/* ==========================================
   ECHO CRAFT CREATIVE STUDIO
   NAVIGATION SYSTEM
   Desktop Sidebar + Luxury Mobile Menu
========================================== */


/* ==========================================
   DEFAULT MOBILE ELEMENT STATE
========================================== */

.mobileHeader,
.mobileMenu {
    display: none;
}


/* ==========================================
   DESKTOP SIDEBAR
========================================== */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    isolation: isolate;

    display: flex;
    width: 280px;
    height: 100vh;
    flex-direction: column;
    justify-content: space-between;

    padding: 65px 30px 45px;

    overflow-y: auto;
    overflow-x: hidden;

    border-right: 1px solid rgba(216, 179, 106, 0.24);

    background:
        linear-gradient(
            105deg,
            rgba(255, 255, 255, 0.025) 0%,
            transparent 18%,
            transparent 68%,
            rgba(216, 179, 106, 0.035) 84%,
            transparent 100%
        ),
        linear-gradient(
            180deg,
            rgba(26, 21, 17, 0.68) 0%,
            rgba(12, 11, 10, 0.84) 48%,
            rgba(7, 7, 7, 0.94) 100%
        ),
        url("../images/backgrounds/sidebar-texture.png");

    background-size:
        100% 100%,
        100% 100%,
        cover;

    background-position:
        center,
        center,
        center;

    background-repeat: no-repeat;

    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);

    box-shadow:
        inset 1px 0 0 rgba(255, 255, 255, 0.025),
        inset -1px 0 0 rgba(216, 179, 106, 0.08),
        inset -14px 0 30px rgba(0, 0, 0, 0.44),
        7px 0 30px rgba(0, 0, 0, 0.42);
}

.sidebar::before {
    position: absolute;
    top: 0;
    left: 12px;
    bottom: 0;
    z-index: -1;

    width: 54px;

    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.035),
            rgba(255, 255, 255, 0.012) 42%,
            transparent 100%
        );

    content: "";

    filter: blur(8px);

    pointer-events: none;
}

.sidebar::after {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: -1;

    width: 2px;

    background:
        linear-gradient(
            180deg,
            transparent 0%,
            rgba(216, 179, 106, 0.14) 18%,
            rgba(216, 179, 106, 0.3) 50%,
            rgba(216, 179, 106, 0.12) 82%,
            transparent 100%
        );

    content: "";

    pointer-events: none;
}

/* ==========================================
   DESKTOP LOGO
========================================== */

.logo {
    text-align: center;
}

.logo img {
    display: block;
    width: 165px;
    margin: 0 auto 15px;
}

.logo h2 {
    color: #d8b36a;
    font-family: "Cormorant Garamond", serif;
    font-size: 2rem;
}

.logo span {
    display: block;
    margin-top: 6px;

    color: #c8c8c8;

    font-size: 0.8rem;
    letter-spacing: 3px;
    text-transform: uppercase;
}


/* ==========================================
   DESKTOP NAVIGATION LINKS
========================================== */

.sidebar nav {
    display: flex;
    flex-direction: column;
    gap: 12px;

    margin-top: 40px;
}

.sidebar nav a {
    display: flex;
    align-items: center;
    gap: 14px;

    padding: 16px 20px;

    border: 1px solid transparent;
    border-radius: 12px;

    color: #dddddd;

    font-size: 1.05rem;
    text-decoration: none;

    transition:
        transform 0.3s ease,
        background 0.3s ease,
        border-color 0.3s ease,
        color 0.3s ease;
}

.sidebar nav a i {
    width: 20px;

    color: #d8b36a;

    text-align: center;
}

.sidebar nav a:hover {
    transform: translateX(4px);

    border-color: rgba(216, 179, 106, 0.16);

    background: rgba(216, 179, 106, 0.08);

    color: #d8b36a;
}

