/* ===========================
   CSS RESET & BASE STYLES
   =========================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --color-bg: #ffffff;
    --color-surface: #f8f9fa;
    --color-surface-light: #e9ecef;
    --color-text: #212529;
    --color-text-light: #6c757d;
    --color-accent: #ff6b35;
    --color-accent-dark: #e55a2b;
    --color-accent-light: #ff8c5f;
    --font-primary: 'Inter', sans-serif;
    --font-display: 'Playfair Display', serif;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: var(--font-primary);
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ===========================
   CONTAINER & LAYOUT
   =========================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ===========================
   HEADER & NAVIGATION
   =========================== */
header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
}

.logo {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--color-text);
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    color: var(--color-accent);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    color: var(--color-text);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--color-text);
}

/* ===========================
   HERO SECTION
   =========================== */
.hero {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    padding: 6rem 2rem;
    min-height: 70vh;
}

.hero-content h1 {
    font-family: var(--font-display);
    font-size: 4rem;
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--color-text);
}

.hero-content p {
    font-size: 1.25rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.btn {
    display: inline-block;
    padding: 1rem 2.5rem;
    background: var(--color-accent);
    color: white;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(255, 107, 53, 0.3);
}

.btn:hover {
    background: var(--color-accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(255, 107, 53, 0.4);
}

.hero-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* ===========================
   SECTION HEADERS
   =========================== */
.featured {
    padding: 4rem 2rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-family: var(--font-display);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.section-header p {
    color: var(--color-text-light);
    font-size: 1.1rem;
}

/* ===========================
   TAG CLOUD
   =========================== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.tag {
    padding: 0.25rem 1rem;
    background: var(--color-surface);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 25px;
    color: var(--color-text);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.tag:hover {
    background: var(--color-surface-light);
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.tag.active {
    background: var(--color-accent);
    border-color: var(--color-accent);
    color: white;
}

/* ===========================
   RECIPE GRID
   =========================== */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.recipe-card {
    background: var(--color-surface);
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.recipe-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--color-accent);
}

.recipe-card.grayed-out {
    opacity: 0.3;
    filter: grayscale(100%);
    pointer-events: none;
    cursor: default;
}

.card-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.recipe-card:hover .card-image img {
    transform: scale(1.1);
}

.card-content {
    padding: 1.5rem;
}

.card-meta {
    color: var(--color-accent);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.card-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--color-text);
}

.card-excerpt {
    color: var(--color-text-light);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.25rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

.cook-time {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

.view-recipe {
    color: var(--color-accent);
    font-weight: 600;
    font-size: 0.9rem;
}

/* ===========================
   RECIPE DETAIL PAGE
   =========================== */
.recipe-header {
    text-align: center;
    margin: 3rem 0;
}

.recipe-header h1 {
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.recipe-meta-large {
    display: flex;
    gap: 2rem;
    justify-content: center;
    color: var(--color-text-light);
    font-size: 1.1rem;
    margin-top: 1.5rem;
}

.recipe-meta-large span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.recipe-hero-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 3rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.recipe-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

/* ===========================
   INGREDIENTS BOX
   =========================== */
.ingredients-box {
    background: var(--color-surface);
    padding: 2rem;
    border-radius: 15px;
    height: fit-content;
    position: sticky;
    top: 100px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.ingredients-box h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--color-accent);
}

.ingredient-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.ingredient-group-header {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--color-text);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-accent);
}

.ingredient-group-header:first-child {
    margin-top: 0;
}

.ingredient-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.ingredient-item.indented {
    padding-left: 1.5rem;
}

.ingredient-item span {
    color: var(--color-text);
    line-height: 1.6;
}

/* ===========================
   CHECKBOX STYLING
   =========================== */
.checkbox {
    width: 20px;
    height: 20px;
    min-width: 20px;
    border: 2px solid var(--color-accent);
    border-radius: 4px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    margin-top: 2px;
}

.checkbox:hover {
    background: rgba(255, 107, 53, 0.1);
}

.checkbox.checked {
    background: var(--color-accent);
}

.checkbox.checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 14px;
    font-weight: bold;
}

/* ===========================
   INSTRUCTIONS
   =========================== */
.instructions {
    background: var(--color-surface);
    padding: 2rem;
    border-radius: 15px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.instructions h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: 2rem;
    color: var(--color-accent);
}

.instruction-step {
    display: grid;
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    gap: 0.5rem 1rem;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.instruction-step:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.step-number {
    grid-row: 1 / 2;
    grid-column: 1 / 2;
    width: 40px;
    height: 40px;
    background: var(--color-accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.instruction-step h4 {
    grid-row: 1 / 2;
    grid-column: 2 / 3;
    font-family: var(--font-display);
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-text);
    margin: 0;
    align-self: center;
}

.instruction-step p {
    grid-row: 2 / 3;
    grid-column: 2 / 3;
    color: var(--color-text-light);
    line-height: 1.8;
    margin: 0;
}

.instruction-step p strong {
    color: var(--color-text);
    font-weight: 600;
}

/* ===========================
   FOOTER
   =========================== */
footer {
    background: var(--color-surface);
    padding: 3rem 2rem;
    text-align: center;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    margin-top: 4rem;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--color-accent);
    margin-bottom: 1rem;
}

.copyright {
    color: var(--color-text-light);
    font-size: 0.9rem;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 968px) {
    .recipe-content {
        grid-template-columns: 1fr;
    }

    .ingredients-box {
        position: static;
    }
}

@media (max-width: 768px) {
    .hero {
        grid-template-columns: 1fr;
        padding: 3rem 1rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .recipe-header h1 {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .recipe-grid {
        grid-template-columns: 1fr;
    }

    .mobile-toggle {
        display: block;
    }

    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        padding: 2rem;
        gap: 1rem;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: var(--transition);
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }

    .recipe-meta-large {
        flex-direction: column;
        gap: 0.5rem;
    }
}