/* Importing a custom font from Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Open+Sans:wght@700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@700&display=swap');


/* General reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.5;
    color: white;
}



h1.content-h1 {
    text-align: center;
    margin-top: 14.2px; /* Reduced space above the H1 */
    margin-bottom: 20px; /* Reduced space below the H1 */
    padding: 5px 0; /* Slight padding for visual comfort */
    font-size: 1.41rem; /* Slightly smaller font size */
    color: black;
}


.page_intro_text {

margin: 0 auto;

}

.front_page_description {
    
    text-align: left;
    width: 581.6px;
    font-size: 1.18rem; /* Slightly smaller font size */
    color: black;
    
}

.front_page_description a {
    color: #00007D; /* Theme color for links */
    text-decoration: none; /* Underline for clarity that it is a link */
    
}

.front_page_description a:hover {
    text-decoration: underline; /* Underline for clarity that it is a link */    
}


#orderSelect {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 14px;
    cursor: pointer;
    width: 233.2px; /* Adjust the width as needed */
    margin: 0 auto; /* Center horizontally */
    text-align: center;
    position: relative; /* Position relative for the dropdown arrow */
}

/* Style for dropdown arrow */
#orderSelect:after {
    content: '\25BC';  /* Unicode character for down arrow */
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
}





.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
}


/* Header styles */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #ffffff;
    padding: 0.5rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.site-branding {
    display: flex;
    align-items: center;
}

.logo-link {
    display: block;
}

.site-logo {
    height: 41.8px;
    width: auto;
}

.nav-search-container {
    display: flex;
    align-items: center;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Base Navigation styles */
nav.category-bar {
    display: flex;
    align-items: center;
    margin-right: 20px;
}

nav.category-bar ul {
    list-style: none;
    display: flex;
    justify-content: center; /* Center the navigation items */
    padding: 0;
    margin: 0;
}



nav.category-bar ul li {
    position: relative;
    padding: 5px 0; /* Reduced from 10px */
    margin: 0 12px;     
}

nav.category-bar ul li a {
    color: #333333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 10px 0;
}

/* Active link style */
nav.category-bar ul li.active a {
    color: #007B9A;
    position: relative;
}

nav.category-bar ul li.active a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #007B9A;
}

/* Hover and focus styles for links */
nav.category-bar ul li a:hover,
nav.category-bar ul li a:focus {
    color: #007B9A;
}

nav.category-bar ul li .submenu {
    display: none;
    position: absolute;
    left: 50%;
    top: 100%;
    transform: translateX(-50%);
    background: #ffffff;
    border-radius: 4px;
    padding: 5px 0;
    min-width: 150px;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

nav.category-bar ul li .submenu li {
    display: block;
    padding: 0;
    margin: 0;
    text-align: left;
}

nav.category-bar ul li .submenu li a {
    color: #333333;
    padding: 8px 15px;
    display: block;
    font-weight: normal;
}

/* Hover and focus styles for submenu links */
nav.category-bar ul li .submenu li a:hover,
nav.category-bar ul li .submenu li a:focus {
    background-color: #f5f5f5;
    color: #007B9A;
}

/* Show submenu on hover */
nav.category-bar ul li:hover .submenu {
    display: block;
}

/* Search form */
.search_form {
    position: relative;
    display: flex;
    align-items: center;
}

.search-bar {
    border: 1px solid #e0e0e0;
    padding: 6px 32px 6px 12px; /* Reduced from 8px to 6px */
    font-size: 13px; /* Slightly smaller font */
    width: 180px;
    background-color: #f8f8f8;
    border-radius: 5px;
}

.search-bar:focus {
    outline: none;
    border-color: #007B9A;
    color: #007B9A;
}

.button_search {
    background: url('images/magnifying_glass.png') no-repeat center center;
    background-size: 16px;
    width: 24px;
    height: 24px;
    border: none;
    position: absolute;
    right: 8px;
    cursor: pointer;
    opacity: 0.7;
}

.button_search:hover {
    opacity: 1;
}

/* Hide secondary search form */
.search_form_2 {
    display: none;
}




@media (max-width: 1134px) { /* Adjust breakpoint as needed */
  .search_form {
    display: none;
  }
  
  
  
    .search_form_2 {
display: flex;
flex-direction: row;


gap: 1.104%;
    position: absolute;
    right: 0.32%;



    }  
    
    
.search-bar_2 {
    height: 24.25px;
    width: 124.2px;    
    background-color: #f8f8f8; /* Light background for contrast */
    border-radius: 5.41px; /* Soft rounded corners */

}    


.search-bar_2:focus {
    color: #007B9A; /* Or another high-contrast color */
}






.button_search_2 {

  width: 24.25px;        /* Adjust based on desired size */
  height: 24.25px;       /* Same dimension as width */
     cursor: pointer;
    border-radius: 5.41px; /* Soft rounded corners */
   
}



.button_search_2::before {
  content: ''; 
  width: 16.9px;  /* Adjust as needed */
  height: 16.9px; /* Adjust as needed */
  background-image: url('images/magnifying_glass.png');
  background-repeat: no-repeat;
  background-size: contain;  /* Important adjustment */
  background-position: center;
  display: block;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

}



/* Main content styles */
main.content-field {
    padding: 20px 0;
}

#start_here {
    text-align: center;
    display: block;
    margin: 0;
    padding: 10px;
}

#start_here a {
    font-size: 18px;
    color: #1f361d;
    text-decoration: none;
}

