/* Sub-Navigation Menu Styles */

/* Main container for sub-navigation */
.subnav-container {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(18, 18, 27, 0.98);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    z-index: 99;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    overflow: hidden;
}

/* Active state for sub-navigation */
.subnav-container.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

/* Inner container for sub-navigation content */
.subnav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

/* Column layout for sub-navigation */
.subnav-column {
    flex: 1;
    min-width: 200px;
    padding: 0 20px;
}

/* Column header */
.subnav-column h3 {
    color: rgba(255, 255, 255, 0.9);
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Links within sub-navigation */
.subnav-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.subnav-column li {
    margin-bottom: 10px;
}

.subnav-column a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
}

.subnav-column a:hover {
    color: #fff;
}

.subnav-column a i {
    margin-right: 8px;
    font-size: 12px;
    opacity: 0.7;
}

/* Featured content in sub-navigation */
.subnav-featured {
    flex: 2;
    min-width: 300px;
    padding: 0 20px;
    display: flex;
    align-items: center;
}

.featured-content {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    padding: 20px;
    width: 100%;
}

.featured-content h3 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 10px;
}

.featured-content p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.5;
}

.featured-cta {
    display: inline-block;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    transition: all 0.2s ease;
}

.featured-cta:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.3);
}

/* Mobile styles for sub-navigation */
@media (max-width: 768px) {
    .subnav-container {
        position: static;
        transform: none;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        border: none;
        box-shadow: none;
        background: rgba(30, 30, 40, 0.3);
        margin: 0;
        padding: 0;
        transition: all 0.3s ease;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        border-radius: 0;
        margin-left: 15px;
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        display: none; /* Hide by default */
    }

    .subnav-container.active {
        visibility: visible;
        max-height: 2000px; /* Large enough to contain all content */
        opacity: 1;
        margin-top: 0;
        margin-bottom: 10px;
        display: block; /* Show when active */
    }

    /* Style for nav items with active submenu */
    .nav-link.has-submenu.active {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 5px;
    }

    /* Mobile submenu specific styles */
    .mobile-submenu {
        position: relative;
        width: 100%;
        background: rgba(30, 30, 40, 0.3);
        border-left: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 10px;
        display: none; /* Hidden by default */
        opacity: 1;
        visibility: visible;
        max-height: none;
        overflow: visible;
    }

    .mobile-submenu .subnav-content {
        padding: 5px 0 15px 0;
        flex-direction: column;
        display: block;
        max-width: 100%;
        margin: 0;
    }

    /* Ensure all content inside mobile submenu is visible */
    .mobile-submenu * {
        opacity: 1;
        visibility: visible;
    }

    .subnav-content {
        padding: 5px 0 15px 0;
        flex-direction: column;
    }

    .subnav-column {
        padding: 5px 0;
        margin-bottom: 10px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .subnav-column:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }

    .subnav-column h3 {
        font-size: 14px;
        margin-bottom: 8px;
        padding-bottom: 5px;
    }

    .subnav-column ul {
        margin-left: 10px;
    }

    .subnav-column li {
        margin-bottom: 5px;
    }

    .subnav-column a {
        font-size: 13px;
    }

    .subnav-featured {
        padding: 0;
        margin-top: 5px;
    }

    .featured-content {
        padding: 12px;
        margin-right: 10px;
        background: rgba(255, 255, 255, 0.02);
    }

    .featured-content h3 {
        font-size: 14px;
        margin-bottom: 8px;
    }

    .featured-content p {
        font-size: 12px;
        margin-bottom: 10px;
        line-height: 1.4;
    }

    .featured-cta {
        font-size: 12px;
        padding: 6px 12px;
    }
}

/* Nav item with submenu indicator */
.has-submenu {
    position: relative;
}

.has-submenu::after {
    content: '\f107'; /* Font Awesome down arrow */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 6px;
    font-size: 12px;
    transition: transform 0.3s ease;
}

/* Mobile submenu indicators */
@media (max-width: 768px) {
    .has-submenu {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .has-submenu::after {
        margin-right: 15px;
        font-size: 14px;
        color: rgba(255, 255, 255, 0.6);
    }

    .has-submenu.active {
        border-bottom: none;
        background: rgba(255, 255, 255, 0.03);
    }

    .has-submenu.active::after {
        color: rgba(255, 255, 255, 0.9);
    }

    /* Hide the overlay on mobile */
    .subnav-overlay {
        display: none;
    }
}

/* Overlay for when submenu is open */
.subnav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 98;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.subnav-overlay.active {
    opacity: 1;
    visibility: visible;
}
