/* --- Global Variables & Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Vazirmatn:wght@400;600;700;900&display=swap');

:root {
    --primary-blue: #003366; /* Deep Navy Blue (Trust) */
    --accent-gold: #FFC300; /* Vibrant Gold/Yellow (Energy & CTA) */
    --text-dark: #333333;
    --text-light: #F5F7FA;
    --bg-light: #F5F7FA;
    --bg-dark: #1F2833; 
    --font-family: 'Vazirmatn', sans-serif;
    --box-shadow-subtle: 0 2px 10px rgba(0, 0, 0, 0.05); /* Shadow nhẹ‌تر */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: white; /* پس‌زمینه سفید برای حس تمیزی بیشتر */
    color: var(--text-dark);
    direction: rtl;
    line-height: 1.8;
    overflow-x: hidden;
}
button{
    font-family: var(--font-family);

}


/* --- Utility Classes & Layout --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 120px 0; /* افزایش فاصله عمودی برای ظاهر خلوت‌تر */
    text-align: center;
    overflow: hidden; 
}

.bg-light {
    background-color: var(--bg-light); /* بخش‌های غیر اصلی کمی طوسی روشن */
}

.dark-bg {
    background-color: var(--primary-blue);
    color: var(--text-light);
}

.mt-5 { margin-top: 50px; }
.hidden { display: none !important; }

/* Form Group Spacing (Added for form structure) */
.form-group {
    margin-bottom: 20px;
}

/* --- Typography & Headings --- */
h1, h2, h3, h4 {
    font-weight: 900;
    color: var(--primary-blue);
    line-height: 1.2;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 60px; /* افزایش فاصله */
    font-weight: 400;
}

.dark-bg h2 {
    color: var(--accent-gold);
}

/* --- Buttons --- */
.btn {
    padding: 12px 30px;
    text-decoration: none;
    font-weight: 700;
    border-radius: 8px; /* گوشه‌های تیزتر برای ظاهر رسمی */
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-block;
    border: 2px solid transparent;
    cursor: pointer;
}

.btn-cta-primary {
    background-color: var(--accent-gold);
    color: var(--primary-blue);
    border-color: var(--accent-gold);
    box-shadow: 0 4px 10px rgba(255, 195, 0, 0.3);
}

.btn-cta-primary:hover {
    background-color: #ffda6a;
    transform: translateY(-2px);
}

.btn-cta-secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

.btn-cta-secondary:hover {
    background-color: white;
    color: var(--primary-blue);
    transform: translateY(-2px);
}
/* دکمه داخل فوتر و بخش تماس */
.btn-submit {
    background-color: var(--primary-blue);
    color: white;
    width: 100%; /* Make submit button full width for better form UX */
}
.btn-submit:hover {
    background-color: #004488;
}

/* --- Header & Navigation (FIXED FOR DESKTOP) --- */
/* ================================================= */
/* --- 1. Header & Navigation (استایل پرکنتراست و لوکس) --- */
/* ================================================= */

/* --- Header & Navigation (FINAL OPTIMIZATION) --- */
/* ================================================= */

/* Global State */
body.menu-open {
    overflow: hidden; 
}

/* --- Mobile Toggle Button (در دسکتاپ مخفی است) --- */
.menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    transition: color 0.3s;
    flex-shrink: 0;
    font-size: 1.8rem; /* بزرگتر برای موبایل */
    color: var(--primary-blue);
    padding: 8px;
    display: none; 
}

/* --- Header Actions (نگه‌دارنده سبد خرید و دکمه همبرگری) --- */
.header-actions {
    display: flex; 
    align-items: center;
    gap: 15px; /* فاصله بیشتر بین آیکون‌ها */
    flex-shrink: 0;
    /* این Z-Index باید همیشه بالاتر از منوی باز شده باشد */
    z-index: 100000; 
}

/* --- Cart Icon Header (استایل عمومی برای سبد خرید) --- */
.cart-icon-header {
    position: relative;
    font-size: 1.3rem; 
    color: var(--primary-blue); 
    padding: 8px 10px; 
    border-radius: 8px;
    transition: all 0.3s;
    flex-shrink: 0;
    /* استایل دسکتاپ: باکس برجسته */
    background-color: var(--bg-light); 
    box-shadow: var(--box-shadow-subtle);
}

.cart-icon-header:hover {
    background-color: #e0e0e0;
}

