/* =============================================
   MEGA MENU + DROPDOWN – DEFINITIVE FIX
   Loaded LAST to override all other CSS
   ============================================= */

/* ===== CRITICAL: Remove contain & overflow from navbar chain ===== */
.navbar,
.nav-container,
.nav-menu,
.nav-menu > li,
.has-mega-menu,
.has-dropdown {
    overflow: visible !important;
    contain: none !important;
}

.has-mega-menu,
.has-dropdown {
    position: relative !important;
}

/* ===== MEGA MENU – hidden by default ===== */
.mega-menu {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    width: 700px !important;
    max-width: 95vw !important;
    background: #ffffff !important;
    border-top: 3px solid #e53e3e !important;
    box-shadow: 0 16px 48px rgba(0,0,0,0.18) !important;
    border-radius: 0 0 12px 12px !important;
    z-index: 999999 !important;
    margin-top: 0 !important;
    padding: 0 !important;
}

/* ===== SHOW on hover ===== */
.has-mega-menu:hover > .mega-menu {
    display: block !important;
}

/* ===== Mega menu inner layout ===== */
.mega-menu-container {
    padding: 1.75rem 2rem !important;
}

.mega-menu-content {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 2.5rem !important;
}

/* Hide featured card – client request */
.mega-menu-featured {
    display: none !important;
}

/* Column heading */
.mega-menu-column h3 {
    font-size: 0.7rem !important;
    font-weight: 700 !important;
    text-transform: uppercase !important;
    letter-spacing: 1.5px !important;
    color: #1a365d !important;
    margin: 0 0 0.75rem !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 2px solid #e53e3e !important;
}

.mega-menu-column ul {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.mega-menu-column li {
    margin: 0 !important;
}

/* Client request #14: NO icons */
.menu-icon {
    display: none !important;
}

.mega-menu-column a {
    display: block !important;
    padding: 0.55rem 0.75rem !important;
    border-radius: 6px !important;
    text-decoration: none !important;
    color: #2d3748 !important;
    transition: background 0.15s ease !important;
}

.mega-menu-column a:hover {
    background: #f7fafc !important;
    color: #e53e3e !important;
}

.mega-menu-column a strong {
    display: block !important;
    font-size: 0.88rem !important;
    font-weight: 600 !important;
    color: #1a365d !important;
    margin: 0 !important;
}

.mega-menu-column a:hover strong {
    color: #e53e3e !important;
}

.mega-menu-column a small {
    display: block !important;
    font-size: 0.75rem !important;
    color: #718096 !important;
    line-height: 1.4 !important;
    margin-top: 2px !important;
}

/* ===== DROPDOWN (PORTFOLIO) ===== */
.dropdown {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    background: #ffffff !important;
    min-width: 210px !important;
    border-top: 3px solid #e53e3e !important;
    box-shadow: 0 8px 28px rgba(0,0,0,0.15) !important;
    border-radius: 0 0 10px 10px !important;
    z-index: 999999 !important;
    list-style: none !important;
    margin: 0 !important;
    padding: 0.5rem 0 !important;
}

.has-dropdown:hover > .dropdown {
    display: block !important;
}

.dropdown li {
    list-style: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.dropdown li a {
    display: block !important;
    padding: 0.7rem 1.25rem !important;
    color: #2d3748 !important;
    font-size: 0.88rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    white-space: nowrap !important;
    transition: background 0.15s ease !important;
}

.dropdown li a:hover {
    background: #f7fafc !important;
    color: #e53e3e !important;
}

/* ===== MOBILE: hide both ===== */
@media (max-width: 768px) {
    .mega-menu,
    .dropdown {
        display: none !important;
    }
}
