@import url('fonts.googleapis.com');
/* ============================================
   БАЗА: Сброс, шрифты, переменные
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Montserrat", sans-serif;
}

:root {
    /* ОСНОВНЫЕ ПЕРЕМЕННЫЕ */
    --transition: 0.35s ease;
    --font-main: "Montserrat", sans-serif;
    
/* ========== ИСПРАВЛЕННЫЕ ЦВЕТА ТЕМ ========== */

/* СВЕТЛАЯ ТЕМА (немного теплее) */
--bg-light: linear-gradient(160deg, #fef9f3, #f5e9d8);
--text-light: #4a3520; /* Мягче, чем чёрный */
--card-light: #fffaf0; /* Было #fff6e8 - стало ярче */
--accent-light: #d35400; /* ДОБАВЬ ЭТУ СТРОЧКУ! */
--shadow-light: rgba(0,0,0,0.15); /* ДОБАВЬ ЭТУ СТРОЧКУ! */

/* ТЁМНАЯ ТЕМА (добавим глубины) */
--bg-dark: linear-gradient(160deg, #0a0a0f, #151520);
--accent-dark: #9d7aff; /* Более мягкий фиолетовый */
--card-dark: #1a1a2e; /* Было #181820 - стало насыщеннее */
--shadow-dark: rgba(0,0,0,0.55); /* ДОБАВЬ ЭТУ СТРОЧКУ! */

/* ОРАНЖЕВАЯ ТЕМА (стала глубже и насыщеннее) */
--bg-orange: linear-gradient(160deg, #2d1508, #4a2a0d);
--card-orange: #1c1107;
--text-orange: #f5e9d9; /* Более тёплый и контрастный */
--accent-orange: #ff8c42; /* Менее кислотный */
--shadow-orange: rgba(0,0,0,0.4);

/* ЗОЛОТАЯ ТЕМА (более благородная) */
--bg-gold: linear-gradient(160deg, #3a3210, #6b5a1a);
--accent-gold: #ffcc33;
--card-gold: #2a240f; /* Было #2f260d */
--shadow-gold: rgba(0,0,0,0.55); /* ДОБАВЬ ЭТУ СТРОЧКУ! */

/* СИНЯЯ ТЕМА (глубже) */
--bg-blue: linear-gradient(160deg, #0b1528, #1a2f4d);
--card-blue: #1a2b3c; /* Было #132335 */
--accent-blue: #4aa8ff; /* ДОБАВЬ ЭТУ СТРОЧКУ! */
--shadow-blue: rgba(0,0,0,0.55); /* ДОБАВЬ ЭТУ СТРОЧКУ! */
--text-blue: #d6eaff; /* ДОБАВЬ ЭТУ СТРОЧКУ! */
}

/* ============================================
   ГЛОБАЛЬНАЯ ЧИТАЕМОСТЬ ТЕКСТА (ПРИОРИТЕТ №1)
   ============================================ */
body {
    background: var(--bg-orange);
    color: var(--text-orange);
    transition: background var(--transition), color var(--transition);
    min-height: 100vh;
    line-height: 1.6;
    
    /* УЛУЧШЕНИЕ ЧИТАЕМОСТИ: */
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-smoothing: antialiased;
}

/* ВСЕ текстовые элементы должны быть контрастными */
h1, h2, h3, h4, h5, h6,
p, li, span, a:not(nav a), /* Исключаем навигацию, у неё свои стили */
.text-block,
.recipe-body,
.recipe-card .info, /* Текст внутри карточек */
.hero-content {
    color: inherit;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); /* Лёгкая тень для отделения от фона */
}

/* УСИЛЕНИЕ КОНТРАСТА ДЛЯ СВЕТЛОЙ ТЕМЫ */
body.theme-light {
    color: #2a1d0f !important; /* Тёмно-коричневый вместо #5c3a21 */
}

body.theme-light h1,
body.theme-light h2,
body.theme-light h3,
body.theme-light p,
body.theme-light .text-block,
body.theme-light .hero-content {
    color: #2a1d0f !important;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
}

/* УСИЛЕНИЕ КОНТРАСТА ДЛЯ ТЁМНОЙ ТЕМЫ */
body.theme-dark {
    color: #f0f0f0 !important; /* Почти белый вместо #e6e6e6 */
}

body.theme-dark h1,
body.theme-dark h2,
body.theme-dark h3,
body.theme-dark p,
body.theme-dark .text-block,
body.theme-dark .hero-content {
    color: #f0f0f0 !important;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* УСИЛЕНИЕ ДЛЯ ЗОЛОТОЙ ТЕМЫ */
body.theme-gold {
    color: #fff8d6 !important; /* Ярче */
}

/* УСИЛЕНИЕ ДЛЯ СИНЕЙ ТЕМЫ */
body.theme-blue {
    color: #e8f3ff !important; /* Ярче */
}

/* ОРАНЖЕВУЮ ТЕМУ НЕ ТРОГАЕМ — она норм */

body.theme-light { background: var(--bg-light); color: var(--text-light); }
body.theme-dark { background: var(--bg-dark); color: var(--text-dark); }
body.theme-orange { background: var(--bg-orange); color: var(--text-orange); }
body.theme-gold { background: var(--bg-gold); color: var(--text-gold); }
body.theme-blue { background: var(--bg-blue); color: var(--text-blue); }

/* ============================================
   КОНТЕЙНЕР И ТИПОГРАФИКА
   ============================================ */
.container {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
}

h1, h2, h3 {
    margin-bottom: 20px;
    font-weight: 700;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    line-height: 1.2;
}

p {
    margin-bottom: 15px;
}
/* ============================================
   ШАПКА И НАВИГАЦИЯ (с текстурой дерева + БЕГУЩИЙ СВЕТ)
   ============================================ */
header {
    width: 100%;
    padding: 20px 0;
    display: flex;
    justify-content: center;
    background: transparent;
    position: relative;
    z-index: 10;
}

nav {
    display: flex;
    gap: 30px;
    font-weight: 600;
}

nav a {
    position: relative;
    padding: 8px 18px;
    text-decoration: none;
    color: inherit;
    font-weight: 700;
    transition: all 0.4s ease;
    border: 3px solid transparent;
    border-radius: 8px;
    background-clip: padding-box;
    overflow: hidden; /* Важно для эффекта бегущего света */
}

/* Текстура дерева для кнопок навигации (остаётся как было) */
nav a::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    z-index: -1;
    border-radius: 10px;
    background: url('../img/wood-texture.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    box-shadow: inset 0 0 60px rgba(255,255,255,0.15);
    animation: woodPulse 10s ease infinite;
}

@keyframes woodPulse {
    0% { background-position: 0% 0%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 100%; }
}

/* ЭФФЕКТ БЕГУЩЕГО СВЕТА (новый слой поверх дерева) */
nav a::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%; /* Начинается слева за пределами кнопки */
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.4), /* Яркая полоса света */
        transparent
    );
    transition: left 0.7s ease;
    z-index: -1; /* Между текстом и деревом */
    border-radius: 8px;
}

/* При наведении — свет пробегает слева направо */
nav a:hover::after {
    left: 100%; /* Уезжает вправо за пределы кнопки */
}

/* Усиливаем эффект при наведении */
nav a:hover {
    color: #fff;
    transform: translateY(-3px);
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.5);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* ============================================
   ПЕРЕКЛЮЧАТЕЛЬ ТЕМ
   ============================================ */
.theme-switch {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 10px 14px;
    border-radius: 8px;
    background: var(--accent-orange);
    color: #fff;
    cursor: pointer;
    font-weight: bold;
    z-index: 999;
    box-shadow: 0 4px 12px var(--shadow-orange);
    transition: background var(--transition), box-shadow var(--transition);
}

body.theme-light .theme-switch { background: var(--accent-light); box-shadow: 0 4px 12px var(--shadow-light); }
body.theme-dark .theme-switch { background: var(--accent-dark); box-shadow: 0 4px 12px var(--shadow-dark); }
body.theme-orange .theme-switch { background: var(--accent-orange); box-shadow: 0 4px 12px var(--shadow-orange); }
body.theme-gold .theme-switch { background: var(--accent-gold); box-shadow: 0 4px 12px var(--shadow-gold); }
body.theme-blue .theme-switch { background: var(--accent-blue); box-shadow: 0 4px 12px var(--shadow-blue); }

.theme-switch:hover {
    filter: brightness(1.2);
}

.text-center {
    text-align: center;
    font-size: 36px;
}

/* ============================================
   КАРТОЧКИ РЕЦЕПТОВ
   ============================================ */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 25px;
}
/* ============================================
   КАРТОЧКИ РЕЦЕПТОВ - ИСПРАВЛЕННЫЕ ЦВЕТА
   ============================================ */
