﻿
/**
 * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 * 
 * Mega menu styling.
 */


/*
 * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 * 
 * Mega menu styling and layout.
 */

/* ========================================
   DnaGenics Mega Menu Navigation
   Veo-inspired mega-menu design for >1600px viewports
   ======================================== */

/* Ensure navbar dropdowns float above content */
.navbar .dropdown-menu {
    z-index: 1100;
}

/* Custom Navbar Breakpoint at 1600px */
/* Keep navbar collapsed below 1600px */
@media (max-width: 1599px) {
    .navbar-expand-custom > .container,
    .navbar-expand-custom > .container-fluid {
        padding-right: 15px;
        padding-left: 15px;
    }

    .navbar-expand-custom .navbar-nav {
        flex-direction: column;
        width: 100%;
    }

    .navbar-expand-custom .navbar-nav .nav-item.has-megamenu .dropdown-menu {
        position: static;
        float: none;
    }

    .navbar-expand-custom .navbar-nav .nav-link {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }

    .navbar-expand-custom > .container,
    .navbar-expand-custom > .container-fluid {
        flex-wrap: wrap;
    }

    .navbar-expand-custom .navbar-collapse {
        flex-basis: 100%;
        flex-grow: 1;
        align-items: center;
    }

    .navbar-expand-custom .navbar-toggler {
        display: block;
        border: 1px solid rgba(0,0,0,.1);
        border-radius: 0.25rem;
        padding: 0.25rem 0.75rem;
    }
}

/* Expand navbar at 1600px and above */
@media (min-width: 1600px) {
    .navbar-expand-custom {
        flex-flow: row nowrap;
        justify-content: flex-start;
    }

    .navbar-expand-custom .navbar-nav {
        flex-direction: row;
    }

    .navbar-expand-custom .navbar-nav .nav-link {
        padding-right: 0.5rem;
        padding-left: 0.5rem;
    }

    .navbar-expand-custom > .container,
    .navbar-expand-custom > .container-fluid {
        flex-wrap: nowrap;
    }

    .navbar-expand-custom .navbar-collapse {
        display: flex !important;
        flex-basis: auto;
    }

    .navbar-expand-custom .navbar-toggler {
        display: none;
    }
}

/* Mega Menu Overlay */
.megamenu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(2px);
    z-index: 999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.megamenu-overlay.show {
    display: block;
    opacity: 1;
    pointer-events: auto;
}

/* Navigation Item with Mega Menu */
.nav-item.has-megamenu {
    position: static;
}

.nav-item.has-megamenu > .nav-link {
    position: relative;
}

.nav-item.has-megamenu > .nav-link::after {
    content: '\f078';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    font-size: 0.7rem;
    margin-left: 6px;
    transition: transform 0.3s ease;
}

.nav-item.has-megamenu.active > .nav-link::after {
    transform: rotate(180deg);
}

/* Responsive Behavior */
@media (max-width: 1599px) {
    /* Hide the chevron indicator below 1600px */
    .nav-item.has-megamenu > .nav-link::after {
        display: none;
    }
    
    /* Show regular dropdown menu below 1600px */
    .nav-item.has-megamenu .dropdown-menu {
        display: block;
    }
    
    /* Ensure dropdown works with Bootstrap's toggle */
    .nav-item.has-megamenu .dropdown-menu:not(.show) {
        display: none;
    }
}

@media (min-width: 1600px) {
    /* Hide regular dropdowns on large screens (premium megamenu handles this) */
    /* Note: Premium megamenu CSS handles dropdown hiding at >=1200px */
    
    /* Show mega menu chevron */
    .nav-item.has-megamenu > .nav-link::after {
        display: inline-block;
    }
}

@media (prefers-reduced-motion: reduce) {
    .megamenu-overlay {
        transition: none;
    }
}

/* Print Styles */
@media print {
    .megamenu-overlay {
        display: none !important;
    }
}

