/*
 * مستشفى الأطفال التخصصي بالبحيرة — RTL Comprehensive Overrides
 * Enforces Right-to-Left layout for Arabic across ALL pages
 * Loaded LAST to override any LTR defaults
 */

/* ============================================
   1. GLOBAL RTL FOUNDATION
   ============================================ */
.rtl,
body.rtl,
.albahira-rtl,
.albahira-ecosystem,
.pd-luxury-home-container,
.pd-app-container,
.albahira-hospital-ecosystem {
    direction: rtl !important;
    text-align: right !important;
    unicode-bidi: embed;
}

/* Force Arabic font everywhere */
body.rtl,
body.rtl *:not(i):not(.fa):not(.dashicons):not([class*="icon"]):not(code):not(pre) {
    font-family: 'Cairo', 'Open Sans', 'Amiri', sans-serif !important;
}

/* Preserve monospace for code */
.rtl code, .rtl pre {
    font-family: monospace !important;
    direction: ltr;
}

/* ============================================
   2. HEADER — RTL
   ============================================ */
.rtl .pd-header-content {
    flex-direction: row !important;
}

.rtl .pd-logo-link {
    margin-right: 0 !important;
    margin-left: 40px !important;
}

.rtl .pd-nav-list {
    flex-direction: row !important;
}

.rtl .pd-header-right {
    flex-direction: row !important;
}

.rtl .pd-top-bar-inner {
    flex-direction: row !important;
}

.rtl .pd-top-left,
.rtl .pd-top-right {
    flex-direction: row !important;
}

.rtl .pd-top-item {
    flex-direction: row !important;
}

.rtl .pd-dropdown-wrap {
    left: auto !important;
    right: 50% !important;
    transform: translateX(50%) translateY(10px) !important;
}

.rtl .pd-has-dropdown:hover .pd-dropdown-wrap {
    transform: translateX(50%) translateY(0) !important;
}

.rtl .pd-dropdown-menu {
    text-align: right !important;
}

/* Mobile drawer */
.rtl .pd-mobile-drawer {
    left: auto !important;
    right: 0 !important;
}

.rtl .pd-drawer-header {
    flex-direction: row !important;
}

.rtl .pd-drawer-nav a,
.rtl .pd-drawer-nav .pd-main-link {
    text-align: right !important;
}

/* Header dropdown positioning */
.rtl .pd-dropdown {
    left: auto !important;
    right: -20px !important;
}

.rtl .pd-dropdown li a:hover {
    transform: translateX(-5px) !important;
}

/* Sub-dropdown positioning */
.rtl .pd-sub-dropdown {
    left: auto !important;
    right: 100% !important;
    transform: translateX(-10px) !important;
}

.rtl .pd-dropdown li:hover .pd-sub-dropdown {
    transform: translateX(0) !important;
}

/* Mobile logo fix */
@media (max-width: 1023px) {
    .rtl .site-header .site-logo img,
    .rtl .site-header .logo img,
    .rtl .pd-header-inner .pd-logo img,
    .rtl #pdMainHeader img,
    .rtl #pdMainHeader .pd-logo img {
        margin-left: 0 !important;
        margin-right: 15px !important;
    }
}

/* ============================================
   3. HERO SECTION — RTL
   ============================================ */
.rtl .pd-hero-grid-v2 {
    direction: rtl !important;
}

.rtl .pd-hero-content-v2 {
    text-align: right !important;
}

.rtl .pd-hero-label-v2 {
    text-align: right !important;
}

.rtl .pd-hero-line-v2 {
    margin: 8px 0 20px 0 !important;
}

.rtl .pd-hero-title-v2 {
    text-align: right !important;
}

.rtl .pd-hero-desc-v2 {
    text-align: right !important;
}

.rtl .pd-hero-actions-v2 {
    flex-direction: row !important;
    justify-content: flex-start !important;
}

/* ============================================
   4. DEPARTMENTS SECTION — RTL
   ============================================ */
