/* --- Header Styles --- */
.header {
    background-color: #051B2B; /* Dark */
    padding: 0.5rem max(2rem, calc((100vw - 1200px) / 2));
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative; /* Establishes a base stacking context */
    z-index: 1000;
}
.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}
.header-logo {
    height: 60px;
    width: auto;
}
.brand-text-wrapper {
    color: #F7F9FB;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    line-height: 1.2;
    font-weight: 700;
}
.brand-text-wrapper span {
    display: block;
}
.header-nav {
    display: flex;
    align-items: center;
}
.nav-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}
.nav-item {
    margin-left: 1.5rem;
}
.nav-link {
    text-decoration: none;
    color: #F7F9FB; /* White */
    font-size: 1rem;
    opacity: 0.8;
    transition: opacity 0.2s ease-in-out;
    padding: 5px 0;
}
.nav-link.active {
    opacity: 1;
    color: #1798C1; /* Blue */
}
.nav-link:hover {
    opacity: 1;
}
.cta-button {
    background-color: #1798C1; /* Blue */
    color: #F7F9FB; /* White */
    text-decoration: none;
    padding: 0.75rem 1.25rem;
    border-radius: 6px;
    font-weight: 700;
    margin-left: 2rem;
    transition: all 0.2s ease-in-out;
}
.cta-button:hover {
    background-color: #1380A2; /* Darker Blue */
    transform: scale(1.05);
}

/* --- Mobile Navigation Toggler (Hamburger Icon) --- */
.nav-toggler {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1100; /* Highest z-index to be on top of everything */
    height: 24px;
    width: 30px;
    position: relative; 
}
/* When menu is active, fix the button to the viewport */
.nav-toggler.active {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
}
.toggler-icon {
    display: block;
    width: 100%;
    height: 3px;
    background-color: #F7F9FB;
    margin: 5px 0;
    transition: all 0.4s ease;
    position: relative;
}
.nav-toggler.active .toggler-icon:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.nav-toggler.active .toggler-icon:nth-child(2) {
    opacity: 0;
}
.nav-toggler.active .toggler-icon:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}


/* --- Header Responsive Styles (for Overlay Menu) --- */
@media (max-width: 992px) {
    .header {
        padding: 0.5rem 1.5rem; /* Adjust padding for mobile */
    }
    .nav-toggler { 
        display: block; 
    }
    .header-nav {
        display: none; /* Hide desktop nav by default */
    }
    
    /* Full-screen overlay styles */
    .header-nav.active {
        display: flex;
        position: fixed; /* Take over the full screen */
        z-index: 1099; /* Below the close button */
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(5, 27, 43, 0.98); /* Semi-transparent dark background */
        backdrop-filter: blur(5px);
        justify-content: center;
        align-items: center;
        flex-direction: column;
        transform: translateX(100%); /* Start off-screen */
        transition: transform 0.4s ease-in-out;
    }

    .header-nav.active.open {
        transform: translateX(0); /* Slide in */
    }

    /* Styles for links inside the overlay */
    .header-nav.active .nav-list {
        flex-direction: column;
        align-items: center;
        gap: 2rem; /* Spacing between links */
        margin-bottom: 3rem;
    }
    .header-nav.active .nav-item {
        margin: 0;
    }
    .header-nav.active .nav-link {
        font-size: 1.8rem; /* Larger, more tappable links */
        font-weight: 500;
        opacity: 1;
    }
    .header-nav.active .cta-button {
        font-size: 1.2rem;
        padding: 1rem 2rem;
        margin: 0;
    }
}

/* Prevents page from scrolling when menu is open */
.body-no-scroll {
    overflow: hidden;
}
