/* --- 1. FONTS & VARIABLES --- */
@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Sora:wght@500;600;700;800&display=swap');

:root {
    --bg: #171816;
    --bg2: #1d1e1b;
    --surface: #252622;
    --text: #f4f0e8;
    --muted: #aaa79f;
    --line: #343530;
    --accent: #f08a32;
    --accent2: #ff9d48;
    --max: 1280px;
    --radius: 12px;
}

/* --- 2. GLOBAL RESET & BASE --- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: 'Manrope', sans-serif; line-height: 1.55; }
a { color: inherit; text-decoration: none; transition: color 0.2s; }
img { max-width: 100%; display: block; }
.container { width: min(var(--max), calc(100% - 48px)); margin: auto; }
::selection { background: var(--accent); color: #fff; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #333; border-radius: 5px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* --- 3. HEADER & NAV --- */
.site-header { height: 76px; position: relative; z-index: 30; background: rgba(23, 24, 22, .96); border-bottom: 1px solid #30312d; backdrop-filter: blur(5px); }
.header-inner { height: 76px; display: flex; align-items: center; }
.brand { display: flex; align-items: center; flex: 0 0 auto; }
.brand > img.brand-logo { width: 260px; height: auto; display: block; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 34px; }
.nav > a { font-family: 'Manrope', sans-serif; font-size: 14px; font-weight: 600; color: #b9b6ae; padding: 29px 0; position: relative; }
.nav > a:hover, .nav > a.active { color: var(--text); }
.nav > a.active:after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--accent); }

