/* ============================================
   БАЗОВЫЕ НАСТРОЙКИ (не меняем)
   ============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    flex: 1;
}

/* ============================================
   ВАРИАНТЫ ЦВЕТОВЫХ СХЕМ
   Выберите один вариант и раскомментируйте
   ============================================ */

/* --- ВАРИАНТ 1: Тёплый минимализм (рекомендую) --- */
/*:root {
    --bg-color: #faf3ed;
    --text-color: #2d1b12;
    --primary: #c87a4a;
    --primary-light: #f0d5c4;
    --primary-dark: #a85f33;
    --card-bg: #ffffff;
    --shadow: 0 8px 30px rgba(0,0,0,0.06);
    --shadow-hover: 0 20px 50px rgba(0,0,0,0.10);
    --radius: 24px;
    --header-bg: rgba(255, 248, 242, 0.85);
    --footer-bg: #1f1108;
    --footer-text: #d4c0b0;
    --border-light: #f0e2d8;
}
*/
/* --- ВАРИАНТ 2: Свежий травяной --- */

:root {
    --bg-color: #f6f9f0;
    --text-color: #1e2b1a;
    --primary: #6b8c5c;
    --primary-light: #d5e8cd;
    --primary-dark: #4d6a40;
    --card-bg: #ffffff;
    --shadow: 0 8px 30px rgba(0,0,0,0.05);
    --shadow-hover: 0 20px 50px rgba(0,0,0,0.08);
    --radius: 20px;
    --header-bg: rgba(246, 249, 240, 0.92);
    --footer-bg: #1a2616;
    --footer-text: #c4d4b8;
    --border-light: #e2ecda;
}


/* --- ВАРИАНТ 3: Элегантный тёмный (премиум) --- */
/*
:root {
    --bg-color: #1a1410;
    --text-color: #eee5dd;
    --primary: #d4a373;
    --primary-light: #8a6b52;
    --primary-dark: #b8895e;
    --card-bg: #2a221d;
    --shadow: 0 8px 30px rgba(0,0,0,0.3);
    --shadow-hover: 0 20px 50px rgba(0,0,0,0.5);
    --radius: 20px;
    --header-bg: rgba(26, 20, 16, 0.92);
    --footer-bg: #0f0b09;
    --footer-text: #a89282;
    --border-light: #3a2e28;
}
*/
/* ============================================
   ШАПКА
   ============================================ */
.header {
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
    text-decoration: none;
    letter-spacing: -0.5px;
    transition: transform 0.2s;
}

.logo:hover {
    transform: scale(1.02);
}

.logo span {
    color: var(--primary-dark);
    font-weight: 300;
}

/* Меню — современное, с активным состоянием */
.nav-menu {
    display: flex;
    gap: 8px;
    background: var(--card-bg);
    padding: 6px;
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    flex-wrap: wrap;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    padding: 8px 18px;
    border-radius: 30px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.25s ease;
}

.nav-menu a:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

.nav-menu a.active {
    background: var(--primary);
    color: white;
}

/* ============================================
   ХЛЕБНЫЕ КРОШКИ
   ============================================ */
.breadcrumb {
    margin: 30px 0 20px;
    padding: 12px 20px;
    background: var(--card-bg);
    border-radius: 16px;
    color: var(--text-color);
    font-size: 14px;
    opacity: 0.7;
    box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ============================================
   КАРТОЧКИ РЕЦЕПТОВ — СОВРЕМЕННАЯ СЕТКА
   ============================================ */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 28px;
    margin: 30px 0 50px;
}

.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.2, 0, 0, 1);
    cursor: pointer;
    position: relative;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

/* Бейдж категории на карточке */
.card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--primary);
    color: white;
    padding: 4px 14px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    backdrop-filter: blur(4px);
    background: rgba(200, 122, 74, 0.9);
}

.card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.4s;
}

.card:hover .card-img {
    transform: scale(1.02);
}

.card-content {
    padding: 22px 24px 24px;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
    line-height: 1.3;
}

.card-desc {
    color: var(--text-color);
    opacity: 0.7;
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--text-color);
    opacity: 0.6;
    border-top: 1px solid var(--border-light);
    padding-top: 14px;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ============================================
   СТРАНИЦА РЕЦЕПТА
   ============================================ */
