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

:root {
    --color-bg: #fefcf9;
    --color-text: #2c2c2c;
    --color-heading: #1a1a1a;
    --color-accent: #c0392b;
    --color-accent-light: #e74c3c;
    --color-link: #b33025;
    --color-link-hover: #8e241b;
    --color-muted: #6b6b6b;
    --color-border: #e8e0d6;
    --color-card-bg: #fff;
    --color-footer-bg: #1a1a1a;
    --color-footer-text: #ccc;
    --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-heading: Georgia, 'Times New Roman', serif;
    --max-width: 1100px;
    --gap: 2rem;
}

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

body {
    font-family: var(--font-body);
    color: var(--color-text);
    background: var(--color-bg);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--color-link); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--color-link-hover); text-decoration: underline; }

.container { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; }

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

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.site-logo {
    font-size: 1.25rem;
    color: var(--color-accent);
    text-decoration: none;
    letter-spacing: -0.02em;
}
.site-logo:hover { color: var(--color-accent-light); text-decoration: none; }

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 1.5rem;
}

.main-nav a {
    font-size: 0.9rem;
    color: var(--color-text);
    font-weight: 500;
    padding: 0.25rem 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

.main-nav a:hover {
    color: var(--color-accent);
    border-bottom-color: var(--color-accent);
    text-decoration: none;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 28px;
    height: 20px;
    position: relative;
}

.menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    position: absolute;
    left: 0;
    transition: transform 0.3s, opacity 0.3s;
}

.menu-toggle span:nth-child(1) { top: 0; }
.menu-toggle span:nth-child(2) { top: 9px; }
.menu-toggle span:nth-child(3) { top: 18px; }

.menu-toggle.active span:nth-child(1) { transform: rotate(45deg); top: 9px; }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: rotate(-45deg); top: 9px; }

/* === BREADCRUMB === */
.breadcrumb {
    background: #f9f6f2;
    border-bottom: 1px solid var(--color-border);
    padding: 0.6rem 0;
    font-size: 0.85rem;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
}

.breadcrumb li::after { content: '›'; margin-left: 0.3rem; color: var(--color-muted); }
.breadcrumb li:last-child::after { display: none; }
.breadcrumb li:last-child { color: var(--color-muted); }

/* === MAIN CONTENT === */
.main-content {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--gap) 1.5rem 3rem;
}

.article h1 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: var(--color-heading);
    line-height: 1.25;
    margin-bottom: 1rem;
}

.intro {
    font-size: 1.1rem;
    color: var(--color-muted);
    line-height: 1.8;
    margin-bottom: 2rem;
    border-left: 3px solid var(--color-accent);
    padding-left: 1rem;
}

/* === TABLE OF CONTENTS === */
.toc {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}

.toc h2 { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }
.toc ol { padding-left: 1.25rem; }
.toc li { margin-bottom: 0.35rem; font-size: 0.92rem; }

/* === CONTENT BODY === */
.content-body h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--color-heading);
    margin: 2.5rem 0 1rem;
    padding-bottom: 0.4rem;
    border-bottom: 2px solid var(--color-border);
}

.content-body h3 {
    font-size: 1.25rem;
    color: var(--color-heading);
    margin: 2rem 0 0.75rem;
}

.content-body p { margin-bottom: 1.2rem; }

.content-body ul, .content-body ol {
    margin-bottom: 1.2rem;
    padding-left: 1.5rem;
}

.content-body li { margin-bottom: 0.4rem; }

.content-body blockquote {
    border-left: 3px solid var(--color-accent);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    background: #faf7f4;
    font-style: italic;
    color: var(--color-muted);
}

/* === CARDS GRID (hub pages) === */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: 1.5rem;
    transition: box-shadow 0.2s, transform 0.15s;
}

.card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transform: translateY(-2px);
}

.card h3 { font-size: 1.15rem; margin-bottom: 0.5rem; }
.card h3 a { color: var(--color-heading); }
.card h3 a:hover { color: var(--color-accent); text-decoration: none; }
.card p { font-size: 0.9rem; color: var(--color-muted); margin: 0; }

/* === RECIPE SPECIFIC === */
.recipe-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin: 1.5rem 0;
    padding: 1rem 1.5rem;
    background: #f9f6f2;
    border-radius: 6px;
    font-size: 0.9rem;
}

.recipe-meta dt { font-weight: 600; color: var(--color-heading); }
.recipe-meta dd { color: var(--color-muted); }

.recipe-ingredients {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    margin: 1.5rem 0;
}

.recipe-ingredients h3 { font-size: 1.1rem; margin-bottom: 0.75rem; }
.recipe-ingredients ul { padding-left: 1.25rem; }
.recipe-ingredients li { margin-bottom: 0.35rem; }

.recipe-steps { counter-reset: step; }
.recipe-steps li {
    counter-increment: step;
    margin-bottom: 1.25rem;
    padding-left: 2.5rem;
    position: relative;
}
.recipe-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 1.75rem;
    height: 1.75rem;
    background: var(--color-accent);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
}

/* === FAQ === */
.faq-section { margin-top: 3rem; }
.faq-section h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    margin-bottom: 1.25rem;
}

.faq-item {
    border: 1px solid var(--color-border);
    border-radius: 6px;
    margin-bottom: 0.75rem;
    overflow: hidden;
}

.faq-item summary {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    background: var(--color-card-bg);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.faq-item summary::after { content: '+'; font-size: 1.25rem; color: var(--color-accent); }
.faq-item[open] summary::after { content: '−'; }
.faq-item summary::-webkit-details-marker { display: none; }

.faq-answer {
    padding: 0 1.25rem 1rem;
    color: var(--color-muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* === RELATED LINKS === */
.related-links {
    margin-top: 2.5rem;
    padding: 1.5rem;
    background: #f9f6f2;
    border-radius: 8px;
}

.related-links h2 { font-size: 1.15rem; margin-bottom: 1rem; }
.related-links ul { list-style: none; }
.related-links li { margin-bottom: 0.5rem; padding-left: 1rem; position: relative; }
.related-links li::before { content: '→'; position: absolute; left: 0; color: var(--color-accent); }
.link-desc { font-size: 0.85rem; color: var(--color-muted); }

/* === FOOTER === */
.site-footer {
    background: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-col h3 {
    color: #fff;
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.4rem; }
.footer-col a { color: var(--color-footer-text); font-size: 0.85rem; }
.footer-col a:hover { color: #fff; text-decoration: none; }

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid #333;
    font-size: 0.8rem;
    color: #888;
}

.footer-bottom a { color: #888; }
.footer-bottom a:hover { color: #fff; }

/* === HERO (home) === */
.hero {
    text-align: center;
    padding: 3rem 0 2rem;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: 2.6rem;
    color: var(--color-heading);
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.15rem;
    color: var(--color-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .menu-toggle { display: block; }

    .main-nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: #fff;
        border-bottom: 1px solid var(--color-border);
        padding: 1rem 1.5rem;
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

    .main-nav.open { display: block; }
    .main-nav ul { flex-direction: column; gap: 0; }
    .main-nav li { border-bottom: 1px solid var(--color-border); }
    .main-nav a { display: block; padding: 0.75rem 0; }

    .article h1 { font-size: 1.75rem; }
    .hero h1 { font-size: 2rem; }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
    .cards-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
}
