/* --- FINAL, VETTED STYLES FOR HEADER & MOBILE MENU --- */

/* ---- 1. Header Bar ---- */
header {
    background: #fff;
    border-bottom: 0px solid #e9ecef;
    padding: 15px 0;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 900;
}
body {
    padding-top: 76px; /* Space for the fixed header */
}
header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0;
}
header .logo-image {
    max-height: 45px;
}

/* ---- 2. Desktop Navigation ---- */
header nav {
    display: flex;
    align-items: center;
    height: 45px;
}
header nav ul { padding: 0; margin: 0; list-style: none; }
header nav ul li { display: inline; margin-left: 30px; }
header nav ul li a {
    font-family: 'Arial', sans-serif;
    font-weight: 700;
    font-size: 14px;
    color: #333;
    text-decoration: none;
}
header nav ul li a:hover { color: #007bff; }

/* ---- 3. Mobile Navigation (Hamburger & Overlay) ---- */
.hamburger-menu { display: none; }
.mobile-nav-overlay {
    position: fixed; top: 0; left: 0;
    height: 100vh; width: 100vw;
    background-color: #333333 !important;
    z-index: 1000;
    display: flex; flex-direction: column;
    align-items: flex-start; justify-content: flex-start;
    padding: 30px 10%;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-nav-overlay.show { opacity: 1; visibility: visible; }
.close-menu-btn {
    position: absolute; top: 15px; right: 25px;
    font-size: 45px; color: white !important; /* Force color to white */
    text-decoration: none; line-height: 1;
    display: block !important; /* Force visibility */
}
.mobile-nav-overlay .menu-logo { max-height: 46px; margin-bottom: 50px; }
.mobile-nav-overlay nav { width: 100%; }
.mobile-nav-overlay nav ul { list-style: none; padding: 0; margin: 0; text-align: left; }
.mobile-nav-overlay nav ul li { padding: 10px 0; border-bottom: 1px solid #4a627a; }
.mobile-nav-overlay nav ul li:first-child { border-top: 1px solid #4a627a; }
.mobile-nav-overlay nav ul li a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 18px;
    color: #fff;
    display: block;
}

/* This media query shows/hides the correct menu */
@media (max-width: 768px) {
    header nav { display: none; }
    .hamburger-menu {
        display: block; font-size: 30px;
        color: #333; background: none;
        border: none; cursor: pointer;
    }
}

/* --- PATCH TO STYLE THE NEW 'CLOSE MENU' BUTTON --- */

/* First, remove the old, non-working style for the 'X' icon */
.mobile-nav-overlay .close-menu-btn {
    display: none; /* This hides the old 'X' completely */
}

/* Now, style the new list item that contains our button */
.mobile-nav-overlay nav ul li.close-menu-button-li {
    margin-top: 30px; /* Add space above the button */
    border: none; /* Remove any lines around the button */
    padding: 0;
}

/* Finally, style the link itself to look like a button */
.mobile-nav-overlay nav ul li.close-menu-button-li a {
    background-color: #6c757d; /* A neutral grey background */
    text-align: center;
    border-radius: 5px;
    font-size: 16px !important; /* Smaller, button-like font size */
    padding: 12px 0 !important;
    transition: background-color 0.2s ease;
}

.mobile-nav-overlay nav ul li.close-menu-button-li a:hover {
    background-color: #5a6268;
}

/* --- PATCH TO STYLE THE 'CLOSE MENU' BUTTON --- */

/* This styles the list item that contains our button */
.mobile-nav-overlay nav ul li.close-menu-button-li {
    margin-top: 20px; /* Adds space above the button */
    border: none; /* Removes any lines around the button */
}

/* This styles the link itself to look like a button */
.mobile-nav-overlay nav ul li.close-menu-button-li a {
    background-color: #6c757d; /* A neutral grey background */
    text-align: center;
    border-radius: 5px;
    font-size: 16px !important;
    padding: 12px 0 !important;
    transition: background-color 0.2s ease;
}

.mobile-nav-overlay nav ul li.close-menu-button-li a:hover {
    background-color: #5a6268;
}
 
/* --- Styles for the new visible mobile close button --- */

/* This hides the original button so it doesn't get in the way */
#main-close-btn {
    display: none;
}

/* This styles your new visible button */
.visible-close-button {
    position: absolute;
    top: 15px;
    right: 20px;
    width: 40px;
    height: 40px;
    background-color: rgba(0, 0, 0, 0.2); /* A semi-transparent square background */
    border-radius: 8px;
    
    /* Styles for the 'X' inside */
    color: #ffffff;
    font-size: 32px;
    font-weight: bold;
    text-align: center;
    line-height: 40px; /* Vertically centers the 'X' */
    cursor: pointer;
    z-index: 1002; /* Ensures it appears on top */
    transition: background-color 0.2s;
}

.visible-close-button:hover {
    background-color: rgba(0, 0, 0, 0.4); /* Darker on hover */
}

/* --- Homepage Hero Slider Styles --- */

#hero-carousel {
    height: 60vh; /* Sets the slider height to 60% of the viewport height */
    min-height: 400px;
}

#hero-carousel .carousel-item {
    height: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}