#start_here a:hover {
    color: #3a8a34;
    text-decoration: underline;
}



#articles-container {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px; /* Adjust the gap as needed */
    justify-content: center; /* Center the cards in the container */
    padding: 20px; /* Add some padding around the cards */
}



.article-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 0 1 calc(50% - 20px); /* Adjust the percentage to control width */
    height: 400px; /* Fixed height for square look */
    border: 1px solid #ddd; /* A light border for the card */
    border-radius: 10px; /* softer rounded corners */
    overflow: hidden; /* Ensures the content fits within the rounded corners */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); /* A subtle shadow for depth */
    background-color: #fff; /* White background for the card */
    position: relative; /* Needed for absolute positioning of the fade effect */
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for hover effect */
}

.article-card:hover {
    transform: translateY(-1.79px); /* slight upward lift */
    box-shadow: 0 10px 20px rgba(0,0,0,0.12), 0 5px 5px rgba(0,0,0,0.24); /* more pronounced shadow */
}

.article-card-content {
    padding: 15px; /* roomier padding */
    height: calc(100% - 50px); /* Adjust height based on the total height of the card minus footer height */
    overflow: hidden; /* Hide overflow content */
}



.article-card-image {
    width: 100%;
    height: 200px; /* or whatever height you desire */
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat; /* This ensures the image does not repeat */  
    cursor: pointer;     
}



.article-card h3 {
    margin-bottom: 10px; /* adds space below the title */
    font-size: 1.25rem; /* slightly larger title */
    color: black; /* darker color for better legibility */
}

.article-card p {
    font-size: 1rem;
    color: black; /* slightly lighter than the title for hierarchy */
    line-height: 1.5; /* improved line spacing for readability */
    position: relative;    
}

.article-card::after {
    content: '';
    position: absolute;
    bottom: 50px; /* position at the bottom of the content area, above the footer */
    left: 0;
    width: 100%;
    height: 120px; /* height of the fade effect */
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1)); /* fade effect */
    pointer-events: none; /* ensure the fade doesn't interfere with clicking */
}

.article-card-footer {
    padding: 10px 15px; /* consistent padding with the content */
    background-color: #f8f8f8; /* lighter background to distinguish the footer */
    text-align: center; /* centers the Read More button */
    position: absolute; /* position at the bottom of the card */
    bottom: 0;
    width: 100%;
    box-sizing: border-box; /* This ensures that padding is included in the width */    
}

.article-card .read-more {
    display: block; /* Make the link a block to have padding */
    padding: 10px 20px; /* Larger clickable area */
    font-weight: bold; /* Makes the button text stand out */
    background-color: #1f361d; /* Dark Green for the button background */
    color: #FFFFFF; /* White for the text */
    text-decoration: none; /* No underline by default */
    transition: background-color 0.3s ease; /* Smooth transition for background color */
    border-radius: 0 0 8px 8px; /* Maintain the rounded corners at the bottom */
}

