/* =============== */
/* BLOCK: side-nav */
/* =============== */

.side-nav {
    background-color: transparent;
    position: relative;
}

/* --- Pseudo-element for full bleed background --- */

.side-nav::before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 100vw;
    background-color: #EBFCF8;
    z-index: var(--z-negative);
}

/* --- Menu container & list --- */

.side-nav__menu {
    position: sticky;
    top: 10rem;
    padding: 1rem 2.5rem 4rem 0rem;
}

.side-nav__list {
    padding: 0;
    list-style-type: none;
    margin: 0;
}

.side-nav__item {
    margin-bottom: 1rem;
}

/* --- Navigation Links --- */

.side-nav__link {
    font-size: 1.2rem;
    display: block;
    text-decoration: none;
    padding: 0.2rem 0;
    color: var(--color-primary-variant);
    border-bottom: 1px solid var(--color-primary-variant);
    transition: all 0.2s ease;
}


.side-nav__link:hover {
    border-bottom: 1px solid var(--color-accent);
}


/* --- Active state (modifier) --- */

.side-nav__link--active {
    border-radius: 3px;
    background: linear-gradient(100deg, hsla(164.65, 100%, 42.16%, 0.2), hsla(164.65, 100%, 42.16%, 0.05));
    border-bottom: 1px solid var(--color-accent);
}


/* --- Toggle Button (Mobile Only) --- */

.side-nav__toggle {
    display: none;
    position: absolute;
    top: 0;
    left: 0;
    width: 44px;
    height: 48px;
    background-color: #00D7A0;
    border: none;
    border-radius: 0 50% 50% 0;
    cursor: pointer;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: var(--z-overlay);
    transition: background-color 0.2s;
}


.side-nav__toggle:hover,
.side-nav__toggle:focus {
    background-color: #00D7A0;
}


/* ======================== */
/* RESPONSIVE MEDIA QUERIES */
/* ======================== */

/* ==== TABLET (Breakpoint: 1200px) ==== */

@media (max-width: 1200px) {

    .side-nav {
        position: fixed;
        top: 0;
        height: 100vh;
        left: -280px;
        /* Hide off-screen by default */
        width: 280px;
        background-color: #ffffff;
        border-right: 1px solid #B9F4E5;
        border-radius: 0;
        box-shadow: 4px 0 10px rgba(0, 28, 39, 0.2);
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        z-index: var(--z-drawer);
        padding: 2rem;
        display: flex;
        /* Layout resets */
        flex-direction: column;
        justify-content: center;
    }


    /* MODIFIER: Open State (toggle via JS) */

    .side-nav.is-open {
        transform: translateX(280px);
        /* Slide drawer into view */

    }

    .side-nav__menu {
        border-right: none;
        padding-right: 0;
    }

    /* Show the toggle button */

    .side-nav__toggle {
        display: flex;
        left: 100%;
        /* Puts it attached to the right edge of the drawer */
        top: 8rem;
    }
}