/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Playfair+Display:wght@600;700&display=swap');

:root {
    /* Colors */
    --primary: #e85d04;
    --primary-dark: #dc2f02;
    --secondary: #370617;
    --text-main: #1f1f1f;
    --text-muted: #6b7280;
    --bg-body: #ffffff;
    --bg-light: #f9fafb;
    --white: #ffffff;

    /* Spacing */
    --container-width: 1200px;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 2rem;
    --spacing-xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
}

/* Reset */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--bg-body);
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
    color: var(--secondary);
    line-height: 1.2;
    margin-bottom: var(--spacing-md);
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

ul {
    list-style: none;
}

/* Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: 20px;
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    display: none;
    /* Hidden by default, shown via JS */
    border: 1px solid rgba(0, 0, 0, 0.05);
    max-width: 500px;
    margin: 0 auto;
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

@media (min-width: 768px) {
    .cookie-banner {
        left: auto;
        /* Right align on desktop */
        margin: 0;
    }
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background-color: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(232, 93, 4, 0.2), 0 2px 4px -1px rgba(232, 93, 4, 0.1);
}

.section-padding {
    padding: var(--spacing-xl) 0;
}

.text-center {
    text-align: center;
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 1000;
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-main);
}

.nav-links a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    padding: 160px 0 100px;
    /* Account for fixed nav */
    background: linear-gradient(to bottom, #fff5f0, #fff);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    color: var(--secondary);
}

.hero p {
    font-size: 1.25rem;
    color: var(--text-muted);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Featured Grid */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.recipe-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.recipe-img {
    height: 200px;
    background-color: #eee;
    object-fit: cover;
    width: 100%;
}

.recipe-content {
    padding: 1.5rem;
}

.recipe-title {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.recipe-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: var(--secondary);
    color: var(--white);
    padding: 4rem 0;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer h3 {
    color: var(--white);
    margin-bottom: 1.5rem;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a:hover {
    color: var(--white);
}

.copyright {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.875rem;
}

/* Mobile Navigation */
.hamburger {
    display: none;
    cursor: pointer;
    background: none;
    border: none;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: var(--secondary);
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        /* Adjust based on navbar height */
        gap: 0;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
        padding: 2rem 0;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        margin: 16px 0;
        display: block;
        font-size: 1.2rem;
    }

    .desktop-only {
        display: none;
    }
}

/* Recipe Detail Styles */
.recipe-hero-img {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    margin-bottom: 2rem;
    aspect-ratio: 2/1;
    /* Enforce aspect ratio to reduce CLS */
    object-fit: cover;
}

.recipe-content-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

@media (max-width: 768px) {
    .recipe-content-grid {
        grid-template-columns: 1fr;
    }
}

.ingredients-section {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: var(--radius-lg);
    height: fit-content;
}

.ingredients-list li {
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.instruction-step {
    margin-bottom: 2rem;
    display: flex;
    gap: 1.5rem;
}

.step-number {
    background: var(--primary);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.recipe-meta-large {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
    justify-content: center;
}

.meta-item {
    text-align: center;
}

.meta-item .label {
    display: block;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.meta-item .value {
    font-weight: 600;
    color: var(--secondary);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--radius-md);
    font-family: inherit;
    transition: border-color 0.2s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(232, 93, 4, 0.1);
}

textarea {
    resize: vertical;
    min-height: 150px;
}

/* Page Header */
.page-header {
    background: var(--bg-light);
    padding: 160px 0 60px;
    text-align: center;
}