.rtl .pd-deps-header {
    text-align: right !important;
}

.rtl .pd-deps-grid-v2 {
    direction: rtl !important;
}

.rtl .pd-dep-card-v2 {
    text-align: right !important;
    padding: 18px 0 18px 16px !important;
}

.rtl .pd-dep-card-v2:nth-child(odd) {
    padding-left: 18px !important;
    padding-right: 0 !important;
    border-right: none !important;
    border-left: 1px solid rgba(175, 196, 162, 0.4) !important;
}

.rtl .pd-dep-card-v2:nth-child(even) {
    padding-right: 18px !important;
    padding-left: 0 !important;
}

.rtl .pd-dep-card-v2 h3,
.rtl .pd-dep-card-v2 p {
    text-align: right !important;
}

/* ============================================
   5. SPECIALISTS / DOCTORS — RTL
   ============================================ */
.rtl .pd-section-header-left {
    text-align: right !important;
}

.rtl .pd-spec-filter-title {
    margin-right: 0 !important;
    margin-left: 8px !important;
}

.rtl .pd-spec-search-btn {
    border-left: none !important;
    border-right: 1px solid #5A5A5A !important;
}

.rtl .pd-filter-bar-v2 {
    direction: rtl !important;
    text-align: right !important;
}

.rtl .pd-search-v2 {
    direction: rtl !important;
}

.rtl .pd-search-v2 input {
    text-align: right !important;
}

.rtl .pd-filter-controls {
    direction: rtl !important;
}

/* Doctor cards */
.rtl .pd-doctor-card-v3,
.rtl .pd-doctor-card-new {
    text-align: right !important;
}

.rtl .pd-doc-specialty-v3,
.rtl .pd-card-spec {
    text-align: right !important;
}

.rtl .pd-doc-meta-v3 {
    justify-content: flex-start !important;
    flex-direction: row !important;
}

/* ============================================
   6. TRUST SECTION — RTL
   ============================================ */
.rtl .pd-trust-content-v3 {
    text-align: right !important;
}

.rtl .pd-trust-actions-v3 {
    text-align: right !important;
}

/* ============================================
   7. HEALTH PROGRAMMES — RTL
   ============================================ */
.rtl .pd-section-header {
    text-align: right !important;
}

.rtl .pd-section-label {
    text-align: right !important;
}

.rtl .pd-section-title {
    text-align: right !important;
}

.rtl .pd-section-desc {
    text-align: right !important;
}

.rtl .pd-prog-card {
    text-align: right !important;
}

.rtl .pd-prog-tags {
    justify-content: flex-start !important;
}

/* ============================================
   8. REVIEWS / TESTIMONIALS — RTL
   ============================================ */
.rtl .pd-home-reviews {
    background: transparent !important;
    padding: 80px 0 !important;
}

.rtl .pd-home-reviews .pd-section-header {
    text-align: center !important;
}

.rtl .pd-review-card {
    text-align: right !important;
    background: #FFFFFF !important;
    border: 1px solid rgba(22, 78, 61, 0.08) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03) !important;
    border-radius: 12px !important;
    padding: 30px !important;
    transition: all 0.3s ease !important;
}

.rtl .pd-review-card:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 15px 40px rgba(22, 78, 61, 0.06) !important;
    border-color: rgba(22, 78, 61, 0.15) !important;
}

.rtl .pd-reviewer {
    text-align: right !important;
}

.rtl .pd-stars {
    text-align: right !important;
    direction: ltr !important;
}

/* ============================================
   9. TECHNOLOGIES — RTL
   ============================================ */
.rtl .pd-tech-layout-v2 {
    direction: rtl !important;
}

.rtl .pd-tech-visual-v2 {
    order: 2 !important;
}

.rtl .pd-tech-content-v2 {
    order: 1 !important;
    text-align: right !important;
}