#hero-carousel .carousel-caption {
    /* This adds a semi-transparent dark overlay to make text readable */
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 10px;
    padding: 2rem;
    bottom: 10%; /* Positions the text box up from the bottom */
}

#hero-carousel .carousel-caption h1 {
    font-size: 3rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

#hero-carousel .carousel-caption p {
    font-size: 1.25rem;
}

/* On smaller screens, make the text a bit smaller */
@media (max-width: 768px) {
    #hero-carousel .carousel-caption h1 {
        font-size: 2rem;
    }
    #hero-carousel .carousel-caption p {
        font-size: 1rem;
    }
    #hero-carousel {
        height: 50vh;
        min-height: 300px;
    }
}

/* --- Custom Menu Font & Style Patch --- */

/* Part 1: Change the font for all menu links (desktop and mobile) */
/* This uses the 'Montserrat' font we already added for the slider for consistency. */
.desktop-nav ul li a,
.mobile-nav-overlay nav ul li a {
    font-family: 'Arial', sans-serif;
    font-weight: 700; /* Makes the font bold. Use 400 for regular weight. */
}

/* Part 2: Make the text uppercase ONLY on mobile screens */
@media (max-width: 992px) { /* This targets tablets and phones */
    .mobile-nav-overlay nav ul li a {
        text-transform: uppercase;
        letter-spacing: 1px; /* Adds a little space between letters for readability */
    }
}

/* --- NEW STYLE FOR SQUARE HAMBURGER MENU ICON --- */

.hamburger-menu {
    /* Box Styling */
    width: 42px;              /* Fixed width */
    height: 42px;             /* Fixed height */
    border: 2px solid #333;   /* Default dark border */
    border-radius: 7px;       /* Slightly rounded corners for a modern square */
    
    /* Icon Alignment & Sizing */
    display: flex !important; /* This ensures perfect centering */
    align-items: center;
    justify-content: center;
    font-size: 24px;          /* Optimized icon size for the box */
    padding: 0;               /* Reset default padding */
    
    /* Effects */
    transition: background-color 0.2s ease;
}

/* Adds a subtle background color on hover */
.hamburger-menu:hover {
    background-color: #f0f0f0;
}

/* --- NEW SLEEK MOBILE MENU STYLES --- */
.mobile-nav-overlay nav {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center; /* This vertically centers the menu */
    align-items: center; /* This horizontally centers the menu */
    padding-bottom: 50px; /* Pushes menu up from the bottom edge */
}

.mobile-nav-overlay nav ul {
    text-align: center; /* Ensures text is centered */
}

.mobile-nav-overlay nav ul li a {
    font-size: 1.5rem; /* A smaller, sleeker font size */
    padding: 15px 0; /* Adds vertical spacing between links */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: none; /* Removes any previous borders */
}

/* Style for the "Close Menu" button */
.close-menu-li {
    margin-top: 30px;
    padding-top: 0;
    border-top: none;
}

.close-menu-li a {
    font-size: 1rem !important; /* Make it smaller than the nav links */
    font-weight: 400 !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    padding: 10px 25px !important;
    color: rgba(255, 255, 255, 0.8);
}

.close-menu-li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* --- FINAL HEADER & MOBILE MENU STYLES --- */

/* Part 1: Hide the desktop text links, but keep icons and hamburger */
@media (min-width: 993px) {
    header .header-actions nav {
        display: none; /* Hides the text links */
    }
    header .hamburger-menu {
        display: flex; /* Ensures the hamburger is visible */
    }
}

/* Part 2: Fix the hamburger icon's appearance */
.hamburger-menu {
    background-color: transparent !important; /* Removes the white box fill */
    color: #333; /* Ensures the three lines are visible (dark) */
    border: 1px solid #ddd; /* Adds a sleek border */
    border-radius: 5px;
    padding: 5px 8px;
}
/* On the homepage, make the hamburger lines white */
body.home .hamburger-menu {
    color: #fff !important;
    border-color: rgba(255, 255, 255, 0.7) !important;
}


/* Part 3: Change the mobile slide-in menu background color */
.mobile-nav-overlay {
    background-color: #333333; /* The dark header color you wanted */
}

