/* ============================================
   PageContent.css - محتوای داینامیک صفحات
   نسخه نهایی - با طراحی مینیمال و رنگی
   ============================================ */

.page-content {
    --page-color: #4A90E2;
    --page-shadow: 0 2px 12px rgba(0,0,0,0.15);
    --page-rgb: 74,144,226;
    display: flex;
    flex-direction: column;
    gap: var(--gap-xl, 1.5rem);
    margin-bottom: var(--gap-xl, 1.5rem);
}

/* ============================================
   بخش الف) عنوان اصلی (hero)
   ============================================ */
.page-hero {
    padding: var(--gap-md, 0.75rem) 0;
    text-align: right;
}

.page-hero-title {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.5;
    margin: 0 0 0.85rem;
    color: var(--page-color);
    text-shadow: var(--page-shadow);
    letter-spacing: 0.3px;
    position: relative;
    padding-bottom: 0.75rem;
    display: inline-block;
    max-width: 100%;
}

/* خط رنگی زیر عنوان - هم‌رنگ با تم صفحه */
.page-hero-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 100%;
    max-width: 320px;
    height: 3px;
    background: linear-gradient(90deg, var(--page-color) 0%, var(--page-color) 30%, transparent 100%);
    border-radius: 3px;
    box-shadow: 0 2px 10px rgba(var(--page-rgb), 0.4);
}

.page-hero-subtitle {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--page-color);
    opacity: 0.85;
    margin: 0.75rem 0;
    line-height: 1.7;
}

.page-hero-body-wrapper {
    position: relative;
}

.page-hero-body {
    font-size: 1rem;
    line-height: 2;
    color: #444;
    margin: 0;
    text-align: justify;
}

/* در موبایل متن خلاصه ۳ خط */
@media (max-width: 767px) {
    .page-hero-body.short {
        display: -webkit-box;
        -webkit-line-clamp: 3;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* ============================================
   دکمه "موارد بیشتر" - طراحی مینیمال
   ============================================ */
.page-hero-toggle {
    margin-top: 0.75rem;
    display: none; /* پیش‌فرض مخفی، در موبایل نمایش داده می‌شه */
}

.page-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.9rem 0.4rem 0.6rem;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--page-color);
    background: transparent;
    border: 1.5px solid color-mix(in srgb, var(--page-color) 40%, transparent);
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1;
}

.page-toggle-btn:hover {
    background: color-mix(in srgb, var(--page-color) 8%, transparent);
    border-color: var(--page-color);
}

.page-toggle-btn:active {
    transform: scale(0.96);
}

.page-toggle-btn .toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-toggle-btn .toggle-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

/* آیکون فلش پایین → بالا موقع باز شدن */
.page-toggle-btn.is-open .toggle-icon {
    transform: rotate(180deg);
}

/* ============================================
   بخش ج) فهرست
   ============================================ */
.page-list {
    background: linear-gradient(135deg, #fafafa 0%, #ffffff 100%);
    border-right: 5px solid var(--page-color);
    border-radius: 16px;
    padding: 1.5rem 1.75rem;
    box-shadow:
        0 2px 12px rgba(0,0,0,0.05),
        0 8px 24px rgba(var(--page-rgb), 0.06),
        inset 0 0 0 1px rgba(0,0,0,0.03);
    position: relative;
    margin: 0.5rem 0.25rem;
}

.page-list::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 60px;
    height: 60px;
    background: radial-gradient(circle at top right, rgba(var(--page-rgb), 0.12), transparent 70%);
    border-radius: 0 16px 0 100%;
    pointer-events: none;
}

.page-list-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--page-color);
    text-shadow: var(--page-shadow);
    margin: 0 0 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px dashed rgba(var(--page-rgb), 0.35);
    position: relative;
}

.page-list-items {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.page-list-item {
    position: relative;
    padding-right: 1.75rem;
    font-size: 1rem;
    line-height: 1.9;
    color: #444;
    transition: transform 0.2s ease;
}

.page-list-item:hover {
    transform: translateX(-3px);
}

.page-list-item::before {
    content: '';
    position: absolute;
    right: 0.4rem;
    top: 0.6em;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--page-color);
    box-shadow: 0 0 0 3px rgba(var(--page-rgb), 0.2);
}

.page-list-item-title {
    font-weight: 800;
    color: var(--page-color);
    margin-left: 0.35rem;
}

.page-list-item-text {
    font-weight: 400;
    color: #555;
}

/* ============================================
   بخش د/و) عنوان اصلی دوم و سوم
   ============================================ */
.page-main {
    padding: var(--gap-md, 0.75rem) 0;
    position: relative;
}

.page-main-title {
    font-size: 1.5rem;
    font-weight: 800;
    line-height: 1.5;
    margin: 0 0 0.75rem;
    color: var(--page-color);
    text-shadow: var(--page-shadow);
    position: relative;
    padding-right: 1.25rem;
    padding-bottom: 0.6rem;
    display: inline-block;
    max-width: 100%;
}

/* نوار عمودی کنار عنوان */
.page-main-title::before {
    content: '';
    position: absolute;
    right: 0;
    top: 0.3em;
    width: 5px;
    height: 1.1em;
    background: linear-gradient(180deg, var(--page-color), color-mix(in srgb, var(--page-color) 40%, transparent));
    border-radius: 3px;
    box-shadow: 0 0 12px rgba(var(--page-rgb), 0.5);
}

