/*
Theme Name: Flavor Kitchen
Theme URI: https://goodrec.ru
Author: Алексей Новиков
Author URI: https://goodrec.ru
Description: Домашняя кулинария и семейные рецепты от души
Version: 1.0.0
License: GNU General Public License v2 or later
Text Domain: flavor-kitchen
*/

:root {
    --primary: #e67e22;
    --primary-dark: #d35400;
    --secondary: #27ae60;
    --text: #2c3e50;
    --text-light: #7f8c8d;
    --bg: #fdfcfb;
    --bg-alt: #fef9f3;
    --border: #ecf0f1;
    --shadow: 0 2px 15px rgba(0,0,0,0.08);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: "Segoe UI", "Roboto", -apple-system, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
}

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

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

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.site-logo {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-logo span { color: var(--primary); }

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 25px;
    flex-wrap: wrap;
}

.main-nav a {
    color: var(--text);
    font-weight: 500;
    padding: 8px 0;
}

.main-nav a:hover { color: var(--primary); }

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--bg-alt) 0%, #fff 100%);
    padding: 50px 0 40px;
    text-align: center;
}

.hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.5rem);
    margin-bottom: 15px;
    color: var(--text);
}

.hero p {
    font-size: 1.1rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* Recipe Grid */
.recipes-section { padding: 50px 0; }

.section-heading {
    font-size: 1.8rem;
    margin-bottom: 30px;
    position: relative;
    display: inline-block;
}

.section-heading::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.recipe-card {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s, box-shadow 0.3s;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.recipe-card-image {
    height: 200px;
    background: var(--bg-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: var(--primary);
    overflow: hidden;
}

.recipe-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-card-content { padding: 20px; }

.recipe-card h3 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    line-height: 1.4;
}

.recipe-card h3 a { color: var(--text); }
.recipe-card h3 a:hover { color: var(--primary); }

.recipe-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

.recipe-meta {
    display: flex;
    gap: 15px;
    margin-top: 15px;
    font-size: 0.85rem;
    color: var(--text-light);
}

.recipe-meta span { display: flex; align-items: center; gap: 5px; }

/* Single Post */
.single-recipe {
    padding: 40px 0 60px;
}

.single-recipe .container {
    max-width: 800px;
}

.recipe-header {
    margin-bottom: 30px;
}

.recipe-header h1 {
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    line-height: 1.3;
    margin-bottom: 15px;
}

.recipe-info {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    color: var(--text-light);
    font-size: 0.9rem;
}

.recipe-content {
    font-size: 1.05rem;
}

.recipe-content h2 {
    font-size: 1.4rem;
    margin: 30px 0 15px;
    color: var(--text);
}

.recipe-content h3 {
    font-size: 1.2rem;
    margin: 25px 0 12px;
}

.recipe-content p { margin-bottom: 18px; }

.recipe-content ul, .recipe-content ol {
    margin: 0 0 20px 25px;
}

.recipe-content li { margin-bottom: 8px; }

.recipe-content img {
    border-radius: 10px;
    margin: 25px 0;
}

/* Sidebar */
.with-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 40px;
}

@media (max-width: 900px) {
    .with-sidebar { grid-template-columns: 1fr; }
}

.sidebar-widget {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: var(--shadow);
}

.sidebar-widget h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.sidebar-widget ul { list-style: none; }

.sidebar-widget li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.sidebar-widget li:last-child { border: none; }

.sidebar-widget a { color: var(--text); }
.sidebar-widget a:hover { color: var(--primary); }

/* Footer */
.site-footer {
    background: var(--text);
    color: #bdc3c7;
    padding: 40px 0 25px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h5 {
    color: #fff;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: #bdc3c7; }
.footer-col a:hover { color: var(--primary); }

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #3d566e;
    font-size: 0.9rem;
}

/* Breadcrumbs */
.breadcrumbs {
    padding: 15px 0;
    font-size: 0.9rem;
    color: var(--text-light);
}

.breadcrumbs a { color: var(--text-light); }
.breadcrumbs a:hover { color: var(--primary); }

/* Search Form */
.search-box {
    display: flex;
    gap: 8px;
}

.search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.95rem;
}

.search-box button {
    background: var(--primary);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}

.search-box button:hover { background: var(--primary-dark); }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 40px;
}

.pagination a, .pagination span {
    padding: 10px 15px;
    background: #fff;
    border-radius: 6px;
    box-shadow: var(--shadow);
}

.pagination .current {
    background: var(--primary);
    color: #fff;
}

/* Page Content */
.page-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

/* Mobile */
@media (max-width: 768px) {
    .site-header .container { justify-content: center; text-align: center; }
    .main-nav ul { justify-content: center; gap: 15px; }
    .hero { padding: 35px 0 30px; }
    .recipes-section { padding: 35px 0; }
    .recipe-grid { gap: 20px; }
}
