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

:root {
    /* Fall Color Palette */
    --autumn-orange: #D2691E;
    --burnt-orange: #CC5500;
    --deep-red: #8B0000;
    --golden-yellow: #DAA520;
    --warm-brown: #8B4513;
    --cream: #F5F5DC;
    --forest-green: #228B22;
    --rust: #B7410E;
    --amber: #FFBF00;
    --burgundy: #800020;
    
    /* Typography */
    --heading-font: 'Playfair Display', serif;
    --body-font: 'Inter', sans-serif;
    
    /* Spacing */
    --container-max-width: 1200px;
    --section-padding: 4rem 0;
}

body {
    font-family: var(--body-font);
    line-height: 1.6;
    color: var(--warm-brown);
    background: linear-gradient(135deg, var(--cream) 0%, #FFF8DC 100%);
    overflow-x: hidden;
}

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, var(--deep-red) 0%, var(--burnt-orange) 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 4px 20px rgba(139, 69, 19, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-family: var(--heading-font);
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.logo p {
    font-size: 0.9rem;
    opacity: 0.9;
    font-style: italic;
}

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

.nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border-radius: 25px;
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    padding: var(--section-padding);
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
    background: linear-gradient(135deg, var(--cream) 0%, var(--golden-yellow) 50%, var(--amber) 100%);
    overflow: hidden;
}

.hero-content {
    max-width: 600px;
    z-index: 2;
    padding-left: 2rem;
}

.hero-content h2 {
    font-family: var(--heading-font);
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--deep-red);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--warm-brown);
    margin-bottom: 2rem;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--burnt-orange) 0%, var(--rust) 100%);
    color: white;
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(204, 85, 0, 0.3);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(204, 85, 0, 0.4);
}

/* Autumn Leaves Animation */
.autumn-leaves {
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
}

.autumn-leaves::before,
.autumn-leaves::after {
    content: '🍂';
    position: absolute;
    font-size: 2rem;
    animation: float 6s ease-in-out infinite;
    color: var(--autumn-orange);
}

.autumn-leaves::before {
    top: 20%;
    right: 10%;
    animation-delay: -2s;
}

.autumn-leaves::after {
    top: 60%;
    right: 20%;
    animation-delay: -4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(10deg); }
}

/* Recipe Section */
.recipes-section {
    padding: var(--section-padding);
    background: white;
}

.recipes-section h2 {
    font-family: var(--heading-font);
    font-size: 2.5rem;
    text-align: center;
    color: var(--deep-red);
    margin-bottom: 1rem;
}

.section-description {
    text-align: center;
    font-size: 1.1rem;
    color: var(--warm-brown);
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

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

.recipe-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(139, 69, 19, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
}

.recipe-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--autumn-orange), var(--golden-yellow), var(--rust));
}

.recipe-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(139, 69, 19, 0.2);
    border-color: var(--autumn-orange);
}

.recipe-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, var(--golden-yellow) 0%, var(--autumn-orange) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
    overflow: hidden;
}

.recipe-content {
    padding: 1.5rem;
}

.recipe-content h3 {
    font-family: var(--heading-font);
    font-size: 1.4rem;
    color: var(--deep-red);
    margin-bottom: 0.8rem;
}

.recipe-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--warm-brown);
}

.recipe-content p {
    color: var(--warm-brown);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.recipe-link {
    display: inline-block;
    color: var(--burnt-orange);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
    border: 2px solid var(--burnt-orange);
    border-radius: 25px;
    background: transparent;
}

.recipe-link:hover {
    background: var(--burnt-orange);
    color: white;
    transform: translateX(5px);
}

/* About Section */
.about-section {
    padding: var(--section-padding);
    background: linear-gradient(135deg, var(--cream) 0%, #FFF8DC 100%);
}

.about-section h2 {
    font-family: var(--heading-font);
    font-size: 2.5rem;
    text-align: center;
    color: var(--deep-red);
    margin-bottom: 2rem;
}

.about-section p {
    text-align: center;
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
}

/* Footer */
.footer {
    background: var(--warm-brown);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

.footer-links {
    margin-top: 1rem;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--amber);
}

/* Recipe Page Styles */
.recipe-hero {
    background: linear-gradient(135deg, var(--deep-red) 0%, var(--burnt-orange) 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
}

.recipe-hero h1 {
    font-family: var(--heading-font);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.recipe-details {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.recipe-detail {
    background: rgba(255, 255, 255, 0.2);
    padding: 1rem 2rem;
    border-radius: 25px;
    font-weight: 600;
}

.recipe-main {
    padding: var(--section-padding);
    background: white;
}

.recipe-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.ingredients-section h3,
.instructions-section h3 {
    font-family: var(--heading-font);
    font-size: 1.8rem;
    color: var(--deep-red);
    margin-bottom: 1.5rem;
}

.ingredients-list {
    list-style: none;
}

.ingredients-list li {
    padding: 0.8rem;
    margin-bottom: 0.5rem;
    background: var(--cream);
    border-left: 4px solid var(--autumn-orange);
    border-radius: 5px;
}

.instructions-list {
    counter-reset: step-counter;
}

.instructions-list li {
    counter-increment: step-counter;
    padding: 1.5rem;
    margin-bottom: 1rem;
    background: var(--cream);
    border-radius: 10px;
    position: relative;
    padding-left: 4rem;
}

.instructions-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 1rem;
    top: 1rem;
    background: var(--burnt-orange);
    color: white;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

/* Popup Ad Styles */
.ad-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.ad-popup.show {
    opacity: 1;
    pointer-events: all;
}

.ad-content {
    background: white;
    border-radius: 15px;
    max-width: 400px;
    width: 90%;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.ad-header {
    background: linear-gradient(135deg, var(--autumn-orange) 0%, var(--rust) 100%);
    color: white;
    padding: 1rem;
    text-align: center;
}

.ad-body {
    padding: 2rem;
    text-align: center;
}

.ad-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-button {
    background: var(--burnt-orange);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 25px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.ad-button:hover {
    background: var(--rust);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content h2 {
        font-size: 2.5rem;
    }
    
    .recipe-content-wrapper {
        grid-template-columns: 1fr;
    }
    
    .nav ul {
        flex-direction: column;
        gap: 1rem;
    }
    
    .recipe-details {
        flex-direction: column;
        align-items: center;
    }
}

/* Loading Animation */
@keyframes recipeCardLoad {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.recipe-card {
    animation: recipeCardLoad 0.6s ease forwards;
}

.recipe-card:nth-child(even) {
    animation-delay: 0.1s;
}

.recipe-card:nth-child(3n) {
    animation-delay: 0.2s;
}
