/*
 * ============================================================
 * مستشفى الأطفال التخصصي بالبحيرة
 * Department Page Template — CSS
 * ============================================================
 * ملف: pd-department-page.css
 * المتطلبات: pd-header-footer.css + pd-cards.css
 * الاتجاه: RTL (عربي)
 * ============================================================
 */

/* ============================================================
   SECTION 1 — HERO
   ============================================================ */

.dep-hero {
    position: relative;
    min-height: 520px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
    font-family: var(--hf-font);
    direction: rtl;
}

/* طبقة الصورة الخلفية */
.dep-hero__bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center 30%;
    z-index: 0;
    transition: transform 6s ease;
}

.dep-hero:hover .dep-hero__bg {
    transform: scale(1.03);
}

/* التدرج فوق الصورة لضمان قراءة النص */
.dep-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(18, 43, 30, 0.88)  0%,
        rgba(18, 43, 30, 0.55) 45%,
        rgba(18, 43, 30, 0.18) 100%
    );
    z-index: 1;
}

/* زخرفة دائرة خضراء في خلفية الـ Hero */
.dep-hero__deco {
    position: absolute;
    top: -80px;
    left: -80px;
    width: 380px;
    height: 380px;
    border-radius: 50%;
    background: radial-gradient(
        circle,
        rgba(74, 140, 92, 0.18) 0%,
        transparent 70%
    );
    z-index: 1;
    pointer-events: none;
}

/* المحتوى الداخلي */
.dep-hero__content {
    position: relative;
    z-index: 2;
    padding: 48px 0 60px;
    width: 100%;
    max-width: var(--hf-container-max);
    margin-inline: auto;
    padding-inline: 24px;
}

/* Breadcrumb */
.dep-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.dep-breadcrumb a,
.dep-breadcrumb span {
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.70);
    text-decoration: none;
    transition: color 0.2s ease;
}

.dep-breadcrumb a:hover {
    color: var(--hf-accent);
}

.dep-breadcrumb .sep {
    color: rgba(255, 255, 255, 0.35);
    font-size: 11px;
}

.dep-breadcrumb .current {
    color: var(--hf-accent);
    font-weight: 600;
}

/* شارة القسم */
.dep-hero__tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 16px;
    background: rgba(200, 169, 110, 0.20);
    border: 1px solid rgba(200, 169, 110, 0.40);
    border-radius: var(--hf-radius-pill);
    font-size: 12px;
    font-weight: 700;
    color: var(--hf-accent);
    letter-spacing: 0.06em;
    margin-bottom: 18px;
    backdrop-filter: blur(4px);
}

/* عنوان القسم الرئيسي */
.dep-hero__title {
    font-size: clamp(1.9rem, 4vw, 3rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.25;
    margin-bottom: 18px;
    max-width: 680px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

/* وصف القسم */
.dep-hero__desc {
    font-size: 15.5px;
    color: rgba(255, 255, 255, 0.80);
    line-height: 1.8;
    max-width: 560px;
    margin-bottom: 32px;
}

/* أزرار الـ Hero */
.dep-hero__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.dep-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 13px 28px;
    background: linear-gradient(135deg, var(--hf-accent) 0%, var(--hf-accent-hover) 100%);
    color: #fff;
    font-family: var(--hf-font);
    font-size: 14.5px;
    font-weight: 700;
    border-radius: var(--hf-radius-pill);
    border: none;
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 6px 22px rgba(200, 169, 110, 0.40);
    transition: var(--hf-transition);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.dep-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(200, 169, 110, 0.55);
    color: #fff;
}

.dep-btn-outline-white {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 12px 26px;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-family: var(--hf-font);
    font-size: 14.5px;
    font-weight: 600;
    border-radius: var(--hf-radius-pill);
    border: 1.5px solid rgba(255, 255, 255, 0.45);
    cursor: pointer;
    text-decoration: none;
    backdrop-filter: blur(6px);
    transition: var(--hf-transition);
    white-space: nowrap;
}

.dep-btn-outline-white:hover {
    background: rgba(255, 255, 255, 0.22);
    border-color: rgba(255, 255, 255, 0.7);
    color: #fff;
}

/* إحصائيات سريعة في الـ Hero */
.dep-hero__stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
    margin-top: 36px;
    padding-top: 28px;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.dep-stat {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.dep-stat__num {
    font-size: 24px;
    font-weight: 900;
    color: var(--hf-accent);
    line-height: 1;
    direction: ltr;
    unicode-bidi: embed;
}

.dep-stat__label {
    font-size: 12px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.60);
}

/* ============================================================
   SECTION 2 — CARE CASES (الرعاية والحالات)
   ============================================================ */

.dep-care {
    padding: 72px 0;
    background: var(--hf-bg-white);
    direction: rtl;
    font-family: var(--hf-font);
}

.dep-care__inner {
    width: 100%;
    max-width: var(--hf-container-max);
    margin-inline: auto;
    padding-inline: 24px;
}

/* شبكة بطاقات الرعاية */
.dep-care__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

/* بطاقة الرعاية */
.dep-care-card {
    background: var(--hf-bg-white);
    border-radius: 16px;
    border: 1px solid rgba(74, 140, 92, 0.10);
    box-shadow: 0 2px 12px rgba(30, 59, 47, 0.06);
    padding: 28px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease,
                border-color 0.25s ease;
    position: relative;
    overflow: hidden;
}

.dep-care-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom, var(--hf-primary) 0%, var(--hf-primary-light) 100%);
    border-radius: 0 16px 16px 0;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.dep-care-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 44px rgba(30, 59, 47, 0.12);
    border-color: rgba(74, 140, 92, 0.22);
}

