/* ======================= General Setup & Variables ======================= */
:root {
    --accent-color: rgba(235, 99, 78, 1);
    --bg-light-blue: rgba(212, 237, 241, 1);
    --bg-light-pink: rgba(255, 228, 224, 1);

    --text-dark: #2c3e50;
    --text-secondary: #7f8c8d;
    --white: #ffffff;
    --border-color: #e0e0e0;

    --border-radius: 15px;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
}

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

body {
    color: var(--text-dark);
    line-height: 1.8;
    font-size: 16px;
    direction: rtl;
    -webkit-font-smoothing: antialiased;
}

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

.section-title {
    font-weight: 800;
    text-align: center;
    margin-bottom: 50px;
    color: var(--text-dark);
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: var(--border-radius);
    border: none;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    font-size: 1.05rem;
    letter-spacing: -0.5px;
}

.btn-accent {
    background-color: var(--accent-color);
    color: var(--white);
    box-shadow: 0 5px 15px rgba(235, 99, 78, 0.3);
}

.btn-accent:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(235, 99, 78, 0.4);
}


/* ======================= Hero Section ======================= */
.hero-section {
    background-color: var(--bg-light-blue);
    padding: 60px 0 170px;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px;
    background: var(--white);
    clip-path: ellipse(80% 100% at 50% 100%);
}

.hero-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 60px;
}

@media (max-width: 768px) {
    .hero-section {
        padding: 40px 0 160px 0 !important;
    }
    .hero-grid {
        gap: 0px !important;
    }
}

.hero-image {
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.hero-text-container h1 {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.price-box {
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    text-align: center;
}

.price-details {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 20px;
}

.old-price {
    font-size: 1.2rem;
    color: var(--text-secondary);
    text-decoration: line-through;
}

.final-price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-dark);
}

.price-box .btn {
    width: 100%;
}

.price-subtitle {
    margin-top: 15px;
    margin-bottom: 0;
    font-size: 0.9rem;
    color: #e74c3c;
}

/* --- Modern Course Meta Tags --- */

/* The container for the tags */
.course-meta {
    justify-content: center;
    display: flex;
    flex-wrap: wrap; /* Allows tags to wrap to the next line on small screens */
    gap: .75rem;     /* Space between tags */
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Individual tag styling */
.course-meta li {
    display: flex;
    align-items: center;
    background-color: #f1f5f9; /* A light, modern gray */
    color: #334155;           /* A dark, soft text color */
    padding: .5rem 1rem;
    border-radius: 50em;       /* Creates the pill/capsule shape */
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.course-meta li:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
}

/* Icon styling within the tag */
.course-meta i {
    color: #4f46e5; /* A vibrant indigo for the icon */
    font-size: 1.1rem;
    margin-left: .5rem; /* Space between icon and text (for RTL) */
}

/* Text styling within the tag */
.course-meta li strong {
    font-weight: 700;
    margin-left: .25rem;
}


/* ======================= Pain Points Section ======================= */
.pain-points-section {
    padding-bottom: 50px;
}

.pain-points-list {
    columns: 2;
    column-gap: 50px;
    margin: 40px auto;
    max-width: 900px;
    list-style: none;
}

.pain-points-list li {
    padding-right: 35px;
    position: relative;
    margin-bottom: 18px;
    font-size: 1.1rem;
}

.pain-points-list li::before {
    content: '\f058';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    color: var(--accent-color);
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.2rem;
}

.pain-points-summary {
    text-align: center;
    max-width: 700px;
    margin: 40px auto 40px;
    font-size: 1.1rem;
    color: var(--text-secondary);
}

.pain-points-section .btn {
    display: block;
    width: fit-content;
    margin: 0 auto;
}


/* ======================= Syllabus & Other BG Sections ======================= */
.syllabus-section, .testimonials-section, .faq-section {
    padding: 100px 0;
    background-color: var(--bg-light-blue);
    position: relative;
}

.syllabus-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
}

.syllabus-item {
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    text-align: center;
    font-weight: 500;
    font-size: 1.1rem;
    box-shadow: var(--shadow);
}


/* ======================= Post-Course Section ======================= */
.post-course-section {
    padding: 100px 0;
}

.post-course-box {
    max-width: 800px;
    margin: 0 auto;
    padding: 50px;
    background-color: var(--bg-light-pink);
    border-radius: var(--border-radius);
    text-align: center;
    position: relative;
}

.post-course-box .quote-icon {
    position: absolute;
    top: -25px;
    right: 50%;
    transform: translateX(50%);
    font-size: 3rem;
    color: var(--accent-color);
    background: var(--white);
    padding: 0 10px;
}

.post-course-box h3 {
    margin-bottom: 20px;
    font-size: 1.6rem;
}


/* ======================= Testimonials Section ======================= */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background-color: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}
.author-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.author-info img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
}
.author-name {
    margin: 0;
    font-weight: 700;
}
.author-handle {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}
.testimonial-text {
    color: var(--text-secondary);
}


/* ======================= Final CTA Section ======================= */
.final-cta-section {
    padding: 100px 0;
}
.final-cta-box {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px;
    border-radius: var(--border-radius);
    background-color: var(--bg-light-blue);
    text-align: center;
}
.final-cta-box h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}
.final-cta-box p {
    color: var(--text-secondary);
}
.final-price-display {
    background: var(--white);
    border: 1px solid var(--border-color);
    padding: 20px;
    border-radius: var(--border-radius);
    margin: 30px 0;
}
.price-text {
    font-size: 1rem;
    color: var(--text-dark);
}
.price-amount {
    display: flex;
    justify-content: center;
    gap: 20px;
    align-items: baseline;
    margin-top: 10px;
}
.final-price-large {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-dark);
}
.old-price-large {
    font-size: 1.4rem;
    text-decoration: line-through;
    color: var(--text-secondary);
}

