/* ==========================================================================
    Saffron Export Website - Refined Stylesheet by Your Coding Partner
    Version: 2.3 (Final Layout & Targeting Fixes)
    Date: June 9, 2025
==========================================================================
*/

/* تعریف متغیرهای رنگی */
:root {
    --saffron-red: #C3073F;
    --saffron-gold: #FFC300;
    --dark-bg: #1A1A1A;
    --light-text: #f4f4f4;
    --dark-text: #333;
    --body-bg: #FCFBF8;
    --whatsapp-green: #25D366;
    --whatsapp-sent-bg: #e1ffc7;
    --whatsapp-received-bg: #ffffff;
    --success-green: #28a745;
    --font-main: 'Vazirmatn', sans-serif;
}

/* استایل کلی و ریسет */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font-main); background-color: var(--body-bg); color: var(--dark-text); text-align: right; direction: rtl; font-size: 16px; line-height: 1.7; }
html { scroll-behavior: smooth; }

/* **اصلاح مدل فاصله‌گذاری عمومی** */
main > section {
    padding-top: 80px;
    padding-bottom: 80px;
}
.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding-left: 20px;
    padding-right: 20px;
}

h1, h2, h3 { font-weight: 700; line-height: 1.3; }
h2 { text-align: center; font-size: 2.8rem; margin-bottom: 20px; color: var(--saffron-red); }
.section-subtitle { text-align: center; max-width: 700px; margin: 0 auto 60px auto; font-size: 1.1rem; line-height: 1.8; color: #666; }

/* بنر بالایی */
.top-banner { background-color: var(--saffron-red); color: white; text-align: center; padding: 12px; font-size: 1rem; font-weight: 500; }
.top-banner strong { color: var(--saffron-gold); }

/* منوی ناوبری */
.navbar { background-color: rgba(26, 26, 26, 0.95); backdrop-filter: blur(10px); height: 80px; display: flex; justify-content: center; align-items: center; font-size: 1.1rem; position: sticky; top: 0; z-index: 999; box-shadow: 0 4px 15px rgba(0,0,0,0.1); width: 100%; }
.nav-container { display: flex; justify-content: space-between; align-items: center; height: 80px; width: 100%; max-width: 1200px; padding: 0 20px; }
.nav-logo { color: var(--saffron-gold); font-size: 1.6rem; font-weight: bold; text-decoration: none; }
.nav-menu { display: flex; list-style: none; }
.nav-item { height: 80px; }
.nav-link { color: var(--light-text); display: flex; align-items: center; text-decoration: none; padding: 0 1.2rem; height: 100%; position: relative; transition: color 0.3s ease; }
.nav-link::after { content: ''; position: absolute; bottom: 20px; left: 50%; right: 50%; height: 2px; background: var(--saffron-gold); opacity: 0; transition: all 0.4s ease-in-out; }
.nav-link:hover { color: var(--saffron-gold); }
.nav-link:hover::after { left: 1.2rem; right: 1.2rem; opacity: 1; }
.hamburger { display: none; cursor: pointer; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; transition: all 0.3s ease-in-out; background-color: var(--light-text); }


/* هدر */
.hero-section { position: relative; min-height: 90vh; background: url('https://wallpapershome.com/images/pages/pic_h/427.jpg') no-repeat center center/cover; display: flex; align-items: center; justify-content: center; color: white; padding: 80px 20px; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(0,0,0,0.8), rgba(0,0,0,0.2)); }
.hero-content { position: relative; z-index: 2; text-align: center; max-width: 800px; }
.hero-content h1 { font-size: 3.8rem; margin-bottom: 20px; line-height: 1.4; text-shadow: 0 2px 10px rgba(0,0,0,0.5); }
.hero-content p { font-size: 1.5rem; margin-bottom: 40px; }
.cta-button { background-color: var(--saffron-gold); color: var(--dark-bg); padding: 18px 40px; border-radius: 50px; text-decoration: none; font-size: 1.2rem; font-weight: bold; transition: all 0.3s ease; border: 2px solid var(--saffron-gold); }
.cta-button:hover { background-color: transparent; color: var(--saffron-gold); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(0,0,0,0.2); }

