/* ========================================
   MEGA MENU
======================================== */

.mega-menu {
    position: fixed;
    top: 88px;
    left: 50%;
    width: min(1100px, 90vw);
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    padding: 35px;
    background: var(--white);
    border-top: 3px solid var(--red);
    border-left: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.10);
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, 15px);
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease,
        transform 0.2s ease;

    z-index: 2000;
}


/* OPEN MEGA MENU */

.nav-item:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}


/* COLUMNS */

.mega-column {
    display: flex;
    flex-direction: column;
}


/* COLUMN TITLES */

.mega-column h3 {
    margin: 0 0 18px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--red);
    color: var(--red);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}


/* LINKS */

.mega-column a {
    display: block;
    padding: 8px 0;
    color: var(--black);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    transition:
        color 0.2s ease,
        padding-left 0.2s ease;
}

.mega-column a:hover {
    color: var(--red);
    padding-left: 5px;
}

/* Mega menu opened by button */
#megaMenu.mega-menu-open .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

/* ========================================
   MEDIUM DESKTOP / LAPTOP
======================================== */

@media (max-width: 1100px) and (min-width: 769px) {

    .mega-menu {
        top: 88px;
        width: 85vw;
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
        max-height: calc(100vh - 100px);
        overflow-y: auto;
    }

}


/* ========================================
   MOBILE
======================================== */

@media (max-width: 768px) {

    .mega-menu {
        position: static;
        top: auto;
        left: auto;
        width: 100%;
        display: none;
        grid-template-columns: 1fr;
        padding: 20px;
        border: none;
        box-shadow: none;
        transform: none;
    }

}