.rtl .pd-tech-item-v2 {
    flex-direction: row !important;
    text-align: right !important;
}

.rtl .pd-tech-info {
    text-align: right !important;
}

.rtl .pd-tech-footer-v2 {
    text-align: right !important;
}

/* ============================================
   10. JOURNAL / BLOG — RTL
   ============================================ */
.rtl .pd-journal-card {
    text-align: right !important;
}

.rtl .pd-journal-meta {
    text-align: right !important;
}

/* ============================================
   11. FAQ / INSURANCE — RTL
   ============================================ */
.rtl .pd-faq-list {
    padding: 0 !important;
    margin: 0 !important;
    list-style: none !important;
}

.rtl .pd-faq-q {
    text-align: right !important;
    flex-direction: row !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
}

.rtl .pd-faq-q span {
    margin-left: 0 !important;
    margin-right: 14px !important;
}

.rtl .pd-faq-a {
    text-align: right !important;
    padding-right: 0 !important;
}

.rtl .pd-faq-full {
    text-align: right !important;
}

/* Insurance Partners Boxed Section Reset (No background, Centered) */
.rtl .pd-insurance-box-v2 {
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 40px 0 !important;
    margin-bottom: 50px !important;
    text-align: center !important;
}

.rtl .pd-insurance-title-v2 {
    text-align: center !important;
    font-family: 'Cairo', 'Noto Serif SC', serif !important;
    font-size: 28px !important;
    color: #164E3D !important;
    margin-bottom: 30px !important;
}

.rtl .pd-insurance-grid-v2 {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 40px !important;
}

.rtl .pd-ins-logo-v2 {
    flex: unset !important;
    width: auto !important;
    max-width: 150px !important;
    padding: 10px !important;
}

.rtl .pd-ins-logo-v2 img {
    max-height: 50px !important;
    height: auto !important;
    width: auto !important;
    max-width: 100% !important;
    filter: grayscale(100%) !important;
    opacity: 0.7 !important;
    transition: all 0.3s ease !important;
    mix-blend-mode: multiply !important;
}

.rtl .pd-ins-logo-v2 img:hover {
    filter: none !important;
    opacity: 1 !important;
}

/* ============================================
   12. BOOKING SECTION — RTL
   ============================================ */
.rtl .pd-book-grid {
    direction: rtl !important;
}

.rtl .pd-book-content-col {
    order: 2 !important;
    text-align: right !important;
}

.rtl .pd-book-form-col {
    order: 1 !important;
}

@media (max-width: 991px) {
    .rtl .pd-book-content-col {
        order: 1 !important;
    }
    .rtl .pd-book-form-col {
        order: 2 !important;
    }
}

.rtl .pd-info-card-v2 {
    text-align: right !important;
}

.rtl .pd-info-item-v2 {
    flex-direction: row !important;
    text-align: right !important;
}

.rtl .pd-section-desc-left {
    text-align: right !important;
}

/* ============================================
   13. FOOTER — RTL
   ============================================ */
.rtl .pd-luxury-global-footer {
    direction: rtl !important;
    text-align: right !important;
}

.rtl .pd-footer-cols {
    direction: rtl !important;
}

.rtl .pd-footer-col {
    text-align: right !important;
}

.rtl .pd-footer-links li a,
.rtl .pd-footer-links li {
    text-align: right !important;
}

.rtl .pd-footer-nav-links {
    text-align: right !important;
}

.rtl .pd-footer-bottom-inner {
    flex-direction: row !important;
}

.rtl .pd-social-row {
    flex-direction: row !important;
}

/* ============================================
   14. CONTACT PAGE — RTL
   ============================================ */
.rtl .pd-contact-page {
    direction: rtl !important;
    text-align: right !important;
}

.rtl .pd-contact-main-grid {
    direction: rtl !important;
}

.rtl .pd-contact-form-card {
    text-align: right !important;
}

.rtl .pd-form-label {
    text-align: right !important;
}