.recipe-card {
    background: var(--card-orange);
    color: var(--text-orange); /* ЯВНО указываем цвет текста */
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 6px 20px var(--shadow-orange);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    position: relative;
    height: 100%;
    border: 1px solid rgba(255, 255, 255, 0.1); /* Лёгкая рамка для отделения */
}

/* Усиливаем цвета карточек для каждой темы */
body.theme-light .recipe-card {
    background: var(--card-light);
    color: var(--text-light);
    box-shadow: 0 6px 20px var(--shadow-light);
    border-color: rgba(0, 0, 0, 0.05);
}

body.theme-dark .recipe-card {
    background: var(--card-dark);
    color: var(--text-dark);
    box-shadow: 0 6px 20px var(--shadow-dark);
}

body.theme-gold .recipe-card {
    background: var(--card-gold);
    color: var(--text-gold);
    box-shadow: 0 6px 20px var(--shadow-gold);
}

body.theme-blue .recipe-card {
    background: var(--card-blue);
    color: var(--text-blue);
    box-shadow: 0 6px 20px var(--shadow-blue);
}

/* Эффект подъёма и наклона */
.recipe-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.4);
}

/* Свечение акцентного цвета по краям */
.recipe-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    box-shadow: 0 0 0 0 var(--accent-orange);
    transition: box-shadow 0.5s ease;
    pointer-events: none;
    z-index: 1;
}

