/* ─── RTL patch + design system for Tabyar — always-Persian monolingual site ── */
/* Loaded LAST (after persian-rtl.css) by InjectPersianAssets middleware, so it wins. */

/* ═══════════════════════════════════════════════════════════════════════════
   1. FONT — Vazirmatn (distinctly Persian)
   ═══════════════════════════════════════════════════════════════════════════ */
@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/vazirmatn/Vazirmatn-Regular.woff2") format("woff2");
    font-weight: 100 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/vazirmatn/Vazirmatn-Bold.woff2") format("woff2");
    font-weight: 700 900;
    font-style: normal;
    font-display: swap;
}

/* Canonical Persian product font. Font choice is intentionally fixed so the
   interface has one predictable typographic hierarchy on every surface. */
html[dir="rtl"] { --site-font: "Yekan Bakh", "YekanBakhFaNum", "Vazirmatn", "Tahoma", "Arial", sans-serif; }

html[dir="rtl"],
html[dir="rtl"] body,
html[dir="rtl"] body *:not(i):not(svg):not(path):not([class^="ph-"]):not([class*=" ph-"]):not(.ph):not(.fa):not(.fas):not(.far):not(.fab):not(.fa-brands):not(.fa-regular):not(.fa-solid):not(.slick-arrow):not(.material-symbols-outlined),
html[dir="rtl"] button,
html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select,
html[dir="rtl"] .btn,
html[dir="rtl"] .form-control,
html[dir="rtl"] .form-select,
html[dir="rtl"] .dropdown-menu,
html[dir="rtl"] .modal,
html[dir="rtl"] .card,
html[dir="rtl"] .table {
    font-family: var(--site-font) !important;
    letter-spacing: 0 !important;
}

html[dir="rtl"] {
    --bs-font-sans-serif: var(--site-font);
    --bs-body-font-family: var(--site-font);
    --bs-heading-font-family: var(--site-font);
    --bs-btn-font-family: var(--site-font);
}

html[lang="fa"],
html[lang="fa"] * {
    font-feature-settings: "locl" 1, "kern" 1, "liga" 1;
}

/* ═══════════════════════════════════════════════════════════════════════════
   2. DESIGN TOKENS — refined medical palette (indigo + coral, warm trust)
   ═══════════════════════════════════════════════════════════════════════════ */