.sidebar nav a.active {
    border: 1px solid rgba(216, 179, 106, 0.2);

    background:
        linear-gradient(
            90deg,
            #3d2d1d,
            #2b2119
        );

    color: #d8b36a;

    box-shadow:
        inset 0 0 18px rgba(216, 179, 106, 0.04),
        0 10px 24px rgba(0, 0, 0, 0.18);
}


/* ==========================================
   PROJECT BUTTON
========================================== */

.projectButton {
    display: flex;
    align-items: center;
    justify-content: center;

    padding: 18px;

    border: 1px solid rgba(216, 179, 106, 0.5);
    border-radius: 50px;

    background:
        linear-gradient(
            135deg,
            #d8b36a,
            #b78a3b
        );

    color: #111111;

    font-weight: 700;
    text-decoration: none;

    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease,
        background 0.3s ease;
}

.projectButton:hover {
    transform: translateY(-3px);

    background:
        linear-gradient(
            135deg,
            #e6c379,
            #c49642
        );

    box-shadow:
        0 15px 35px rgba(216, 179, 106, 0.25);
}


/* ==========================================
   DESKTOP CONTENT OFFSET
========================================== */

main {
    margin-left: 280px;
}


/* ==========================================
   MOBILE NAVIGATION
========================================== */