.recipe-card:hover::after {
    box-shadow: 0 0 0 3px var(--accent-orange);
}

/* Цвет свечения для каждой темы */
body.theme-light .recipe-card:hover::after {
    box-shadow: 0 0 0 3px var(--accent-light);
}

body.theme-dark .recipe-card:hover::after {
    box-shadow: 0 0 0 3px var(--accent-dark);
}

body.theme-gold .recipe-card:hover::after {
    box-shadow: 0 0 0 3px var(--accent-gold);
}

body.theme-blue .recipe-card:hover::after {
    box-shadow: 0 0 0 3px var(--accent-blue);
}

/* Анимация изображения */
.recipe-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    transition: all 0.7s ease;
    filter: brightness(0.95);
    position: relative;
    z-index: 0;
}

.recipe-card:hover img {
    transform: scale(1.08);
    filter: brightness(1.05) contrast(1.1);
}

/* Анимация текста в карточке */
.recipe-card .info {
    padding: 20px;
    transition: transform 0.5s ease;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.recipe-card:hover .info {
    transform: translateY(-5px);
}

/* Кнопка внутри карточки */
.recipe-card .btn {
    margin-top: auto;
    transform: translateY(10px);
    opacity: 0.9;
    transition: all 0.4s ease;
    align-self: flex-start;
}

.recipe-card:hover .btn {
    transform: translateY(0);
    opacity: 1;
}

/* Усиливаем читаемость текста в карточках */
.recipe-card h3 {
    color: inherit;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.recipe-card p {
    color: inherit;
    opacity: 0.9;
    font-size: 0.95rem;
}

/* ============================================
   ТЕКСТОВЫЕ БЛОКИ
   ============================================ */
.text-block {
    text-align: justify;
    font-weight: 500;
    line-height: 1.65;
    font-size: 18px;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================
   КНОПКИ
   ============================================ */
/* ============================================
   КНОПКИ (ИСПРАВЛЕННЫЕ - РАБОТАЮТ В КАРТОЧКАХ)
   ============================================ */
.btn {
    display: inline-block;
    padding: 12px 18px;
    border-radius: 10px;
    text-decoration: none;
    color: #fff;
    background: var(--accent-orange);
    font-weight: 600;
    box-shadow: 0 4px 12px var(--shadow-orange);
    transition: all var(--transition);
    border: none;
    cursor: pointer;
}

/* ОБЩИЕ КНОПКИ (не в карточках) */
body.theme-light .btn { 
    background: var(--accent-light); 
    box-shadow: 0 4px 12px var(--shadow-light); 
}

body.theme-dark .btn { 
    background: var(--accent-dark); 
    box-shadow: 0 4px 12px var(--shadow-dark); 
}

body.theme-gold .btn { 
    background: var(--accent-gold); 
    box-shadow: 0 4px 12px var(--shadow-gold); 
}

body.theme-blue .btn { 
    background: var(--accent-blue); 
    box-shadow: 0 4px 12px var(--shadow-blue); 
}

/* КНОПКИ ВНУТРИ КАРТОЧЕК (особые правила) */
body.theme-light .recipe-card .btn {
    background: var(--accent-light) !important;
    box-shadow: 0 4px 12px var(--shadow-light) !important;
    color: white !important;
}

body.theme-dark .recipe-card .btn {
    background: var(--accent-dark) !important;
    box-shadow: 0 4px 12px var(--shadow-dark) !important;
    color: white !important;
}

body.theme-orange .recipe-card .btn {
    background: var(--accent-orange) !important;
    box-shadow: 0 4px 12px var(--shadow-orange) !important;
    color: white !important;
}

body.theme-gold .recipe-card .btn {
    background: var(--accent-gold) !important;
    box-shadow: 0 4px 12px var(--shadow-gold) !important;
    color: #1a1408 !important; /* Тёмный текст на золотом */
}

body.theme-blue .recipe-card .btn {
    background: var(--accent-blue) !important;
    box-shadow: 0 4px 12px var(--shadow-blue) !important;
    color: white !important;
}

/* ХОВЕР ДЛЯ ВСЕХ КНОПОК */
.btn:hover { 
    filter: brightness(1.2) translateY(-2px); 
}

.btn-outline {
    background: transparent;
    color: inherit;
    border: 2px solid rgba(255,255,255,0.12);
    box-shadow: none;
}

.btn-outline:hover {
    background: rgba(255,255,255,0.06);
}

/* ============================================
   ГЕРОЙ-БАННЕР (деревянный, с параллаксом)
   ============================================ */
.hero-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    margin-bottom: 40px;
    border: 4px solid #c1966a;
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.recipe-hero {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transform: translateY(0);
    transition: transform 0.2s ease-out;
}

/* ============================================
   ГЕРОЙ ЛЁГКИЙ (для страницы рецепта)
   ============================================ */
.hero-light {
    display: flex;
    flex-direction: column-reverse;
    position: relative;
    width: 100%;
    min-height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, #fff7ed, #ffe9d6);
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    overflow: hidden;
    text-align: center;
    padding: 20px;
    color: #5c3a21;
}

body.theme-dark .hero-light {
    background: linear-gradient(160deg, #1b1b25, #0f0f15);
    color: #e6e6e6;
}

.hero-light img {
    width: 100%;
    max-height: 75vh;
    height: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    margin-bottom: 12px;
    transition: transform 0.3s ease;
    object-fit: cover;
    object-position: center;
}


.hero-light h1 {
    font-size: clamp(24px, 4vw, 36px);
    margin-bottom: 20px;
}

.hero-light p {
    font-size: clamp(14px, 1.6vw, 18px);
    opacity: 0.9;
}

/* ============================================
   ГЕРОЙ "СОЛНЦЕ" (для about.html)
   ============================================ */
.hero-about {
    position: relative;
    width: 100%;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    border-radius: 16px;
    overflow: hidden;
    transition: background 0.6s ease;
}

/* Анимированное солнце (твой ахуенный эффект) */
.hero-about::after {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255,255,200,0.3) 0%, transparent 60%);
    animation: sun-glow 6s ease-in-out infinite alternate;
    z-index: 1;
}

@keyframes sun-glow {
    0% { transform: scale(0.9) rotate(0deg); opacity: 0.6; }
    50% { transform: scale(1.1) rotate(15deg); opacity: 0.85; }
    100% { transform: scale(0.9) rotate(0deg); opacity: 0.6; }
}

.hero-about .hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 40px;
    max-width: 800px;
    transition: color 0.6s ease;
}

.hero-about .hero-content h1 {
    font-size: clamp(32px, 5vw, 48px);
    margin-bottom: 15px;
    line-height: 1.1;
}

.hero-about .hero-content p {
    font-size: clamp(16px, 2vw, 20px);
    opacity: 0.9;
    line-height: 1.6;
}

/* Цвета текста для разных тем */
body.theme-light .hero-about .hero-content { color: #1c1c1c; }
body.theme-dark .hero-about .hero-content { color: #ffe6b8; }
body.theme-orange .hero-about .hero-content { color: #fff; }
body.theme-gold .hero-about .hero-content { color: #2a1f0f; }
body.theme-blue .hero-about .hero-content { color: #eef6ff; }

/* ============================================
   ВОЛНА ТЕКСТА (анимация для заголовков)
   ============================================ */
.text-wave {
    display: inline-block;
    position: relative;
}

.text-wave .char {
    display: inline-block;
    position: relative;
    animation: wave 3s ease-in-out infinite;
    animation-delay: calc(var(--char-index) * 0.05s);
}

@keyframes wave {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        text-shadow: 0 0 0 rgba(255, 255, 255, 0); 
    }
    25% { 
        transform: translateY(-6px) rotate(1deg); 
        text-shadow: 0 6px 12px rgba(255, 200, 100, 0.4); 
    }
    50% { 
        transform: translateY(3px) rotate(-1deg); 
        text-shadow: 0 3px 8px rgba(255, 220, 150, 0.3); 
    }
}

/* ============================================
   ФУТЕР (с текстурой дерева)
   ============================================ */
footer {
    background: var(--card-orange);
    padding: 30px 0;
    text-align: center;
    box-shadow: 0 -6px 20px rgba(0,0,0,0.2);
    position: relative;
    border-top: 10px solid #a97c50;
    margin-top: 60px;
}

body.theme-light footer { background: var(--card-light); }
body.theme-dark footer { background: var(--card-dark); }
body.theme-gold footer { background: var(--card-gold); }
body.theme-blue footer { background: var(--card-blue); }

footer::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 14px;
    background: url('../img/wood-texture-footer.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    box-shadow: inset 0 0 20px rgba(255,255,255,0.2);
}

/* ============================================
   СТРАНИЦА ОТДЕЛЬНОГО РЕЦЕПТА
   ============================================ */
.recipe-body {
    margin: 40px 0;
    padding: 30px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.recipe-body section {
    margin-bottom: 40px;
}

.recipe-body h2 {
    font-size: 28px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--accent-orange);
    color: inherit;
}

body.theme-light .recipe-body h2 { border-bottom-color: var(--accent-light); }
body.theme-dark .recipe-body h2 { border-bottom-color: var(--accent-dark); }
body.theme-gold .recipe-body h2 { border-bottom-color: var(--accent-gold); }
body.theme-blue .recipe-body h2 { border-bottom-color: var(--accent-blue); }

/* Ингредиенты */
.recipe-body ul {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.recipe-body li {
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border-left: 4px solid var(--accent-orange);
    transition: transform 0.3s ease, background 0.3s ease;
}

body.theme-light .recipe-body li { 
    background: rgba(0, 0, 0, 0.03); 
    border-left-color: var(--accent-light);
}
body.theme-dark .recipe-body li { border-left-color: var(--accent-dark); }
body.theme-gold .recipe-body li { border-left-color: var(--accent-gold); }
body.theme-blue .recipe-body li { border-left-color: var(--accent-blue); }

.recipe-body li:hover {
    transform: translateX(5px);
    background: rgba(255, 255, 255, 0.1);
}

/* Шаги приготовления */
.recipe-body ol {
    list-style: none;
    counter-reset: step-counter;
    padding-left: 0;
}

.recipe-body ol li {
    display: flex;
    align-items: center;
    gap: 10px;
    counter-increment: step-counter;
    margin-bottom: 25px;
    padding-left: 60px;
    position: relative;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.recipe-body ol li::before {
    content: counter(step-counter);
    width: 40px;
    height: 40px;
    background: var(--accent-orange);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

body.theme-light .recipe-body ol li::before { background: var(--accent-light); }
body.theme-dark .recipe-body ol li::before { background: var(--accent-dark); }
body.theme-gold .recipe-body ol li::before { background: var(--accent-gold); }
body.theme-blue .recipe-body ol li::before { background: var(--accent-blue); }

/* Кнопка "Назад" */
.recipe-body + .btn {
    display: block;
    width: fit-content;
    margin: 40px auto;
    padding: 15px 30px;
    font-size: 18px;
}

/* Адаптив для страницы рецепта */
@media (max-width: 768px) {
    .recipe-body {
        padding: 20px;
    }
    
    .recipe-body ul {
        grid-template-columns: 1fr;
    }
    
    .recipe-body ol li {
        padding: 15px 15px 15px 70px;
    }
    
    .recipe-body ol li::before {
        left: 15px;
        top: 15px;
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */
@media (max-width: 768px) {
    nav {
        display: grid; 
        grid-template-columns: 1fr 1fr;
        gap: 5px; 
        align-items: center; 
    }

    .theme-switch {
        position: fixed;
        top: 10px;
        right: 10px;
        padding: 3px 5px;
        border-radius: 8px;
        background: var(--accent-orange);
        color: #fff;
        cursor: pointer;
        font-weight: bold;
        z-index: 999;
        box-shadow: 0 4px 12px var(--shadow-orange);
        transition: background var(--transition), box-shadow var(--transition);
    }
    
    .recipe-grid { 
        grid-template-columns: 1fr; 
    }
    
    .recipe-card img { 
        height: 220px; 
    }
    
    h1 { 
        font-size: 28px; 
    }
    
    .hero-about {
        min-height: 200px;
    }
    
    .hero-about .hero-content {
        padding: 20px;
    }
    
    .hero-light {
        min-height: 200px;
        padding: 16px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .hero-about .hero-content h1 {
        font-size: 24px;
    }
    
    .hero-light h1 {
        font-size: 20px;
    }
    
    .text-block {
        padding: 15px;
        font-size: 16px;
    }
}
/* ============================================
   СТРАНИЦА ИСТОРИИ (history.html)
   ============================================ */

/* Хронология - вертикальная линия времени */
.history-timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto;
    padding-left: 40px;
}

/* Вертикальная линия */
.history-timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--accent-orange);
    border-radius: 2px;
}

body.theme-light .history-timeline::before { background: var(--accent-light); }
body.theme-dark .history-timeline::before { background: var(--accent-dark); }
body.theme-gold .history-timeline::before { background: var(--accent-gold); }
body.theme-blue .history-timeline::before { background: var(--accent-blue); }

/* Элементы хронологии */
.timeline-item {
    position: relative;
    margin-bottom: 40px;
    background: var(--card-orange);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px var(--shadow-orange);
    transition: transform 0.4s ease;
}

body.theme-light .timeline-item { 
    background: var(--card-light); 
    box-shadow: 0 5px 15px var(--shadow-light);
}
body.theme-dark .timeline-item { 
    background: var(--card-dark); 
    box-shadow: 0 5px 15px var(--shadow-dark);
}
body.theme-gold .timeline-item { 
    background: var(--card-gold); 
    box-shadow: 0 5px 15px var(--shadow-gold);
}
body.theme-blue .timeline-item { 
    background: var(--card-blue); 
    box-shadow: 0 5px 15px var(--shadow-blue);
}

.timeline-item:hover {
    transform: translateY(-5px);
}

/* Точка на линии времени */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -50px;
    top: 30px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--accent-orange);
    border: 4px solid var(--card-orange);
    box-shadow: 0 0 0 3px var(--accent-orange);
    z-index: 2;
}

body.theme-light .timeline-item::before { 
    background: var(--accent-light); 
    border-color: var(--card-light);
    box-shadow: 0 0 0 3px var(--accent-light);
}
body.theme-dark .timeline-item::before { 
    background: var(--accent-dark); 
    border-color: var(--card-dark);
    box-shadow: 0 0 0 3px var(--accent-dark);
}
body.theme-gold .timeline-item::before { 
    background: var(--accent-gold); 
    border-color: var(--card-gold);
    box-shadow: 0 0 0 3px var(--accent-gold);
}
body.theme-blue .timeline-item::before { 
    background: var(--accent-blue); 
    border-color: var(--card-blue);
    box-shadow: 0 0 0 3px var(--accent-blue);
}

/* Год/дата */
.timeline-date {
    display: inline-block;
    background: var(--accent-orange);
    color: white;
    padding: 6px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 15px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.2);
}

body.theme-light .timeline-date { background: var(--accent-light); }
body.theme-dark .timeline-date { background: var(--accent-dark); }
body.theme-gold .timeline-date { 
    background: var(--accent-gold); 
    color: #1a1408;
}
body.theme-blue .timeline-date { background: var(--accent-blue); }

/* Заголовок события */
.timeline-title {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: inherit;
}

/* Текст события */
.timeline-content {
    color: inherit;
    opacity: 0.9;
    line-height: 1.6;
}

/* Исторические изображения */
.history-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin: 40px 0;
}

.history-image {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 4/3;
}

.history-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.history-image:hover img {
    transform: scale(1.1);
}

/* Подпись к изображению */
.history-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 10px;
    font-size: 14px;
    text-align: center;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.history-image:hover .history-caption {
    transform: translateY(0);
}

/* Цитаты из истории */
.history-quote {
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.6;
    padding: 25px;
    margin: 30px 0;
    background: rgba(255,255,255,0.05);
    border-left: 5px solid var(--accent-orange);
    border-radius: 0 10px 10px 0;
    position: relative;
}

body.theme-light .history-quote { 
    background: rgba(0,0,0,0.03); 
    border-left-color: var(--accent-light);
}
body.theme-dark .history-quote { border-left-color: var(--accent-dark); }
body.theme-gold .history-quote { border-left-color: var(--accent-gold); }
body.theme-blue .history-quote { border-left-color: var(--accent-blue); }

.history-quote::before {
    content: '"';
    font-size: 4rem;
    position: absolute;
    top: -20px;
    left: 10px;
    opacity: 0.2;
    font-family: Georgia, serif;
}

.history-quote cite {
    display: block;
    margin-top: 10px;
    font-style: normal;
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Адаптивность для истории */
@media (max-width: 768px) {
    .history-timeline {
        padding-left: 30px;
    }
    
    .history-timeline::before {
        left: 15px;
    }
    
    .timeline-item::before {
        left: -35px;
    }
    
    .timeline-item {
        padding: 20px;
    }
    
    .history-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .history-gallery {
        grid-template-columns: 1fr;
    }
    
    .timeline-item::before {
        left: -25px;
        width: 15px;
        height: 15px;
    }
    
    .history-quote {
        padding: 20px;
        font-size: 1rem;
    }
}

/* Анимация появления элементов истории */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-item {
    animation: fadeInUp 0.6s ease forwards;
}



.timeline-item:nth-child(2) { animation-delay: 0.2s; }
.timeline-item:nth-child(3) { animation-delay: 0.4s; }
.timeline-item:nth-child(4) { animation-delay: 0.6s; }
.timeline-item:nth-child(5) { animation-delay: 0.8s; }