/* --- Cart Count Badge (دایره نشانگر تعداد) --- */
.cart-count-badge {
    position: absolute;
    top: -8px;
    right: -8px;
    background-color: var(--accent-gold);
    color: var(--primary-blue); 
    font-size: 0.75rem;
    font-weight: 800;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    border: 3px solid white; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* ================================================= */
/* --- 1. Desktop Header & Navigation --- */
/* ================================================= */

#main-header {
    width: 100%;
    position: fixed; 
    top: 0;
    z-index: 1000;
    height: 75px; 
    background-color: white; 
    box-shadow: 0 1px 10px rgba(0, 0, 0, 0.04); 
    transition: all 0.3s ease-in-out;
}

#main-header.scrolled {
    height: 65px; 
    background-color: rgba(255, 255, 255, 0.98); 
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1); 
}

.header-content {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- لوگو و برند --- */
.logo {
    font-size: 1.6rem;
    font-weight: 800; 
    color: var(--primary-blue);
    display: flex;
    align-items: center;
    padding: 10px 0;
    flex-shrink: 0;
    margin-left: 20px; 
}

/* --- ناوبری دسکتاپ --- */
#main-nav {
    flex-grow: 1; 
    display: flex;
    justify-content: center; 
}
#main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
}
#main-nav ul li {
    margin: 0 16px;
}
#main-nav ul li a {
    text-decoration: none;
    color: var(--text-dark); 
    font-size: 1rem;
    font-weight: 600;
    padding: 5px 0;
    transition: color 0.3s;
}

/* --- دکمه مشاوره رایگان (CTA Button) --- */
.btn-login {
    background-color: var(--accent-gold) !important;
    color: var(--primary-blue) !important; 
    padding: 10px 22px !important;
    border-radius: 50px !important; 
    font-weight: 700 !important;
    transition: all 0.3s;
    border: none !important;
    flex-shrink: 0; 
}
.btn-login:hover {
    background-color: #ffda66 !important; 
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15); 
}


/* ================================================= */
/* --- 2. Mobile Navigation & Actions (Responsive) --- */
/* ================================================= */
@media (max-width: 992px) {
    
    /* --- Mobile Header Height & Layout --- */
    :root {
        --mobile-header-height: 100px; 
    }
    #main-header {
        height: var(--mobile-header-height);
    }

    /* لوگو سمت راست، اعمال سمت چپ */
    .logo {
        flex-grow: 1; 
        text-align: right; 
        font-size: 1.5rem;
        margin-right: 20px;
    }
    
    .menu-toggle {
        display: block; 
    }
    
    .cart-icon-header {
        background-color: transparent !important;
        box-shadow: none !important;
        padding: 5px; 
        font-size: 1.7rem; 
        margin-right: 0; 
    }

    /* ---------------------------------------------------------------- */
    /* --- تغییر اصلی: Mobile Sidebar Menu (منوی کشویی لوکس) --- */
    /* ---------------------------------------------------------------- */
    #main-nav {
        /* تبدیل به سایدبار با ابعاد ثابت */
        position: fixed; 
        top: 0; 
        right: 0;
        width: 85vw; /* کمی پهن‌تر */
        max-width: 350px; 
        height: 100vh; 
        
        background-color: var(--primary-blue); /* پس‌زمینه آبی تیره */
        color: var(--text-light); 
        z-index: 99999999999999999999999999999999999999; 
        
        /* Layout: آیتم‌ها از بالا و راست شروع شوند */
        display: flex; 
        flex-direction: column;
        justify-content: flex-start; 
        align-items: flex-start; 
        
        /* انیمیشن سایدبار (ورود از راست) */
        transform: translateX(100%); 
        transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94); /* انیمیشن نرم */
        overflow-y: auto;
        
        /* سایه قوی کنار سایدبار */
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.6); 
    }

    /* Active State (باز شدن منو) */
    #main-nav.active {
        transform: translateX(0);
    }
    
    /* آیتم‌های لیست ناوبری */
    #main-nav ul {
        flex-direction: column;
        align-items: flex-start; 
        text-align: right;
        /* فاصله از بالای سایدبار (زیر هدر مخفی) */
        padding: calc(var(--mobile-header-height) + 20px) 25px 20px 25px; 
        width: 100%;
        margin: 0;
    }

    #main-nav ul li {
        margin: 0;
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* جداکننده خطی روشن و ظریف */
    }
    
    #main-nav ul li:last-child {
        border-bottom: none;
    }

    #main-nav ul li a {
        display: block; 
        font-size: 1.4rem; /* بزرگتر و قابل لمس‌تر */
        font-weight: 700; 
        color: var(--text-light); 
        padding: 15px 10px; 
        transition: all 0.3s;
        border-radius: 4px;
    }
    
    /* افکت لوکس Hover/Active */
    #main-nav ul li a:hover,
    #main-nav ul li a.active-nav {
        color: var(--primary-blue); /* متن آبی تیره شود */
        background-color: var(--accent-gold); /* پس‌زمینه طلایی بگیرد */
        padding-right: 20px; /* جلوه حرکتی شیک به راست */
    }

    /* CTA button inside Mobile Menu (برجسته‌ترین عنصر) */
    #main-nav .btn-login {
        display: block !important; 
        margin: 30px 25px 40px 25px; 
        font-size: 1.2rem !important; /* کمی بزرگتر و پررنگ */
        padding: 15px 35px !important; 
        width: calc(100% - 50px); 
        text-align: center;
        /* استایل دکمه را به سفید/آبی تغییر می‌دهیم تا در پس‌زمینه تاریک بدرخشد */
        background-color: white !important; 
        color: var(--primary-blue) !important;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3); 
    }
}
/* Hide toggle button on large screens */
.menu-toggle {
    display: none; 
}


