/* ================= VARIABLES ================= */
:root {
    --color-olive: #708238;
    --color-olive-dark: #556B2F;
    --color-white: #FFFFFF;
    --color-bg-light: #F9F9F7;
    --color-black: #1A1A1A;
    --color-brown: #3E2723;
    --color-brown-light: #5D4037;
    --font-main: 'Poppins', sans-serif;
    --font-heading: 'Playfair Display', serif;
}

/* ================= RESET & BASE ================= */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    color: var(--color-black);
    background-color: var(--color-bg-light);
    font-family: var(--font-main);
    line-height: 1.5;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    display: block;
}

button {
    cursor: pointer;
    border: none;
    font: inherit;
    background: none;
}

input,
select,
textarea {
    outline: none;
    font: inherit;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ================= TYPOGRAPHY ================= */
h1,
h2,
h3 {
    font-family: var(--font-heading);
    letter-spacing: 1px;
    color: var(--color-brown);
}

.section {
    margin-bottom: 50px;
}

/* ================= HEADER ================= */
.header {
    background-color: var(--color-olive-dark);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 14px rgba(60, 75, 40, 0.4);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
}

.header-actions {
    display: flex;
    gap: 15px;
}

.header-btn {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.2s ease;
}

.header-btn:hover {
    transform: scale(1.2);
}

/* ================= ABOUT SECTION ================= */
.about-section {
    min-height: 100vh;
    position: relative;
    text-align: center;
    padding: 80px 20px;
    background: url("../images/about/about-hero.jpg") no-repeat center/cover fixed;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.about-section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(2px);
    z-index: 1;
}

.about-section>* {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    width: 100%;
}

.about-title {
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--color-white);
    margin-bottom: 30px;
    text-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.about-description {
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: var(--color-white);
    max-width: 1000px;
    margin: 0 auto 30px;
    font-weight: 500;
    line-height: 1.6;
}

.about-stats {
    display: flex;
    justify-content: space-around;
    align-items: center;
    margin: 60px auto 0;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    max-width: 800px;
    color: var(--color-white);
}

.stat-item {
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-item b {
    display: block;
    font-size: 4rem;
    margin-bottom: 5px;
    color: var(--color-olive);
}

/* ================= RECIPES LAYOUT (DESKTOP) ================= */
.recipes-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-align: center;
    margin: 40px 0 20px;
}

.recipes-description {
    max-width: 1000px;
    margin: 0 auto 40px;
    text-align: center;
    padding: 0 20px;
    font-weight: 500;
}

.mobile-filter-wrapper {
    display: none;
}

.recipes-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    max-width: 1600px;
    /* Широкий контейнер для 4 карток */
    margin: 0 auto;
    padding: 0 40px 40px;
}

/* ================= ФІЛЬТР ================= */
.recipes-filter {
    background: var(--color-white);
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 80px;
    height: fit-content;
}

.filter-group {
    margin-bottom: 25px;
}

.filter-input {
    width: 100%;
    padding: 10px 15px;
    border-radius: 8px;
    border: 1px solid #ccc;
}

select.filter-input {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    font-family: var(--font-main);
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 16px;
    padding-right: 48px;
}

select.filter-input::-ms-expand {
    display: none;
}

.filter-title {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.filter-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.filter-btn {
    text-align: left;
    padding: 8px 15px;
    border-radius: 8px;
    color: var(--color-brown-light);
    transition: 0.3s;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--color-olive);
    color: var(--color-white);
}

/* ================= ГРИД КАРТОЧОК ================= */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
    gap: 30px;
    align-items: stretch;
}

/* ================= RECIPE CARD ================= */
.recipe-card {
    width: 100%;
    min-height: 380px;
    height: 100%;
    background: var(--color-white);
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
}

.recipe-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.recipe-img-wrapper {
    width: 100%;
    height: 200px;
    overflow: hidden;
    flex-shrink: 0;
}

.recipe-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s;
}

.recipe-card:hover .recipe-img-wrapper img {
    transform: scale(1.1);
}

.recipe-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.recipe-card-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.recipe-card-description {
    font-size: 0.9rem;
    color: #666;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 15px;
}

.recipe-info {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--color-olive-dark);
    font-weight: 600;
}

/* ================= LOAD MORE BUTTON ================= */
.load-more-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
}

.load-more-button {
    display: flex;
    align-items: center;
    gap: 8px;
    background-color: var(--color-olive);
    color: white;
    padding: 12px 40px;
    border-radius: 30px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.load-more-button:hover {
    background-color: var(--color-olive-dark);
    transform: scale(1.05);
}

/* ================= MOBILE & TABLET (ADAPTIVE) ================= */
@media screen and (max-width: 1024px) {
    .recipes-layout {
        display: block;
    }

    .mobile-filter-wrapper {
        display: flex;
        justify-content: center;
        margin-bottom: 30px;
    }

    .mobile-filter-btn {
        background: var(--color-olive);
        color: white;
        padding: 12px 30px;
        border-radius: 50px;
        font-weight: 600;
    }

    .recipes-filter {
        position: fixed;
        top: 0;
        left: -100%;
        width: 300px;
        height: 100vh;
        z-index: 1000;
        transition: 0.4s;
        border-radius: 0 20px 20px 0;
    }

    .recipes-filter.active {
        left: 0;
    }

    .filter-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        display: none;
        backdrop-filter: blur(2px);
    }

    .filter-overlay.active {
        display: block;
    }

    .close-filter-btn {
        display: block;
        font-size: 2rem;
        text-align: right;
        width: 100%;
    }
}