html[dir="rtl"] {
    --t-primary: #5163c6;
    --t-primary-strong: #3f4fb0;
    --t-primary-soft: #eef0fb;
    --t-accent: #f67e7d;
    --t-accent-strong: #ef6664;
    --t-accent-soft: #fef0ef;
    --t-ink: #1b2433;
    --t-ink-soft: #5b6577;
    --t-muted: #8a93a6;
    --t-line: #eceef4;
    --t-surface: #ffffff;
    --t-page: #f4f6fb;

    --t-radius: 18px;
    --t-radius-sm: 12px;
    --t-radius-pill: 999px;

    --t-shadow-sm: 0 1px 3px rgba(27, 36, 51, 0.04);
    --t-shadow: 0 3px 12px rgba(27, 36, 51, 0.045);
    --t-shadow-lg: 0 8px 24px rgba(27, 36, 51, 0.08);
    --t-shadow-primary: 0 5px 14px rgba(81, 99, 198, 0.2);
    --t-shadow-accent: 0 5px 14px rgba(246, 126, 125, 0.2);

    --t-grad-primary: linear-gradient(135deg, #5e72d6 0%, #4452b4 100%);
    --t-grad-accent: linear-gradient(135deg, #fa8a83 0%, #f06a6f 100%);
}

/* Dark mode — just re-point the design tokens; everything uses var(--t-*),
   so all cards/boxes/text adapt automatically. */
html[dir="rtl"][data-bs-theme="dark"],
html[dir="rtl"] body.dark[data-bs-theme="dark"] {
    --t-primary-soft: #25305a;
    --t-accent-soft: #3a2528;
    --t-ink: #eef1f7;
    --t-ink-soft: #b3bccd;
    --t-muted: #828da0;
    --t-line: #2a3140;
    --t-surface: #161b26;
    --t-page: #0f131c;

    --t-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --t-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    --t-shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.45);
}

html[dir="rtl"] body {
    background: var(--t-page);
    color: var(--t-ink-soft);
}

/* ═══════════════════════════════════════════════════════════════════════════
   3. BUTTONS — gradient, soft depth, smooth hover
   ═══════════════════════════════════════════════════════════════════════════ */
html[dir="rtl"] .btn {
    border-radius: var(--t-radius-sm) !important;
    font-weight: 700 !important;
    transition: transform 0.16s ease, box-shadow 0.18s ease, filter 0.18s ease, background 0.18s ease !important;
}

html[dir="rtl"] .btn-primary {
    background: var(--t-grad-primary) !important;
    border: none !important;
    box-shadow: var(--t-shadow-primary) !important;
    color: #fff !important;
}
html[dir="rtl"] .btn-primary:hover,
html[dir="rtl"] .btn-primary:focus {
    transform: translateY(-2px);
    filter: brightness(1.04);
    box-shadow: 0 8px 20px rgba(81, 99, 198, 0.28) !important;
}

html[dir="rtl"] .btn-secondary,
html[dir="rtl"] .login-btn {
    background: var(--t-grad-accent) !important;
    border: none !important;
    box-shadow: var(--t-shadow-accent) !important;
    color: #fff !important;
}
html[dir="rtl"] .btn-secondary:hover,
html[dir="rtl"] .login-btn:hover {
    transform: translateY(-2px);
    filter: brightness(1.03);
    box-shadow: 0 8px 20px rgba(246, 126, 125, 0.3) !important;
}

html[dir="rtl"] .btn-light {
    background: var(--t-surface) !important;
    border: 1px solid var(--t-line) !important;
    color: var(--t-ink) !important;
    box-shadow: var(--t-shadow-sm) !important;
}
html[dir="rtl"] .btn-light:hover {
    border-color: rgba(81, 99, 198, 0.3) !important;
    color: var(--t-primary) !important;
}

/* Quick-access chips in hero (pill outline buttons) */
html[dir="rtl"] .instant-link .btn,
html[dir="rtl"] .instant-link a {
    border-radius: var(--t-radius-pill) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   4. SECTION TITLES — eyebrow chip + strong headline
   ═══════════════════════════════════════════════════════════════════════════ */
html[lang="fa"] .section-title .sub-title,
html[lang="fa"] .vector-title {
    font-family: "Vazirmatn", "Tahoma", "Arial", sans-serif !important;
}

html[dir="rtl"] .section-title .sub-title {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--t-accent-soft);
    color: var(--t-accent-strong);
    padding: 0.32rem 0.9rem;
    border-radius: var(--t-radius-pill);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    margin-bottom: 0.55rem;
    text-align: right;
}

html[dir="rtl"] .section-title .title {
    color: var(--t-ink);
    font-weight: 800;
    text-align: right;
    line-height: 1.5;
}

/* "مشاهده همه" link → pill */
html[dir="rtl"] .section-title a.btn,
html[dir="rtl"] .section-title .view-all {
    border-radius: var(--t-radius-pill) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   5. CARDS — premium surface, layered shadow, smooth hover lift
   ═══════════════════════════════════════════════════════════════════════════ */
html[dir="rtl"] .clinics-card,
html[dir="rtl"] .services-card,
html[dir="rtl"] .doctor-card,
html[dir="rtl"] .category-card,
html[dir="rtl"] .directory-card {
    background: var(--t-surface) !important;
    border: 1px solid var(--t-line) !important;
    border-radius: var(--t-radius) !important;
    box-shadow: var(--t-shadow) !important;
    transition: transform 0.2s ease, box-shadow 0.22s ease, border-color 0.2s ease !important;
    height: 100%;
    overflow: hidden;
}

html[dir="rtl"] .clinics-card:hover,
html[dir="rtl"] .services-card:hover,
html[dir="rtl"] .doctor-card:hover,
html[dir="rtl"] .category-card:hover,
html[dir="rtl"] .directory-card:hover {
    transform: translateY(-3px);
    border-color: rgba(81, 99, 198, 0.28) !important;
    box-shadow: 0 10px 24px rgba(81, 99, 198, 0.15) !important;
}

/* Tighten the popular-services grid gap (was a wide 32px gutter) */
html[dir="rtl"] .service-section .row {
    --bs-gutter-x: 1.25rem;
    --bs-gutter-y: 1.25rem;
}

/* Give slider rows room so the hover lift + shadow isn't clipped by overflow */
html[dir="rtl"] .slick-general .slick-list {
    padding-bottom: 16px !important;
    margin-bottom: -6px;
}
html[dir="rtl"] .slick-slide > div {
    padding: 0 !important;
}

/* Card media zoom on hover */
html[dir="rtl"] .clinics-card:hover .clinics-img img,
html[dir="rtl"] .services-card:hover .services-img img {
    transform: scale(1.05);
}

/* ── Card badges / chips → soft pills ──────────────────────────────────────── */
html[dir="rtl"] .directory-card-badge,
html[dir="rtl"] .clinics-meta-box,
html[dir="rtl"] .service-meta .badge {
    border-radius: var(--t-radius-pill) !important;
    padding: 0.4rem 0.85rem !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    background: var(--t-primary-soft) !important;
    color: var(--t-primary-strong) !important;
    box-shadow: none !important;
    border: none !important;
}

/* Chips floating on card images (service/clinic) → clean white pill, only a
   whisper of shadow for separation (was a heavy 0 8px 18px drop shadow). */
html[dir="rtl"] .service-category-chip,
html[dir="rtl"] .service-type-chip,
html[dir="rtl"] .clinics-meta-box {
    border-radius: var(--t-radius-pill) !important;
    padding: 0.38rem 0.8rem !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    box-shadow: 0 2px 6px rgba(15, 23, 42, 0.08) !important;
}

/* "آماده پذیرش" availability badge → green tint */
html[dir="rtl"] .clinics-meta-box.text-success,
html[dir="rtl"] .badge.text-success,
html[dir="rtl"] .badge.bg-success-subtle {
    background: #e6f6ee !important;
    color: #16895a !important;
}

/* ── Card arrow chip ───────────────────────────────────────────────────────── */
html[dir="rtl"] .directory-card-arrow {
    background: transparent;
    color: var(--t-muted);
    border-radius: 12px;
    width: 38px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}
html[dir="rtl"] .directory-card:hover .directory-card-arrow {
    background: var(--t-primary-soft);
    color: var(--t-primary);
    transform: translateX(-3px);
}

/* ── Card titles ───────────────────────────────────────────────────────────── */
html[dir="rtl"] .clinics-title a,
html[dir="rtl"] .service-title a,
html[dir="rtl"] .doctor-name a,
html[dir="rtl"] .category-content {
    color: var(--t-ink) !important;
    font-weight: 800 !important;
    text-decoration: none !important;
}

html[dir="rtl"] .category-content {
    font-size: 16px !important;
}

/* ── Card description ──────────────────────────────────────────────────────── */
html[dir="rtl"] .directory-card p,
html[dir="rtl"] .clinics-content,
html[dir="rtl"] .category-card p {
    color: var(--t-muted) !important;
    line-height: 1.9 !important;
}

/* ── Card images ───────────────────────────────────────────────────────────── */
html[dir="rtl"] .clinics-img,
html[dir="rtl"] .services-img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--t-radius-sm);
    background: #eef1f7;
}
html[dir="rtl"] .clinics-img img,
html[dir="rtl"] .services-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