/* --- Hero Section --- */
#hero {
    height: 100vh;
    background: url('img/hero-bg.jpg') no-repeat center center;
    background-size: cover;
    background-attachment: fixed; 
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    padding-top: 80px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8); /* تیره‌تر کردن اوورلی برای خوانایی بیشتر */
    z-index: 1;
}

.hero-inner {
    position: relative;
    z-index: 2;
    color: white;
    text-align: center;
    max-width: 900px;
}

.hero-inner h1 {
    font-size: 4rem;
    color: white;
    margin-bottom: 25px;
}

.hero-inner .subtitle {
    font-size: 1.2rem;
    color: var(--accent-gold);
    font-weight: 600;
    margin-bottom: 15px;
}

.hero-inner .description {
    font-size: 1.2rem;
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.scroll-down-btn {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: white;
    font-size: 2rem;
    animation: bounce 2s infinite;
    z-index: 2;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

/* Discount Timer */
.discount-timer-box {
    background-color: rgba(255, 195, 0, 0.1);
    border: 1px solid var(--accent-gold);
    padding: 15px 30px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: inline-block;
}

.discount-timer-box p {
    font-size: 1rem;
    margin-bottom: 5px;
    color: #ffd861;
}

.countdown {
    display: flex;
    justify-content: center;
    font-size: 2rem;
    font-weight: 900;
    color: var(--accent-gold);
    direction: ltr; 
}

.countdown span {
    margin: 0 10px;
}

.countdown span::after {
    content: attr(data-unit);
    display: block;
    font-size: 0.5em;
    font-weight: 400;
    color: white;
}


/* --- About Section --- */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 2fr; /* جابجایی ستون‌ها برای ترکیب بصری بهتر */
    gap: 80px;
    align-items: center;
    text-align: right;
}

.about-text h2 {
    text-align: right;
}

.about-image {
    width: 100%;
    max-width: 350px;
    height: 350px;
    object-fit: cover;
    border-radius: 12px; /* گوشه‌های گرد کمتری */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.badges-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 30px;
    margin-bottom: 40px;
}

.badge-item {
    background-color: var(--bg-light);
    color: var(--primary-blue);
    padding: 15px 10px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid #ddd;
}

.badge-item i {
    color: var(--accent-gold);
    margin-left: 8px;
}

.btn-read-more {
    background-color: var(--primary-blue);
    color: white;
}
.btn-read-more:hover {
    background-color: #004488;
}

/* --- Results Section (Stats Counter) --- (Stats counter elements are in JS, so skip CSS here) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.stat-item {
    background-color: rgba(255, 255, 255, 0.1); /* شفافیت کمتر */
    padding: 30px;
    border-radius: 10px;
    opacity: 0; 
    transform: translateY(20px); 
    transition: all 0.5s ease-out;
    border-bottom: 4px solid var(--accent-gold);
}

.stat-item.in-view {
    opacity: 1;
    transform: translateY(0);
}

.stat-number {
    font-size: 3rem;
    font-weight: 900;
    color: var(--accent-gold);
    display: block;
    margin-bottom: 5px;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
    opacity: 0.9;
}

/* --- Why Choose Us (Focus on unique value) --- */
.why-us-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px; /* افزایش فاصله */
    margin-top: 60px;
}

.why-us-item {
    background-color: white;
    padding: 35px;
    border-radius: 12px;
    box-shadow: var(--box-shadow-subtle);
    transition: 0.3s;
    text-align: center;
    border-top: 4px solid var(--primary-blue);
    opacity: 0; 
    transform: translateY(20px); 
}

