/* =========================================================
   MIJN RECEPTEN
   FASE 2 - APP LAYOUT
   ========================================================= */

* {
    box-sizing: border-box;
}

:root {
    --green: #304d3b;
    --green-dark: #243d2f;
    --green-light: #dcebdc;
    --green-soft: #eef4ef;

    --text: #252525;
    --muted: #777777;

    --border: #e9e9e9;
    --background: #ffffff;
}


/* =========================================================
   BASIS
   ========================================================= */

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;

    background: var(--background);
    color: var(--text);

    font-family:
        Arial,
        Helvetica,
        sans-serif;
}

body {
    min-height: 100vh;
}


/* =========================================================
   APP
   ========================================================= */

.app {
    min-height: 100vh;
    display: flex;
}


/* =========================================================
   DESKTOP SIDEBAR
   ========================================================= */

.sidebar {
    width: 240px;
    min-height: 100vh;

    padding: 32px 20px;

    border-right: 1px solid var(--border);

    background: #ffffff;

    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;

    display: flex;
    flex-direction: column;
}


.logo {
    padding: 0 12px 35px 12px;

    color: var(--green);

    font-size: 22px;
    font-weight: 700;
}


.logo-icon {
    margin-right: 7px;
}


.navigation {
    display: flex;
    flex-direction: column;
    gap: 5px;
}


.nav-button {
    width: 100%;

    display: flex;
    align-items: center;

    padding: 13px 14px;

    border: none;
    border-radius: 13px;

    background: transparent;
    color: #555555;

    font-size: 14px;
    text-align: left;

    cursor: pointer;

    transition:
        background 0.15s ease,
        color 0.15s ease;
}


.nav-button:hover {
    background: var(--green-soft);
    color: var(--green);
}


.nav-button.active {
    background: var(--green-light);
    color: var(--green);

    font-weight: 700;
}


.nav-icon {
    width: 28px;

    font-size: 17px;
}


/* =========================================================
   CONTENT
   ========================================================= */

.content {
    width: 100%;

    margin-left: 240px;

    padding: 45px 6% 80px 6%;
}


.page {
    width: 100%;
    max-width: 1100px;

    margin: 0 auto;
}


.page-header {
    margin-bottom: 38px;
}


.page-header h1 {
    margin: 0 0 9px 0;

    color: var(--green);

    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.1;
}


.page-header p {
    margin: 0;

    color: var(--muted);

    font-size: 16px;
}


/* =========================================================
   PAGE SWITCHING
   ========================================================= */

.page-section {
    display: none;
}


.page-section.active {
    display: block;
}


/* =========================================================
   RECEPT CARD
   ========================================================= */

.recipe-card {
    display: grid;

    grid-template-columns: 1fr 1fr;

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 22px;

    background: #ffffff;

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.06);
}


.recipe-image {
    min-height: 500px;

    background-image:
        url("https://images.unsplash.com/photo-1467003909585-2f8a72700288?auto=format&fit=crop&w=1200&q=80");

    background-size: cover;
    background-position: center;
}


.recipe-content {
    padding: 42px;
}


.recipe-title {
    margin: 0 0 20px 0;

    color: var(--green);

    font-size: 36px;
    line-height: 1.1;
}


/* =========================================================
   TAGS
   ========================================================= */

.tags {
    display: flex;
    flex-wrap: wrap;

    gap: 8px;

    margin-bottom: 24px;
}


.tag {
    display: inline-flex;
    align-items: center;

    padding: 7px 13px;

    border-radius: 50px;

    background: var(--green-light);
    color: #35583f;

    font-size: 11px;
    font-weight: 700;
}


/* =========================================================
   INFO
   ========================================================= */

.info-row {
    display: flex;
    align-items: center;

    gap: 8px;

    margin-bottom: 24px;

    color: var(--muted);

    font-size: 14px;
}


/* =========================================================
   NUTRITION PILL
   ========================================================= */

.nutrition {
    display: inline-flex;
    align-items: stretch;

    margin-bottom: 30px;

    overflow: hidden;

    border-radius: 50px;

    background: var(--green-light);
    color: #35583f;
}


.nutrition-item {
    padding: 9px 13px;

    border-right: 1px solid rgba(53, 88, 63, 0.25);

    font-size: 10px;
    font-weight: 700;
}


.nutrition-item:last-child {
    border-right: none;
}


/* =========================================================
   INGREDIENTS
   ========================================================= */

.section-title {
    margin: 0 0 12px 0;

    color: var(--green);

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 1px;
    text-transform: uppercase;
}


.ingredients {
    margin: 0;
    padding: 0;

    list-style: none;
}