.rtl .pd-form-input,
.rtl .pd-form-select,
.rtl .pd-form-textarea {
    text-align: right !important;
    direction: rtl !important;
}

.rtl .pd-form-checkbox-row {
    flex-direction: row !important;
    text-align: right !important;
}

.rtl .pd-info-item {
    flex-direction: row !important;
    text-align: right !important;
}

.rtl .pd-email-item {
    text-align: right !important;
}

/* ============================================
   15. DOCTORS PAGE — RTL
   ============================================ */
.rtl .pd-doctors-page-wrapper {
    direction: rtl !important;
    text-align: right !important;
}

.rtl .pd-search-input-wrap input {
    padding: 16px 24px 16px 60px !important;
    text-align: right !important;
}

.rtl .pd-search-input-wrap button {
    right: auto !important;
    left: 10px !important;
}

.rtl .pd-trust-item {
    flex-direction: row !important;
    text-align: right !important;
}

.rtl .pd-trust-text {
    text-align: right !important;
}

/* ============================================
   16. SINGLE DEPARTMENT — RTL
   ============================================ */
.rtl .pd-dermatology-service-page {
    direction: rtl !important;
    text-align: right !important;
}

.rtl .pd-dept-stats-panel {
    direction: rtl !important;
    text-align: right !important;
}

/* ============================================
   17. SERVICES PAGE — RTL
   ============================================ */
.rtl .pd-services-page {
    direction: rtl !important;
    text-align: right !important;
}

.rtl .pd-subtag {
    border-width: 0px 1px 1px 0px !important;
}

.rtl .pd-service-item:hover {
    transform: translateX(-4px) !important;
}

.rtl .pd-link-learn-more:hover,
.rtl .pd-whatsapp-link:hover {
    transform: translateX(-4px) !important;
}

/* ============================================
   18. TECHNOLOGIES PAGE — RTL
   ============================================ */
.rtl .pd-technologies-page {
    direction: rtl !important;
    text-align: right !important;
}

/* ============================================
   19. PROGRAMMES PAGE — RTL
   ============================================ */
.rtl .pd-programmes-page {
    direction: rtl !important;
    text-align: right !important;
}

.rtl .pd-pigment-page-wrapper {
    direction: rtl !important;
    text-align: right !important;
}

/* ============================================
   20. CAPACITY STATS — RTL
   ============================================ */
.rtl .pd-capacity-section {
    direction: rtl !important;
    text-align: right !important;
}

.rtl .pd-capacity-card {
    text-align: right !important;
}

.rtl .pd-capacity-card-name {
    text-align: right !important;
}

/* ============================================
   21. PRICE LIST — RTL
   ============================================ */
.rtl .pd-price-wrapper {
    direction: rtl !important;
    text-align: right !important;
}

/* ============================================
   22. ABOUT PAGE — RTL
   ============================================ */
.rtl .pd-about-wrapper,
.rtl .pd-about-page {
    direction: rtl !important;
    text-align: right !important;
}

/* ============================================
   23. SKIN PASSPORT — RTL
   ============================================ */
.rtl .pd-passport-page {
    direction: rtl !important;
    text-align: right !important;
}

/* ============================================
   24. RESULTS GALLERY — RTL
   ============================================ */
.rtl .pd-results-page {
    direction: rtl !important;
    text-align: right !important;
}

/* ============================================
   25. BED BOOKING FORM — RTL
   ============================================ */
.rtl .pd-bed-booking-form {
    direction: rtl !important;
    text-align: right !important;
}

.rtl .pd-bed-booking-form label {
    text-align: right !important;
}

.rtl .pd-bed-booking-form input,
.rtl .pd-bed-booking-form select,
.rtl .pd-bed-booking-form textarea {
    text-align: right !important;
    direction: rtl !important;
}

/* ============================================
   26. GENERAL UTILITY RTL FIXES
   ============================================ */

/* Reverse flex row directions for RTL */
.rtl .pd-flex-row {
    flex-direction: row !important;
}