.recipe-header {
    text-align: center;
    margin: 20px 0 30px;
}

.recipe-header h1 {
    font-size: 44px;
    font-weight: 800;
    color: var(--text-color);
    letter-spacing: -1px;
}

.recipe-header h1::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 12px auto 0;
    border-radius: 4px;
}

.recipe-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin: 30px 0;
}

.recipe-gallery img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    transition: transform 0.3s;
}

.recipe-gallery img:hover {
    transform: scale(1.02);
}

.recipe-info {
    background: var(--card-bg);
    padding: 28px 32px;
    border-radius: var(--radius);
    margin: 20px 0 30px;
    box-shadow: var(--shadow);
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.recipe-info-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
}

.recipe-info-item .icon {
    font-size: 22px;
}

.ingredients {
    background: var(--card-bg);
    padding: 28px 32px;
    border-radius: var(--radius);
    margin: 20px 0;
    box-shadow: var(--shadow);
}

.ingredients h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ingredients ul {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 4px;
}

.ingredients li {
    padding: 10px 14px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.ingredients li::before {
    content: '•';
    color: var(--primary);
    font-size: 20px;
}

.steps {
    background: var(--card-bg);
    padding: 28px 32px;
    border-radius: var(--radius);
    margin: 20px 0 40px;
    box-shadow: var(--shadow);
}

.steps h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 18px;
    color: var(--text-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.steps ol {
    padding-left: 0;
    list-style: none;
    counter-reset: step;
}

.steps ol li {
    counter-increment: step;
    padding: 14px 16px 14px 60px;
    position: relative;
    border-bottom: 1px solid var(--border-light);
    line-height: 1.7;
    font-size: 15px;
}

.steps ol li:last-child {
    border-bottom: none;
}

.steps ol li::before {
    content: counter(step);
    position: absolute;
    left: 12px;
    top: 14px;
    width: 32px;
    height: 32px;
    background: var(--primary-light);
    color: var(--primary-dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

/* ============================================
   ПОДВАЛ
   ============================================ */
.footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
}

.footer h4 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    color: white;
    letter-spacing: 0.5px;
}

.footer p {
    margin: 6px 0;
    opacity: 0.7;
    font-size: 14px;
}

.footer-bottom {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
    font-size: 13px;
    opacity: 0.5;
}

/* ============================================
   АДАПТИВНОСТЬ
   ============================================ */
@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .logo {
        text-align: center;
        font-size: 24px;
    }
    
    .nav-menu {
        justify-content: center;
        border-radius: 30px;
        padding: 4px;
        gap: 4px;
    }
    
    .nav-menu a {
        padding: 6px 14px;
        font-size: 13px;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .recipe-header h1 {
        font-size: 30px;
    }
    
    .recipe-info {
        flex-direction: column;
        gap: 12px;
        padding: 20px;
    }
    
    .ingredients, .steps {
        padding: 20px;
    }
    
    .ingredients ul {
        grid-template-columns: 1fr;
    }
    
    .steps ol li {
        padding: 12px 12px 12px 50px;
        font-size: 14px;
    }
    
    .steps ol li::before {
        width: 28px;
        height: 28px;
        font-size: 12px;
        left: 8px;
        top: 12px;
    }
    
    .recipe-gallery {
        grid-template-columns: 1fr;
    }
    
    .recipe-gallery img {
        height: 180px;
    }
    
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   ПАГИНАЦИЯ
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 40px 0 60px;
    flex-wrap: wrap;
}

.pagination button {
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border: 2px solid var(--border-light);
    background: var(--card-bg);
    color: var(--text-color);
    border-radius: 12px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.pagination button:hover:not(:disabled) {
    background: var(--primary-light);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.pagination button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.pagination button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: none;
}

.pagination .page-dots {
    color: var(--text-color);
    opacity: 0.5;
    padding: 0 8px;
    font-size: 18px;
    user-select: none;
}

@media (max-width: 600px) {
    .pagination button {
        min-width: 38px;
        height: 38px;
        font-size: 13px;
        padding: 0 8px;
    }
}