/* styles/nav.css */

/* Ensure the main container remains transparent over the hero image */
.main-nav {
    background-color: transparent; /* Reverted to transparent */
    border-bottom: none; 
    position: absolute; 
    width: 100%; 
    top: 0;
    left: 0;
    z-index: 1000; 
}

.nav-container {
    max-width: 100%; 
    margin: 0 auto;
    /* 1rem top/bottom for height, 2rem left/right for comfortable spacing */
    padding: 1rem 2rem; 
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Constraints for the new webp logo */
.nav-logo {
    max-height: 120px; 
    width: auto;
    display: block;
}

/* Desktop Links Alignment */
.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0 auto; 
}

/* Update link colors to default to solid black */
.nav-links > li > a {
    font-family: 'Playfair Display', serif; /* Applies the new editorial font */
    color: #8B0000; 
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem; /* Slightly increased for better readability with serifs */
    transition: color 0.3s ease;
}

/* ============================================================
   Homepage Only: Navigation Split-Color Fix
   ============================================================ */
.home-page .nav-links > li > a {
    color: #8B0000; 
    transition: opacity 0.3s ease; 
}

/* Homepage Only: Hover states */
.home-page .nav-links > li > a:hover,
.home-page .nav-links > li > a:focus,
.home-page .nav-links > li > a:active {
    opacity: 0.7; 
}


/* Change link hover, focus, and active states to highlight red */
.nav-links > li > a:hover,
.nav-links > li > a:focus,
.nav-links > li > a:active {
    color: var(--color-accent-red); /* Highlight red on interaction */
}

/* Dropdown Architecture */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-bg-light);
    min-width: 220px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    list-style: none;
    padding: 1rem 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    border-top: 3px solid var(--color-accent-red);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
}

.dropdown-menu li a {
    font-family: 'Playfair Display', serif; /* Applies the new editorial font */
    display: block;
    padding: 0.75rem 1.5rem;
    color: #8B0000; 
    text-decoration: none;
    font-size: 1rem; /* Slightly increased */
    transition: background-color 0.2s, color 0.2s;
}

.dropdown-menu li a:hover {
    background-color: var(--color-bg-alt);
    color: var(--color-accent-red);
}

.arrow {
    font-size: 0.8rem;
    margin-left: 4px;
}

/* Mobile Toggle Button */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.mobile-toggle span {
    width: 25px;
    height: 3px;
    background-color: #000; /* Update mobile hamburger icon to black to match text */
    transition: 0.3s;
}

/* Mobile Responsiveness */
@media (max-width: 992px) {
    .mobile-toggle {
        display: flex;
    }
    
    .nav-links {
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--color-bg-light); /* Mobile menu background */
        padding: 2rem 0;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .dropdown-menu {
        position: relative;
        left: 0;
        transform: none;
        box-shadow: none;
        border-top: none;
        display: none; 
        padding-left: 1.5rem;
        opacity: 1;
        visibility: visible;
    }
    
    .dropdown.active .dropdown-menu {
        display: block;
    }
}

/* ============================================================
   Global Quote Pill Button (Outlined)
   ============================================================ */
.nav-quote-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent; /* Removes the solid fill */
    border: 2px solid #8B0000; /* Adds the deep red outline */
    color: #8B0000; /* Makes the text deep red to match */
    padding: 0.5rem 1.65rem; /* Slightly reduced padding to account for the 2px border */
    border-radius: 50px; 
    font-family: inherit; 
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.3s ease, transform 0.2s ease, color 0.3s ease, border-color 0.3s ease;
    white-space: nowrap;
}

/* Hover Interaction */
.nav-quote-pill:hover,
.nav-quote-pill:focus {
    background-color: #8B0000; /* Fills in with red on hover */
    color: #FFFFFF; /* Text turns white so it remains readable */
    border-color: #8B0000;
    transform: translateY(-2px); /* Keeps the subtle lift */
}

/* Ensure mobile layout doesn't break with the new button */
@media (max-width: 992px) {
    .nav-actions {
        display: none; /* Hide in header on mobile, or move into mobile menu */
    }
    
    /* Option to show it inside the active mobile menu */
    .nav-links.active .nav-actions {
        display: flex;
        justify-content: center;
        margin: 1.5rem 0 0 0;
        padding-top: 1rem;
        border-top: 1px solid rgba(0,0,0,0.1);
    }
}