:root {
    --bg: #FAF6F0;
    --bg-alt: #F3ECE1;
    --surface: #FFFFFF;
    --surface-warm: #EFE5D8;
    --espresso: #2C1E16;
    --roast: #4A3222;
    --caramel: #B5733D;
    --caramel-dark: #945929;
    --text: #2A1D15;
    --text-muted: #6B5648;
    --border: #E5D7C6;
    --success: #2E6F40;
    --danger: #A63A3A;
    --radius: 14px;
    --shadow: 0 6px 24px rgba(44, 30, 22, 0.06);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background-color: var(--bg);
}

h1, h2, h3, h4 {
    font-family: 'Playfair Display', Georgia, serif;
    color: var(--espresso);
    line-height: 1.25;
    margin-top: 0;
}
h1 { font-size: clamp(1.9rem, 3.2vw, 2.7rem); margin-bottom: 0.6rem; }
h2 { font-size: clamp(1.4rem, 2.3vw, 1.9rem); margin-bottom: 0.75rem; }
h3 { font-size: 1.22rem; margin-bottom: 0.5rem; }
p { margin: 0 0 1.1rem; }
a { color: var(--caramel-dark); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; display: block; border-radius: 10px; }

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

/* Header & Nav */
.site-header {
    background: rgba(250, 246, 240, 0.96);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    gap: 16px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: 'Playfair Display', serif;
    font-size: 1.35rem;
    color: var(--espresso);
    text-decoration: none !important;
}
.brand-mark {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--espresso);
    color: var(--bg);
    display: grid;
    place-items: center;
    font-size: 1.2rem;
}
.brand-text span { color: var(--caramel); font-weight: 600; }

.main-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    font-size: 0.96rem;
    font-weight: 500;
}
.main-nav a { color: var(--roast); padding: 8px 4px; }
.nav-dropdown { position: relative; }
.nav-drop-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 8px;
    z-index: 200;
}
.nav-dropdown:hover .nav-drop-menu { display: block; }
.nav-drop-menu a {
    display: block;
    padding: 8px 12px;
    border-radius: 8px;
}
.nav-drop-menu a:hover { background: var(--bg-alt); text-decoration: none; }

.nav-pill {
    background: var(--surface-warm);
    padding: 8px 14px !important;
    border-radius: 999px;
}
.nav-cta, .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 20px;
    border-radius: 10px;
    background: var(--caramel);
    color: #fff !important;
    font-weight: 600;
    border: none;
    cursor: pointer;
    font-size: 0.96rem;
    text-decoration: none !important;
    transition: background 0.15s ease, transform 0.15s ease;
}
.btn:hover, .nav-cta:hover { background: var(--caramel-dark); }
.btn-outline {
    background: transparent;
    color: var(--espresso) !important;
    border: 1.5px solid var(--border);
}
.btn-outline:hover { background: var(--surface-warm); }
.btn-sm { min-height: 36px; padding: 6px 14px; font-size: 0.88rem; }
.nav-admin {
    background: var(--espresso);
    color: #fff !important;
    padding: 8px 14px !important;
    border-radius: 8px;
    font-size: 0.88rem;
}
.nav-toggle {
    display: none;
    min-width: 44px;
    min-height: 44px;
    background: var(--surface-warm);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--espresso);
}

/* Hero */
.hero {
    padding: 56px 0 42px;
    background: linear-gradient(135deg, #F5ECE0 0%, #FAF6F0 65%, #EFE3D2 100%);
    border-bottom: 1px solid var(--border);
}
.hero-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.9fr;
    gap: 32px;
    align-items: center;
}
.hero-badge {
    display: inline-block;
    background: var(--surface-warm);
    color: var(--roast);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 14px;
}
.hero-sub { color: var(--text-muted); font-size: 1.08rem; max-width: 580px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }

.search-bar {
    display: flex;
    gap: 8px;
    margin-top: 20px;
    max-width: 520px;
}
.search-bar input {
    flex: 1;
    min-height: 46px;
    padding: 10px 16px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    font-size: 1rem;
    color: var(--text);
}