.dep-care-card:hover::before {
    opacity: 1;
}

/* أيقونة البطاقة */
.dep-care-card__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: var(--hf-radius-md);
    background: var(--hf-primary-soft);
    font-size: 22px;
    color: var(--hf-primary);
    flex-shrink: 0;
    transition: var(--hf-transition);
}

.dep-care-card:hover .dep-care-card__icon {
    background: var(--hf-primary);
    color: #fff;
}

.dep-care-card__title {
    font-size: 16px;
    font-weight: 800;
    color: var(--hf-dark-green);
    line-height: 1.4;
}

.dep-care-card__desc {
    font-size: 13.5px;
    color: var(--hf-text-muted);
    line-height: 1.75;
    flex: 1;
}

.dep-care-card__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 700;
    color: var(--hf-primary);
    text-decoration: none;
    transition: var(--hf-transition-fast);
    margin-top: 4px;
    letter-spacing: 0.01em;
}

.dep-care-card__link .arrow {
    font-size: 16px;
    transition: transform 0.22s ease;
}

.dep-care-card__link:hover {
    color: var(--hf-dark-green);
}

.dep-care-card__link:hover .arrow {
    transform: translateX(-4px);
}

/* ============================================================
   SECTION 3 — DOCTORS (مُدمج مع pd-cards.css)
   ============================================================ */

.dep-doctors {
    padding: 72px 0;
    background: var(--hf-bg);
    direction: rtl;
    font-family: var(--hf-font);
}

.dep-doctors__inner {
    width: 100%;
    max-width: var(--hf-container-max);
    margin-inline: auto;
    padding-inline: 24px;
}

.dep-doctors__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

.dep-doctors__cta {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

/* زر "عرض كافة الأطباء" */
.dep-btn-all-doctors {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 13px 32px;
    background: transparent;
    color: var(--hf-primary);
    font-family: var(--hf-font);
    font-size: 14.5px;
    font-weight: 700;
    border-radius: var(--hf-radius-pill);
    border: 2px solid var(--hf-primary);
    cursor: pointer;
    text-decoration: none;
    transition: var(--hf-transition);
    letter-spacing: 0.02em;
}

.dep-btn-all-doctors:hover {
    background: var(--hf-primary);
    color: #fff;
    box-shadow: 0 8px 26px rgba(74, 140, 92, 0.32);
    transform: translateY(-2px);
}

/* ============================================================
   SECTION 4 — JOURNEY STEPS (رحلتك العلاجية)
   ============================================================ */

.dep-journey {
    padding: 72px 0;
    background: var(--hf-accent-light);
    direction: rtl;
    font-family: var(--hf-font);
    position: relative;
    overflow: hidden;
}

/* خط وصل بين الخطوات (ديسكتوب) */
.dep-journey::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 10%;
    left: 10%;
    height: 2px;
    background: linear-gradient(to left,
        transparent 0%,
        var(--hf-accent) 20%,
        var(--hf-accent) 80%,
        transparent 100%
    );
    opacity: 0.25;
    pointer-events: none;
    z-index: 0;
}

