/* Sourdough Guide - Stylesheet */

/* Reset and Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --color-primary: #8B4513;
    --color-primary-dark: #6B3410;
    --color-secondary: #D2691E;
    --color-accent: #F4A460;
    --color-background: #FDF5E6;
    --color-surface: #FFFFFF;
    --color-text: #2C1810;
    --color-text-light: #5D4037;
    --color-border: #DDD0C0;
    --color-success: #4A7C4E;
    --color-warning: #C17817;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --max-width: 1100px;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 18px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-background);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-primary-dark);
}

h1 {
    font-size: 2.8rem;
    margin-bottom: 0.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid var(--color-accent);
}

h3 {
    font-size: 1.5rem;
    margin: 2rem 0 1rem;
    color: var(--color-primary);
}

h4 {
    font-size: 1.2rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--color-secondary);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s, color 0.2s;
}

a:hover {
    color: var(--color-secondary);
    border-bottom-color: var(--color-secondary);
}

ul, ol {
    margin: 1rem 0 1.5rem 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

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

/* Hero */
.hero {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.hero h1 {
    color: white;
    font-size: 3.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}

.tagline {
    font-size: 1.4rem;
    opacity: 0.95;
    font-style: italic;
    margin-top: 0.5rem;
}

/* Navigation */
.main-nav {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.main-nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 1rem 0;
}

.main-nav a {
    display: block;
    padding: 0.5rem 1rem;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text);
    border: none;
    border-radius: var(--radius-sm);
    transition: background-color 0.2s, color 0.2s;
}

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

/* Main Content */
main {
    padding: 3rem 0;
}

.intro {
    background: var(--color-surface);
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 3rem;
}

.content-section {
    background: var(--color-surface);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-bottom: 2.5rem;
}

/* Instruction Boxes */
.instruction-box {
    background: var(--color-background);
    border-left: 4px solid var(--color-primary);
    padding: 1.5rem 2rem;
    margin: 1.5rem 0;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.instruction-box h4 {
    color: var(--color-primary);
    margin-top: 1.5rem;
}

.instruction-box h4:first-child {
    margin-top: 0;
}

.instruction-box ol, .instruction-box ul {
    margin-bottom: 0;
}

/* Two Column Layout */
.two-column {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin: 1.5rem 0;
}

.column {
    background: var(--color-background);
    padding: 1.5rem;
    border-radius: var(--radius-md);
}

.column h4 {
    margin-top: 0;
    color: var(--color-primary);
}

.column ul {
    margin-bottom: 0;
}

/* Recipe Section */
.recipe-ingredients {
    margin: 1.5rem 0;
}

.recipe-ingredients table {
    width: 100%;
    max-width: 500px;
    border-collapse: collapse;
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.recipe-ingredients th,
.recipe-ingredients td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.recipe-ingredients th {
    background: var(--color-primary);
    color: white;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
}

.recipe-ingredients tr:last-child td {
    border-bottom: none;
}

.recipe-ingredients tr:nth-child(even) td {
    background: var(--color-background);
}

/* Timeline */
.timeline {
    margin: 2rem 0;
    padding-left: 2rem;
    border-left: 3px solid var(--color-accent);
}

.timeline-item {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--color-background);
    border-radius: var(--radius-sm);
}

.timeline-item .time {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    color: var(--color-primary);
    min-width: 160px;
}

.timeline-item .step {
    flex: 1;
    color: var(--color-text-light);
}

/* Temperature Chart */
.temp-chart table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.temp-chart th,
.temp-chart td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.temp-chart th {
    background: var(--color-primary);
    color: white;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.temp-chart tr:last-child td {
    border-bottom: none;
}

.temp-chart tr:nth-child(even) td {
    background: var(--color-background);
}

/* Signs Grid */
.signs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.sign-card {
    background: var(--color-background);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    border: 2px solid var(--color-border);
}

.sign-card h4 {
    margin-top: 0;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-border);
}

.sign-card.good {
    border-color: var(--color-success);
    background: rgba(74, 124, 78, 0.1);
}

.sign-card.good h4 {
    color: var(--color-success);
    border-color: var(--color-success);
}

.sign-card ul {
    margin-bottom: 0;
}

/* Pattern Grid */
.pattern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}

.pattern {
    background: var(--color-background);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
}

.pattern h4 {
    margin-top: 0;
    color: var(--color-primary);
}

.pattern p {
    margin-bottom: 0;
    font-size: 0.95rem;
    color: var(--color-text-light);
}