.why-us-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.why-us-item i {
    font-size: 2.5rem;
    color: var(--accent-gold);
    margin-bottom: 15px;
}

.why-us-item h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}
.why-us-item p {
    text-align: center;
}
.why-us-item.in-view {
    opacity: 1;
    transform: translateY(0);
}


/* --- Courses Section --- */
.courses-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.course-card {
    background-color: white;
    border-radius: 12px;
    box-shadow: var(--box-shadow-subtle);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    text-align: right;
    display: flex; /* Added flex to structure card content better */
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.course-card img {
    width: 100%;
    height: 180px; /* کاهش ارتفاع تصویر */
    object-fit: cover;
}

.card-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: var(--accent-gold);
    color: var(--primary-blue);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 700;
}

.card-content {
    padding: 20px;
    flex-grow: 1; /* Ensures content takes up available space */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.course-card h3 {
    margin-bottom: 10px;
}
.course-card p {
    color: #999;
}
.course-pricing {
    margin: 15px 0 20px 0;
}

.price-old {
    font-size: 0.9rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 10px;
    display: block;
}

.price-new {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--primary-blue);
}

.btn-buy-course {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    font-weight: 700;
    background-color: var(--primary-blue);
    color: white;
}
.btn-buy-course:hover {
    background-color: #004488;
}

/* VIP Card Styling */
.vip-course-card {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--accent-gold);
    color: var(--primary-blue);
    padding: 30px 40px;
    border-radius: 15px;
    margin-top: 60px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: right;
}

.vip-content h4 {
    color: var(--primary-blue);
    font-size: 1.6rem;
    margin-bottom: 10px;
}
.vip-content p {
    color: var(--primary-blue);
}

.vip-pricing {
    text-align: center;
    flex-shrink: 0;
}

.vip-price-tag {
    font-size: 1.6rem;
    font-weight: 900;
    display: block;
    margin-bottom: 10px;
    color: var(--primary-blue);
}

.btn-reserve-vip {
    background-color: var(--primary-blue);
    color: white;
    padding: 10px 25px;
    font-size: 0.95rem;
}
.btn-reserve-vip:hover {
     background-color: #004488;
}

/* --- Testimonials Section (Minimalist) --- */
#testimonials {
    background-color: white; /* پس زمینه سفید */
}

.testimonial-slider-container {
    max-width: 700px; /* کوچکتر شدن کانتینر برای تمرکز بیشتر */
    margin: 50px auto 0;
    position: relative;
    overflow: hidden;
    padding: 30px;
    background-color: var(--bg-light);
    border-radius: 15px;
    box-shadow: var(--box-shadow-subtle);
}

.testimonial-slide {
    min-width: 100%;
    padding: 10px;
    opacity: 0;
    position: absolute; 
    top: 0;
    left: 0;
    transition: opacity 0.6s ease-in-out;
    text-align: center;
}

.testimonial-slide.active-slide {
    opacity: 1;
    position: relative;
}

.testimonial-slide i {
    font-size: 2.5rem;
    color: var(--primary-blue);
    margin-bottom: 20px;
    opacity: 0.8;
}

.testimonial-slide p {
    font-size: 1.15rem;
    font-style: italic;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.author {
    font-weight: 700;
    color: var(--primary-blue);
    font-size: 1rem;
    display: block;
}

.slider-dots {
    text-align: center;
    margin-top: 30px;
    position: relative;
    z-index: 10; 
}

.dot {
    height: 10px;
    width: 10px;
    margin: 0 5px;
    background-color: #ccc;
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.dot.active {
    background-color: var(--primary-blue);
    transform: scale(1.3);
}


/* --- FAQ Section (Accordion) --- */
.faq-accordion-container {
    max-width: 750px;
    margin: 50px auto 0;
    text-align: right;
}

.faq-item {
    border: 1px solid #ddd;
    margin-bottom: 15px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--box-shadow-subtle);
}

.faq-question {
    width: 100%;
    background-color: white;
    color: var(--primary-blue);
    padding: 18px 20px;
    text-align: right;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question:hover {
    background-color: var(--bg-light);
}

.faq-question i {
    transition: transform 0.3s;
}

.faq-question.active i {
    transform: rotate(180deg);
    color: var(--accent-gold);
}

.faq-answer {
    background-color: var(--bg-light);
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-in-out, padding 0.4s ease-in-out;
}

.faq-answer.open {
    padding: 20px;
    max-height: 500px; 
}

/* --- Blog Section (NEW/Refined styles) --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
    text-align: right;
}

.blog-post {
    background-color: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--box-shadow-subtle);
    transition: transform 0.3s, box-shadow 0.3s;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.blog-post img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.post-content {
    padding: 20px;
}

.post-content h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
    color: var(--primary-blue);
}

.post-content p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 15px;
}

.read-more-btn {
    color: var(--accent-gold);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.read-more-btn i {
    margin-right: 5px;
    transition: margin-right 0.3s;
}

.read-more-btn:hover {
    color: #ffda6a;
}
.read-more-btn:hover i {
     margin-right: 0;
}


/* --- Contact Section (Dark background, clear contrast) --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 2fr; /* جابجایی محل فرم و جزییات تماس */
    gap: 70px;
    align-items: flex-start;
    text-align: right;
    color: white;
}

.contact-details {
    padding-top: 10px;
}

.contact-details h3 {
    color: var(--accent-gold);
    margin-bottom: 15px;
}
.contact-subtitle {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
    text-align: right;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--accent-gold);
    margin-left: 15px;
    margin-top: 5px;
}

