/* --- Global Styles --- */
a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

/* --- 1. Announcement Bar Styling (Updated for dynamic height) --- */
.announcement-bar {
    background-color: var(--primary-dark); color: white;
    text-align: center; 
    /* FIX: Use padding and min-height for dynamic expansion on mobile */
    padding: 8px 50px; /* Added horizontal padding for close button */
    min-height: 35px; /* Ensures a minimum height */
    font-size: 14px; font-weight: 500;
    display: flex; justify-content: center; align-items: center;
    position: relative; 
    transition: height 0.3s ease, opacity 0.3s ease;
    flex-wrap: wrap; /* Allows text to wrap */
}
.announcement-bar a { color: white; font-weight: 600; text-decoration: underline; margin-left: 5px; }
.announcement-close-btn {
    position: absolute; right: 15px; background: none; border: none;
    color: white; font-size: 20px; cursor: pointer; line-height: 1; padding: 0 5px;
    opacity: 0.8; transition: opacity 0.2s, transform 0.2s;
}
.announcement-bar.closed { height: 0; opacity: 0; padding: 0; overflow: hidden; }

/* --- 2. Header and Navigation Styling (Desktop) --- */
.header {
    position: sticky; top: 0; z-index: 1000; width: 100%;
    background-color: rgba(255, 255, 255, 0.95); backdrop-filter: blur(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); transition: all 0.3s ease;
    border-bottom: 5px solid var(--primary-dark);
}
.container {
    max-width: 1200px; margin: 0 auto; padding: 10px 20px;
    display: flex; justify-content: space-between; align-items: center;
    color: var(--primary-dark);
}
/* FIXED: Logo Link Wrapper Style (Anchors it to the left) */
.logo-link {
    display: flex;
    align-items: center; 
    color: inherit;
    text-decoration: none;
    /* FIX: margin-right: auto ensures the logo is anchored to the left */
    margin-right: auto;
}
.logo { display: flex; align-items: center; }
.logo img { /* Height is set via dynamic CSS in the PHP file */
    vertical-align: middle; 
}
.nav { display: flex; align-items: center; margin-left: auto; }
.nav-list { display: flex; gap: 40px; margin-right: 20px; }
.nav-item a { font-size: 16px; font-weight: 500; color: var(--primary-dark); padding: 15px 0; display: block; transition: color 0.2s ease; }
.nav-item a:hover { color: var(--primary-dark); }

/* Dropdown Menu Styling (Desktop - Hover Activated) */
.has-dropdown { position: relative; }
.dropdown-menu {
    position: absolute; top: 100%; left: 50%;
    transform: translateX(-50%) translateY(10px); background-color: var(--background-white);
    min-width: 200px; box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1); border-radius: 6px;
    padding: 0; 
    z-index: 10; opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
}
.dropdown-menu .sub-menu { /* Target the standard WordPress UL */
    padding: 10px 0; 
}
.dropdown-menu .sub-menu li { /* Ensure sub-menu list items don't inherit main menu border/styles */
    border-bottom: none !important;
    padding: 0;
}
.has-dropdown:hover .dropdown-menu { opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0); }
.dropdown-menu a { 
    color: var(--primary-dark); padding: 10px 20px; display: block; white-space: nowrap; 
    font-size: 15px; font-weight: 400; line-height: 1.2;
}
.dropdown-menu a:hover { background-color: var(--light-gray); color: var(--primary-dark); }

/* --- 3. CTA Button Styling (Desktop Animation) --- */
.cta-button {
    position: relative; display: inline-block; overflow: visible;
    background-color: var(--background-white); color: var(--primary-dark);
    border: 2px solid var(--primary-dark); border-radius: 5px;
    padding: 10px 20px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;
    z-index: 10; transition: all 0.2s ease-out;
}
.cta-button::before { /* Red Corner Dot */
    content: ""; position: absolute; top: -5px; right: -5px;
    width: 10px; height: 10px; border-radius: 50%; background-color: var(--indicator-red);
    z-index: 15; box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.2);
}
.cta-button::after { /* Offset Layer */
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: -1; transform: translate(0px, 0px); opacity: 0;
    border: 2px solid var(--primary-dark); border-radius: 5px;
    transition: transform 0.2s ease-out, opacity 0.05s linear;
}
.cta-button:hover { color: var(--primary-dark); border-color: var(--primary-dark); transform: translate(2px, 2px); }
.cta-button:hover::after { transform: translate(0px, 0px); opacity: 1; }
.cta-button.initial-offset::after { transform: translate(5px, 5px); opacity: 1; }
.menu-toggle { display: none; background: none; border: none; font-size: 30px; cursor: pointer; color: var(--primary-dark); line-height: 1; }


/* ================================================= */
/* RESPONSIVENESS (MOBILE STYLES)                    */
/* ================================================= */

@media (max-width: 992px) {
    
    /* --- ANNOUNCEMENT BAR MOBILE FIXES --- */
    .announcement-bar {
        padding: 10px 50px; /* Increased padding for better text wrapping */
    }
    .announcement-bar a {
        /* Make the tap target larger on mobile */
        padding: 5px 10px; 
        display: inline-block;
        font-size: 15px;
    }
    /* --- END ANNOUNCEMENT BAR FIXES --- */
    
    .header {
        border-bottom: none;
    }

    .container { flex-wrap: wrap; }
    .menu-toggle { display: block; order: 2; }
    .logo-link { order: 1; margin-right: 0; } /* Reset margin on mobile */

    /* Navigation Container */
    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        margin-left: initial;
        padding-top: 0;
        order: 3;
    }

    .nav.mobile-menu-open {
        display: flex;
        background-color: var(--background-white);
        border-top: 1px solid var(--light-gray);
        padding-bottom: 20px;
    }

    .nav-list {
        flex-direction: column; align-items: flex-start; gap: 0;
        width: 100%; margin: 0; padding: 0;
    }

    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--light-gray);
    }
    
    .nav-item a {
        padding: 15px 20px;
        font-size: 17px;
        line-height: 1.4;
        cursor: pointer;
    }
    
    /* Submenu Items Collapsed by Default (Mobile) */
    .dropdown-menu {
        position: relative;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        background-color: var(--light-gray);
        padding: 0;
        visibility: visible;
        opacity: 1;
        width: 100%;
        display: block;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease-in-out;
    }
    .dropdown-menu .sub-menu {
        padding: 0;
        margin: 0;
    }
    
    .has-dropdown.expanded .dropdown-menu {
        max-height: 500px;
        padding: 0 0 10px 0;
    }

    .dropdown-menu a {
        padding: 10px 40px;
        font-size: 15px;
        line-height: 1.3;
    }

    /* Simplified Mobile CTA Button */
    .nav .cta-button {
        background-color: var(--primary-dark);
        color: var(--background-white);
        border: 2px solid var(--primary-dark);
        width: calc(100% - 40px);
        text-align: center;
        margin: 20px 20px 0 20px;
        transform: none !important;
        
        &::after,
        &::before { display: none; }
    }
}