.dep-journey__inner {
    width: 100%;
    max-width: var(--hf-container-max);
    margin-inline: auto;
    padding-inline: 24px;
    position: relative;
    z-index: 1;
}

/* شبكة 2×2 الخطوات */
.dep-journey__grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
    margin-top: 48px;
}

/* بطاقة خطوة */
.dep-step-card {
    background: var(--hf-bg-white);
    border-radius: 16px;
    border: 1px solid rgba(200, 169, 110, 0.18);
    box-shadow: 0 2px 16px rgba(200, 169, 110, 0.10);
    padding: 30px 28px 26px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease;
    position: relative;
}

.dep-step-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(200, 169, 110, 0.18);
}

/* رقم الخطوة */
.dep-step-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--hf-accent) 0%, var(--hf-accent-hover) 100%);
    color: #fff;
    font-size: 20px;
    font-weight: 900;
    box-shadow: 0 6px 18px rgba(200, 169, 110, 0.35);
    flex-shrink: 0;
    direction: ltr;
}

.dep-step-content {
    flex: 1;
}

.dep-step-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--hf-dark-green);
    margin-bottom: 8px;
    line-height: 1.4;
}

.dep-step-desc {
    font-size: 13.5px;
    color: var(--hf-text-muted);
    line-height: 1.75;
}

/* ============================================================
   SECTION 5 — FAQ ACCORDION
   ============================================================ */

.dep-faq {
    padding: 72px 0;
    background: var(--hf-bg-white);
    direction: rtl;
    font-family: var(--hf-font);
}

.dep-faq__inner {
    width: 100%;
    max-width: 800px;
    margin-inline: auto;
    padding-inline: 24px;
}

.dep-faq__list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 48px;
}

/* عنصر الـ Accordion */
.dep-faq-item {
    background: var(--hf-bg-white);
    border-radius: var(--hf-radius-md);
    border: 1px solid rgba(74, 140, 92, 0.12);
    overflow: hidden;
    transition: border-color 0.25s ease,
                box-shadow 0.25s ease;
}

.dep-faq-item.is-open {
    border-color: rgba(74, 140, 92, 0.30);
    box-shadow: 0 4px 20px rgba(30, 59, 47, 0.08);
}

/* زر السؤال */
.dep-faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    padding: 18px 22px;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--hf-font);
    font-size: 15px;
    font-weight: 700;
    color: var(--hf-dark-green);
    text-align: right;
    direction: rtl;
    transition: color 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.dep-faq-q:hover {
    color: var(--hf-primary);
}

.dep-faq-item.is-open .dep-faq-q {
    color: var(--hf-primary);
}

/* أيقونة + / × */
.dep-faq-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    min-width: 30px;
    border-radius: 50%;
    background: var(--hf-primary-soft);
    color: var(--hf-primary);
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    flex-shrink: 0;
    transition: background 0.25s ease,
                transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.dep-faq-item.is-open .dep-faq-icon {
    background: var(--hf-primary);
    color: #fff;
    transform: rotate(45deg);
}

/* منطقة الجواب */
.dep-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.40s cubic-bezier(0.4, 0, 0.2, 1),
                padding 0.30s ease;
}

.dep-faq-item.is-open .dep-faq-a {
    max-height: 400px;
}

.dep-faq-a-inner {
    padding: 0 22px 22px;
    font-size: 14px;
    color: var(--hf-text-muted);
    line-height: 1.85;
    border-top: 1px solid rgba(74, 140, 92, 0.08);
    padding-top: 16px;
}

/* ============================================================
   SECTION 6 — CTA BANNER
   ============================================================ */

.dep-cta {
    padding: 64px 0;
    background: linear-gradient(
        135deg,
        var(--hf-accent-light) 0%,
        #fdf0e0 100%
    );
    direction: rtl;
    font-family: var(--hf-font);
    position: relative;
    overflow: hidden;
}

/* زخرفة دائرتان خلف الـ CTA */
.dep-cta::before,
.dep-cta::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.dep-cta::before {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(200,169,110,0.12) 0%, transparent 70%);
    top: -80px;
    left: -60px;
}

.dep-cta::after {
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(74,140,92,0.10) 0%, transparent 70%);
    bottom: -60px;
    right: -40px;
}

.dep-cta__inner {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--hf-container-max);
    margin-inline: auto;
    padding-inline: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
}