/* Lists */
.rtl ul, .rtl ol {
    padding-right: 20px !important;
    padding-left: 0 !important;
}

/* Arrow symbols → should flip in RTL */
.rtl .pd-btn-sage-v2,
.rtl .pd-btn-sage,
.rtl .pd-btn-link {
    direction: rtl !important;
}

/* Table RTL */
.rtl table {
    direction: rtl !important;
    text-align: right !important;
}

.rtl th, .rtl td {
    text-align: right !important;
}

/* Search & filter inputs */
.rtl input[type="text"],
.rtl input[type="email"],
.rtl input[type="tel"],
.rtl input[type="search"],
.rtl input[type="number"],
.rtl textarea,
.rtl select {
    text-align: right !important;
    direction: rtl !important;
}

/* Swiper RTL support */
.rtl .swiper {
    direction: rtl !important;
}

.rtl .swiper-button-prev,
.rtl .swiper-button-next {
    transform: scaleX(-1) !important;
}

/* ============================================
   27. STAT ITEMS BAR — RTL
   ============================================ */
.rtl .pd-stat-item-v2 {
    border-right: none !important;
    border-left: 1px solid rgba(175, 196, 162, 0.4) !important;
}

.rtl .pd-stat-item-v2:first-child {
    border-left: 1px solid rgba(175, 196, 162, 0.4) !important;
}

.rtl .pd-stat-item-v2:last-child {
    border-left: none !important;
}

/* ============================================
   28. BREADCRUMBS — RTL
   ============================================ */
.rtl .pd-breadcrumbs,
.rtl .pd-contact-breadcrumbs {
    direction: rtl !important;
    text-align: right !important;
}

/* ============================================
   29. MOBILE RESPONSIVE RTL OVERRIDES
   ============================================ */
@media (max-width: 991px) {
    .rtl .pd-hero-grid-v2 {
        text-align: right !important;
    }

    .rtl .pd-hero-content-v2 {
        text-align: right !important;
    }

    .rtl .pd-hero-actions-v2 {
        justify-content: center !important;
        flex-direction: column !important;
    }

    .rtl .pd-deps-grid-v2 {
        grid-template-columns: 1fr !important;
    }

    .rtl .pd-dep-card-v2:nth-child(odd) {
        border-left: none !important;
    }

    .rtl .pd-contact-main-grid {
        grid-template-columns: 1fr !important;
    }

    .rtl .pd-book-grid {
        grid-template-columns: 1fr !important;
    }

    .rtl .pd-header-content {
        flex-direction: row !important;
    }
}

@media (max-width: 767px) {
    .rtl .pd-deps-list-v2 {
        grid-template-columns: 1fr !important;
    }
    
    .rtl .pd-dep-card-v2,
    .rtl .pd-dep-card-v2:nth-child(odd),
    .rtl .pd-dep-card-v2:nth-child(even) {
        padding: 18px 0 !important;
        border-left: none !important;
        border-right: none !important;
    }

    .rtl .pd-stat-item-v2 {
        border-left: none !important;
        border-right: none !important;
    }

    .rtl .pd-tech-layout-v2 {
        flex-direction: column !important;
    }
}

/* ============================================
   30. ADMIN CAPACITY PAGES — RTL
   ============================================ */
.rtl .pd-admin-capacity {
    direction: rtl !important;
    text-align: right !important;
}

/* ============================================
   31. WOOCOMMERCE — RTL
   ============================================ */
.rtl .woocommerce,
.rtl .woocommerce-page {
    direction: rtl !important;
    text-align: right !important;
}

.rtl .woocommerce form .form-row label {
    text-align: right !important;
}

/* Centering and layout alignment additions */
.rtl .pd-capacity-header {
    text-align: center !important;
}

.rtl .pd-capacity-subtitle {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.rtl .pd-home-journal .pd-section-header {
    text-align: center !important;
}