/* محصولات */
.products-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 40px; }
.product-card { background: #fff; border-radius: 15px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); overflow: hidden; text-align: center; padding: 25px; display: flex; flex-direction: column; transition: transform 0.3s ease, box-shadow 0.3s ease; position: relative; border: 1px solid #eee; }
.product-card:hover { transform: translateY(-10px); box-shadow: 0 15px 40px rgba(0,0,0,0.1); }
.product-card img { max-width: 100%; height: 250px; object-fit: contain; margin-bottom: 20px; }
.product-card h3 { font-size: 1.6rem; color: var(--saffron-red); margin-bottom: 15px; }
.product-card p { flex-grow: 1; margin-bottom: 25px; color: #555; }
.product-button { background-color: var(--whatsapp-green); color: white; padding: 14px 30px; border-radius: 50px; text-decoration: none; font-weight: bold; transition: background-color 0.3s ease; display: inline-block; }
.product-button:hover { background-color: #128C7E; }
.product-price-tag { position: absolute; top: 20px; right: 20px; background-color: var(--saffron-red); color: white; padding: 5px 15px; border-radius: 20px; font-size: 1rem; font-weight: bold; }
.best-value { overflow: visible; }
.best-value::before { content: 'بهترین انتخاب'; position: absolute; top: 25px; left: -35px; background-color: var(--saffron-gold); color: var(--dark-bg); padding: 8px 30px; font-weight: bold; font-size: 0.9rem; white-space: nowrap; transform: rotate(-45deg); box-shadow: 0 5px 10px rgba(0,0,0,0.1); }

/* داستان ما */
.story-content { display: flex; flex-direction: row; align-items: center; gap: 40px; }
.story-text { flex: 1; min-width: 0; }
.story-text h3 { font-size: 1.8rem; color: var(--dark-bg); }
.story-text p { line-height: 1.9; font-size: 1.1rem; }
.story-image { flex: 1; min-width: 0; }
.story-image img { width: 100%; border-radius: 15px; box-shadow: 0 15px 30px rgba(0,0,0,0.15); }

/* بخش‌های تمام-عرض تیره */
.dark-section { background-color: var(--dark-bg); color: var(--light-text); }
.dark-section h2 { color: var(--saffron-gold); }
.dark-section .section-subtitle { color: #ccc; }

/* راهنمای کیفیت */
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 40px; }
.grade-card { background: #2a2a2a; padding: 30px; border-radius: 15px; border: 1px solid #444; }
.grade-card img { width: 100%; height: 200px; object-fit: cover; border-radius: 10px; margin-bottom: 20px; }
.grade-card h3 { font-size: 1.5rem; color: var(--saffron-gold); text-align: center; margin-bottom: 20px; }
.grade-card ul { list-style: none; }
.grade-card ul li { margin-bottom: 15px; line-height: 1.6; display: flex; align-items: center; }
.our-product { border: 2px solid var(--saffron-gold); box-shadow: 0 0 20px rgba(255, 195, 0, 0.2); }
.grade-card ul li::before { content: ''; display: inline-block; width: 24px; height: 24px; margin-left: 10px; background-size: contain; background-repeat: no-repeat; background-position: center; flex-shrink: 0; }
.our-product ul li::before { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%2328a745" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/><polyline points="22 4 12 14.01 9 11.01"/></svg>'); }
.grade-card:not(.our-product) ul li::before { background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="%23C3073F" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/></svg>'); }

/* گواهینامه ها */
.certificates-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; margin-top: 40px; }
.certificate-item { text-align: center; }
.certificate-item img { width: 100%; max-width: 300px; height: auto; border-radius: 10px; border: 3px solid var(--saffron-gold); transition: transform 0.3s ease; object-fit: cover; }
.certificate-item img:hover { transform: scale(1.05); }
.certificate-item p { margin-top: 15px; font-size: 1.1rem; font-weight: bold; }

/* نظرات */
.testimonials-grid-redesigned { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; align-items: stretch; }
.testimonial-card-redesigned, .testimonial-whatsapp { display: flex; flex-direction: column; }
.testimonial-card-redesigned { background: #fff; padding: 30px; border-radius: 15px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); border: 1px solid #eee; position: relative; }
.testimonial-card-redesigned::before { content: '“'; position: absolute; top: 10px; right: 20px; font-size: 6rem; color: var(--saffron-red); opacity: 0.08; font-family: Georgia, serif; }
.testimonial-card-redesigned p { font-style: italic; color: #555; line-height: 1.8; margin: 0 0 20px 0; flex-grow: 1; z-index: 2; position: relative; }
.testimonial-author { display: flex; align-items: center; }
.testimonial-author img { width: 60px; height: 60px; border-radius: 50%; margin-left: 15px; border: 3px solid var(--saffron-red); object-fit: cover; }
.testimonial-whatsapp { background: url('https://i.ibb.co/7z3P8yY/whatsapp-bg.png'); border-radius: 15px; padding: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.05); border: 1px solid #eee; }
.whatsapp-header { display: flex; align-items: center; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.whatsapp-header img { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; margin-left: 10px; }
.whatsapp-user strong { display: block; }
.whatsapp-user span { font-size: 0.8rem; color: #777; }
.chat-bubble { padding: 10px 15px; border-radius: 10px; max-width: 80%; margin-bottom: 10px; line-height: 1.5; box-shadow: 0 1px 2px rgba(0,0,0,0.1); }
.chat-bubble.received { background: var(--whatsapp-received-bg); margin-right: auto; border-top-right-radius: 0; }
.chat-bubble.sent { background: var(--whatsapp-sent-bg); margin-left: auto; border-top-left-radius: 0; }
.timestamp { font-size: 0.7rem; color: #999; text-align: left; margin-top: 5px; }

/* سوالات متداول */
.faq-accordion { max-width: 800px; margin: 0 auto; border-top: 1px solid #444; }
.faq-item { border-bottom: 1px solid #444; }
.faq-question { background: none; border: none; width: 100%; text-align: right; padding: 25px 20px; font-family: var(--font-main); font-size: 1.3rem; font-weight: 500; color: var(--light-text); cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background-color 0.3s ease; }
.faq-question:hover { background-color: rgba(255,255,255,0.05); }
.faq-question::after { content: '+'; font-size: 2.5rem; color: var(--saffron-gold); transition: transform 0.4s ease-in-out; }
.faq-question.active::after { transform: rotate(135deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.4s ease-in-out; background-color: rgba(0,0,0,0.15); }
.faq-answer p { padding: 25px; line-height: 1.8; font-size: 1.1rem; color: #ccc; margin:0; border-top: 1px solid #444; }

/* تماس با ما */
.map-container { border-radius: 15px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,0.1); margin: 40px auto; }
.address { display: flex; align-items: center; justify-content: center; text-align: center; font-size: 1.3rem; margin-top: 40px; color: #444; }
.address svg { margin-left: 10px; flex-shrink: 0; }

/* فوتر */
footer { background-color: #111; color: #aaa; text-align: center; padding: 30px; font-size: 1rem; }

/* واتس‌اپ شناور */
.whatsapp-float { position: fixed; bottom: 30px; left: 30px; background-color: var(--whatsapp-green); width: 60px; height: 60px; border-radius: 50%; display: flex; align-items: center; justify-content: center; box-shadow: 0 5px 15px rgba(0,0,0,0.3); z-index: 100; transition: transform 0.3s ease; }
.whatsapp-float:hover { transform: scale(1.1); }
.whatsapp-float svg { width: 30px; height: 30px; }


/* واکنش‌گرا */
@media (max-width: 960px) {
    body { padding-top: 80px; }
    .top-banner { display: none; }
    .navbar { position: fixed; top: 0; }
    .nav-menu { position: fixed; right: -100%; top: 80px; flex-direction: column; background-color: var(--dark-bg); width: 100%; height: calc(100vh - 80px); text-align: center; transition: right 0.4s ease-in-out; }
    .nav-menu.active { right: 0; }
    .hamburger { display: block; }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
    .hero-section { min-height: 70vh; }
    .hero-content h1 { font-size: 2.5rem; }
    h2 { font-size: 2.2rem; }
    .story-content { flex-direction: column; }
    .guide-grid, .testimonials-grid-redesigned, .certificates-grid { grid-template-columns: 1fr; }
    .best-value::before { top: 20px; left: -40px; }
}


/* ==========================================================================
    Blog Section Styles
==========================================================================
*/
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
}

.blog-card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.blog-image-link {
    display: block;
    height: 220px;
}

.blog-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-content h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.blog-content h3 a {
    text-decoration: none;
    color: var(--saffron-red);
    transition: color 0.3s ease;
}

.blog-content h3 a:hover {
    color: var(--dark-text);
}

.blog-excerpt {
    color: #555;
    margin-bottom: 20px;
    flex-grow: 1; /* باعث می‌شود دکمه‌ها همیشه در پایین کارت باشند */
}

.blog-read-more {
    text-decoration: none;
    color: var(--saffron-red);
    font-weight: bold;
    transition: letter-spacing 0.3s ease;
}

.blog-read-more:hover {
    letter-spacing: 0.5px;
}