@media (max-width: 768px) {

    .sidebar {
        display: none;
    }

    main {
        margin-left: 0;
    }


    /* ======================================
       MOBILE HEADER
    ====================================== */

    .mobileHeader {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 9999;

        display: flex;
        height: 76px;
        align-items: center;
        justify-content: space-between;

        padding: 0 22px;

        border-bottom: 1px solid rgba(216, 179, 106, 0.18);

        background:
            linear-gradient(
                180deg,
                rgba(18, 18, 18, 0.98),
                rgba(12, 12, 12, 0.98)
            );

        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);

        box-shadow:
            0 8px 28px rgba(0, 0, 0, 0.35),
            inset 0 -1px 0 rgba(255, 255, 255, 0.015);
    }

    .mobileHeader::after {
        position: absolute;
        bottom: -1px;
        left: 50%;

        width: 110px;
        height: 1px;

        content: "";

        background:
            linear-gradient(
                90deg,
                transparent,
                rgba(216, 179, 106, 0.75),
                transparent
            );

        transform: translateX(-50%);
    }

    .mobileHeader img {
        display: block;
        width: 62px;
        height: auto;
    }


    /* ======================================
       MOBILE MENU BUTTON
    ====================================== */

    #menuToggle {
        display: flex;
        width: 48px;
        height: 48px;
        align-items: center;
        justify-content: center;

        padding: 0;

        border: 1px solid rgba(216, 179, 106, 0.24);
        border-radius: 50%;

        background: rgba(216, 179, 106, 0.06);

        color: #d8b36a;

        font-size: 1.55rem;

        cursor: pointer;

        transition:
            transform 0.25s ease,
            background 0.25s ease,
            border-color 0.25s ease,
            box-shadow 0.25s ease;
    }

    #menuToggle:hover,
    #menuToggle:active {
        transform: scale(0.96);

        border-color: rgba(216, 179, 106, 0.55);

        background: rgba(216, 179, 106, 0.12);

        box-shadow:
            0 0 24px rgba(216, 179, 106, 0.12);
    }


    /* ======================================
       LUXURY MOBILE MENU
    ====================================== */

    .mobileMenu {
        position: fixed;
        top: 88px;
        left: 14px;
        right: 14px;
        z-index: 9998;

        display: none;

        max-height: calc(100vh - 105px);
        overflow-y: auto;

        padding: 18px;

        border: 1px solid rgba(216, 179, 106, 0.28);
        border-radius: 22px;

        background:
            linear-gradient(
                160deg,
                rgba(30, 24, 19, 0.98),
                rgba(11, 11, 11, 0.99)
            );

        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);

        box-shadow:
            0 24px 70px rgba(0, 0, 0, 0.58),
            0 0 28px rgba(216, 179, 106, 0.08);
    }

    .mobileMenu::before {
        display: block;

        width: 68px;
        height: 3px;

        margin: 0 auto 18px;

        border-radius: 999px;

        content: "";

        background:
            linear-gradient(
                90deg,
                transparent,
                #d8b36a,
                transparent
            );
    }

    .mobileMenu.is-open {
        display: block;

        animation:
            mobileMenuReveal 0.28s ease both;
    }


    /* ======================================
       MOBILE MENU LINKS
    ====================================== */

    .mobileMenu a {
        display: flex;
        align-items: center;
        gap: 14px;

        margin-bottom: 9px;
        padding: 14px 15px;

        border: 1px solid transparent;
        border-radius: 14px;

        background: rgba(255, 255, 255, 0.025);

        color: #f2f2f2;

        text-decoration: none;

        transition:
            transform 0.25s ease,
            background 0.25s ease,
            border-color 0.25s ease,
            color 0.25s ease;
    }

    .mobileMenu a:hover,
    .mobileMenu a:active {
        transform: translateX(4px);

        border-color: rgba(216, 179, 106, 0.26);

        background: rgba(216, 179, 106, 0.08);

        color: #d8b36a;
    }

    .mobileMenu a i {
        display: flex;
        width: 38px;
        height: 38px;
        flex: 0 0 38px;
        align-items: center;
        justify-content: center;

        border: 1px solid rgba(216, 179, 106, 0.22);
        border-radius: 50%;

        background: rgba(216, 179, 106, 0.06);

        color: #d8b36a;

        font-size: 0.9rem;
    }

    .mobileMenu a span {
        flex: 1;

        font-size: 0.98rem;
        font-weight: 600;
        letter-spacing: 0.01em;
    }


    /* ======================================
       MOBILE START PROJECT BUTTON
    ====================================== */

    .mobileMenu .projectButton {
        justify-content: center;
        gap: 10px;

        margin-top: 16px;
        margin-bottom: 0;

        padding: 16px 20px;

        border: 1px solid #d8b36a;
        border-radius: 999px;

        background:
            linear-gradient(
                135deg,
                #e2bd6c,
                #b88932
            );

        color: #111111;

        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;

        box-shadow:
            0 14px 30px rgba(0, 0, 0, 0.35),
            0 0 24px rgba(216, 179, 106, 0.12);
    }

    .mobileMenu .projectButton:hover,
    .mobileMenu .projectButton:active {
        transform: translateY(-2px);

        border-color: #efd184;

        background:
            linear-gradient(
                135deg,
                #efd184,
                #c89b43
            );

        color: #111111;
    }

}


/* ==========================================
   SMALL PHONE REFINEMENT
========================================== */

@media (max-width: 480px) {

    .mobileHeader {
        height: 72px;
        padding: 0 18px;
    }

    .mobileHeader img {
        width: 58px;
    }

    #menuToggle {
        width: 44px;
        height: 44px;

        font-size: 1.4rem;
    }

    .mobileMenu {
        top: 82px;
        left: 10px;
        right: 10px;

        max-height: calc(100vh - 94px);

        padding: 15px;

        border-radius: 19px;
    }

    .mobileMenu a {
        gap: 12px;

        margin-bottom: 7px;
        padding: 12px;
    }

    .mobileMenu a i {
        width: 35px;
        height: 35px;
        flex-basis: 35px;
    }

    .mobileMenu a span {
        font-size: 0.93rem;
    }

    .mobileMenu .projectButton {
        padding: 15px 18px;

        font-size: 0.82rem;
    }

}


/* ==========================================
   MOBILE MENU ANIMATION
========================================== */

@keyframes mobileMenuReveal {

    from {
        opacity: 0;

        transform:
            translateY(-12px)
            scale(0.985);
    }

    to {
        opacity: 1;

        transform:
            translateY(0)
            scale(1);
    }

}