.article-card .read-more:hover,
.article-card .read-more:focus {
    background-color: #3a8a34; /* Medium Green for the hover effect */
    text-decoration: underline; /* Underline the text on hover */
    transform: none; /* No transformation on hover */
    box-shadow: none; /* No shadow on hover */
}



.you_may_also_like {
    color: black;
    margin-top: 41px;
    margin-bottom: 3px;    
    text-align: center;
}


/* Footer styles */
footer {
    background-color: #333333; /* Dark grey for a sophisticated look */
    color: white; /* Keep the text legible */
    text-align: center;
    padding: 40px 0; /* Increased padding */    
}

footer p {
    font-size: 1rem; /* Responsive font size */
}

footer a {
    color: #007B9A;
}


/* Article page styling */

.content-field {
    width: 80%; /* Adjust the width to your preference */
    max-width: 800px; /* Sets a maximum width for the content to not stretch too wide on large screens */
    margin: 40px auto; /* Centers the content and adds vertical spacing */
    padding: 20px; /* Adds padding inside the content area */
    background-color: white; /* A soft off-white background color */
    display: grid;   
}

.article-page {
    justify-self: center;
    align-self: center;    
    width: 581.6px; 
    
    
}

@media(max-width: 624.3px) {

.article-page {
   
width: 97.4%; 
    
    
}

.front_page_description {
    
width: 97.4%;
    
}  
    
}

.article-page h2 {
    font-size: 2.36rem; /* Larger font size for main headings */
    color: black; /* Dark grey color for better readability */
    line-height: 1.5; /* Line height for clear readability */
    text-align: center;
}

.article-page h3 {
    font-size: 1.32rem; /* Distinguished font size for subheadings */
    color: black; /* Slightly lighter than h2 for visual hierarchy */
    line-height: 1.5; /* Line height for clear readability */
    text-align: center;    
}

.article-page h4 {
    font-size: 1.18rem; /* Distinguished font size for subheadings */
    color: black; /* Slightly lighter than h2 for visual hierarchy */
    line-height: 1.5; /* Line height for clear readability */
    text-align: center;    
      
}


.article-page p, .article-page ul, .article-page ol {
    font-size: 1.18rem; /* Comfortable font size for reading */
    color: black; /* A softer color than the headings */
    line-height: 1.5; /* Increased line height for readability */
   
}

.article-page p a, .article-page figcaption a {
    color: #00007D; /* Theme color for links */
    text-decoration: none; /* Underline for clarity that it is a link */
    
}

.article-page p a:hover, .article-page figcaption a:hover {
    text-decoration: underline; /* Underline for clarity that it is a link */    
}

.article-page a h3:hover {
    text-decoration: none; /* Underline for clarity that it is a link */    
}

.article-page img {
    max-width: 100%; /* Ensures image is not larger than its container */
    height: auto; /* Maintains aspect ratio */ 
}

.article-page figure {
    text-align: center; /* Centers images and captions */
}

.article-page figcaption {
    font-size: 1.084rem; /* Smaller font size for image captions */
    color: #777; /* A grey color that is lighter than the main text */

}

ul {
    list-style-type: disc; /* Ensure bullets are shown */
    padding-left: 20px; /* Ensure there's space for bullets */
}

@media (max-width: 600px) {
    ul {
        list-style-type: disc; /* Reiterate bullet style for small screens */
        padding-left: 20px; /* Adjust padding if necessary */
    }
}


.card-container {
    text-align: left; /* Aligns the inline-block elements to the left */
    margin-left: 0;
    margin-right: auto;
    padding: 10px; /* Adjusts space inside the container around the cards */
    background-color: #ffffff; /* Ensures the background of the cards is white */
}

.card {
    display: inline-block; /* Inline-block for inline flow with block features */
    width: 82.6px; /* Fixed width for each card */
    height: auto;
    margin-right: 10.5px; /* Adjust this value as needed to set the spacing between cards */
    box-shadow: 0px 0px 5px rgba(0, 0, 0, 0.2); /* Adds a subtle shadow to each card for depth */
    background-color: #ffffff; /* Ensures the card background is white */
    border-radius: 5px; /* Optional: adds rounded corners to the cards */
    border: 1px solid black; /* Adds a border around each card */
}