/* خط رنگی زیر عنوان */
.page-main-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 1.25rem;
    width: 60%;
    max-width: 240px;
    height: 2px;
    background: linear-gradient(90deg, var(--page-color) 0%, transparent 100%);
    border-radius: 2px;
}

.page-main-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--page-color);
    opacity: 0.85;
    margin: 0 0 0.75rem;
    line-height: 1.7;
}

.page-main-body {
    font-size: 1rem;
    line-height: 2;
    color: #444;
    margin: 0;
    text-align: justify;
}

/* ============================================
   سوالات متداول
   ============================================ */
.faq-section {
    margin-top: var(--gap-xl, 1.5rem);
    padding: var(--gap-lg, 1rem) 0;
}

.faq-section h2 {
    font-size: 1.3rem;
    font-weight: 800;
    color: #333;
    margin: 0 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 3px solid #4A90E2;
    display: inline-block;
}

.faq-section details {
    background: #f9fafb;
    border-radius: 12px;
    margin-bottom: 0.6rem;
    padding: 0.8rem 1.1rem;
    border: 1px solid #eef0f3;
    transition: all 0.2s ease;
}

.faq-section details[open] {
    background: #fff;
    border-color: #d0d7de;
    box-shadow: 0 4px 14px rgba(0,0,0,0.06);
}

.faq-section summary {
    font-weight: 700;
    font-size: 1rem;
    color: #2c3e50;
    cursor: pointer;
    list-style: none;
    padding: 0.2rem 0;
    position: relative;
    padding-left: 1.5rem;
}

.faq-section summary::-webkit-details-marker {
    display: none;
}

.faq-section summary::after {
    content: '+';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    color: #4A90E2;
    font-weight: 400;
    transition: transform 0.3s ease;
}

.faq-section details[open] summary::after {
    content: '−';
    transform: translateY(-50%) rotate(180deg);
}

.faq-section details p {
    margin: 0.75rem 0 0;
    font-size: 0.95rem;
    line-height: 1.9;
    color: #555;
    padding-top: 0.75rem;
    border-top: 1px dashed #e0e0e0;
}

/* ============================================
   واکنش‌گرایی
   ============================================ */

/* ===== موبایل ===== */
@media (max-width: 767px) {

    .page-content {
        gap: 1.25rem;
        margin-bottom: 1.25rem;
    }

    /* فاصله عنوان اصلی از سمت راست (درخواست کاربر) */
    .page-hero {
        padding-right: 1.25rem;
        padding-left: 0.5rem;
    }

    .page-hero-title {
        font-size: 1.35rem;
        padding-bottom: 0.6rem;
        margin-bottom: 0.6rem;
        line-height: 1.6;
    }

    .page-hero-title::after {
        max-width: 200px;
        height: 2.5px;
    }

    .page-hero-subtitle {
        font-size: 0.95rem;
        margin: 0.6rem 0;
    }

    .page-hero-body {
        font-size: 0.95rem;
        line-height: 1.9;
    }

    /* نمایش دکمه در موبایل */
    .page-hero-toggle {
        display: block;
        margin-top: 0.6rem;
    }

    .page-toggle-btn {
        font-size: 0.8rem;
        padding: 0.35rem 0.8rem 0.35rem 0.55rem;
    }

    /* فهرست با فاصله از لبه‌ها */
    .page-list {
        padding: 1.1rem 1.2rem;
        margin: 0.5rem 0.75rem;
        border-radius: 14px;
        border-right-width: 4px;
    }

    .page-list-title {
        font-size: 1.05rem;
        margin-bottom: 0.85rem;
    }

    .page-list-item {
        font-size: 0.95rem;
        padding-right: 1.5rem;
        line-height: 1.8;
    }

    /* فاصله عنوان دوم و سوم از راست */
    .page-main {
        padding-right: 1.25rem;
        padding-left: 0.5rem;
    }

    .page-main-title {
        font-size: 1.15rem;
        padding-right: 1rem;
        padding-bottom: 0.5rem;
    }

    .page-main-title::after {
        right: 1rem;
        height: 1.5px;
    }

    .page-main-subtitle {
        font-size: 0.9rem;
    }

    .page-main-body {
        font-size: 0.95rem;
        line-height: 1.9;
    }

    .faq-section h2 {
        font-size: 1.15rem;
    }

    .faq-section summary {
        font-size: 0.95rem;
    }

    .faq-section details p {
        font-size: 0.9rem;
    }
}

/* ===== تبلت ===== */
@media (min-width: 768px) and (max-width: 1023px) {
    .page-hero-title { font-size: 1.6rem; }
    .page-hero-subtitle { font-size: 1rem; }
    .page-hero-body { font-size: 1rem; }
    .page-list { margin: 0.5rem 0.25rem; }
    .page-main-title { font-size: 1.35rem; }
}

/* ===== دسکتاپ ===== */
@media (min-width: 1024px) {
    /* در دسکتاپ متن کامل دیده می‌شه و دکمه مخفی است */
    .page-hero-body.full {
        display: block !important;
    }
    .page-hero-body.short {
        display: none !important;
    }
    .page-hero-toggle {
        display: none !important;
    }

    .page-hero-title { font-size: 1.9rem; }
    .page-main-title { font-size: 1.55rem; }
}

/* ===== کاهش انیمیشن ===== */
@media (prefers-reduced-motion: reduce) {
    .page-hero-body,
    .page-toggle-btn,
    .page-list-item,
    .page-toggle-btn .toggle-icon {
        transition: none;
    }
}