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

:root {
    --primary-color: #c17555;
    --secondary-color: #e8a87c;
    --accent-color: #d4936e;
    --warm-red: #d9715d;
    --warm-cream: #faf6f0;
    --warm-beige: #f5e6d3;
    --text-dark: #4a3f35;
    --text-light: #8b7d6b;
    --bg-light: #fdfbf7;
    --white: #ffffff;
    --shadow: 0 4px 12px rgba(193, 117, 85, 0.12);
    --shadow-lg: 0 12px 30px rgba(193, 117, 85, 0.18);
    --shadow-warm: 0 2px 8px rgba(217, 113, 93, 0.08);
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.logo:hover {
    color: var(--accent-color);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-dark);
    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(--accent-color);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--primary-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #d4936e 0%, #e8a87c 50%, #f4c2a0 100%);
    color: var(--white);
    padding: 120px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
    animation: fadeInUp 0.8s ease 0.2s backwards;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.cta-button {
    display: inline-block;
    background: var(--white);
    color: var(--primary-color);
    padding: 15px 40px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
    animation: fadeInUp 0.8s ease 0.4s backwards;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.4);
    background: var(--warm-cream);
}

/* Filter Section */
.filter-section {
    background: var(--warm-cream);
    padding: 2rem 0;
    border-bottom: 1px solid var(--warm-beige);
}

.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    background: var(--white);
    border: 2px solid var(--secondary-color);
    color: var(--primary-color);
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-warm);
}

.filter-btn:hover,
.filter-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

/* Recipes Section */
.recipes-section {
    padding: 80px 20px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--primary-color);
}

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

.recipe-card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
    animation: fadeIn 0.6s ease;
    border: 1px solid var(--warm-beige);
}

.recipe-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    border-color: var(--secondary-color);
}

.recipe-card.hidden {
    display: none;
}

.recipe-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
}

.recipe-card:hover .recipe-image {
    transform: scale(1.05);
}

.recipe-content {
    padding: 1.5rem;
}

.recipe-category {
    display: inline-block;
    background: linear-gradient(135deg, var(--secondary-color), #f4c2a0);
    color: var(--white);
    padding: 6px 18px;
    border-radius: 25px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: var(--shadow-warm);
}

.recipe-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.recipe-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.recipe-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.recipe-description {
    color: var(--text-light);
    line-height: 1.6;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    overflow-y: auto;
    animation: fadeIn 0.3s ease;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background: var(--white);
    border-radius: 25px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: slideUp 0.3s ease;
    box-shadow: 0 20px 60px rgba(193, 117, 85, 0.25);
    border: 2px solid var(--warm-beige);
}

.close-modal {
    position: sticky;
    top: 20px;
    right: 20px;
    float: right;
    font-size: 2rem;
    background: linear-gradient(135deg, var(--warm-red), var(--accent-color));
    color: var(--white);
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    z-index: 10;
    box-shadow: var(--shadow);
}

.close-modal:hover {
    transform: rotate(90deg) scale(1.1);
    background: linear-gradient(135deg, var(--primary-color), var(--warm-red));
    box-shadow: var(--shadow-lg);
}

.recipe-detail {
    padding: 2rem;
}

.recipe-detail-header {
    text-align: center;
    margin-bottom: 2rem;
}

.recipe-detail-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.recipe-detail-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 20px;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    border: 3px solid var(--warm-beige);
}

.recipe-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--warm-cream), var(--warm-beige));
    border-radius: 15px;
    box-shadow: var(--shadow-warm);
}

.info-item {
    text-align: center;
}

.info-item-label {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block;
}

.info-item-value {
    color: var(--text-dark);
    font-size: 1.1rem;
}

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

.recipe-section h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid transparent;
    background: linear-gradient(to right, var(--secondary-color), var(--warm-beige)) bottom/100% 3px no-repeat;
}

.ingredients-list {
    list-style: none;
    padding-left: 0;
}

.ingredients-list li {
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--warm-cream);
    border-left: 4px solid var(--secondary-color);
    border-radius: 8px;
    transition: var(--transition);
}

.ingredients-list li:hover {
    background: var(--warm-beige);
    border-left-color: var(--primary-color);
    transform: translateX(5px);
}

.instructions-list {
    list-style: none;
    counter-reset: step-counter;
    padding-left: 0;
}

.instructions-list li {
    counter-increment: step-counter;
    padding: 1rem 1rem 1rem 3.5rem;
    margin-bottom: 1rem;
    background: var(--warm-cream);
    border-radius: 10px;
    position: relative;
    border: 1px solid var(--warm-beige);
    transition: var(--transition);
}

.instructions-list li:hover {
    background: var(--warm-beige);
    box-shadow: var(--shadow-warm);
    transform: translateX(5px);
}

.instructions-list li::before {
    content: counter(step-counter);
    position: absolute;
    left: 1rem;
    top: 1rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    box-shadow: var(--shadow-warm);
}

.download-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    border: none;
    padding: 18px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 15px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 2rem;
    box-shadow: var(--shadow);
}

.download-btn:hover {
    background: linear-gradient(135deg, var(--warm-red), var(--primary-color));
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* About Section */
.about-section {
    background: linear-gradient(180deg, var(--bg-light) 0%, var(--warm-cream) 100%);
    padding: 80px 20px;
    position: relative;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--warm-beige), transparent);
}

.about-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-light);
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--white);
    padding: 2rem 20px;
    text-align: center;
}

.footer p {
    margin: 0.5rem 0;
    opacity: 0.9;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow);
    }

    .nav-links.active {
        display: flex;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

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

    .section-title {
        font-size: 2rem;
    }

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

    .recipe-detail-image {
        height: 250px;
    }

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

@media (max-width: 480px) {
    .hero {
        padding: 80px 20px;
    }

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

    .cta-button {
        padding: 12px 30px;
    }

    .filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }

    .recipe-detail {
        padding: 1rem;
    }
}

/* Print Styles for Downloaded Recipes */
@media print {
    body * {
        visibility: hidden;
    }

    .recipe-detail, .recipe-detail * {
        visibility: visible;
    }

    .recipe-detail {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    .close-modal,
    .download-btn {
        display: none;
    }
}