.btn-secondary {
    background-color: #bdc3c7;
    color: var(--text-dark);
}
.btn-secondary:hover {
    background-color: #95a5a6;
}
.btn-full {
    width: 100%;
    max-width: 450px;
    padding: 16px;
    font-size: 1.2rem;
}


/* ======================= FAQ Section ======================= */
.accordion {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.accordion-item {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius) !important;
    overflow: hidden;
    transition: all 0.3s ease;
}
.accordion-item.active {
    border-color: var(--accent-color);
    box-shadow: var(--shadow);
}
.accordion-header {
    width: 100%;
    background: none;
    border: none;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.2rem;
    font-weight: 500;
    font-family: 'Vazirmatn';
    text-align: right;
    color: var(--text-dark);
}
.accordion-header i {
    transition: transform 0.3s ease;
    color: var(--accent-color);
}
.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}
.accordion-content p {
    padding: 0 20px 20px;
    margin: 0;
    color: var(--text-secondary);
}
.accordion-item.active .accordion-header i {
    transform: rotate(180deg);
}
.accordion-item.active .accordion-content {
    max-height: 300px; /* Adjust if content is taller */
}


/* ======================= Responsive Design ======================= */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
    }
    .hero-image-container {
        order: 1;
        max-width: 500px;
        margin: 0 auto 40px;
    }
    .hero-text-container {
        order: 2;
        text-align: center;
    }
    .price-details {
        justify-content: center;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .section-title { font-size: 1.8rem; }
    h1 { font-size: 1.5rem; }

    .pain-points-list {
        columns: 1;
    }

    .discount-form {
        flex-direction: column;
        align-items: center;
    }
    .discount-form input {
        width: 100%;
        max-width: 350px;
    }
}


/* =================================== */
/* Styles for V2 Price Story Block    */
/* =================================== */

.price-story-v2 {
    background-color: #eef7f9; /* یک پس‌زمینه بسیار ملایم برای تمایز */
    border-radius: 10px;
    padding: 10px 15px;
    margin-top: 20px;
    margin-bottom: 15px;
    border: 1px solid #cce3e7;
}

.price-step-v2 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

/* جداکننده خط‌چین بین مراحل */
.price-step-v2:not(:last-child) {
    border-bottom: 1px dashed #b8d5da;
}

.step-label-v2 {
    font-size: 14px;
    color: #5b8a8e; /* رنگ متن لیبل‌ها */
    font-weight: 500;
}

.price-and-badge-v2 {
    display: flex;
    align-items: center;
    gap: 8px; /* فاصله بین قیمت و بج تخفیف */
}

.step-value-v2 {
    font-size: 16px;
    font-weight: 600;
    color: #0A4045;
}

/* استایل قیمت خط خورده */
.step-value-v2.strikethrough {
    color: #90a4ae;
    text-decoration: line-through;
    text-decoration-color: #ff7e6b;
    text-decoration-thickness: 1.5px;
    font-size: 15px;
}

/* استایل قیمت نهایی */
.step-value-v2.final {
    color: #d95a41; /* هماهنگ با رنگ دکمه خرید */
    font-size: 20px;
    font-weight: 800; /* بسیار برجسته */
}

/* استایل بج‌های تخفیف */
.badge-v2 {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    color: white;
}

.badge-v2.discount {
    background-color: #26848C; /* رنگ اصلی تم */
}

.badge-v2.special {
    background-color: #c5402c; /* رنگ ویژه و متمایز */
}


/* --- Episodes Section --- */
.episodes-section {
    border-top: 1px solid var(--brand-border-color);
    padding-top: 2rem;
}

.section-title {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.episodes-list {
    display: grid; /* Changed to grid */
    grid-template-columns: 1fr; /* Default to 1 column for mobile */
    gap: 1rem; /* Space between cards */
}

/* --- Media Query for Desktop --- */
/* On screens wider than 768px, switch to a 2-column layout */
@media (min-width: 768px) {
    .episodes-list {
        grid-template-columns: repeat(2, 1fr); /* 2 equal columns */
        gap: 1.5rem; /* A bit more space on desktop */
    }
}

.episode-card {
    background-color: #fff;
    border: 1px solid var(--brand-border-color);
    border-radius: 8px;
    transition: box-shadow 0.3s ease;
    overflow: hidden;
    display: flex; /* Use flexbox to manage content height */
    flex-direction: column;
}

.episode-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.episode-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: default;
}

.episode-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.episode-status-icon {
    font-size: 1rem;
    color: var(--brand-muted-text);
}

.episode-status-icon.fa-unlock {
    color: var(--brand-success);
}

.episode-title {
    font-weight: 600;
    color: var(--brand-dark-text);
}

.episode-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--brand-muted-text);
}

.episode-time {
    font-size: 0.875rem;
    white-space: nowrap;
}

.episode-body {
    background-color: var(--brand-light-bg);
    color: var(--brand-muted-text);
    font-size: 0.9rem;
    border-top: 1px solid var(--brand-border-color);
    flex-grow: 1; /* Allows the body to fill available space */
}

.episode-body p {
    margin: 0;
    padding: 1rem 1.25rem;
    padding-left: 3rem;
}

/* Style for the "Show All" button */
#toggleEpisodesBtn {
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 2rem;
}
