/* ===== RESPONSIVE FIX FOR de-flex / de-flex-col ===== */

.de-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Desktop */
.de-flex-col {
    display: flex;
    align-items: center;
}

/* Mobile behavior */
@media (max-width: 991px) {

    .de-flex {
        flex-wrap: wrap;           /* allow stacking */
        position: relative;
    }

    .de-flex-col {
        width: auto;
    }

    /* LOGO */
    .de-flex-col:first-child {
        flex: 1;
    }

    /* MENU ICON */
    .de-flex-col:last-child {
        flex: 0;
    }

    /* MENU CONTAINER (header-col-mid) */
    .header-col-mid {
        width: 100%;
        order: 3;                  /* push menu below */
        display: none;             /* hidden by default */
        background: #000;
        padding: 15px 0;
    }

    .header-col-mid.active {
        display: block;
    }
}

@media (max-width: 991px) {

    .header-col-mid {
        max-height: 100vh;        /* full screen height */
        overflow-y: auto;         /* allow scrolling */
    }

    #mainmenu li:last-child {
        margin-bottom: 20px;      /* spacing for last item */
    }
}

@media (max-width: 991px) {

    header {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 9999;
        background: #000;
    }

    /* Push page content below header */
    body {
        padding-top: 70px; /* adjust if your header is taller */
    }
}


/* ============================= */
/* MOBILE MENU OPEN STATE */
/* ============================= */

@media (max-width: 991px) {

    body.menu-open #mainmenu {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #111;

        /* 🔑 FIXES */
        max-height: calc(100vh - 80px);
        overflow-y: auto;

        padding: 15px 0;
        z-index: 9999;
    }

    body.menu-open #mainmenu li {
        display: block;
        text-align: center;
        margin: 12px 0;
    }

    body.menu-open #mainmenu li a {
        color: #fff;
        font-size: 16px;
        display: block;
        padding: 10px 0;
    }
}