/* Use last-child to remove margin from the last card */
.card:last-child {
    margin-right: 0;
}


.quiz-button-container {
    text-align: center; /* Center-align the button container */
    padding: 10px; /* Add some padding around the buttons */
}

.quiz-button {
    background-color: #2e8b57; /* Casino felt green */
    color: white;
    border: 2px solid #276749; /* Slightly darker border for depth */
    padding: 15px 30px; /* Larger padding for a bigger button */
    margin: 15px 10px; /* Space around the button */
    border-radius: 8px; /* Rounded corners */
    cursor: pointer;
    font-size: 1.182rem;
    display: inline-block; /* Align buttons next to each other */
    text-align: center; /* Center the text inside the button */
    min-width: 220px; /* Minimum width to handle longer text */
    box-shadow: 0 4px #1c5a38; /* Shadow effect to give depth, darker shade of the button color */
    transition: all 0.3s ease; /* Transition for the hover effect */
    vertical-align: top; /* Aligns buttons if they wrap to next line */
}

.quiz-button:hover, .quiz-button:focus {
    background-color: #3cb371; /* Lighter green for hover/focus */
    box-shadow: 0 2px #1c5a38; /* Shorter shadow for a 'pressed' effect */
    transform: translateY(2px); /* Moves button down instead of up */
}


/* To handle spacing and alignment, wrap buttons in a container */
.quiz-button-container {
    text-align: center; /* Center-align the button container */
}

/* Clear the float if you have other elements around */
.clearfix::after {
    content: "";
    clear: both;
    display: table;
}

.fade-in {
  opacity: 0;
  visibility: hidden; /* Ensures the element does not block interactions while invisible */
  transition: visibility 0s linear 0.68s, opacity 0.68s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-in.visible {
  visibility: visible;
  opacity: 1;
  transition: opacity 0.68s cubic-bezier(0.4, 0, 0.2, 1);
}


.youtubevid {

position: relative;
padding-bottom: 56.25%;
padding-top: 30px; height: 0; overflow: hidden;
margin-bottom: 4.26%;
}
 
.youtubevid iframe,
.youtubevid object,
.youtubevid embed {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
}



.image-container {
    display: flex; /* Use flexbox for layout */
}

.figure {
    margin-right: 8.2px; /* Add some space between images */
}



#tocButton {
    position: fixed; 
    top: 0px;  
    left: 50%;      
    transform: translateX(-50%); 
    z-index: 1000;  
    width: 46.127px;
    height: 46.127px;    
    background-color: #1f361d; 
    color: white;
    border: none;
    border-radius: 12.3%; 
    cursor: pointer;
    display: none;
    opacity: 0.237;           /* Start hidden */
}




#tocContainer {
    position: fixed; /* Updated to fixed positioning */ 
    top: 20px;          /* Matching the top position of the button */
    left: 50%;          /* Position at 50% of the page width */
    transform: translateX(-50%); /* Shift left by half of the container's width */
    background-color: white;
    border: 1px solid #ddd;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    padding: 20px;
    max-width: 300px; 
    z-index: 1000; 
    display: none;


  
}

#tocButton:hover {
    opacity: 1; /* Fully opaque on hover */
    background-color: #3a8a34;    
}

/* Styles remain the same for #tocContainer ul, #tocContainer li, and #tocContainer a */


#tocContainer ul {
    list-style: none;
    padding: 0;
}

#tocContainer li {
    margin-bottom: 5px;
}

#tocContainer a {
    display: block; /* Make links full-width blocks */
    color: black;
    text-decoration: none;
}

#tocContainer a:hover {
    background-color: #e8e8e8; /* Subtle background highlight */
    text-decoration: underline;  
}





/* Style for tags */
.article-tags {
    margin-top: 34px; /* Add some space between the article content and tags */
}

.article-tags h3 {
    font-size: 1rem; /* Smaller font size for the tags heading */
    margin-bottom: 5px; /* Add a small space below the heading */
    color: #1f361d; /* Define the color for the tags */    
}