.header-search { display: flex; width: 215px; height: 38px; background: #292a27; border-radius: 20px; margin-left: 20px; overflow: hidden; transition: all 0.3s; }
.header-search:focus-within { box-shadow: 0 0 0 1px var(--accent); background: #2f302c; }
.header-search input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--text); padding: 0 13px; font: 11px 'Manrope'; }
.header-search input::placeholder { color: #85837d; }
.header-search button { border: 0; background: transparent; color: var(--accent); width: 40px; display: grid; place-items: center; cursor: pointer; }
.header-search button svg { width: 16px; height: 16px; stroke: var(--accent); fill: none; stroke-width: 2; }
.menu-toggle { display: none; margin-left: auto; background: none; border: 0; color: var(--text); font-size: 24px; cursor: pointer; }

/* --- 4. HERO SECTION (HOME) --- */
.home-hero { position: relative; min-height: 600px; border-bottom: 1px solid var(--line); overflow: hidden; display: flex; align-items: center; }
.hero-media { position: absolute; inset: 0; z-index: 1; }
.hero-media img { width: 100%; height: 100%; object-fit: cover; position: absolute; top: 0; left: 0; transition: opacity 0.4s ease; }
.hero-shade { position: absolute; inset: 0; z-index: 2; background: linear-gradient(90deg, rgba(23,24,22,0.95) 0%, rgba(23,24,22,0.8) 40%, rgba(23,24,22,0.2) 75%, rgba(23,24,22,0) 100%), linear-gradient(0deg, rgba(23,24,22,0.8) 0%, rgba(23,24,22,0) 40%); }
.hero-inner { position: relative; z-index: 3; width: min(var(--max), calc(100% - 48px)); margin: 0 auto; padding: 60px 0; min-height: 600px; display: flex; align-items: center; animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1); }
.hero-copy { width: 55%; max-width: 650px; }
.hero-kicker { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; color: var(--accent); margin-bottom: 14px; display: block; }
.hero-copy h1 { font-family: 'Sora', sans-serif; font-weight: 700; font-size: clamp(47px, 4.7vw, 72px); line-height: 1.02; margin: 0 0 24px; }
.hero-copy h1 span { color: var(--accent); }
.hero-copy p { font-size: 17px; line-height: 1.6; color: #cfcac2; max-width: 430px; margin: 0 0 32px; }

.button { display: inline-flex; align-items: center; gap: 10px; padding: 13px 24px; border-radius: 7px; font-size: 13px; font-weight: 700; transition: all 0.3s; }
.button-primary { background: var(--accent); color: #181916; box-shadow: 0 4px 15px rgba(240, 138, 50, 0.15); }
.button-primary:hover { background: var(--accent2); transform: translateY(-2px); box-shadow: 0 8px 25px rgba(240, 138, 50, 0.35); }

.hero-feature { position: absolute; right: 0; bottom: 40px; background: rgba(23, 24, 22, 0.85); backdrop-filter: blur(8px); padding: 20px; border-radius: 12px; border: 1px solid rgba(255,255,255,0.1); max-width: 350px; z-index: 4; transition: transform 0.3s ease; }
.hero-feature:hover { transform: translateY(-5px); border-color: var(--accent); }
.hero-feature span { font-size: 10px; color: var(--accent); text-transform: uppercase; margin-bottom: 8px; display: block; }
.hero-feature strong { font-size: 18px; line-height: 1.3; color: #fff; margin-bottom: 10px; display: block; transition: opacity 0.3s; }
.hero-feature small { font-size: 12px; color: var(--muted); }

.hero-controls { position: absolute; right: 0; bottom: 28px; display: flex; gap: 7px; z-index: 5; }
.hero-controls i { width: 23px; height: 3px; background: var(--accent); margin-right: auto; }
.hero-controls button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: rgba(255,255,255,.09); color: #eee; cursor: pointer; transition: 0.2s; }
.hero-controls button:hover { background: var(--accent); color: #fff; }

@keyframes fadeInUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

/* --- 5. SECTIONS & GRIDS --- */
.section { padding: 64px 0; }
.category-section { background: #1b1c19; border-bottom: 1px solid #292a27; }
.section-head { display: flex; align-items: end; justify-content: space-between; margin-bottom: 24px; }
.section-head h2 { font-family: 'Sora', sans-serif; font-size: clamp(29px, 3vw, 40px); margin: 7px 0 0; }
.eyebrow { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; font-weight: 700; color: var(--accent); display: block; margin-bottom: 8px; }
.arrow-link { font-size: 11px; color: var(--accent); font-weight: 600; }

.category-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.category-card { position: relative; height: 150px; overflow: hidden; border: 1px solid #363732; border-radius: 11px; background: #242521; transition: 0.3s; }
.category-card:hover { border-color: var(--accent); }
.category-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: 0.6s; }
.category-card:hover img { transform: scale(1.06); }
.category-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, rgba(9,10,9,0.95) 0%, rgba(9,10,9,0.5) 45%, rgba(9,10,9,0) 85%); }
.category-card-body { position: absolute; left: 16px; bottom: 14px; z-index: 2; }
.category-card-body strong { display: block; font: 700 16px/1.15 'Manrope', sans-serif; text-shadow: 0 2px 4px rgba(0,0,0,0.8); }
.category-card-body span { font-size: 10px; color: #aaa79f; text-shadow: 0 1px 3px rgba(0,0,0,0.8); }

.recipe-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.recipe-card { background: #20211e; border: 1px solid #33342f; border-radius: 10px; overflow: hidden; transition: 0.3s; box-shadow: 0 4px 20px rgba(0,0,0,0.1); }
.recipe-card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: 0 12px 30px rgba(0,0,0,0.3); }
.card-image { position: relative; aspect-ratio: 1.8; overflow: hidden; background: #242521; }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s; }
.recipe-card:hover .card-image img { transform: scale(1.035); filter: brightness(1.08); }
.recipe-tag { position: absolute; top: 12px; left: 12px; padding: 4px 8px; border: 1px solid var(--accent); border-radius: 5px; color: var(--accent); font-size: 9px; background: rgba(17,18,16,.72); }
.card-body { padding: 15px 16px 17px; }
.card-body h3 { font: 700 18px/1.2 'Manrope', sans-serif; margin: 0 0 13px; }

/* --- 6. PAGE INTRO (WITH BACKGROUND TEXTURE) --- */
.page-intro { 
    padding: 65px 0 50px; 
    background: var(--bg2); 
    border-bottom: 1px solid var(--line); 
    position: relative; 
    overflow: hidden;
}

/* Фоновая картинка с затемнением */
.page-intro::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: url('/assets/img/bg-texture.jpg'); /* Путь к твоему фото */
    background-size: cover;
    background-position: center;
    opacity: 0.15; /* Сильное затемнение (15% видимости) */
    z-index: 0;
    pointer-events: none;
}

/* Контент поверх фона */
.page-intro .container {
    position: relative;
    z-index: 1;
}

.page-intro h1 { font-family: 'Manrope', sans-serif; font-weight: 800; font-size: clamp(46px, 6vw, 76px); margin: 12px 0; }
.page-intro h1 em { display: block; font-style: normal; color: var(--text); margin-top: 4px; }

/* About & Donate Shared Styles */
.about-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin: 40px 0 20px; }
.about-card { background: var(--surface); border: 1px solid var(--line); padding: 24px; border-radius: var(--radius); transition: 0.2s; }
.about-card:hover { transform: translateY(-3px); border-color: var(--accent); }
.about-card h3 { font-size: 18px; margin: 0 0 10px 0; color: var(--text); }
.about-card p { color: var(--muted); font-size: 14px; margin: 0; }

.contact-box { background: linear-gradient(145deg, var(--surface), var(--bg2)); border: 1px solid var(--line); border-radius: var(--radius); padding: 40px 20px; text-align: center; max-width: 700px; margin: 20px auto 0; }
.btn-email { display: inline-flex; align-items: center; gap: 10px; background: var(--accent); color: #181916; padding: 12px 24px; border-radius: 7px; font-weight: 700; margin-top: 15px; text-decoration: none; }
.btn-email:hover { background: var(--accent2); }

/* Donate Specifics */
.donate-wrapper { max-width: 800px; margin: 0 auto; text-align: center; }
.donate-title { white-space: nowrap; }
.donate-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 40px 0; text-align: left; }

/* --- 7. RECIPE PAGE & GALLERY --- */
.recipe-container { max-width: 1140px; }
.recipe-top { padding: 55px 0 40px; }
.recipe-top h1 { font-size: clamp(46px, 6vw, 76px); margin: 12px 0 20px; max-width: 100%; }
.lead { font-size: 19px; color: #d0ccc4; max-width: 850px; }
.back { color: var(--muted); font-size: 12px; display: inline-block; margin-bottom: 15px; opacity: 0.7; }
.back:hover { opacity: 1; color: var(--accent); }

.recipe-cover { margin: 12px 0 55px; border-radius: 12px; overflow: hidden; border: 1px solid #30312d; }
.recipe-cover img { width: 100%; max-height: 700px; object-fit: cover; }

.recipe-layout { display: grid; grid-template-columns: 270px 1fr; gap: 60px; }
.ingredients { position: sticky; top: 95px; background: var(--surface); border: 1px solid #343530; border-radius: 10px; padding: 21px; height: fit-content; align-self: start; }
.block-label { font-size: 10px; letter-spacing: 1.7px; text-transform: uppercase; color: var(--accent); padding-bottom: 11px; border-bottom: 1px solid var(--line); margin-bottom: 15px; font-weight: 700; }
.ingredients li { padding: 9px 0; border-bottom: 1px solid #343530; font-size: 14px; list-style: none; }

.step { display: grid; grid-template-columns: 42px 1fr; gap: 15px; padding-bottom: 28px; margin-bottom: 28px; border-bottom: 1px solid var(--line); }
.step-num { color: var(--accent); font-weight: 700; }
.step h2 { font: 700 23px/1.2 'Manrope', sans-serif; margin: 0 0 8px; }
.step p { color: #cbc7bf; font-size: 16px; margin: 0 0 9px; }

/* Gallery Scroller */
.gallery-scroller { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 15px; }
.gallery-scroller::-webkit-scrollbar { height: 6px; }
.gallery-scroller::-webkit-scrollbar-thumb { background: #444; border-radius: 4px; }
.gallery-item { flex: 0 0 auto; width: 280px; height: 200px; scroll-snap-align: start; border-radius: 10px; overflow: hidden; cursor: zoom-in; border: 1px solid var(--line); transition: 0.2s; }
.gallery-item:hover { transform: scale(1.02); border-color: var(--accent); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* Lightbox */
.lightbox-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.92); z-index: 9999; justify-content: center; align-items: center; backdrop-filter: blur(5px); }
.lightbox-overlay.active { display: flex; }
.lightbox-overlay img { max-width: 90%; max-height: 90vh; border-radius: 8px; }
.lightbox-close { position: absolute; top: 20px; right: 30px; color: #fff; font-size: 40px; background: none; border: none; cursor: pointer; }

.serving { background: #6e765b; padding: 30px; border-radius: 10px; margin-top: 60px; }
.serving p { font: 600 23px/1.4 'Manrope', sans-serif; margin: 0; color: #fff; }
.recipe-video video { width: 100%; height: auto; border-radius: 10px; display: block; }

/* --- 8. FOOTER --- */
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; color: #85827c; font-size: 11px; position: relative; }
.site-footer::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 100px; height: 1px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: 0.5; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; }
.footer-brand img { width: 150px; height: auto; }

/* --- 9. RESPONSIVE --- */
@media(max-width: 1000px) {
    .category-grid { grid-template-columns: repeat(3, 1fr); }
    .recipe-layout { grid-template-columns: 1fr; }
    .ingredients { position: static; margin-bottom: 30px; }
}

@media(max-width: 760px) {
    .container { width: calc(100% - 30px); }
    .site-header, .header-inner { height: 68px; }
    
    /* Mobile Nav Fix */
    .nav { 
        display: none; position: absolute; top: 68px; left: 0; right: 0; 
        background: #171816; 
        flex-direction: column; padding: 10px 15px; border-bottom: 1px solid var(--line); z-index: 99; 
        box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    }
    .nav.open { display: flex; }
    .nav > a { 
        padding: 12px 0 !important; 
        border-bottom: 1px solid var(--line); 
        width: 100%;
    }
    .nav > a:last-of-type { border-bottom: none; }
    .menu-toggle { display: block; }
    
    /* Hero Mobile */
    .home-hero { min-height: auto; flex-direction: column; justify-content: flex-end; }
    .hero-media img { position: relative; height: 300px; }
    .hero-inner { min-height: auto; padding: 30px 0; flex-direction: column; align-items: flex-start; width: calc(100% - 30px); }
    .hero-copy { width: 100%; }
    .hero-feature { position: relative; right: auto; bottom: auto; margin-top: 25px; width: 100%; background: var(--surface); }
    .hero-controls { display: none; }
    
    /* Grids Mobile */
    .recipe-grid, .category-grid { grid-template-columns: 1fr 1fr; }
    .gallery-item { width: 240px; height: 180px; }
    
    /* Donate Mobile */
    .donate-title { white-space: normal; font-size: 32px; }
    .donate-features { grid-template-columns: 1fr; }
}

@media(max-width: 500px) {
    .category-grid, .recipe-grid { grid-template-columns: 1fr; }
    .brand > img.brand-logo { width: 190px; }
}