.dep-cta__text {
    flex: 1;
    min-width: 280px;
}

.dep-cta__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 700;
    color: var(--hf-accent-hover);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.dep-cta__title {
    font-size: clamp(1.4rem, 2.5vw, 2rem);
    font-weight: 900;
    color: var(--hf-dark-green);
    line-height: 1.35;
    margin-bottom: 12px;
}

.dep-cta__desc {
    font-size: 14.5px;
    color: var(--hf-text-muted);
    line-height: 1.75;
    max-width: 500px;
}

.dep-cta__actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    align-items: center;
    flex-shrink: 0;
}

/* ============================================================
   SECTION 7 — OTHER DEPARTMENTS (أقسام أخرى)
   ============================================================ */

.dep-explore {
    padding: 72px 0;
    background: var(--hf-bg);
    direction: rtl;
    font-family: var(--hf-font);
}

.dep-explore__inner {
    width: 100%;
    max-width: var(--hf-container-max);
    margin-inline: auto;
    padding-inline: 24px;
}

/* شبكة بطاقات الأقسام */
.dep-explore__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 48px;
}

/* ============================================================
   UTILITY — Shared Section Head (يُستخدم في جميع الأقسام)
   ============================================================ */

.dep-section-head {
    text-align: center;
}

.dep-section-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 5px 16px;
    background: var(--hf-primary-soft);
    border: 1px solid var(--hf-border);
    border-radius: var(--hf-radius-pill);
    font-size: 12px;
    font-weight: 700;
    color: var(--hf-primary);
    letter-spacing: 0.06em;
    margin-bottom: 14px;
}

.dep-section-title {
    font-size: clamp(1.5rem, 2.8vw, 2.2rem);
    font-weight: 900;
    color: var(--hf-dark-green);
    line-height: 1.3;
    margin-bottom: 12px;
}

.dep-section-title span { color: var(--hf-primary); }

.dep-section-desc {
    font-size: 15px;
    color: var(--hf-text-muted);
    max-width: 580px;
    margin-inline: auto;
    line-height: 1.8;
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */

/* Tablet ≤ 900px */
@media (max-width: 900px) {
    .dep-hero { min-height: 440px; }
    .dep-hero__title { font-size: 2rem; }
    .dep-hero__stats { gap: 20px; }

    .dep-journey__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .dep-cta__inner {
        flex-direction: column;
        text-align: center;
    }

    .dep-cta__desc { max-width: 100%; }
    .dep-cta__actions { justify-content: center; }

    .dep-care,
    .dep-doctors,
    .dep-journey,
    .dep-faq,
    .dep-cta,
    .dep-explore {
        padding: 52px 0;
    }
}

/* Mobile ≤ 600px */
@media (max-width: 600px) {
    .dep-hero { min-height: 380px; }
    .dep-hero__content { padding: 32px 0 44px; }
    .dep-hero__title { font-size: 1.65rem; max-width: 100%; }
    .dep-hero__desc { font-size: 14px; }
    .dep-hero__actions { flex-direction: column; }
    .dep-hero__stats { gap: 16px; }
    .dep-stat__num { font-size: 20px; }

    .dep-care__grid,
    .dep-doctors__grid,
    .dep-explore__grid {
        grid-template-columns: 1fr;
    }

    .dep-journey__grid {
        grid-template-columns: 1fr;
    }

    .dep-step-card { padding: 22px 18px; gap: 14px; }

    .dep-care,
    .dep-doctors,
    .dep-journey,
    .dep-faq,
    .dep-cta,
    .dep-explore {
        padding: 40px 0;
    }

    .dep-cta__actions { flex-direction: column; width: 100%; }
    .dep-btn-primary,
    .dep-btn-outline-white { width: 100%; justify-content: center; }
}

/* Small Mobile ≤ 400px */
@media (max-width: 400px) {
    .dep-hero__title { font-size: 1.45rem; }
    .dep-faq-q { font-size: 14px; padding: 15px 16px; }
    .dep-faq-a-inner { padding: 0 16px 18px; padding-top: 14px; }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
    .dep-hero__bg { filter: grayscale(1); }
    .dep-hero__overlay { background: rgba(0,0,0,0.5); }
    .dep-cta, .dep-doctors__cta { display: none; }
    .dep-faq-a { max-height: none !important; }
    .dep-faq-item { break-inside: avoid; }
}
