:root {
    --primary-red: #A6192E;
    --primary-navy: #002344;
    --primary-gold: #E89923;
    --dark-gray: #45474A;
    --hover-red: #920322;
    --white: #ffffff;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Offsets the scroll to account for the sticky header */
}

body {
    margin: 0;
    font-family: Helvetica, Arial, sans-serif;
}

#header-placeholder {
    display: contents;
}

/* --- Base Header Settings --- */
.main-header {
    background-color: var(--white);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- Left Section --- */
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
}

.hamburger-menu {
    display: none;
}

.logo-link {
    display: flex;
    align-items: center;
}

.header-logo {
    height: 60px;
    width: auto;
}

.header-label {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-red);
    white-space: nowrap;
}

/* --- Center Section: Desktop Nav --- */
.header-center {
    display: flex;
    justify-content: center;
    flex: 0 1 auto;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.nav-links a, .mobile-nav-links a, .mobile-language a {
    text-decoration: none;
    color: var(--dark-gray);
    font-weight: bold;
    font-size: 1rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after, .mobile-language a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--hover-red);
    transition: width 0.3s ease;
}

.nav-links a:hover, .mobile-nav-links a:hover, .mobile-language a:hover {
    color: var(--hover-red);
    text-decoration: none;
}

.nav-links a:hover::after, .mobile-language a:hover::after {
    width: 100%;
}

.nav-links a.active, .mobile-nav-links a.active {
    color: var(--primary-red);
}

.nav-links a.active::after {
    width: 100%;
}

.nav-links .nav-icon {
    display: none;
}

/* --- Right Section: Language Dropdown --- */
.header-right {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex: 1;
}

.language-dropdown {
    position: relative;
}

.dropdown-toggle {
    background: none;
    border: none;
    color: var(--dark-gray);
    font-weight: bold;
    cursor: pointer;
    font-size: 1rem;
    padding: 10px;
}

.dropdown-toggle:hover {
    color: var(--hover-red);
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--white);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    list-style: none;
    padding: 10px 0;
    margin: 0;
    min-width: 120px;
    border: 1px solid #eee;
}

.language-dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu li a {
    display: block;
    padding: 8px 20px;
    text-decoration: none;
    color: var(--dark-gray);
}

.dropdown-menu li a:hover {
    background-color: #f9f9f9;
    color: var(--hover-red);
    text-decoration: underline;
}

/* --- Hidden Elements by Default --- */
.mobile-menu-overlay,
.mobile-menu {
    display: none;
}

/* --- Header CTA Button --- */
.btn-header-cta {
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: bold;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-align: center;
    background-color: var(--primary-red);
    color: var(--white);
    border: 2px solid var(--primary-red);
    margin-left: 20px;
}

.btn-header-cta:hover {
    background-color: var(--hover-red);
    border-color: var(--hover-red);
}