/* ── Category card → image-led, like the service cards (was sparse) ───────── */
html[dir="rtl"] .category-card {
    text-align: right !important;
    padding: 0 !important;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
html[dir="rtl"] .category-card .category-card-link {
    display: flex !important;
    flex-direction: column;
    height: 100%;
    text-decoration: none !important;
}
html[dir="rtl"] .category-card .category-banner {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: var(--t-page);
}
html[dir="rtl"] .category-card .category-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}
html[dir="rtl"] .category-card:hover .category-cover { transform: scale(1.06); }

/* dark gradient scrim so the overlaid name stays readable */
html[dir="rtl"] .category-card .category-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 19, 28, 0.78) 0%, rgba(15, 19, 28, 0.28) 38%, rgba(15, 19, 28, 0) 62%);
}
/* category name overlaid on the image (bottom) */
html[dir="rtl"] .category-card .category-content {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 0.7rem 0.9rem;
    color: #fff !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    margin: 0 !important;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
html[dir="rtl"] .category-card .category-content i {
    color: #fff !important;
    font-size: 18px;
}

html[dir="rtl"] .category-card .category-body {
    padding: 0.85rem 1rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    flex: 1 1 auto;
}
html[dir="rtl"] .category-card .category-desc {
    color: var(--t-muted) !important;
    font-size: 13px;
    line-height: 1.85;
    margin: 0 !important;
}
html[dir="rtl"] .category-card .category-more {
    margin-top: auto;
    padding-top: 0.7rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--t-primary) !important;
    font-weight: 700;
    font-size: 13px;
}
html[dir="rtl"] .category-card .category-more i {
    transition: transform 0.18s ease;
}
html[dir="rtl"] .category-card:hover .category-more i { transform: translateX(-4px); }