/* Trouble Tables */
.trouble-table table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.trouble-table th,
.trouble-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.trouble-table th {
    background: var(--color-primary);
    color: white;
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.trouble-table tr:last-child td {
    border-bottom: none;
}

/* Troubleshooting Section */
.trouble-section {
    margin: 2rem 0;
}

.trouble-section h3 {
    background: var(--color-accent);
    color: var(--color-primary-dark);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1rem;
}

.trouble-item {
    background: var(--color-background);
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: var(--radius-md);
    border-left: 4px solid var(--color-secondary);
}

.trouble-item h4 {
    margin-top: 0;
    color: var(--color-primary-dark);
}

.trouble-item p {
    margin-bottom: 0.5rem;
}

.trouble-item p:last-child {
    margin-bottom: 0;
}

/* Equipment Grid */
.equipment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.equipment-card {
    background: var(--color-background);
    padding: 2rem;
    border-radius: var(--radius-lg);
}

.equipment-card h3 {
    margin-top: 0;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--color-accent);
}

.equipment-card.essential {
    border: 2px solid var(--color-primary);
}

.equipment-card.helpful {
    border: 2px solid var(--color-accent);
}

.equipment-item {
    margin: 1.5rem 0;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-border);
}

.equipment-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.equipment-item h4 {
    margin-top: 0;
}

.equipment-item p {
    margin-bottom: 0.5rem;
}

.product-rec {
    font-size: 0.95rem;
    color: var(--color-text-light);
}

.product-rec a {
    color: var(--color-primary);
    font-weight: 500;
}

/* Product Callouts */
.product-callout {
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.05) 0%, rgba(244, 164, 96, 0.1) 100%);
    border: 1px solid var(--color-accent);
    padding: 1.5rem;
    margin: 2rem 0;
    border-radius: var(--radius-md);
}

.product-callout h4 {
    margin-top: 0;
    color: var(--color-primary);
}

.product-callout p {
    margin-bottom: 0;
}

.product-callout a {
    font-weight: 500;
}

/* Quick Reference */
.quick-reference {
    background: var(--color-surface);
    padding: 2.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.reference-tables {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.reference-tables table {
    width: 100%;
    border-collapse: collapse;
    box-shadow: var(--shadow-sm);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.reference-tables caption {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-primary);
    text-align: left;
    padding-bottom: 0.75rem;
}

.reference-tables th,
.reference-tables td {
    padding: 0.75rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
}

.reference-tables th {
    background: var(--color-primary);
    color: white;
}

.reference-tables tr:last-child td {
    border-bottom: none;
}

.reference-tables tr:nth-child(even) td {
    background: var(--color-background);
}

/* Footer */
footer {
    background: var(--color-primary-dark);
    color: rgba(255,255,255,0.9);
    padding: 2rem 0;
    margin-top: 3rem;
    text-align: center;
}

footer p {
    margin: 0.5rem 0;
}

.affiliate-disclosure {
    font-size: 0.85rem;
    opacity: 0.8;
    max-width: 600px;
    margin: 1rem auto 0;
}

/* Responsive */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }

    h1, .hero h1 {
        font-size: 2.2rem;
    }

    h2 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.3rem;
    }

    .hero {
        padding: 3rem 0;
    }

    .tagline {
        font-size: 1.1rem;
    }

    .main-nav ul {
        gap: 0.25rem;
    }

    .main-nav a {
        padding: 0.4rem 0.75rem;
        font-size: 0.85rem;
    }

    .content-section,
    .intro,
    .quick-reference {
        padding: 1.5rem;
    }

    .instruction-box {
        padding: 1rem 1.25rem;
    }

    .timeline {
        padding-left: 1rem;
    }

    .timeline-item .time {
        min-width: auto;
        width: 100%;
    }

    .equipment-grid {
        grid-template-columns: 1fr;
    }

    .equipment-card {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero h1 {
        font-size: 1.8rem;
    }

    .two-column,
    .signs-grid,
    .pattern-grid {
        grid-template-columns: 1fr;
    }

    .recipe-ingredients table {
        font-size: 0.9rem;
    }

    .recipe-ingredients th,
    .recipe-ingredients td {
        padding: 0.5rem 0.75rem;
    }
}

/* Print Styles */
@media print {
    .main-nav,
    .product-callout {
        display: none;
    }

    .hero {
        background: none;
        color: var(--color-text);
        padding: 1rem 0;
    }

    .hero h1 {
        color: var(--color-primary);
        text-shadow: none;
    }

    .content-section,
    .intro {
        box-shadow: none;
        border: 1px solid var(--color-border);
    }

    a {
        color: var(--color-text);
    }

    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 0.8em;
        color: var(--color-text-light);
    }
}
