:root {
    --bg-primary: #f9f9f9;
    --text-primary: #333;
    --bg-secondary: #f4f4f4;
    --accent-color: #ee5a24;
    --card-bg: white;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --header-bg: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --text-primary: #f0f0f0;
    --bg-secondary: #2a2a2a;
    --accent-color: #ff6b6b;
    --card-bg: #2a2a2a;
    --shadow: 0 4px 15px rgba(0,0,0,0.3);
    --header-bg: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

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

body {
    font-family: 'Tahoma', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    direction: rtl;
    transition: background-color 0.3s ease, color 0.3s ease;
}

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

/* هدر اصلی */
header {
    background: var(--header-bg);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.8rem;
    font-weight: bold;
}

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

nav li {
    margin-left: 2rem;
}

nav a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

nav a:hover {
    color: #ffd700;
}

.header-search {
    display: flex;
    gap: 5px;
    align-items: center;
}

.header-search input {
    padding: 8px;
    border: none;
    border-radius: 5px;
    width: 200px;
    font-size: 0.9rem;
}

.header-search button {
    padding: 8px 12px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.header-search button:hover {
    background: rgba(255,255,255,0.3);
}

.theme-toggle {
    background: none;
    border: 1px solid white;
    color: white;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.3s;
}

.theme-toggle:hover {
    background: rgba(255,255,255,0.2);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    margin: 3px 0;
    transition: 0.3s;
}

/* هدرهای اختصاصی */
.section-header {
    background: var(--header-bg);
    color: white;
    padding: 30px 0;
    text-align: center;
    position: relative;
    animation: fadeInDown 1s ease;
    margin-bottom: 40px;
    border-bottom: 3px solid rgba(255,255,255,0.3);
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.recipes-header::before { content: '🍳'; position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-size: 2rem; }
.tips-header::before { content: '💡'; position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-size: 2rem; }
.videos-header::before { content: '📹'; position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-size: 2rem; }
.blog-header::before { content: '📝'; position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-size: 2rem; }
.favorites-header::before { content: '❤️'; position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-size: 2rem; }
.about-header::before { content: '👥'; position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-size: 2rem; }
.contact-header::before { content: '📧'; position: absolute; left: 20px; top: 50%; transform: translateY(-50%); font-size: 2rem; }

/* بقیه استایل‌ها مثل قبل (هیرو، کارت‌ها، etc.) – برای اختصار، فرض کن کپی از قبلی. */
.hero {
    background: url('https://via.placeholder.com/1200x400?text=تصویر+آشپزی+۱') no-repeat center/cover;
    height: 400px;
    display: flex;
    align-items: center;
    text-align: center;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    position: relative;
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.recipe-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
    opacity: 0;
    animation: fadeIn 0.5s forwards;
}

.recipe-card:hover {
    transform: translateY(-5px);
}

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

.recipe-info {
    padding: 15px;
}

.recipe-info h3 {
    color: var(--accent-color);
}

.rating {
    display: flex;
    gap: 2px;
}

.star {
    font-size: 1.2rem;
    color: #ddd;
    cursor: pointer;
}

.star.filled {
    color: #ffd700;
}

.details-btn, .favorite-btn {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin: 5px;
}

.details-btn {
    background: #007bff;
    color: white;
}

.favorite-btn {
    background: #ffd700;
    color: #333;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.page-btn {
    padding: 10px 15px;
    background: var(--bg-secondary);
    border: 1px solid #ddd;
    cursor: pointer;
}

.page-btn.active {
    background: var(--accent-color);
    color: white;
}

.tip-card, .video-item, .blog-post, .favorite-item {
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    padding: 15px;
    margin-bottom: 20px;
}

.team-card, .stat-item {
    background: var(--card-bg);
    border-radius: 10px;
    box-shadow: var(--shadow);
    transition: transform 0.3s;
}

.team-card:hover, .stat-item:hover {
    transform: scale(1.05);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--accent-color);
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin: 40px 0;
}

.timeline-content {
    background: var(--card-bg);
    padding: 20px;
    border-radius: 10px;
    width: 45%;
}

.timeline-content.right {
    margin-left: 55%;
}

.timeline-content.left {
    margin-right: 55%;
}

.join-btn {
    background: var(--accent-color);
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1rem;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group input, .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: var(--card-bg);
    color: var(--text-primary);
}

.submit-btn {
    background: var(--accent-color);
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
}

.newsletter {
    background: var(--accent-color);
    color: white;
    padding: 20px;
    text-align: center;
}

.newsletter input {
    padding: 10px;
    border: none;
    border-radius: 5px;
    width: 250px;
    margin-left: 10px;
}

.newsletter button {
    padding: 10px 20px;
    background: white;
    color: var(--accent-color);
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

footer {
    background: #333;
    color: white;
    padding: 20px 0;
    text-align: center;
}

.social-links a {
    color: #ffd700;
    margin: 0 10px;
    text-decoration: none;
}

/* انیمیشن‌ها */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

/* ریسپانسیو */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        gap: 10px;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .header-search {
        width: 100%;
    }

    .header-search input {
        width: 100%;
    }

    .hamburger {
        display: flex;
    }

    nav ul {
        display: none;
    }

    nav ul.active {
        display: flex;
    }

    .section-header {
        padding: 20px 0;
    }

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

    .section-header::before {
        display: none;
    }

    .recipe-grid, .tips-grid, .video-grid, .blog-grid, .favorites-grid, .team-gallery {
        grid-template-columns: 1fr;
    }

    .about-stats {
        flex-direction: column;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-content {
        width: 100%;
        margin: 0;
    }

    .newsletter input {
        width: 100%;
        margin-bottom: 10px;
        margin-left: 0;
    }
}

@media (max-width: 480px) {
    .hero {
        height: 300px;
    }
}

        /* CSS Variables – بهبودیافته */
        :root {
            --bg-primary: #fffaf0; /* کرم گرم برای light */
            --text-primary: #2c1810;
            --bg-secondary: #f8e8d9;
            --accent-color: #e74c3c; /* قرمز اشتها‌آور */
            --accent-hover: #f39c12; /* طلایی hover */
            --card-bg: white;
            --shadow: 0 8px 32px rgba(231, 76, 60, 0.1); /* سایه نارنجی نرم */
            --header-bg: linear-gradient(135deg, #ff6b6b, #f7931e, #e74c3c); /* gradient چندرنگی */
        }

        [data-theme="dark"] {
            --bg-primary: #1a0f0b; /* قهوه‌ای تیره */
            --text-primary: #f4e4d9;
            --bg-secondary: #2c1810;
            --accent-color: #ff8c69;
            --accent-hover: #ffd700;
            --card-bg: #3c2f2f;
            --shadow: 0 8px 32px rgba(255, 140, 105, 0.3);
            --header-bg: linear-gradient(135deg, #8b0000, #a52a2a, #dc143c); /* dark gradient */
        }

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

        body {
            font-family: 'Tahoma', sans-serif;
            line-height: 1.7;
            color: var(--text-primary);
            background: linear-gradient(to bottom, var(--bg-primary), #f5e8c7); /* gradient بک */
            direction: rtl;
            transition: all 0.4s ease;
        }

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

        /* هدر اصلی – قشنگ‌تر با سایه و border-bottom */
        header {
            background: var(--header-bg);
            color: white;
            padding: 1.2rem 0;
            box-shadow: 0 4px 20px rgba(231, 76, 60, 0.2);
            position: sticky;
            top: 0;
            z-index: 1000;
            border-bottom: 4px solid rgba(255,255,255,0.2);
        }

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

        .logo {
            font-size: 2rem;
            font-weight: bold;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        }

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

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

        nav li a:hover {
            background: rgba(255,255,255,0.2);
            color: var(--accent-hover);
            transform: translateY(-2px);
        }

        .header-search {
            display: flex;
            gap: 10px;
            align-items: center;
            background: rgba(255,255,255,0.1);
            padding: 0.5rem;
            border-radius: 25px;
        }

        .header-search input {
            background: transparent;
            border: none;
            color: white;
            width: 180px;
            font-size: 1rem;
        }

        .header-search input::placeholder {
            color: rgba(255,255,255,0.7);
        }

        .header-search button {
            background: transparent;
            border: none;
            color: white;
            cursor: pointer;
            font-size: 1.2rem;
            padding: 0.5rem;
            transition: transform 0.3s;
        }

        .header-search button:hover {
            transform: scale(1.1);
        }

        .theme-toggle {
            background: rgba(255,255,255,0.1);
            border: 2px solid white;
            color: white;
            padding: 0.8rem;
            border-radius: 50%;
            cursor: pointer;
            font-size: 1.3rem;
            transition: all 0.3s ease;
            box-shadow: 0 2px 10px rgba(0,0,0,0.2);
        }

        .theme-toggle:hover {
            background: rgba(255,255,255,0.2);
            transform: rotate(180deg);
        }

        .hamburger {
            display: none;
            flex-direction: column;
            cursor: pointer;
            gap: 4px;
        }

        .hamburger span {
            width: 25px;
            height: 3px;
            background: white;
            border-radius: 2px;
            transition: 0.3s;
        }

        /* هیرو – اضافه شده */
        .hero {
            background: linear-gradient(rgba(231, 76, 60, 0.7), rgba(231, 76, 60, 0.3)), url('https://via.placeholder.com/1200x600?text=آشپزی+خوشمزه') no-repeat center/cover;
            height: 60vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            color: white;
            position: relative;
            animation: fadeInDown 1s ease;
        }

        .hero::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0,0,0,0.4); /* overlay تیره */
        }

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

        .hero h1 {
            font-size: 3.5rem;
            margin-bottom: 1rem;
            text-shadow: 3px 3px 6px rgba(0,0,0,0.5);
        }

        .hero p {
            font-size: 1.4rem;
            margin-bottom: 2rem;
            max-width: 600px;
        }

        .cta-btn {
            background: white;
            color: var(--accent-color);
            padding: 1rem 2.5rem;
            border: none;
            border-radius: 50px;
            font-size: 1.2rem;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(0,0,0,0.2);
            text-decoration: none;
        }

        .cta-btn:hover {
            background: var(--accent-hover);
            color: white;
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(0,0,0,0.3);
        }

        /* بخش لینک‌ها – بهبودیافته */
        .home-links {
            padding: 60px 0;
            background: var(--bg-secondary);
        }

        .section-header {
            background: var(--header-bg);
            color: white;
            padding: 2rem 0;
            text-align: center;
            position: relative;
            animation: fadeInDown 1s ease;
            margin-bottom: 3rem;
            border-radius: 0 0 50px 50px; /* گرد پایین */
            box-shadow: 0 8px 32px rgba(231, 76, 60, 0.2);
        }

        .section-header h2 {
            font-size: 2.8rem;
            font-weight: bold;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
        }

        .home-header::before {
            content: '🏠';
            position: absolute;
            left: 20px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 2.5rem;
        }

        .links-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
            gap: 2rem;
            max-width: 1000px;
            margin: 0 auto;
        }

        .link-card {
            background: var(--card-bg);
            border-radius: 20px;
            padding: 2rem;
            text-align: center;
            text-decoration: none;
            color: var(--text-primary);
            box-shadow: var(--shadow);
            transition: all 0.4s ease;
            position: relative;
            overflow: hidden;
        }

        .link-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background: var(--accent-color);
            transform: scaleX(0);
            transition: transform 0.3s ease;
        }

        .link-card:hover::before {
            transform: scaleX(1);
        }

        .link-card:hover {
            transform: translateY(-10px) scale(1.02);
            box-shadow: 0 12px 40px rgba(231, 76, 60, 0.2);
            background: linear-gradient(135deg, var(--card-bg), var(--bg-secondary));
        }

        .link-icon {
            font-size: 4rem;
            display: block;
            margin-bottom: 1rem;
            transition: transform 0.3s ease;
        }

        .link-card:hover .link-icon {
            transform: rotate(360deg) scale(1.1);
        }

        .link-card h3 {
            color: var(--accent-color);
            margin-bottom: 0.5rem;
            font-size: 1.5rem;
        }

        .link-card p {
            color: #666;
            font-size: 1.1rem;
        }

        /* فوتر – قشنگ‌تر */
        footer {
            background: linear-gradient(135deg, #2c1810, #1a0f0b);
            color: #f4e4d9;
            padding: 3rem 0;
            text-align: center;
            box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
        }

        .social-links {
            margin-top: 1.5rem;
        }

        .social-links a {
            color: var(--accent-hover);
            margin: 0 1.5rem;
            text-decoration: none;
            font-size: 1.2rem;
            transition: all 0.3s ease;
        }

        .social-links a:hover {
            color: white;
            transform: translateY(-3px);
        }

        /* انیمیشن‌ها – بهبودیافته */
        @keyframes fadeInUp {
            from {
                opacity: 0;
                transform: translateY(50px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .links-grid .link-card:nth-child(1) { animation-delay: 0.1s; }
        .links-grid .link-card:nth-child(2) { animation-delay: 0.2s; }
        .links-grid .link-card:nth-child(3) { animation-delay: 0.3s; }
        .links-grid .link-card:nth-child(4) { animation-delay: 0.4s; }
        .links-grid .link-card:nth-child(5) { animation-delay: 0.5s; }
        .links-grid .link-card:nth-child(6) { animation-delay: 0.6s; }
        .links-grid .link-card:nth-child(7) { animation-delay: 0.7s; }

        /* ریسپانسیو */
        @media (max-width: 768px) {
            header .container {
                flex-direction: column;
                gap: 1rem;
            }

            nav ul {
                flex-direction: column;
                gap: 1rem;
                width: 100%;
            }

            .hamburger {
                display: flex;
            }

            nav ul {
                display: none;
            }

            nav ul.active {
                display: flex;
            }

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

            .links-grid {
                grid-template-columns: 1fr;
                gap: 1.5rem;
            }

            .link-card {
                padding: 1.5rem;
            }
        }
        footer {
            background: linear-gradient(135deg, #2c1810, #1a0f0b);
            color: #f4e4d9;
            padding: 3rem 0;
            text-align: center;
            box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
        }

        .social-links {
            margin-top: 1.5rem;
        }

        .social-links a {
            color: var(--accent-hover);
            margin: 0 1.5rem;
            text-decoration: none;
            font-size: 1.2rem;
            transition: all 0.3s ease;
        }

        .social-links a:hover {
            color: white;
            transform: translateY(-3px);
        }
  /* هدر بخش – تعمیر خط قرمز */
.section-header {
    background: var(--header-bg);
    color: white;
    padding: 30px 0;
    text-align: center;
    position: relative;
    animation: fadeInDown 1s ease;
    margin-bottom: 40px;
    border-bottom: 3px solid var(--accent-color); /* تغییر به accent – نارنجی نرم */
    border-radius: 0 0 20px 20px; /* گرد کردن برای قشنگی */
}

[data-theme="dark"] .section-header {
    border-bottom: 3px solid #ff8c69; /* در dark، نارنجی روشن‌تر */
}

/* timeline در about – خط نرم‌تر */
.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px; /* ضخیم‌تر برای وضوح */
    background: linear-gradient(to bottom, var(--accent-color), transparent); /* gradient نرم */
    transform: translateX(-50%);
}