/* ── Service price / duration → FLAT row, no gray boxes ─────────────────────
   Was two nested gray panels with red labels; now a clean divided row. */
html[dir="rtl"] .service-info-row {
    display: flex !important;
    align-items: center;
    gap: 0 !important;
    border-top: 1px solid var(--t-line);
    padding-top: 0.85rem;
    margin-top: 0.1rem;
    min-height: 64px;
}
html[dir="rtl"] .service-price-block,
html[dir="rtl"] .service-duration-block {
    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}
html[dir="rtl"] .service-price-block { padding-left: 1rem !important; }
html[dir="rtl"] .service-duration-block {
    padding-right: 1rem !important;
    border-right: 1px solid var(--t-line) !important;
}
html[dir="rtl"] .service-info-label {
    color: var(--t-muted) !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}
html[dir="rtl"] .service-info-label i {
    color: var(--t-primary) !important;
    font-size: 14px;
}
html[dir="rtl"] .service-price-block strong {
    color: var(--t-ink) !important;
    font-size: 16px !important;
    font-weight: 800 !important;
    white-space: nowrap;
}
html[dir="rtl"] .service-duration-block strong {
    color: var(--t-ink) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}
html[dir="rtl"] .service-price-block del {
    color: var(--t-muted) !important;
    font-size: 12px;
    font-weight: 500;
    margin-right: 6px;
}

