/* =========================================================
   JAYARA WEB WORKS
   MOBILE NAVBAR
========================================================= */


/* =========================================================
   DESKTOP — HIDE MOBILE NAV
========================================================= */

.navbar-mobile,
.mobile-menu {
    display: none;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 700px) {

    /* -----------------------------------------
       MAIN MOBILE NAVBAR
    ----------------------------------------- */

    .navbar-mobile {

        display: flex;

        position: fixed;

        top: 0;
        left: 0;

        width: 100%;
        height: 82px;

        padding: 0 22px;

        align-items: center;
        justify-content: space-between;

        background: rgba(247, 240, 232, 0.92);

        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);

        border-bottom: 1px solid
            rgba(63, 42, 32, 0.10);

        z-index: 10000;

        box-sizing: border-box;
    }


    /* -----------------------------------------
       LOGO
    ----------------------------------------- */

    .navbar-mobile .navbar-logo {

        display: flex;

        align-items: center;

        width: 112px;

        text-decoration: none;

        z-index: 10002;
    }


    .navbar-mobile .navbar-logo img {

        display: block;

        width: 112px;
        height: auto;

        max-width: 100%;
    }


    /* -----------------------------------------
       MENU BUTTON
    ----------------------------------------- */

    .mobile-menu-btn {

        position: relative;

        display: flex;

        flex-direction: column;

        justify-content: center;

        align-items: center;

        gap: 7px;

        width: 48px;
        height: 48px;

        padding: 0;

        border: 1px solid
            rgba(63, 42, 32, 0.18);

        border-radius: 50%;

        background: rgba(247, 240, 232, 0.70);

        cursor: pointer;

        z-index: 10002;

        -webkit-tap-highlight-color: transparent;

        transition:
            background 0.3s ease,
            border-color 0.3s ease,
            transform 0.3s ease;
    }


    .mobile-menu-btn span {

        display: block;

        width: 18px;
        height: 1.5px;

        background: #3f2a20;

        transform-origin: center;

        transition:
            transform 0.35s ease,
            opacity 0.25s ease;
    }


    /* -----------------------------------------
       BUTTON HOVER
    ----------------------------------------- */

    .mobile-menu-btn:active {

        transform: scale(0.94);
    }


    /* -----------------------------------------
       HAMBURGER → X
    ----------------------------------------- */

    .mobile-menu-btn.active span:first-child {

        transform:
            translateY(4.25px)
            rotate(45deg);
    }


    .mobile-menu-btn.active span:last-child {

        transform:
            translateY(-4.25px)
            rotate(-45deg);
    }


    /* -----------------------------------------
       FULL SCREEN MENU
    ----------------------------------------- */

    .mobile-menu {

        display: flex;

        position: fixed;

        top: 0;
        left: 0;

        width: 100%;
        height: 100svh;

        padding:
            120px
            24px
            40px;

        box-sizing: border-box;

        flex-direction: column;

        justify-content: center;

        gap: 0;

        background: #3f2a20;

        z-index: 9999;

        opacity: 0;

        visibility: hidden;

        pointer-events: none;

        transform: translateY(-12px);

        transition:
            opacity 0.35s ease,
            visibility 0.35s ease,
            transform 0.35s ease;

        overflow-y: auto;
    }


    /* -----------------------------------------
       OPEN STATE
    ----------------------------------------- */

   /* =========================================================
   MOBILE MENU — FORCE OPEN FROM BODY STATE
========================================================= */