/* Cards & Grids */
.section { padding: 48px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
}
.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}
.cat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.cat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--espresso);
    box-shadow: 0 2px 10px rgba(44,30,22,0.03);
    transition: transform 0.15s ease, border-color 0.15s ease;
}
.cat-card:hover { transform: translateY(-2px); border-color: var(--caramel); text-decoration: none; }
.cat-icon { font-size: 1.6rem; }

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.83rem;
    color: var(--text-muted);
    margin-bottom: 10px;
}
.tag {
    display: inline-block;
    background: var(--surface-warm);
    color: var(--roast);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}
.card h3 a { color: var(--espresso); }
.card-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

/* Recipe Detail */
.breadcrumb {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 20px 0 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.recipe-layout {
    display: grid;
    grid-template-columns: 1.6fr 0.9fr;
    gap: 32px;
    align-items: start;
}
.recipe-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 26px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}
.recipe-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    background: var(--bg-alt);
    padding: 14px;
    border-radius: 12px;
    margin: 18px 0;
}
.recipe-stat strong { display: block; font-size: 1.02rem; color: var(--espresso); }
.recipe-stat span { font-size: 0.83rem; color: var(--text-muted); }

.ingredient-list, .step-list { padding-left: 20px; margin: 12px 0; }
.ingredient-list li, .step-list li { margin-bottom: 10px; }
.tip-box {
    background: #FBF3E8;
    border-left: 4px solid var(--caramel);
    padding: 14px 18px;
    border-radius: 0 10px 10px 0;
    margin: 18px 0;
}

.faq-item {
    border-bottom: 1px solid var(--border);
    padding: 14px 0;
}
.faq-item:last-child { border-bottom: none; }
.faq-item h3 { font-size: 1.06rem; margin-bottom: 6px; }

/* Tools & Forms */
.tool-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
}
.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 6px;
    color: var(--roast);
}
.form-control {
    width: 100%;
    min-height: 44px;
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
}
textarea.form-control { min-height: 120px; resize: vertical; }

.timer-display {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--espresso);
    text-align: center;
    padding: 16px;
    background: var(--bg-alt);
    border-radius: 12px;
    margin: 14px 0;
}

.alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-weight: 500;
}
.alert-success { background: #E7F4EB; color: var(--success); border: 1px solid #B7DEC2; }
.alert-error { background: #FBEAEA; color: var(--danger); border: 1px solid #EBC0C0; }

/* AdSense CLS-safe slot */
.ad-slot {
    min-height: 96px;
    margin: 24px 0;
    background: var(--bg-alt);
    border: 1px dashed var(--border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ad-placeholder-label {
    font-size: 0.82rem;
    color: var(--text-muted);
}

/* Google Button */
.btn-google {
    width: 100%;
    background: #FFFFFF;
    color: #2C1E16 !important;
    border: 1.5px solid var(--border);
}
.btn-google:hover { background: var(--bg-alt); }

/* Footer */
.site-footer {
    background: var(--espresso);
    color: #EAE0D5;
    padding: 48px 0 24px;
    margin-top: 56px;
}
.site-footer h3 { color: #FFFFFF; font-size: 1.05rem; margin-bottom: 12px; }
.site-footer a { color: #DFC8B0; }
.footer-brand { color: #FFFFFF !important; margin-bottom: 12px; }
.footer-desc { font-size: 0.92rem; color: #CBBBA9; }
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 28px;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; font-size: 0.92rem; }
.footer-bottom {
    margin-top: 32px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.12);
    font-size: 0.86rem;
    color: #B9A795;
}

@media (max-width: 900px) {
    .hero-grid, .recipe-layout, .grid-3, .footer-grid { grid-template-columns: 1fr; }
    .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
    .nav-toggle { display: grid; place-items: center; }
    .main-nav {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: stretch;
        padding: 16px 20px;
        gap: 10px;
    }
    .main-nav.open { display: flex; }
    .nav-drop-menu { position: static; box-shadow: none; display: block; margin-top: 6px; }
}

/* Recipe & Blog Images (CLS-safe aspect ratio) */
.card-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 14px;
    background: var(--bg-alt);
}
.recipe-hero-img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--radius);
    margin: 16px 0 22px;
    box-shadow: var(--shadow);
    background: var(--bg-alt);
}