.contact-item p, .contact-item a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
}

.contact-form-wrapper {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.contact-form-wrapper h3 {
    color: var(--primary-blue);
    margin-bottom: 30px;
    text-align: center;
}

.contact-form-wrapper input,
.contact-form-wrapper textarea {
    width: 100%;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--font-family);
    font-size: 1rem;
    direction: rtl; /* Ensure correct text direction in inputs/textarea */
}

/* --- Footer --- */
#main-footer {
    background-color: var(--bg-dark);
    color: #bbb;
    padding-top: 60px;
    padding-bottom: 20px;
    text-align: right;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 40px; /* Added space before footer bottom */
}

.footer-col h3 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-col p {
    margin-bottom: 15px;
    line-height: 1.7;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul a {
    color: #bbb;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-col ul a:hover {
    color: var(--accent-gold);
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    margin-left: 15px;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--accent-gold);
}

.trust-icons img {
    width: 80px;
    height: auto;
    margin-top: 20px;
    margin-left: 10px;
    opacity: 0.8;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 0.9rem;
    color: #999;
}


/* --- Modal (Shopping Cart) Styles (NEW) --- */
.modal {
    display: none; /* Hidden by default */
    position: fixed; 
    z-index: 2000; /* High z-index to overlay everything */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.4); /* Dark overlay */
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    margin: auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px; 
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: right;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-content h4 {
    font-size: 1.5rem;
    color: var(--primary-blue);
    margin-bottom: 25px;
}

.modal-close-btn {
    color: var(--text-dark);
    float: left;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.modal-close-btn:hover,
.modal-close-btn:focus {
    color: var(--accent-gold);
    text-decoration: none;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px dashed #ddd;
    font-size: 1.05rem;
}

.cart-item:last-of-type {
    border-bottom: none;
}

.cart-item span:first-child {
    font-weight: 600;
    color: var(--primary-blue);
    flex-grow: 1;
}

.cart-item span:nth-child(2) {
    font-weight: 700;
    margin-left: 15px;
    flex-shrink: 0;
}

.remove-item-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s;
    padding: 5px;
}
.remove-item-btn:hover {
    color: #a71d2a;
}

.empty-cart-message {
    font-family: var(--font-family);
    text-align: center;
    color: #999;
    padding: 20px 0;
    font-style: italic;
}

.cart-summary {
    border-top: 2px solid var(--primary-blue);
    padding-top: 20px;
    margin-top: 20px;
    text-align: center;
}

.cart-summary p {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.cart-summary span {
    font-size: 1.4rem;
    color: var(--primary-blue);
    font-weight: 900;
    margin-right: 5px;
}

.checkout-btn {
    padding: 10px 20px;
}

/* Status Message (Notification Box) Styles (NEW) */
.status-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 2000;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: opacity 0.5s ease-in-out;
    opacity: 0;
}


