/* ============================================
   VARIABLES & RESET
   ============================================ */
:root {
    --primary: #FF6B35;
    --primary-dark: #E85D2F;
    --secondary: #2D3047;
    --accent: #FABC2A;
    --bg-light: #F9F9F9;
    --bg-white: #FFFFFF;
    --text-dark: #1A1A1A;
    --text-gray: #666666;
    --text-light: #999999;
    --border: #E5E5E5;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-lg: rgba(0, 0, 0, 0.15);
    --radius: 12px;
    --radius-lg: 20px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
}

/* ============================================
   HEADER & NAVIGATION
   ============================================ */
header {
    background: var(--bg-white);
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

nav h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

nav h1 a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

nav h1 a:hover {
    color: var(--primary-dark);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

nav a:hover {
    color: var(--primary);
}

/* ============================================
   HOMEPAGE
   ============================================ */
.homepage {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 4rem 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    margin-bottom: 3rem;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hero p {
    font-size: 1.3rem;
    opacity: 0.95;
}

.recent-recipes h2 {
    font-size: 2.2rem;
    margin-bottom: 2rem;
    color: var(--secondary);
    font-weight: 700;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.recipe-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: 0 4px 15px var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.recipe-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px var(--shadow-lg);
}

.recipe-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.recipe-card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    display: block;
}

.recipe-card h3 {
    padding: 1.5rem;
    font-size: 1.4rem;
    color: var(--text-dark);
    font-weight: 600;
    line-height: 1.3;
}

.recipe-card p {
    padding: 0 1.5rem 1rem;
    color: var(--text-gray);
    font-size: 0.95rem;
}

.card-meta {
    padding: 1rem 1.5rem;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
    color: var(--text-light);
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* ============================================
   RECIPE PAGE
   ============================================ */
.recipe {
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
}

.recipe-hero {
    margin-bottom: 2rem;
}

.recipe-hero picture {
    display: block;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 10px 40px var(--shadow-lg);
}

.recipe-hero img {
    width: 100%;
    height: auto;
    display: block;
}

.recipe-header {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 15px var(--shadow);
    margin-bottom: 2rem;
}

.recipe-header h1 {
    font-size: 2.8rem;
    margin-bottom: 1rem;
    color: var(--secondary);
    font-weight: 800;
    line-height: 1.2;
}

.recipe-description {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
    line-height: 1.5;
}

.recipe-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.recipe-meta span {
    background: var(--bg-light);
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-dark);
}

.recipe-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-print, .btn-pinterest {
    padding: 0.8rem 1.8rem;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: var(--transition);
}

.btn-print {
    background: var(--secondary);
    color: white;
}

.btn-print:hover {
    background: #1f2237;
    transform: translateY(-2px);
}

.btn-pinterest {
    background: #E60023;
    color: white;
}

.btn-pinterest:hover {
    background: #cc001e;
    transform: translateY(-2px);
}

.recipe-ingredients,
.recipe-steps,
.recipe-tips {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 15px var(--shadow);
    margin-bottom: 2rem;
}

h2 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 1.5rem;
    font-weight: 700;
    padding-bottom: 0.8rem;
    border-bottom: 3px solid var(--primary);
}

.recipe-ingredients ul,
.recipe-tips ul {
    list-style: none;
    padding-left: 0;
}

.recipe-ingredients li,
.recipe-tips li {
    padding: 0.8rem 0;
    padding-left: 2rem;
    position: relative;
    font-size: 1.05rem;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border);
}

.recipe-ingredients li:last-child,
.recipe-tips li:last-child {
    border-bottom: none;
}

.recipe-ingredients li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
    font-size: 1.2rem;
}

.recipe-steps ol {
    counter-reset: step-counter;
    list-style: none;
    padding-left: 0;
}

.recipe-steps li {
    counter-increment: step-counter;
    padding: 1.5rem 0 1.5rem 4.5rem;
    position: relative;
    font-size: 1.05rem;
    line-height: 1.7;
    color: var(--text-dark);
    border-bottom: 1px solid var(--border);
}

.recipe-steps li:last-child {
    border-bottom: none;
}

.recipe-steps li:before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 1.5rem;
    background: var(--primary);
    color: white;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.3rem;
    box-shadow: 0 4px 10px rgba(255, 107, 53, 0.3);
}

.recipe-tips {
    background: linear-gradient(135deg, #FFF9E6 0%, #FFF4D6 100%);
    border-left: 4px solid var(--accent);
}

.recipe-tips h2 {
    border-bottom-color: var(--accent);
}

.recipe-tips li:before {
    content: "💡";
    font-size: 1.2rem;
}

/* ============================================
   FOOTER
   ============================================ */
footer {
    background: var(--secondary);
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
}

footer p {
    opacity: 0.9;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }

    nav ul {
        gap: 1rem;
    }

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

    .hero p {
        font-size: 1rem;
    }

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

    .recipe-header h1 {
        font-size: 2rem;
    }

    .recipe-meta {
        flex-direction: column;
        gap: 0.8rem;
    }

    .recipe-actions {
        flex-direction: column;
    }

    .recipe-ingredients,
    .recipe-steps,
    .recipe-tips {
        padding: 1.5rem;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
    header, footer, .recipe-actions, .btn-print {
        display: none;
    }

    .recipe-hero img {
        max-width: 100%;
        height: auto;
        page-break-inside: avoid;
    }

    body {
        font-size: 12pt;
        background: white;
    }

    h1 {
        font-size: 24pt;
        page-break-after: avoid;
    }

    .recipe-ingredients ul {
        column-count: 2;
    }

    .recipe-ingredients,
    .recipe-steps,
    .recipe-tips {
        box-shadow: none;
        page-break-inside: avoid;
    }
}
