/* ==========================================
   MODERN HEADER NAVIGATION
   ========================================== */

/* Modern Header Container */
.modern-header {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-header.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.08);
    background: rgba(255, 255, 255, 0.95);
}

.modern-header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

/* Logo / Branding */
.site-branding {
    display: flex;
    align-items: center;
    z-index: 1001;
}

.site-branding .custom-logo-link {
    display: flex;
    align-items: center;
    transition: opacity 0.3s ease;
}

.site-branding .custom-logo-link:hover {
    opacity: 0.8;
}

.site-branding .custom-logo {
    height: 45px;
    width: auto;
    max-width: 200px;
}

.site-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.site-title a {
    color: #1a1a1a;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-title a:hover {
    color: #0b6b6f;
}

/* Modern Navigation */
.modern-navigation {
    display: flex;
    align-items: center;
}

.modern-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0.5rem;
}

.modern-menu > .menu-item {
    position: relative;
}

.modern-menu > .menu-item > a {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.25rem;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    letter-spacing: -0.01em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    border-radius: 8px;
}

.modern-menu > .menu-item > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 2px;
    background: #0b6b6f;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-menu > .menu-item > a:hover {
    color: #0b6b6f;
    background: rgba(11, 107, 111, 0.05);
}

.modern-menu > .menu-item > a:hover::after {
    transform: translateX(-50%) scaleX(1);
}

.modern-menu > .current-menu-item > a,
.modern-menu > .current-menu-ancestor > a {
    color: #0b6b6f;
    font-weight: 600;
}

/* Dropdown Menus */
.modern-menu .sub-menu {
    position: absolute;
    top: calc(100% + 0.5rem);
    left: 0;
    min-width: 220px;
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04);
    border-radius: 12px;
    padding: 0.75rem;
    margin: 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1002;
}

.modern-menu .menu-item:hover > .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.modern-menu .sub-menu .menu-item a {
    display: block;
    padding: 0.65rem 1rem;
    color: #1a1a1a;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.modern-menu .sub-menu .menu-item a:hover {
    background: rgba(11, 107, 111, 0.08);
    color: #0b6b6f;
    padding-left: 1.25rem;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-cta-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.75rem 1.75rem;
    background: #0b6b6f;
    color: #ffffff !important;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 50px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(11, 107, 111, 0.2);
}

.header-cta-btn:hover {
    background: #094f52;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(11, 107, 111, 0.3);
}

/* Modern Hamburger Menu */
.modern-menu-toggle {
    display: none;
    padding: 0.5rem;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.hamburger-box {
    width: 28px;
    height: 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: 28px;
    height: 3px;
    background-color: #1a1a1a;
    border-radius: 3px;
    position: absolute;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hamburger-inner {
    display: block;
}

.hamburger-inner::before,
.hamburger-inner::after {
    content: '';
    display: block;
}

.hamburger-inner::before {
    top: -8px;
}

.hamburger-inner::after {
    bottom: -8px;
}

/* Active Hamburger State */
.modern-menu-toggle.active .hamburger-inner {
    transform: rotate(45deg);
    background-color: #0b6b6f;
}

.modern-menu-toggle.active .hamburger-inner::before {
    top: 0;
    opacity: 0;
}

.modern-menu-toggle.active .hamburger-inner::after {
    bottom: 0;
    transform: rotate(-90deg);
    background-color: #0b6b6f;
}

/* ==========================================
   RESPONSIVE STYLES
   ========================================== */

@media (max-width: 991px) {
    .modern-header-container {
        padding: 0 1.5rem;
        height: 70px;
    }

    .modern-navigation {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        padding: 2rem 1.5rem;
        transform: translateX(100%);
        transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        overflow-y: auto;
        z-index: 999;
    }

    .modern-navigation.active {
        transform: translateX(0);
    }

    .modern-menu {
        flex-direction: column;
        align-items: stretch;
        gap: 0.25rem;
    }

    .modern-menu > .menu-item > a {
        padding: 1rem 1.25rem;
        font-size: 1.1rem;
        border-radius: 12px;
    }

    .modern-menu > .menu-item > a::after {
        display: none;
    }

    .modern-menu .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(11, 107, 111, 0.03);
        margin: 0.25rem 0 0.5rem 0;
        padding: 0.5rem;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
    }

    .modern-menu .menu-item.active > .sub-menu {
        max-height: 500px;
        padding: 0.75rem;
    }

    .modern-menu .sub-menu .menu-item a {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .modern-menu-toggle {
        display: block;
    }

    .header-cta-btn {
        display: none;
    }

    /* Mobile CTA in menu */
    .modern-navigation::after {
        content: '';
        display: block;
        margin-top: 2rem;
    }
}

@media (max-width: 767px) {
    .modern-header-container {
        padding: 0 1rem;
        height: 65px;
    }

    .site-branding .custom-logo {
        height: 38px;
    }

    .modern-navigation {
        top: 65px;
    }
}

/* Desktop specific */
@media (min-width: 992px) {
    .modern-menu > .menu-item {
        position: relative;
    }
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

@media (min-width: 992px) {
    body.menu-open {
        overflow: auto;
    }
}

/* Backward compatibility - hide old header styles */
.site-header:not(.modern-header) {
    display: none;
}
