/* ==================== */
/* HEADER STYLES */
/* ==================== */

/* ===== Common Header Styles ===== */
/* .container is defined in style.css */

.secondary-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    min-height: 180px;
    z-index: 1000;
    overflow: visible;
    background-color: transparent;
    background-image: none;
    padding: 0 30px;
    box-sizing: border-box;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 40px;
    max-width: 1200px;
    min-height: 140px;
    margin: 0 auto;
    overflow: visible;
    gap: 32px;
}

.header-actions {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    gap: clamp(40px, 5vw, 72px);
}

.header-actions nav {
    flex: 1;
    order: 1;
}

.header-actions .header-contact {
    order: 2;
}

.secondary-header .header-content {
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== Logo Styles ===== */
.logo {
    margin-left: 0;
    margin-right: clamp(40px, 5vw, 64px);
    overflow: visible;
    flex-shrink: 0;
}

.logo a,
.logo .logo-link {
    text-decoration: none;
    display: flex;
    align-items: center;
    overflow: visible;
}

.logo img,
.logo .logo-video,
.logo .logo-fallback {
    display: block;
    height: 128px;
    width: auto;
    /* Shrinks the logo slightly in the 1100-1300px band so the nav never collides with it */
    max-width: min(393px, 30vw);
    object-fit: contain;
    object-position: left center;
}

.logo-animated .logo-link {
    position: relative;
}

.logo-animated .logo-video {
    display: none;
    opacity: 1;
    background: transparent;
}

.logo-animated .logo-fallback {
    opacity: 1;
}

.logo-animated.is-animating .logo-video {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 2;
    background: transparent;
}

.logo-animated.is-animating .logo-fallback {
    position: relative;
    z-index: 1;
    opacity: 0;
    visibility: hidden;
}

/* ===== Navigation Styles ===== */
nav {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 0;
}

.secondary-header nav {
    position: relative;
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: 0;
    min-width: 0;
    padding-right: clamp(16px, 2vw, 32px);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
}

.secondary-header .nav-links {
    gap: clamp(12px, 1.8vw, 25px);
    justify-content: center;
    margin: 0;
    padding: 0;
}

.nav-links li {
    margin-left: 20px;
}

.secondary-header .nav-links li {
    margin: 0;
}

.nav-links a {
    text-decoration: none;
    font-size: 1.2rem;
    color: white;
    transition: color 0.3s ease;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
    font-weight: 500;
    position: relative;
    white-space: nowrap;
}

.secondary-header .nav-links a {
    color: #e0e0e0;
    font-size: 1.2rem;
    font-weight: 500;
    position: relative;
}

/* Common hover effect for both headers */
.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

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

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

/* ===== Header Contact/CTA Styles ===== */
.header-contact {
    margin-left: 0;
    margin-right: 0;
    flex-shrink: 0;
}

.secondary-header .header-actions .header-contact {
    margin-left: 0;
}

.header-contact .cta-button-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-decoration: none;
    flex-shrink: 0;
    background-color: var(--primary-color);
    color: #fff !important;
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.2;
    border-radius: 4px;
    border: none;
    box-sizing: border-box;
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
    overflow: visible;
    text-transform: uppercase;
    cursor: pointer;
}

.header-contact .cta-button-main::after {
    display: none;
}

.header-contact .cta-button-main:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(var(--primary-rgb), 0.3);
    color: #fff !important;
}

.header-contact a.cta-button,
.secondary-header .header-contact a.btn-98,
.secondary-header .header-contact a.cta-button {
    padding: 12px 24px;
    font-size: 1.1rem;
    background-color: var(--primary-color);
    color: #fff !important;
    border-radius: 4px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.secondary-header .header-contact a.btn-98,
.secondary-header .header-contact a.cta-button,
.main-header .header-contact a.btn-98 {
    background-color: var(--primary-color);
    padding: 8px 18px;
    font-size: 14px;
    font-weight: 500;
}

.header-contact a.cta-button:hover,
.secondary-header .header-contact a.btn-98:hover,
.secondary-header .header-contact a.cta-button:hover,
.main-header .header-contact a.btn-98:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(var(--primary-rgb), 0.3);
}

.main-header .header-contact a.btn-98 {
    box-shadow: 0 4px 12px rgba(var(--primary-rgb), 0.3);
}

.main-header .header-contact a.btn-98:hover {
    box-shadow: 0 8px 15px rgba(var(--primary-rgb), 0.4);
}

/* ===== Hamburger Menu ===== */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    width: 25px;
    height: 20px;
    justify-content: space-between;
    border: none;
    background: transparent;
    padding: 0;
    font: inherit;
    color: inherit;
}

.hamburger span {
    display: block;
    height: 3px;
    background: #333;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.main-header .hamburger span {
    background-color: white;
}

.secondary-header .hamburger span {
    background-color: #ffffff;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.55);
}

/* Hamburger Active State */
.hamburger.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ===== Hero Section Adjustments ===== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    width: 100%;
    overflow: hidden;
    margin-top: 0;
    padding-top: 0;
}