.ingredients li {
    padding: 7px 0;

    border-bottom: 1px solid #eeeeee;

    font-size: 14px;
}


/* =========================================================
   BUTTON
   ========================================================= */

.button {
    display: inline-block;

    margin-top: 24px;

    padding: 13px 22px;

    border: none;
    border-radius: 50px;

    background: var(--green);
    color: white;

    font-size: 13px;
    font-weight: 700;

    cursor: pointer;
}


.button:hover {
    background: var(--green-dark);
}


/* =========================================================
   WEEKMENU
   ========================================================= */

.week-grid {
    display: grid;

    grid-template-columns: repeat(7, 1fr);

    gap: 10px;
}


.day-card {
    min-height: 170px;

    padding: 15px;

    border: 1px solid var(--border);
    border-radius: 15px;

    background: #ffffff;
}


.day-name {
    margin-bottom: 15px;

    color: var(--green);

    font-size: 12px;
    font-weight: 700;

    text-transform: uppercase;
}


.day-meal {
    color: #555555;

    font-size: 13px;
    line-height: 1.4;
}


/* =========================================================
   BOODSCHAPPEN
   ========================================================= */

.shopping-list {
    max-width: 650px;
}


.shopping-category {
    margin-bottom: 28px;
}


.shopping-category h3 {
    margin: 0 0 10px 0;

    color: var(--green);

    font-size: 14px;
}


.shopping-item {
    display: flex;
    align-items: center;

    gap: 10px;

    padding: 10px 0;

    border-bottom: 1px solid var(--border);

    font-size: 14px;
}


.shopping-item input {
    width: 18px;
    height: 18px;

    accent-color: var(--green);
}


/* =========================================================
   RECEPTENOVERZICHT
   ========================================================= */

.recipe-search {
    margin-bottom: 18px;
}


.recipe-search input {
    width: 100%;

    padding: 15px 18px;

    border: 1px solid var(--border);
    border-radius: 50px;

    outline: none;

    background: #ffffff;

    color: var(--text);

    font-family: inherit;
    font-size: 14px;

    box-shadow:
        0 3px 15px rgba(0, 0, 0, 0.03);
}


.recipe-search input:focus {
    border-color: var(--green);
}


.category-buttons {
    display: flex;

    flex-wrap: wrap;

    gap: 8px;

    margin-bottom: 28px;
}


.category-button {
    padding: 8px 14px;

    border: none;
    border-radius: 50px;

    background: #f1f1f1;
    color: #666666;

    font-size: 10px;
    font-weight: 700;

    cursor: pointer;
}


.category-button.active {
    background: var(--green-light);
    color: var(--green);
}


/* =========================================================
   RECEPTEN GRID
   ========================================================= */

.recipe-grid {
    display: grid;

    grid-template-columns:
        repeat(3, 1fr);

    gap: 20px;
}


.recipe-tile {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 18px;

    background: #ffffff;

    box-shadow:
        0 5px 20px rgba(0, 0, 0, 0.05);

    cursor: pointer;

    transition:
        transform 0.15s ease,
        box-shadow 0.15s ease;
}


.recipe-tile:hover {
    transform: translateY(-3px);

    box-shadow:
        0 10px 30px rgba(0, 0, 0, 0.08);
}


.recipe-tile-image {
    width: 100%;
    height: 190px;

    background-size: cover;
    background-position: center;

    background-color: #eef2ee;
}


.recipe-tile-content {
    padding: 17px;
}


.recipe-tile-title {
    margin: 0 0 10px 0;

    color: var(--green);

    font-size: 18px;
    line-height: 1.2;
}


.recipe-tile-tags {
    display: flex;

    flex-wrap: wrap;

    gap: 5px;

    margin-bottom: 13px;
}


.recipe-tile-meta {
    display: flex;

    justify-content: space-between;

    color: var(--muted);

    font-size: 11px;
}


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

.mobile-navigation {
    display: none;
}


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

@media (max-width: 900px) {

    .recipe-grid {
        grid-template-columns:
            repeat(2, 1fr);
    }

}


