/* Header Styles */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    backdrop-filter: blur(9.3px);
    background-color: rgba(0, 0, 0, 0.452);
    height: 80px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 40px;
    height: 100%;
    max-width: 1440px;
    margin: 0 auto;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Overlay that appears behind the mobile nav when open */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.48);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
}

.nav-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.logo-wrapper {
    position: relative;
    width: 142px;
    height: 50px;
}

.company-logo,
.logo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 142px;
    height: 50px;
}

.main-navigation {
    display: flex;
    align-items: center;
    gap: 29px;
}

.nav-item-dropdown {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.nav-text_industries-toggle {
    background: transparent;
    border: none;
    padding: 0;
}


.nav-text {
    color: #fff;
    font: 500 16px Sen;
    cursor: pointer;
    transition: color 0.3s ease;
}

.nav-text:hover {
    color: #8bc34a;
}

.dropdown-icon {
    width: 12px;
    height: 14px;
}

.mobile-menu-toggle {
    /* Hidden on desktop by default; shown by media query at <=1024px */
    display: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    background: transparent;
    border: none;
}

.mobile-menu-toggle:focus {
    outline: 2px solid #8bc34a;
    outline-offset: 2px;
}

.badge {
    position: absolute;
    top: 80px;
    right: 60px;
    height: 100px;
}

/* Mega-menu styles for Industries (white panel with columns) */
.industries-overlay {
    position: fixed;
    inset: 0;
    background: transparent;
    /* no backdrop */
    z-index: 1100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
}

.industries-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.industries-panel {
    position: relative;
    /* left: 50%; */
    transform: translateX(-50%);
    min-width: 320px;
    max-width: 400px;
    background: #ffffff;
    color: #0b132b;
    border-radius: 6px;
    padding: 24px 28px;
    /* box-shadow: 0 20px 50px rgba(2,6,23,0.12); */
    transition: opacity 140ms ease, transform 160ms ease;
    opacity: 0;
}

.industries-overlay.open .industries-panel {
    opacity: 1;
}

.mega-header {
    display: none;
}

.industries-heading {
    display: none;
}

.mega-subtitle {
    margin: 0;
    color: #5b6770;
    font: 400 15px Sen;
}

.mega-columns {
    display: flex;
    flex-direction: column;
    gap: 0;
    overflow: hidden;
}

.mega-col {
    padding: 0;
}

.mega-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.industry-link {
    display: block;
    padding: 12px 16px;
    color: #0b132b;
    text-decoration: none;
    border-radius: 3px;
    font: 500 16px Sen;
    text-align: left;
    transition: color 120ms ease, background-color 120ms ease, transform 120ms ease;
}

.industry-link:hover,
.industry-link:focus {
    color: #000000;
    background-color: rgba(139, 195, 74, 0.1);
    transform: translateX(4px);
    outline: none;
}

.industries-close {
    position: absolute;
    right: 12px;
    top: 8px;
    background: transparent;
    border: none;
    color: #0b132b;
    font-size: 22px;
    cursor: pointer;
}

.no-decoration {
    text-decoration: none;
}


@media (max-width: 880px) {
    .industries-panel {
        min-width: 280px;
        max-width: 90%;
        padding: 20px;
    }
}

@media (max-width: 640px) {
    .industries-panel {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        top: auto !important;
        width: 100% !important;
        height: 62vh;
        border-radius: 12px 12px 0 0;
        padding: 18px 16px;
        transform-origin: bottom center;
    }

    /* keep industries overlay transparent on mobile too */
    .industries-overlay {
        background: transparent;
    }

    .mega-columns {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .industries-heading::before {
        top: 12px;
        bottom: 12px;
    }
}

/* Responsive: show mobile/touch menu toggle and make nav vertical on smaller screens */
@media (max-width: 1024px) {
    .header-container {
        padding: 0 16px;
    }

    .mobile-menu-toggle {
        display: block;
        background: transparent;
        border: none;
        color: #fff;
        font-size: 22px;
        padding: 6px;
    }

    .main-navigation {
        /* mobile nav - hidden by default using visibility/opacity to allow transitions */
        display: flex;
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background-color: rgba(0, 0, 0, 0.92);
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 8px 0;
        z-index: 999;
        /* sits above overlay but below header */
        visibility: hidden;
        opacity: 0;
        transform: translateY(-6px);
        pointer-events: none;
        transition: opacity 200ms ease, transform 200ms ease, visibility 200ms;
    }

    .main-navigation.open {
        visibility: visible;
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Ensure `.open` can work while debugging even if some desktop styles apply */

    .main-navigation .nav-item-dropdown,
    .main-navigation .nav-text {
        width: 100%;
        padding: 14px 20px;
        color: #fff;
        font-size: 16px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    }

    .main-navigation .nav-item-dropdown {
        gap: 8px;
    }
}

.mobile-submenu {
    display: none;
}

.nav-item {
    display: none
}


/* Make `.main-navigation.open` visible outside media query when debugging */
.main-navigation.open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Small phones: slightly tighter spacing */
@media (max-width: 480px) {

    .main-navigation .nav-item-dropdown,
    .main-navigation .nav-text {
        padding: 12px 16px;
        font-size: 15px;
    }
}

/* mobile only */
@media (max-width: 880px) {
    .nav-item {
        display: block;
    }

    .nav-item-dropdown {
        display: none
    }

    .mobile-submenu {
        display: block
    }

    .mobile-submenu {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        list-style: none;
        padding-left: 16px;
    }

    .mobile-submenu.open {
        max-height: 500px;
        /* enough to expand all list items */
    }

    .mobile-submenu2 {
        display: block;
    }

    .mobile-submenu li a {
        color: #ffffff;
        /* white text */
        text-decoration: none;
        padding-left: 12px;

    }

    .mobile-submenu2 li a {
        color: #ffffff;
        /* white text */
        text-decoration: none;
        padding-left: 12px;

    }

    .mobile-submenu2 {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        list-style: none;
        padding-left: 16px;
        text-decoration: none;
        color: #fff;
    }

    .mobile-submenu2.open {
        max-height: 500px;
        /* enough to expand all list items */
        text-decoration: none;
        color: #fff;
    }

    .mobile-dropdown-btn {
        width: 100%;
        background: transparent;
        border: none;
        color: #fff;
        font-size: 16px;
        text-align: left;
        padding: 14px 20px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
    }

    .mobile-dropdown-icon {
        transition: transform 0.3s ease;
    }

    .mobile-dropdown-btn.open .mobile-dropdown-icon {
        transform: rotate(45deg);
    }
}