/* ===== Responsive Styles ===== */
@media screen and (max-width: 1100px) {
    .secondary-header {
        min-height: auto;
        padding: max(env(safe-area-inset-top), 12px) 16px 10px;
    }

    .secondary-header .container {
        padding-left: 0;
        padding-right: 0;
    }

    .header-content {
        display: flex;
        flex-wrap: nowrap;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        min-height: auto;
        padding: 12px 0;
    }

    .header-actions {
        display: flex;
        align-items: center;
        flex: 0 0 auto;
        margin-left: auto;
        gap: 12px;
        min-width: 0;
        position: relative;
    }

    .header-actions .header-contact {
        order: 1;
    }

    .header-actions nav {
        order: 2;
        flex: 0 0 auto;
        width: 0;
        overflow: visible;
        position: static;
        justify-content: flex-end;
        margin-left: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .header-actions .hamburger {
        order: 3;
        display: flex;
        margin-left: 0;
    }

    .logo {
        flex: 1 1 auto;
        min-width: 0;
        margin-right: 12px;
    }

    .header-contact,
    .secondary-header .header-contact,
    .secondary-header .header-actions .header-contact {
        display: block;
        margin-left: 0;
        margin-right: 0;
        flex-shrink: 0;
    }

    .header-contact .cta-button-main {
        padding: 10px 14px;
        font-size: 12px;
        min-height: 44px;
        box-shadow: 0 2px 8px rgba(var(--primary-rgb), 0.35);
    }

    .logo img,
    .logo .logo-video,
    .logo .logo-fallback {
        height: clamp(96px, 13vw, 120px);
        width: auto;
        max-width: 100%;
    }

    .hamburger {
        display: flex;
        flex-direction: column;
        position: relative;
        z-index: 1001;
        width: 44px;
        height: 44px;
        flex-shrink: 0;
        justify-content: space-between;
        align-items: center;
        padding: 11px 10px;
        margin-right: 0;
    }

    .hamburger span {
        width: 22px;
        flex-shrink: 0;
    }

    .hamburger.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    .nav-links {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        left: auto;
        width: min(280px, calc(100vw - 32px));
        height: auto;
        max-height: min(70dvh, 520px);
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        background-color: rgba(22, 22, 22, 0.98);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 10px;
        box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
        padding: 8px 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-8px) scale(0.98);
        transform-origin: top right;
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
        z-index: 1002;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        pointer-events: none;
    }
    
    .main-header .nav-links {
        padding-top: 8px;
        justify-content: flex-start;
    }
    
    .secondary-header .nav-links {
        padding: 8px 0;
        justify-content: flex-start;
    }
    
    .nav-links.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    .dropdown {
        width: 100%;
        text-align: left;
    }

    .dropdown-toggle {
        justify-content: space-between;
        width: 100%;
        padding: 12px 20px;
        box-sizing: border-box;
    }

    .dropdown-menu {
        position: static;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.04);
        box-shadow: none;
        opacity: 1;
        visibility: visible;
        transform: none;
        display: none;
        padding: 0;
        border-radius: 0;
    }

    .dropdown.active .dropdown-menu {
        display: block;
    }

    .dropdown-menu li {
        margin: 0;
    }

    .dropdown-menu a {
        padding: 10px 20px 10px 28px;
        text-align: left;
        font-size: 0.92rem;
    }
    
    .nav-links li {
        margin: 0;
        width: 100%;
        font-size: 1rem;
    }
    
    .nav-links > li > a {
        display: block;
        padding: 12px 20px;
        font-size: 1rem;
        text-align: left;
        box-sizing: border-box;
    }
    
    .nav-links a {
        font-size: 1rem;
        text-shadow: none;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .nav-links a::after {
        display: none;
    }

    .nav-portal-link {
        display: none;
    }
    
    .header-contact a.cta-button,
    .secondary-header .header-contact a.btn-98,
    .main-header .header-contact a.btn-98 {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
}

@media screen and (max-width: 480px) {
    .secondary-header {
        padding: max(env(safe-area-inset-top), 10px) 12px 8px;
    }

    .header-content {
        gap: 8px;
        padding: 10px 0;
    }

    .header-actions {
        gap: 8px;
    }

    .logo img,
    .logo .logo-video,
    .logo .logo-fallback {
        height: 88px;
    }

    .header-contact .cta-button-main {
        padding: 9px 12px;
        font-size: 11px;
        min-height: 40px;
    }

    .hamburger {
        width: 40px;
        height: 40px;
        padding: 8px;
    }
}

/* Dropdown Menu Styling */
.dropdown {
    position: relative;
}

.nav-portal-link {
    display: none;
}

.dropdown-toggle {
    display: flex;
    align-items: center;
}

.dropdown-toggle i {
    margin-left: 5px;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.dropdown:hover .dropdown-toggle i {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgba(26, 26, 26, 0.95);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1001;
    padding: 10px 0;
    list-style: none;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    margin: 0 !important;
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    color: #e0e0e0;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    text-align: left;
}

.dropdown-menu a:hover {
    background-color: rgba(0, 191, 255, 0.1);
    color: var(--primary-color);
}

.dropdown-menu a::after {
    display: none;
}

/* Footer Services Styling */
.footer-services ul {
    list-style: none;
    padding-left: 15px;
    margin-top: 5px;
}

.footer-services ul li {
    margin-bottom: 5px;
}

.footer-services ul li a {
    font-size: 0.9rem;
    color: #cccccc;
}

.footer-services ul li a:hover {
    color: var(--primary-color);
}

/* Mobile menu overlay — hidden; full-screen nav panel provides its own solid backdrop */
.menu-overlay {
    display: none;
}

body.menu-open {
    overflow: visible;
}