@media screen and (max-width: 700px) {

    .mobile-menu {
        display: flex !important;

        position: fixed !important;

        top: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;

        width: 100vw !important;
        height: 100vh !important;
        height: 100svh !important;

        margin: 0 !important;
        padding: 110px 24px 35px !important;

        box-sizing: border-box !important;

        flex-direction: column !important;
        justify-content: center !important;

        background: #3f2a20 !important;

        z-index: 2147483646 !important;

        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;

        transform: translateY(-20px) !important;

        overflow-y: auto !important;

        transition:
            opacity 0.3s ease,
            transform 0.3s ease,
            visibility 0.3s ease !important;
    }


    /* =========================================
       THIS IS THE IMPORTANT PART
    ========================================= */

    body.menu-open .mobile-menu,
    body.mobile-menu-open .mobile-menu,
    body.menu-open.mobile-menu-open .mobile-menu {

        opacity: 1 !important;

        visibility: visible !important;

        pointer-events: auto !important;

        transform: translateY(0) !important;
    }


    /* =========================================
       MENU LINKS
    ========================================= */

    .mobile-menu a {

        display: flex !important;

        align-items: center !important;

        justify-content: space-between !important;

        width: 100% !important;

        padding: 18px 0 !important;

        margin: 0 !important;

        border-bottom: 1px solid
            rgba(247, 240, 232, 0.15) !important;

        color: #f7f0e8 !important;

        text-decoration: none !important;

        font-family: "Cormorant Garamond", serif !important;

        font-size: 40px !important;

        font-weight: 500 !important;

        line-height: 1 !important;

        letter-spacing: -0.02em !important;
    }


    .mobile-menu a::after {

        content: "↗";

        font-family: "Inter", sans-serif;

        font-size: 18px;

        color: #c88a37;
    }


    /* =========================================
       KEEP NAVBAR ABOVE MENU
    ========================================= */

    .navbar-mobile {

        z-index: 2147483647 !important;
    }


    .mobile-menu-btn {

        z-index: 2147483647 !important;
    }


    /* =========================================
       BODY
    ========================================= */

    body.menu-open,
    body.mobile-menu-open {

        overflow: hidden !important;
    }

}
    /* -----------------------------------------
       MENU LINKS
    ----------------------------------------- */

    .mobile-menu a {

        position: relative;

        display: flex;

        align-items: center;

        justify-content: space-between;

        width: 100%;

        padding: 17px 0;

        border-bottom: 1px solid
            rgba(247, 240, 232, 0.12);

        color: #f7f0e8;

        text-decoration: none;

        font-family: "Cormorant Garamond", serif;

        font-size: clamp(34px, 10vw, 52px);

        font-weight: 500;

        line-height: 1;

        letter-spacing: -0.02em;

        transition:
            color 0.3s ease,
            padding-left 0.3s ease;
    }


    .mobile-menu a::after {

        content: "↗";

        font-family: "Inter", sans-serif;

        font-size: 18px;

        font-weight: 400;

        color: #c88a37;

        transition:
            transform 0.3s ease;
    }


    .mobile-menu a:hover {

        color: #d9a45b;

        padding-left: 8px;
    }


    .mobile-menu a:hover::after {

        transform:
            translate(4px, -4px);
    }


    /* -----------------------------------------
       BODY LOCK
    ----------------------------------------- */

    body.mobile-menu-open {

        overflow: hidden;
    }

}


/* =========================================================
   SMALL PHONES
========================================================= */

@media (max-width: 420px) {

    .navbar-mobile {

        height: 76px;

        padding: 0 17px;
    }


    .navbar-mobile .navbar-logo {

        width: 102px;
    }


    .navbar-mobile .navbar-logo img {

        width: 102px;
    }


    .mobile-menu-btn {

        width: 44px;
        height: 44px;
    }


    .mobile-menu {

        padding:
            105px
            20px
            30px;
    }


    .mobile-menu a {

        font-size: 38px;

        padding: 15px 0;
    }


    .mobile-menu a::after {

        font-size: 15px;
    }

}


/* =========================================================
   VERY SMALL PHONES
========================================================= */

@media (max-width: 360px) {

    .mobile-menu a {

        font-size: 34px;
    }

}


/* =========================================================
   REDUCED MOTION
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .mobile-menu,
    .mobile-menu a,
    .mobile-menu-btn,
    .mobile-menu-btn span {

        transition: none;
    }

}