/* --- Mobile Responsiveness (Hamburguer Menu Logic) --- */
@media (max-width: 1024px) {
    /* Show menu toggle, hide desktop nav */
    .menu-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--accent-gold);
        font-size: 1.5rem;
        cursor: pointer;
    }
    
    #main-nav {
        position: fixed;
        top: 0;
        right: -300px; /* از راست مخفی می‌شود */
        height: 100%;
        width: 300px;
        background-color: var(--primary-blue);
        box-shadow: 0 0 15px rgba(0, 0, 0, 0.5);
        transition: right 0.3s ease-in-out;
        padding-top: 80px;
        z-index: 999;
    }

    #main-nav.nav-active {
        z-index: 9999999;
        right: 0;
    }

    #main-nav ul {
        flex-direction: column;
        align-items: flex-start;
    }

    #main-nav li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    #main-nav a {
        display: block;
        padding: 15px 20px;
        margin-right: 0;
        width: 100%;
    }
    
    .cart-icon {
        margin-right: 0;
        justify-content: flex-start; /* Align cart icon to the right on mobile menu */
    }

    .btn-login {
        margin-right: 20px !important;
        margin-top: 10px;
        width: 85%;
        text-align: center;
    }


    /* Layout Adjustments for smaller screens */
    .section {
        padding: 80px 0; /* Reduced padding on mobile */
    }
    .hero-inner h1 {
        font-size: 3rem;
    }
    .cta-buttons {
        flex-direction: column;
        gap: 15px;
    }
    .btn {
        width: 80%;
        margin: 0 auto;
    }
    
    .about-grid, .contact-grid, .courses-container, .stats-grid, .footer-grid, .why-us-grid, .blog-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    /* Revert image position on mobile */
    .about-grid {
        grid-template-areas: "text" "image";
        text-align: center;
    }
    .about-image-wrapper {
        grid-area: image;
        order: 2;
        display: flex;
        justify-content: center;
    }
    .about-text {
        grid-area: text;
        order: 1;
        text-align: center;
    }
    .about-text h2 {
        text-align: center;
    }
    .badges-grid {
        grid-template-columns: 1fr;
    }
    .why-us-item p {
        text-align: justify;
    }
    
    .vip-course-card {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    .vip-pricing {
        margin-top: 20px;
    }
    
    .contact-details, .contact-form-wrapper {
        text-align: center;
    }
    .contact-item {
        justify-content: center;
        text-align: center;
    }
    
    .footer-col {
        text-align: center;
    }
    .social-links {
        margin-top: 15px;
    }
}
/* ================================================= */
/* --- 5. Breadcrumb Section Styles (HIGH-IMPACT COVER) --- */
/* ================================================= */

#breadcrumb-section {
    /* پس‌زمینه با گرادیانت عمیق برای حس پرستیژ و عمق */
    background: linear-gradient(135deg, var(--primary-blue) 0%, #004d99 100%);
    color: white;
    padding: 50px 0; 
    
    /* رفع تداخل با هدر fixed (80px) */
    margin-top: 80px; 
    
    /* یک سایه عمیق زیر Breadcrumb برای جداسازی از محتوای زیرین */
    box-shadow: 0 10px 20px rgba(0, 51, 102, 0.5);
    border-bottom: 5px solid var(--accent-gold); 
}

#breadcrumb-section .container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

#breadcrumb-section h2 {
    color: white; 
    font-size: 3rem; 
    font-weight: 900;
    margin-top: 15px;
    margin-bottom: 0;
    text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.5); 
}

.breadcrumb {
    font-size: 1rem;
    display: flex;
    align-items: center;
    /* بک‌گراند شفاف و پررنگ‌تر برای برجسته شدن Breadcrumb */
    background-color: rgba(255, 255, 255, 0.2); 
    padding: 8px 20px; 
    border-radius: 25px; 
    backdrop-filter: blur(2px); 
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.breadcrumb a {
    color: var(--text-light); 
    text-decoration: none;
    transition: color 0.3s;
    outline-offset: 4px; /* بهبود دسترس‌پذیری (Focus State) */
}

.breadcrumb a:hover,
.breadcrumb a:focus { /* اضافه شدن Focus State */
    color: var(--accent-gold);
}

.breadcrumb .separator {
    margin: 0 10px;
    font-size: 0.8rem;
    color: var(--accent-gold); 
}

.breadcrumb .current-page {
    color: var(--accent-gold);
    font-weight: 700;
}

/* ================================================= */
/* --- 6. Spacing & Header Fixes (تنظیمات نهایی) --- */
/* ================================================= */

/* اطمینان از اینکه محتوای اصلی به اندازه کافی از Breadcrumb فاصله داشته باشد */
#blog-archive, #single-post {
    padding-top: 80px; 
    padding-bottom: 120px; 
    background-color: var(--bg-light); 
}

/* --- Media Queries (تنظیمات موبایل) --- */
@media (max-width: 768px) {
    #main-header {
        height: 90px; 
    }
    #breadcrumb-section {
    padding: 50px 0px;
            margin-top: 60px; /* تنظیم margin-top بر اساس ارتفاع هدر موبایل (60px) */
    }
    #breadcrumb-section h2 {
        font-size: 2.2rem;
    }
    #blog-archive, #single-post {
        padding-top: 50px; 
        padding-bottom: 80px;
    }
} 