/* --- Mobile Mode (Max-width 1024px) --- */
@media (max-width: 1024px) {
    .header-container {
        position: relative;
        justify-content: flex-end;
        padding-top: 40px;
        padding-bottom: 40px;
    }

    .header-center,
    .desktop-only {
        display: none;
    }

    .header-left {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        flex: none;
        width: auto;
    }

    .header-right {
        flex: 0 1 auto;
    }

    .btn-header-cta {
        display: none; /* Hide CTA on mobile header, it can be added to the slide-in menu if needed */
    }

    .hamburger-menu {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 22px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
    }

    .hamburger-menu span {
        width: 100%;
        height: 3px;
        background-color: var(--dark-gray);
        border-radius: 2px;
    }

    .header-logo {
        height: 70px;
    }

    .header-label {
        display: none;
    }

    /* --- Mobile Slide-in Menu Elements --- */
    .mobile-menu-overlay {
        display: block;
        position: fixed;
        top: 0; left: 0; width: 100%; height: 100vh;
        background: rgba(0,0,0,0.5);
        z-index: 1500;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease;
    }

    .mobile-menu-overlay.open {
        opacity: 1;
        visibility: visible;
    }

    .mobile-menu {
        display: block;
        position: fixed;
        top: 0; right: -300px; left: auto;
        width: 260px; height: 100vh;
        background-color: var(--white);
        box-shadow: -2px 0 8px rgba(0,0,0,0.2);
        z-index: 2000;
        transition: right 0.3s ease;
        overflow-y: auto;
        padding: 25px 20px;
        box-sizing: border-box;
    }

    .mobile-menu.open {
        right: 0;
        left: auto;
    }

    .mobile-menu-header {
        display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 20px;
    }

    .mobile-logo { height: 80px; width: auto; }

    .close-menu {
        background: none; border: none; font-size: 32px;
        cursor: pointer; color: var(--dark-gray); line-height: 1; padding: 0;
    }

    .brand-title {
        color: var(--primary-red);
        font-weight: bold; font-size: 1.25rem; line-height: 1.3; margin-bottom: 5px;
    }

    .brand-subtitle {
        color: var(--dark-gray); font-size: 1rem; margin-bottom: 30px;
    }
    
    .mobile-nav-links { list-style: none; padding: 0; margin: 0 0 30px 0; }
    .mobile-nav-links li { margin-bottom: 5px; }

    .mobile-nav-links .nav-icon {
        display: block;
        margin-right: 10px;
        font-size: 1.4rem;
    }

    .mobile-nav-links a {
        display: flex;
        align-items: center;
        padding: 12px 15px;
        border-left: 4px solid transparent; /* prevents jump layout on active hover */
        box-sizing: border-box;
    }

    .mobile-nav-links .nav-text {
        position: relative;
    }

    .mobile-nav-links .nav-text::after {
        content: '';
        position: absolute;
        bottom: -4px;
        left: 0;
        width: 0;
        height: 2px;
        background-color: var(--hover-red);
        transition: width 0.3s ease;
    }

    .mobile-nav-links a:hover .nav-text::after, .mobile-nav-links a.active .nav-text::after {
        width: 100%;
    }

    .mobile-nav-links a.active {
        color: var(--primary-red);
        background-color: #FFDAD9;
        border-left-color: var(--primary-red);
    }

    .mobile-dropdown-toggle {
        background: none;
        border: none;
        color: var(--dark-gray);
        font-weight: bold;
        font-size: 1.15rem;
        padding: 0;
        cursor: pointer;
        width: 100%;
        text-align: left;
        font-family: inherit;
    }
    
    .mobile-dropdown-toggle:hover {
        color: var(--hover-red);
    }

    .mobile-dropdown-menu {
        list-style: none;
        padding: 0 0 0 15px;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }
    
    .mobile-dropdown-menu.open {
        max-height: 150px;
        padding-top: 10px;
    }
    
    .mobile-dropdown-menu li {
        margin-bottom: 12px;
    }
}

/* --- Footer Styles --- */
.main-footer {
    background-color: #fff;
    color: #222;
    padding: 70px 0 0;
    font-family: Helvetica, Arial, sans-serif;
    margin-top: auto;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
}

/* --- Top Row: Branding and Contact --- */
.footer-top-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 40px;
    margin-bottom: 40px;
}

/* Branding (Left) */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
}

.footer-logo-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
}

.footer-logo {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    object-fit: contain;
    background-color: var(--white);
    padding: 4px;
    box-sizing: border-box;
}

.footer-wordmark {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--primary-red);
    text-transform: uppercase;
    line-height: 1.2;
    font-family: Helvetica, Arial, sans-serif;
}

.footer-tagline {
    font-weight: 300;
    font-size: 1.05rem;
    color: #222;
    margin: 0;
    line-height: 1.6;
}

.footer-socials {
    display: flex;
    gap: 15px;
    margin-top: 5px;
}

.footer-socials a {
    color: #222;
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.footer-socials a:hover {
    color: var(--hover-red);
}

.footer-socials .material-symbols-outlined {
    font-size: 28px;
}

/* Contact Information (Right) */
.footer-contact {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
}

.footer-kicker {
    color: var(--primary-red);
    font-size: 1.15rem;
    font-weight: bold;
    text-transform: uppercase;
    margin: 0 0 5px 0;
    letter-spacing: 1px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #222;
    font-size: 1rem;
}

.contact-icon {
    color: var(--primary-red);
    font-size: 1.4rem;
}

/* --- Middle Row: Navigation Layer --- */
.footer-middle-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 60px; /* Ample white space above the sub-footer */
}

.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.footer-nav li {
    display: inline-block;
}

.footer-nav li a {
    color: #222;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    transition: color 0.3s ease;
}

.footer-nav li a:hover {
    color: var(--primary-red);
}

/* --- Bottom Row: Sub-footer / Legal Bar --- */
.footer-bottom-row {
    background-color: #F0F0F4;
    padding: 20px;
    color: #222;
    font-size: 0.9rem;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.footer-attribution {
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: 1.5px;
    font-size: 0.85rem;
}

.footer-attribution .bullet {
    color: var(--primary-red);
    font-size: 1.2rem;
    line-height: 0;
}

/* --- Mobile Responsiveness --- */
@media (max-width: 768px) {
    .footer-top-row {
        flex-direction: column;
        gap: 50px;
    }

    .footer-contact, .footer-middle-row {
        align-items: flex-start;
        text-align: left;
        justify-content: flex-start;
    }
    
    .footer-nav {
        flex-direction: column;
        gap: 20px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        align-items: flex-start;
    }
}