﻿:root {
    --mhg-red: #ed1c24;
    --mhg-dark: #071527;
    --mhg-border: #e5e5e5;
    --mhg-desktop-header-height: 120px;
}

html,
body {
    height: auto;
    overflow-y: auto;
}

header,
.header,
.mhg-header,
.border-bottom {
    position: relative;
    z-index: 3000;
}

.mhg-mega-shell {
    position: relative;
}

.mhg-mobile-menu-toggle {
    display: none;
}

/* DESKTOP */
.mhg-nav-only {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 34px;
    min-height: 72px;
    background: #fff;
    position: relative;
    z-index: 3100;
}

.mhg-nav-link,
.mhg-products-trigger {
    border: 0;
    background: transparent;
    color: var(--mhg-dark);
    text-decoration: none;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    padding: 8px 0;
}

.mhg-products-trigger {
    color: var(--mhg-red);
}

.mhg-products-trigger__icon {
    margin-left: 4px;
    font-size: 14px;
}

.mhg-mega-menu {
    position: fixed;
    top: var(--mhg-desktop-header-height);
    left: 50%;
    width: min(1180px, calc(100vw - 180px));
    transform: translateX(-50%);
    z-index: 5000;
    background: transparent;
    padding: 0;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
}

body.mhg-mega-open .mhg-mega-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mhg-mega-menu__panel {
    width: 100%;
    min-height: 486px;
    background: #fff;
    box-shadow: 0 18px 32px rgba(0,0,0,.14);
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    position: relative;
}

.mhg-mega-menu__close {
    position: absolute;
    top: 24px;
    right: 26px;
    z-index: 5;
    border: 0;
    background: transparent;
    color: #9a9a9a;
    font-size: 28px;
    cursor: pointer;
}