/* ================================================= */
/* --- 8. Blog & Single Post Styles (Layout & Structure) --- */
/* ================================================= */

/* Blog Archive Layout (blog.html) */
#blog-archive {
    background-color: var(--bg-light); 
}

.blog-layout {
    display: grid;
    grid-template-columns: 3fr 1fr; 
    gap: 40px; 
    margin-top: 50px;
}

@media (max-width: 992px) {
    .blog-layout {
        grid-template-columns: 1fr; 
        gap: 30px;
    }
}

.main-content {
    order: 1; 
}

/* Sidebar Styles */
.sidebar {
    order: 2;
}

.sidebar-widget {
    background-color: white;
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: var(--box-shadow-subtle);
}

.sidebar-widget h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--accent-gold);
    padding-bottom: 10px;
}

.sidebar-widget h3 i {
    margin-left: 8px;
    color: var(--accent-gold);
}

/* Search Widget */
.search-widget form {
    display: flex;
}

.search-widget input[type="text"] {
    flex-grow: 1;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 8px 0 0 8px;
    font-family: var(--font-family);
    font-size: 1rem;
    outline: none;
}

.search-widget .btn-submit {
    border-radius: 0 8px 8px 0;
    padding: 0 15px;
    height: auto;
    line-height: 1;
}

/* Categories & Recent Posts Widget */
.categories-widget ul, .recent-posts ul {
    list-style: none;
    padding: 0;
}

.categories-widget ul li, .recent-posts ul li {
    margin-bottom: 10px;
}

.categories-widget ul li a, .recent-posts ul li a {
    display: block;
    padding: 8px 0;
    color: var(--text-dark);
    text-decoration: none;
    border-bottom: 1px dashed #eee;
    transition: color 0.3s, padding-right 0.3s; /* اضافه شدن انتقال برای پدینگ */
    font-size: 0.95rem;
    outline-offset: 4px; /* بهبود دسترس‌پذیری */
}

.categories-widget ul li a:hover, 
.recent-posts ul li a:hover,
.categories-widget ul li a:focus, /* اضافه شدن Focus State */
.recent-posts ul li a:focus { /* اضافه شدن Focus State */
    color: var(--primary-blue);
    padding-right: 5px;
}

.categories-widget i {
    font-size: 0.7rem;
    margin-left: 5px;
    color: var(--accent-gold);
}

/* Course Promo Widget */
.course-promo {
    text-align: center;
    background-color: var(--primary-blue);
    color: white;
    box-shadow: 0 5px 20px rgba(0, 51, 102, 0.4);
}

.course-promo h3 {
    color: var(--accent-gold);
    border-bottom-color: white;
}

.course-promo p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 20px;
}

/* --- Card Styles (Re-used from previous, ensuring consistency) --- */

.blog-grid {
    display: grid;
    /* این الگو برای ریسپانسیو بودن کارت‌ها در اندازه‌های مختلف عالی است */
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px; 
    margin-top: 0;
}

.blog-post-card {
    background-color: white;
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 51, 102, 0.08); 
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    display: flex;
    flex-direction: column;
}

.blog-post-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 51, 102, 0.15); 
}

.blog-post-card .post-img {
    width: 100%;
    height: 240px; 
    object-fit: cover;
}

.blog-post-card .post-info {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* اطمینان از هم‌ارتفاعی کارت‌ها */
}

.post-category {
    display: inline-block;
    color: var(--accent-gold); 
    background-color: rgba(255, 195, 0, 0.1);
    padding: 4px 12px;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 12px;
    width: fit-content;
    text-decoration: none; /* اطمینان از عدم وجود زیرخط */
}

.post-title a {
    color: var(--primary-blue);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.45rem; 
    margin-bottom: 15px;
    display: block;
    line-height: 1.5;
    outline-offset: 4px; /* بهبود دسترس‌پذیری */
    transition: color 0.3s;
}

.post-title a:hover,
.post-title a:focus { /* اضافه شدن Focus State و بهبود Hover */
    text-decoration: underline; 
    color: #001f3f; 
}

.post-excerpt {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.8;
    margin-bottom: 25px;
    flex-grow: 1; /* اطمینان از هم‌ارتفاعی کارت‌ها */
}

.post-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
}

.post-meta i {
    margin-left: 5px;
    color: var(--accent-gold);
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 60px;
}

.page-link {
    display: inline-block;
    padding: 12px 18px;
    margin: 0 7px;
    color: var(--primary-blue);
    text-decoration: none;
    border: 2px solid var(--primary-blue);
    border-radius: 10px;
    transition: all 0.3s ease;
    font-weight: 700;
    outline-offset: 4px; /* بهبود دسترس‌پذیری */
}