.article-tags ul {
    list-style: none; /* Remove default list styles */
    padding: 0; /* Remove default padding */
    margin: 0; /* Remove default margin */
}

.article-tags ul li {
    display: inline-block; /* Display tags inline */
    margin-right: 10px; /* Add space between tags */
}

.article-tags a {
    font-size: 1rem; /* Smaller font size for the tags */
    color: #1f361d; /* Define the color for the tags */
    text-decoration: none; /* Remove underline */
    transition: color 0.3s ease; /* Smooth color transition for hover effect */    
}

.article-tags a:hover {
    color: #3a8a34; /* Define the color for the tags on hover */
    text-decoration: underline; /* Underline on hover */
}

.backtotop, .loading-indicator {
    font-size: 1.21rem;
    display: block;
    text-align: center;
    margin-top: 31px; /* Adjust the distance from the content */
    margin-bottom: -16px; /* Add some space between the link and the tags */
    color: #1f361d;
    text-decoration: underline;
}

.backtotop:hover {
    color: #3a8a34;    
}





/* Media queries for responsiveness */
@media(max-width: 768px) {
    /* Adjust header styles for mobile */
    header {
        height: auto; /* Allow header to adjust to content height */
        padding: 15px; /* Consistent padding */
        background-position: center 30%;
        flex-direction: column; /* Stack logo and nav vertically */
    }

    .site-branding {
        margin-bottom: 15px; /* Space between logo and navigation */
    }

    .site-logo {
        height: 50px; /* Slightly larger logo */
    }

    .nav-search-container {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    /* Stack the navigation items vertically for mobile */
    nav.category-bar {
        width: 100%;
        margin-right: 0;
    }

    nav.category-bar ul {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 10px;
    }
    
    /* Style navigation links for mobile */
    nav.category-bar ul li {
        display: block;
        width: 100%;
        text-align: left;
        margin: 0;
        padding: 0;
    }
    
    nav.category-bar ul li a {
        display: block;
        width: 100%;
        box-sizing: border-box;
        padding: 12px 15px;
        font-size: 1.2rem;
        text-align: left;
    }
    
    nav.category-bar ul li .submenu {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        text-align: left;
        left: 0;
        transform: none;
        min-width: auto;
        box-shadow: none;
        position: static;
        margin-left: 20px;
        background: #f5f5f5;
        border-radius: 0;
    }
    
    nav.category-bar ul li .submenu li {
        display: block;
        justify-content: flex-start;
        padding: 0;
        width: 100%;
        text-align: left;
    }

    nav.category-bar ul li .submenu li a {
        padding: 10px 15px;
        font-size: 1.1rem;
    }
    
    /* Touch-friendly mobile navigation */
    nav.category-bar ul li a.clicked + .submenu {
        display: block !important; /* Added !important to override any other display values */
    }
    
    /* Keep the focus behavior for accessibility */
    nav.category-bar ul li:focus-within .submenu {
        display: block;
    }
    
    

    .search_form {
        margin-top: 15px;
        width: 100%;
    }

    .search-bar {
        width: 100%;
    }
    
    .content-field {
        width: 97.4%;
        padding: 0 0;
    }    
    
    .article-card {
        flex: 0 1 100%;
        aspect-ratio: auto;
        width: 100%;
    }    

    /* Adjust footer styles for mobile */
    footer {
        font-size: 1rem;
        padding: 20px 10px;
        text-align: center;
    }
    
    
    /* New styles for collapsible header */
    body {
        overflow-x: hidden; /* Prevent horizontal scroll */
    }
    
    header {
        will-change: transform; /* Performance optimization */
    }
    
    /* Add a small button to manually show header when needed */
    .show-header-button {
        display: none;
        position: fixed;
        top: 5px;
        right: 5px;
        z-index: 1001;
        width: 30px;
        height: 30px;
        background-color: rgba(31, 54, 29, 0.7);
        color: white;
        border-radius: 50%;
        border: none;
        font-size: 18px;
        line-height: 30px;
        text-align: center;
        opacity: 0;
        transition: opacity 0.3s;
    }
    
    .header-hidden .show-header-button {
        display: block;
        opacity: 1;
    }    
    
    
}