/* ── Service card: equal heights, CTA pinned to bottom, consistent structure ── */
html[dir="rtl"] .services-card.directory-card {
    display: flex;
    flex-direction: column;
}
html[dir="rtl"] .services-card .service-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
}
html[dir="rtl"] .services-card .service-title {
    min-height: 3em;          /* 2 lines reserved so all cards align */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
html[dir="rtl"] .services-card .directory-card-cta {
    margin-top: auto;         /* push booking button to the bottom edge */
}
/* slick service slides also stretch to equal height */
html[dir="rtl"] .service-section .row > [class*="col"],
html[dir="rtl"] .service-section .servicecards {
    display: flex;
}
html[dir="rtl"] .service-section .servicecards > * {
    width: 100%;
}

/* ── Card stats row → FLAT, no nested gray box (just a top divider) ─────────
   Affects service / doctor / clinic / category cards uniformly. */
html[dir="rtl"] .directory-card-stats,
html[dir="rtl"] .doctor-card-stats,
html[dir="rtl"] .service-card-stats {
    background: transparent !important;
    border: 0 !important;
    border-top: 1px solid var(--t-line) !important;
    border-radius: 0 !important;
    padding: 0.85rem 0 0 !important;
    margin-top: 0.85rem;
    box-shadow: none !important;
    overflow: visible;
}
html[dir="rtl"] .directory-card-stats > span,
html[dir="rtl"] .doctor-card-stats > span,
html[dir="rtl"] .service-card-stats > span {
    box-shadow: none !important;
    background: transparent !important;
}
html[dir="rtl"] .directory-card-stats > span:not(:last-child),
html[dir="rtl"] .doctor-card-stats > span:not(:last-child),
html[dir="rtl"] .service-card-stats > span:not(:last-child) {
    border-left: 1px solid var(--t-line) !important;
}
/* numbers → dark ink, labels → muted gray (kill the red labels) */
html[dir="rtl"] .directory-card-stats strong,
html[dir="rtl"] .doctor-card-stats strong,
html[dir="rtl"] .service-card-stats strong {
    color: var(--t-ink) !important;
    font-weight: 800 !important;
}
html[dir="rtl"] .directory-card-stats em,
html[dir="rtl"] .doctor-card-stats em,
html[dir="rtl"] .service-card-stats em,
html[dir="rtl"] .directory-card-stats .stat-copy,
html[dir="rtl"] .service-card-stats .stat-copy {
    color: var(--t-muted) !important;
    font-style: normal;
}
html[dir="rtl"] .directory-card-stats i,
html[dir="rtl"] .doctor-card-stats i,
html[dir="rtl"] .service-card-stats i {
    color: var(--t-primary) !important;
}

/* ── Doctor avatar ─────────────────────────────────────────────────────────── */
html[dir="rtl"] .doctor-img img {
    width: 112px;
    height: 112px;
    border: 4px solid var(--t-surface) !important;
    box-shadow: 0 3px 12px rgba(27, 36, 51, 0.1) !important;
}

/* ── Doctor card: pin the CTA flush to the bottom edge (full-bleed) ───────── */
html[dir="rtl"] .doctor-card {
    display: flex;
    flex-direction: column;
}
html[dir="rtl"] .doctor-card .doctor-inner-card {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: 100%;
}
html[dir="rtl"] .doctor-card .directory-card-cta {
    margin: auto -1.2rem -1.2rem !important;   /* break out of the 1.2rem card padding */
    width: auto !important;
    display: block !important;
    border-radius: 0 !important;
    padding: 0.95rem 1rem !important;
}

/* Specialty label (red) → keep accent but cleaner */
html[dir="rtl"] .doctor-card .text-secondary,
html[dir="rtl"] .doctor-speciality {
    color: var(--t-accent-strong) !important;
    font-weight: 700 !important;
}

/* Phone line → primary tint */
html[dir="rtl"] a[href^="tel:"] {
    color: var(--t-primary) !important;
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════════════════
   6. HERO — floating glass search card + refined chips
   ═══════════════════════════════════════════════════════════════════════════ */
/* Header nav search (collapsible pill) */
html[dir="rtl"] .header-search .input-group {
    flex-direction: row-reverse;
    background: var(--t-surface);
    border-radius: var(--t-radius-pill);
    box-shadow: var(--t-shadow-sm);
    overflow: hidden;
    border: 1px solid var(--t-line);
    align-items: center;
}
html[dir="rtl"] .header-search .input-group .form-control {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding-right: 0.4rem !important;
}
html[dir="rtl"] .header-search .search-submit,
html[dir="rtl"] .header-search #search-button {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: var(--t-muted) !important;
    padding: 0 0.7rem !important;
}

/* Hero search box → clean pill; kill the redundant inner input border */
html[dir="rtl"] .banner-content-search-box .section-bg,
html[dir="rtl"] .banner-content-search-box > form > div {
    background: var(--t-surface) !important;
    border: 1px solid var(--t-line);
    border-radius: var(--t-radius-pill) !important;
    box-shadow: var(--t-shadow-sm);
    padding: 0.35rem 0.5rem !important;
}
html[dir="rtl"] .banner-content-search-box .form-control {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    min-height: 42px;
}
html[dir="rtl"] .banner-content-search-box .icon {
    color: var(--t-muted) !important;
    display: flex;
    align-items: center;
}
html[dir="rtl"] .banner-content-search-box .btn,
html[dir="rtl"] .banner-content-search-box button[type="submit"] {
    border-radius: var(--t-radius-pill) !important;
    padding: 0.6rem 1.6rem !important;
    flex: 0 0 auto;
}

html[dir="rtl"] .instant-link-title {
    color: var(--t-ink-soft);
    font-weight: 700;
}

/* ═══════════════════════════════════════════════════════════════════════════
   7. APPOINTMENT BAR — elevated white card
   ═══════════════════════════════════════════════════════════════════════════ */
html[dir="rtl"] .book-appointment-box {
    background: var(--t-surface) !important;
    border: 1px solid var(--t-line);
    border-radius: var(--t-radius) !important;
    box-shadow: var(--t-shadow) !important;
}
html[dir="rtl"] .book-appointment-box h5 {
    color: var(--t-ink);
    font-weight: 800;
}

/* ═══════════════════════════════════════════════════════════════════════════
   8. FORM CONTROLS — inputs, selects, datepicker
   ═══════════════════════════════════════════════════════════════════════════ */
html[dir="rtl"] .form-control,
html[dir="rtl"] .form-select,
html[dir="rtl"] .select2-selection {
    border-radius: var(--t-radius-sm) !important;
    border: 1px solid var(--t-line) !important;
    min-height: 46px;
    color: var(--t-ink) !important;
}
html[dir="rtl"] .form-control:focus,
html[dir="rtl"] .form-select:focus {
    border-color: rgba(81, 99, 198, 0.5) !important;
    box-shadow: 0 0 0 4px rgba(81, 99, 198, 0.12) !important;
}

/* ── Filter bar on listing pages: fix truncated/narrow selects ─────────────── */
html[dir="rtl"] .directory-filter .form-select,
html[dir="rtl"] .filter-section .form-select,
html[dir="rtl"] .directory-filter select,
html[dir="rtl"] .filter-wrapper select {
    min-width: 150px !important;
    width: auto !important;
}
html[dir="rtl"] .select2-container {
    min-width: 160px !important;
}
html[dir="rtl"] .select2-selection__rendered {
    text-overflow: ellipsis;
    padding-left: 1.4rem !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   9. PAGE HEADER BAND (breadcrumb) — soft gradient
   ═══════════════════════════════════════════════════════════════════════════ */
html[dir="rtl"] .breadcrumb-section,
html[dir="rtl"] .page-header,
html[dir="rtl"] .inner-banner {
    background: linear-gradient(135deg, #eef0fb 0%, #f6eef6 100%) !important;
}
html[dir="rtl"] .breadcrumb {
    flex-direction: row-reverse;
    justify-content: flex-end;
    background: transparent;
}
html[dir="rtl"] .breadcrumb-item + .breadcrumb-item::before {
    float: right;
    padding-right: 0;
    padding-left: var(--bs-breadcrumb-item-padding-x);
}

/* ═══════════════════════════════════════════════════════════════════════════
   10. SLICK SLIDER — RTL arrows + dots
   ═══════════════════════════════════════════════════════════════════════════ */
html[dir="rtl"] .slick-prev { left: auto; right: -25px; }
html[dir="rtl"] .slick-next { right: auto; left: -25px; }

html[dir="rtl"] .slick-arrow {
    background: var(--t-surface) !important;
    box-shadow: var(--t-shadow-sm) !important;
    border: 1px solid var(--t-line) !important;
    color: var(--t-primary) !important;
    transition: background 0.18s ease, color 0.18s ease;
}
html[dir="rtl"] .slick-arrow:hover {
    background: var(--t-grad-primary) !important;
    color: #fff !important;
}
html[dir="rtl"] .slick-dots li.slick-active button:before {
    color: var(--t-primary) !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   11. RTL STRUCTURAL FIXES (layout correctness)
   ═══════════════════════════════════════════════════════════════════════════ */
html[dir="rtl"] .input-group > :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu):not(.form-floating),
html[dir="rtl"] .input-group:not(.has-validation) > .dropdown-toggle:nth-last-child(n+3),
html[dir="rtl"] .input-group.has-validation > .dropdown-toggle:nth-last-child(n+4) {
    border-top-right-radius: var(--bs-border-radius);
    border-bottom-right-radius: var(--bs-border-radius);
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}
html[dir="rtl"] .input-group > :not(:first-child):not(.dropdown-menu):not(.valid-tooltip):not(.valid-feedback):not(.invalid-tooltip):not(.invalid-feedback) {
    border-top-left-radius: var(--bs-border-radius);
    border-bottom-left-radius: var(--bs-border-radius);
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    margin-right: -1px;
    margin-left: 0;
}

html[dir="rtl"] a[href^="tel:"] {
    unicode-bidi: plaintext;
    direction: ltr;
    display: inline-block;
}

html[dir="rtl"] .dropdown-menu-end {
    right: 0;
    left: auto;
}

[dir=rtl] ol,
[dir=rtl] ul {
    padding-right: 2rem;
    padding-left: 0;
}

html[dir="rtl"] .landing-header .navbar-nav {
    flex-direction: row !important;
}

html[dir="rtl"] .navbar-toggler-icon {
    background-image: none !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   12. FOOTER — readable text on dark, tighter sizes, social + credit
   ═══════════════════════════════════════════════════════════════════════════ */
html[dir="rtl"] .footer .footer-top {
    background: #161b26 !important;
    padding: 56px 0 60px !important;
}
html[dir="rtl"] .footer .footer-bottom {
    background: #11151e !important;
    padding: 1rem 0 !important;
}
html[dir="rtl"] .footer .footer-inner {
    border-right-color: rgba(255, 255, 255, 0.1) !important;
}

/* Headings + descriptions */
html[dir="rtl"] .footer .footer-title {
    color: #ffffff !important;
    font-size: 1.05rem !important;
    font-weight: 800 !important;
    margin-bottom: 1.2rem !important;
}
html[dir="rtl"] .footer .footer-description,
html[dir="rtl"] .footer .footer-inner .footer-description {
    color: #aab3c2 !important;
    font-size: 13.5px !important;
    line-height: 2 !important;
    display: block;
}

/* Menu links — light, smaller, with a subtle arrow bullet */
html[dir="rtl"] .footer .footer-menu > li {
    margin-bottom: 0.75rem !important;
}
html[dir="rtl"] .footer .footer-menu > li a {
    color: #aab3c2 !important;
    font-size: 14px !important;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.18s ease, gap 0.18s ease;
}
html[dir="rtl"] .footer .footer-menu > li a::before {
    content: "\f04d";                 /* phosphor caret-left */
    font-family: "Phosphor";
    font-size: 11px;
    color: var(--t-primary);
    opacity: 0.8;
}
html[dir="rtl"] .footer .footer-menu > li a:hover {
    color: #ffffff !important;
    gap: 0.6rem;
}

/* Contact (phone / email) cards */
html[dir="rtl"] .footer .footer-action-card .footer-icon {
    background: rgba(255, 255, 255, 0.08) !important;
    height: 44px !important;
    width: 44px !important;
    line-height: 44px !important;
}
html[dir="rtl"] .footer .footer-action-card .footer-icon i {
    color: #8ea2ff !important;
    font-size: 1.05rem !important;
}
html[dir="rtl"] .footer .footer-action-info {
    color: #aab3c2 !important;
    font-size: 13px !important;
    margin-bottom: 0.15rem !important;
}
html[dir="rtl"] .footer .footer-action-link {
    color: #ffffff !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}

/* Top-services thumbnails block */
html[dir="rtl"] .footer .services-option-content .service-title a {
    color: #e7eaf0 !important;
    font-size: 14px !important;
}
html[dir="rtl"] .footer .services-option-content p {
    color: #8a93a6 !important;
    font-size: 12px !important;
}

/* Footer bottom — copyright + credit + social */
html[dir="rtl"] .footer-bottom,
html[dir="rtl"] .footer-bottom span,
html[dir="rtl"] .footer-copyright,
html[dir="rtl"] .footer-credit {
    color: #aab3c2 !important;
    font-size: 13.5px !important;
}
html[dir="rtl"] .footer-bottom a {
    color: #ffffff !important;
    font-weight: 700;
    text-decoration: none;
}
html[dir="rtl"] .footer-credit a:hover,
html[dir="rtl"] .footer-copyright a:hover {
    color: #8ea2ff !important;
}
html[dir="rtl"] .footer-social-icon a {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.08);
    transition: background 0.2s ease, transform 0.2s ease;
}
html[dir="rtl"] .footer-social-icon a:hover {
    background: var(--t-grad-primary, #5163c6);
    transform: translateY(-2px);
}
html[dir="rtl"] .footer-social-icon i {
    font-size: 1.05rem;
    color: #ffffff !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   13. LISTING PAGES — page hero header + framed filter toolbar
   ═══════════════════════════════════════════════════════════════════════════ */
html[dir="rtl"] .tabyar-page-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(120deg, #eef0fb 0%, #f4eef7 50%, #e9f3f4 100%) !important;
    padding: 2.8rem 0 3rem !important;
    margin-bottom: 2rem;
}
html[dir="rtl"] .tabyar-page-hero-deco {
    position: absolute;
    left: 4%;
    top: 50%;
    transform: translateY(-50%) rotate(-10deg);
    font-size: 8.5rem;
    line-height: 1;
    color: rgba(81, 99, 198, 0.09);
    pointer-events: none;
    z-index: 0;
}
html[dir="rtl"] .tabyar-page-hero-inner {
    position: relative;
    z-index: 1;
}
html[dir="rtl"] .tabyar-page-hero-title {
    color: var(--t-ink);
    font-size: clamp(1.55rem, 2.6vw, 2.25rem);
    font-weight: 800;
    margin-bottom: 0.65rem !important;
}
/* breadcrumb trail under the title */
html[dir="rtl"] .tabyar-page-hero .breadcrumb {
    background: transparent !important;
    padding: 0 !important;
    margin: 0 !important;
    gap: 0.1rem;
}
html[dir="rtl"] .tabyar-page-hero .breadcrumb-item,
html[dir="rtl"] .tabyar-page-hero .breadcrumb-item a {
    color: var(--t-ink-soft) !important;
    font-size: 13.5px;
    font-weight: 600;
    text-decoration: none;
}
html[dir="rtl"] .tabyar-page-hero .breadcrumb-item a:hover { color: var(--t-primary) !important; }
html[dir="rtl"] .tabyar-page-hero .breadcrumb-item.active { color: var(--t-primary) !important; }
html[dir="rtl"] .tabyar-page-hero .tabyar-breadcrumb-divider i { color: var(--t-muted); font-size: 11px; }

/* Framed filter toolbar (services / doctors / clinics) */
html[dir="rtl"] .list-page .movie-lists .container-fluid > .row.align-items-center {
    background: var(--t-surface);
    border: 1px solid var(--t-line);
    border-radius: var(--t-radius);
    box-shadow: var(--t-shadow);
    margin: 0 0 1.7rem !important;
    padding: 1.05rem 1.25rem;
}
html[dir="rtl"] .list-page .filter h6 {
    color: var(--t-ink) !important;
    font-weight: 800;
}

/* Categories toolbar (title + search) → framed panel */
html[dir="rtl"] .directory-toolbar {
    background: var(--t-surface);
    border: 1px solid var(--t-line);
    border-radius: var(--t-radius);
    box-shadow: var(--t-shadow);
    padding: 1.3rem 1.5rem;
    margin-bottom: 1.7rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}
html[dir="rtl"] .directory-kicker {
    display: inline-block;
    color: var(--t-accent-strong) !important;
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 0.3rem;
}
html[dir="rtl"] .directory-heading h1 {
    color: var(--t-ink) !important;
    font-size: 1.35rem !important;
    font-weight: 800 !important;
}
html[dir="rtl"] .directory-heading p {
    color: var(--t-muted) !important;
    font-size: 13.5px !important;
    margin-top: 0.3rem !important;
}

/* Listing search box → clean pill */
html[dir="rtl"] .list-page .section-bg,
html[dir="rtl"] .directory-search-box {
    background: var(--t-page) !important;
    border: 1px solid var(--t-line) !important;
    border-radius: var(--t-radius-pill) !important;
    padding: 0.2rem 0.6rem !important;
}
html[dir="rtl"] .list-page .section-bg .icon,
html[dir="rtl"] .directory-search-box .icon { color: var(--t-muted) !important; }
html[dir="rtl"] .list-page .section-bg .form-control,
html[dir="rtl"] .directory-search-box .form-control {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* Active filter chips */
html[dir="rtl"] #selected-filters .badge,
html[dir="rtl"] #selected-filters > span {
    background: var(--t-primary-soft) !important;
    color: var(--t-primary-strong) !important;
    border-radius: var(--t-radius-pill) !important;
    padding: 0.35rem 0.8rem !important;
    font-weight: 600;
}