@media (max-width: 750px) {

    .app {
        display: block;
    }


    .sidebar {
        display: none;
    }


    .content {
        margin-left: 0;

        padding:
            30px
            18px
            95px
            18px;
    }


    .page-header {
        margin-bottom: 28px;
    }


    .page-header h1 {
        font-size: 34px;
    }


    /* -----------------------------------------
       RECIPE
       ----------------------------------------- */

    .recipe-card {
        grid-template-columns: 1fr;

        border-radius: 18px;
    }


    .recipe-image {
        min-height: 280px;
    }


    .recipe-content {
        padding: 27px;
    }


    .recipe-title {
        font-size: 30px;
    }


    .nutrition {
        max-width: 100%;

        overflow-x: auto;

        border-radius: 25px;
    }


    .nutrition-item {
        white-space: nowrap;
    }


    /* -----------------------------------------
       RECEPTEN
       ----------------------------------------- */

    .recipe-grid {
        grid-template-columns: 1fr;
    }


    .recipe-tile-image {
        height: 220px;
    }


    /* -----------------------------------------
       WEEKMENU
       ----------------------------------------- */

    .week-grid {
        grid-template-columns: 1fr;

        gap: 10px;
    }


    .day-card {
        min-height: auto;
    }


    /* -----------------------------------------
       BOTTOM NAV
       ----------------------------------------- */

    .mobile-navigation {
        position: fixed;

        display: grid;

        grid-template-columns: repeat(4, 1fr);

        left: 0;
        right: 0;
        bottom: 0;

        z-index: 100;

        padding:
            8px
            8px
            calc(8px + env(safe-area-inset-bottom));

        border-top: 1px solid var(--border);

        background: rgba(255, 255, 255, 0.97);

        box-shadow:
            0 -5px 20px rgba(0, 0, 0, 0.06);
    }


    .mobile-nav-button {
        display: flex;

        flex-direction: column;
        align-items: center;

        justify-content: center;

        gap: 3px;

        padding: 6px 2px;

        border: none;

        background: transparent;
        color: #777777;

        font-size: 10px;

        cursor: pointer;
    }


    .mobile-nav-button .nav-icon {
        width: auto;

        font-size: 20px;
    }


    .mobile-nav-button.active {
        color: var(--green);

        font-weight: 700;
    }

}

/* =========================================================
   RECEPT DETAILPAGINA
   ========================================================= */

.back-button {
    display: inline-flex;
    align-items: center;

    margin-bottom: 24px;

    padding: 10px 16px;

    border: none;
    border-radius: 50px;

    background: var(--green-soft);
    color: var(--green);

    font-size: 12px;
    font-weight: 700;

    cursor: pointer;
}


.back-button:hover {
    background: var(--green-light);
}


.recipe-detail {
    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: 22px;

    background: #ffffff;

    box-shadow:
        0 8px 30px rgba(0, 0, 0, 0.06);
}


.recipe-detail-image {
    width: 100%;
    height: 430px;

    background-size: cover;
    background-position: center;
}


.recipe-detail-content {
    padding: 38px;
}


.recipe-detail-title {
    margin: 0 0 18px 0;

    color: var(--green);

    font-size: 38px;
    line-height: 1.1;
}


.recipe-detail-tags {
    display: flex;
    flex-wrap: wrap;

    gap: 7px;

    margin-bottom: 18px;
}


.recipe-detail-time {
    margin-bottom: 22px;

    color: var(--muted);

    font-size: 14px;
}


.recipe-detail-nutrition {
    display: inline-flex;
    align-items: stretch;

    margin-bottom: 35px;

    overflow: hidden;

    border-radius: 50px;

    background: var(--green-light);
    color: #35583f;
}


.recipe-detail-nutrition-item {
    padding: 10px 15px;

    border-right:
        1px solid
        rgba(53, 88, 63, 0.25);

    font-size: 10px;
    font-weight: 700;
}


.recipe-detail-nutrition-item:last-child {
    border-right: none;
}


.recipe-detail-section {
    margin-top: 30px;
}


.recipe-detail-section-title {
    margin: 0 0 14px 0;

    color: var(--green);

    font-size: 12px;
    font-weight: 700;

    letter-spacing: 1px;
    text-transform: uppercase;
}


.recipe-detail-ingredients {
    margin: 0;
    padding: 0;

    list-style: none;
}


.recipe-detail-ingredients li {
    padding: 9px 0;

    border-bottom:
        1px solid
        var(--border);

    font-size: 14px;
}


.recipe-detail-preparation {
    margin: 0;
    padding-left: 20px;
}


.recipe-detail-preparation li {
    margin-bottom: 12px;

    color: #444444;

    font-size: 14px;
    line-height: 1.5;
}


@media (max-width: 750px) {

    .back-button {
        margin-bottom: 18px;
    }


    .recipe-detail {
        border-radius: 18px;
    }


    .recipe-detail-image {
        height: 280px;
    }


    .recipe-detail-content {
        padding: 27px;
    }


    .recipe-detail-title {
        font-size: 30px;
    }


    .recipe-detail-nutrition {
        max-width: 100%;

        overflow-x: auto;

        border-radius: 25px;
    }


    .recipe-detail-nutrition-item {
        white-space: nowrap;
    }

}