.mhg-mega-menu__categories {
    background: #f5f5f5;
    padding: 44px 38px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.mhg-mega-menu__category {
    color: var(--mhg-dark);
    text-decoration: none;
    font-size: 16px;
}

    .mhg-mega-menu__category.is-active,
    .mhg-mega-menu__category:hover {
        color: var(--mhg-red);
        text-decoration: underline;
        text-underline-offset: 4px;
    }

.mhg-mega-menu__content-item {
    display: none;
    grid-template-columns: minmax(0, 1fr) 235px;
    gap: 70px;
    padding: 38px 32px 30px 40px;
    min-height: 486px;
}

    .mhg-mega-menu__content-item.is-active {
        display: grid;
    }

.mhg-mega-menu__mobile-card,
.mhg-mega-menu__mobile-icon,
.mhg-mega-menu__mobile-link-description {
    display: none;
}

.mhg-mega-menu__text h2,
.mhg-mega-menu__text h3 {
    color: var(--mhg-dark);
    font-family: Georgia, "Times New Roman", serif;
    font-weight: 700;
}

.mhg-mega-menu__text h2 {
    margin: 0 0 30px;
    font-size: 22px;
    line-height: 1.2;
}

.mhg-mega-menu__text ul {
    margin: 0;
    padding-left: 18px;
}

.mhg-mega-menu__text li {
    margin-bottom: 20px;
    color: #9a9a9a;
}

    .mhg-mega-menu__text li a {
        color: var(--mhg-dark);
        text-decoration: none;
        font-size: 15px;
    }

.mhg-mega-menu__divider {
    height: 1px;
    background: var(--mhg-border);
    margin: 30px 0 24px;
}

.mhg-mega-menu__text h3 {
    margin: 0 0 24px;
    font-size: 21px;
    line-height: 1.15;
}

.mhg-mega-menu__cta {
    color: var(--mhg-red);
    text-decoration: none;
    font-size: 15px;
}

.mhg-mega-menu__image {
    align-self: center;
}

    .mhg-mega-menu__image img {
        display: block;
        width: 235px;
        height: 420px;
        object-fit: cover;
    }

/* TABLET */
@media (max-width: 1199px) and (min-width: 992px) {
    .mhg-mega-menu {
        width: calc(100vw - 80px);
    }

    .mhg-mega-menu__content-item {
        grid-template-columns: minmax(0, 1fr) 220px;
        gap: 36px;
    }

    .mhg-mega-menu__image img {
        width: 220px;
        height: 360px;
    }
}

/* DESKTOP FIXED HEADER + EXISTING MEGA MENU BACKGROUND */
@media (min-width: 1101px) {
    body {
        padding-top: 0 !important;
    }

    header.border-bottom {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        z-index: 999999 !important;
        background: #fff !important;
    }

        header.border-bottom > .container,
        header.border-bottom .row,
        header.border-bottom section {
            background: #fff !important;
        }

        header.border-bottom + section {
            margin-top: var(--mhg-desktop-header-height) !important;
        }

    body.mhg-mega-open .mhg-mega-menu-backdrop {
        display: block;
        position: fixed;
        top: var(--mhg-desktop-header-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 4980;
        pointer-events: auto;
    }

    body.mhg-mega-open::after {
        content: "";
        position: fixed;
        top: var(--mhg-desktop-header-height);
        left: 0;
        right: 0;
        height: 560px;
        background: #f3f3f3;
        z-index: 4990;
        pointer-events: none;
    }

    .mhg-mega-menu {
        top: calc(var(--mhg-desktop-header-height) + 20px) !important;
        z-index: 5000 !important;
    }

    .mhg-mega-menu__panel {
        position: relative;
        z-index: 5001 !important;
    }
}

/* MOBILE */
@media (max-width: 1100px) {
    html,
    body {
        height: auto !important;
        overflow-y: auto !important;
    }

        body.mhg-mobile-nav-open {
            overflow-y: auto !important;
        }

    header.border-bottom {
        position: sticky !important;
        top: 0 !important;
        z-index: 999999 !important;
        background: #fff !important;
    }

        header.border-bottom > .container,
        header.border-bottom .row,
        header.border-bottom section {
            background: #fff !important;
        }

    .mhg-mega-shell {
        position: static;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        margin-left: auto;
        width: auto;
    }

    .mhg-mobile-menu-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        border: 0;
        background: transparent;
        padding: 0;
        cursor: pointer;
    }

        .mhg-mobile-menu-toggle span {
            display: block;
            width: 23px;
            height: 2px;
            background: var(--mhg-dark);
            border-radius: 2px;
            transition: transform .18s ease, opacity .18s ease;
        }

    body.mhg-mobile-nav-open .mhg-mobile-menu-toggle span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    body.mhg-mobile-nav-open .mhg-mobile-menu-toggle span:nth-child(2) {
        opacity: 0;
    }

    body.mhg-mobile-nav-open .mhg-mobile-menu-toggle span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .mhg-nav-only {
        display: none;
        position: static;
        width: 100%;
        z-index: 999998;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 14px;
        background: #fff;
        border-top: 1px solid var(--mhg-border);
        max-height: none !important;
        overflow: visible !important;
    }

    body.mhg-mobile-nav-open .mhg-nav-only {
        display: flex;
    }

    .mhg-nav-link,
    .mhg-products-trigger {
        width: 100%;
        padding: 15px 14px;
        border-radius: 7px;
        text-align: left;
        font-size: 17px;
        color: var(--mhg-dark);
    }

    .mhg-nav-link--active {
        background: #fff0f1;
        color: var(--mhg-red);
        border-left: 4px solid var(--mhg-red);
    }

    .mhg-products-trigger {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    body.mhg-mega-open .mhg-products-trigger__icon {
        transform: rotate(180deg);
    }

    .mhg-mega-menu {
        position: static;
        width: 100%;
        transform: none;
        display: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        padding: 0;
        margin: 0;
        background: #fff;
        max-height: none !important;
        overflow: visible !important;
    }

    body.mhg-mega-open .mhg-mega-menu {
        display: block;
    }

    .mhg-mega-menu__panel {
        display: block;
        width: 100%;
        min-height: auto;
        box-shadow: none;
        background: #fff;
        max-height: none !important;
        overflow: visible !important;
    }

    .mhg-mega-menu__categories,
    .mhg-mega-menu__close,
    .mhg-mega-menu__image,
    .mhg-mega-menu__mobile-card,
    .mhg-mega-menu__divider,
    .mhg-mega-menu__cta {
        display: none !important;
    }

    .mhg-mega-menu__content-item,
    .mhg-mega-menu__content-item.is-active {
        display: block;
        width: 100%;
        min-height: auto;
        padding: 0;
        margin: 0;
    }

    .mhg-mega-menu__text {
        padding: 0 14px 14px;
    }

        .mhg-mega-menu__text h2 {
            display: block;
            margin: 14px 0 12px;
            font-family: inherit;
            font-size: 17px;
            line-height: 1.2;
            font-weight: 800;
            color: var(--mhg-dark);
        }

        .mhg-mega-menu__text ul {
            list-style: none;
            margin: 0;
            padding: 0;
        }

        .mhg-mega-menu__text li {
            margin: 0 0 10px;
            color: transparent;
        }

            .mhg-mega-menu__text li a {
                display: flex;
                align-items: center;
                gap: 14px;
                width: 100%;
                min-height: 66px;
                position: relative;
                padding: 12px 44px 12px 14px;
                background: #fff;
                border-radius: 8px;
                box-shadow: 0 4px 18px rgba(0,0,0,.07);
                color: var(--mhg-dark);
                text-decoration: none;
                font-size: 15px;
                font-weight: 600;
            }

    .mhg-mega-menu__mobile-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        background: #fff0f1;
        color: var(--mhg-red);
    }

        .mhg-mega-menu__mobile-icon::before {
            content: "⚓";
            font-size: 18px;
        }

    .mhg-mega-menu__mobile-link-text,
    .mhg-mega-menu__mobile-link-title,
    .mhg-mega-menu__mobile-link-description {
        display: block;
    }

    .mhg-mega-menu__mobile-link-title {
        font-size: 15px;
        font-weight: 700;
        color: var(--mhg-dark);
    }

    .mhg-mega-menu__mobile-link-description {
        margin-top: 3px;
        font-size: 13px;
        font-weight: 400;
        color: var(--mhg-dark);
    }

    .mhg-mega-menu__text li a::after {
        content: "›";
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        color: #9aa3af;
        font-size: 26px;
        font-weight: 300;
    }
}