.page-link:hover,
.page-link:focus { /* اضافه شدن Focus State */
    background-color: var(--primary-blue);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 51, 102, 0.3);
}

.page-active {
    background-color: var(--primary-blue);
    color: white !important;
    border-color: var(--primary-blue);
}


/* --- Single Post Layout Adjustments --- */
.post-container {
    max-width: 950px;
    margin: auto;
    padding: 0 15px;
}

/* Post Content Body: Centralized and readable */
.post-content-body {
    max-width: 800px;
    margin: 0 auto;
}

/* Post Footer (Author & Share) */
.post-footer-area {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}

.author-box {
    flex: 2; 
    background-color: white;
    border: 1px solid #e0eeef;
    border-radius: 12px;
    padding: 25px;
    margin-top: 0;
    box-shadow: var(--box-shadow-subtle);
}

.share-section {
    flex: 1; 
    margin-top: 0;
    padding: 0;
    border: none;
    text-align: left;
}

.share-section h4 {
    text-align: center;
    margin-bottom: 15px;
}

.share-section div {
    text-align: center;
}

/* Related Posts Section */
.related-posts {
    margin-top: 80px;
    padding-top: 40px;
    border-top: 2px dashed var(--accent-gold);
}

.related-posts .section-title {
    color: var(--primary-blue);
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.blog-post-card.related-small {
    padding: 0;
}

.blog-post-card.related-small .post-img {
    height: 150px; 
}

.blog-post-card.related-small .post-info {
    padding: 15px;
}

.blog-post-card.related-small .post-title a {
    font-size: 1.1rem; 
    line-height: 1.6;
    margin-bottom: 0;
}

.blog-post-card.related-small .post-category {
    margin-bottom: 8px;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .post-footer-area {
        flex-direction: column;
        align-items: stretch;
    }

    .author-box, .share-section {
        flex: none;
        width: 100%;
        margin-bottom: 30px;
        padding: 20px;
    }
    
    .share-section {
        border-top: 1px solid #eee;
        text-align: center;
    }
    
    .share-section h4 {
        text-align: center;
    }

    .related-posts {
        padding-top: 30px;
    }

    .related-posts .section-title {
        font-size: 1.7rem;
    }
}

/* ================================================= */
/* --- 9. Footer Styles (GRID LAYOUT) --- */
/* ================================================= */

#main-footer {
    background-color: var(--text-dark); 
    color: var(--text-light);
    padding-top: 60px;
    font-size: 0.95rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1.5fr; 
    gap: 40px;
    padding-bottom: 40px;
}

.footer-col h3 {
    color: var(--accent-gold);
    font-size: 1.3rem;
    margin-bottom: 20px;
    font-weight: 700;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 8px;
}

/* Brand Info */
.brand-info p {
    line-height: 1.8;
    margin-bottom: 20px;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    margin-left: 15px;
    transition: color 0.3s;
    outline-offset: 4px; /* بهبود دسترس‌پذیری */
}

.social-links a:hover,
.social-links a:focus { /* اضافه شدن Focus State */
    color: var(--accent-gold);
}

/* Quick Links */
.quick-links ul {
    list-style: none;
    padding: 0;
}

.quick-links ul li {
    margin-bottom: 10px;
}

.quick-links ul li a {
    color: var(--text-light);
    text-decoration: none;
    transition: color 0.3s, padding-right 0.3s;
    outline-offset: 4px; /* بهبود دسترس‌پذیری */
}

.quick-links ul li a:hover,
.quick-links ul li a:focus { /* اضافه شدن Focus State */
    color: var(--accent-gold);
    padding-right: 5px; 
}

/* Contact Info */
.contact-info p {
    margin-bottom: 15px;
}

.contact-info p i {
    color: var(--accent-gold);
    margin-left: 10px;
}

.trust-icons {
    margin-top: 25px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.trust-icons img {
    width: 60px; 
    height: auto;
    background-color: white;
    padding: 5px;
    border-radius: 6px;
    /* بهتر است برای بهبود عملکرد، ابعاد تصویر را در HTML یا اینجا فیکس کنید */
    min-width: 60px;
}

/* Footer Bottom */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 0.85rem;
}

/* Footer Media Queries */
@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .footer-col:nth-child(1) { 
        grid-column: 1 / 3;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .footer-col {
        padding-bottom: 20px;
        margin-bottom: 20px;
        border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
    }
    .footer-col:last-child {
        border-bottom: none;
    }
}