/*
Theme Name: ISRAND Shared Base RTL
Description: RTL overrides for the shared ISRAND base theme.
*/

:root {
  --font-body: 'Noto Sans Arabic', Tahoma, Arial, sans-serif;
  --font-display: 'Noto Serif Arabic', 'Noto Sans Arabic', serif;
}

html[dir="rtl"] {
  direction: rtl;
}

html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

body.isrand-rtl {
  direction: rtl;
  text-align: right;
}

body.isrand-rtl h1,
body.isrand-rtl h2,
body.isrand-rtl h3,
body.isrand-rtl h4,
body.isrand-rtl p,
body.isrand-rtl li,
body.isrand-rtl label,
body.isrand-rtl input,
body.isrand-rtl textarea,
body.isrand-rtl select,
body.isrand-rtl th,
body.isrand-rtl td {
  text-align: right;
}

body.isrand-rtl h1,
body.isrand-rtl h2,
body.isrand-rtl h3,
body.isrand-rtl h4,
body.isrand-rtl .eyebrow,
body.isrand-rtl .tag,
body.isrand-rtl .btn,
body.isrand-rtl .logo-text span,
body.isrand-rtl #primary-navigation > ul > li > a,
body.isrand-rtl #primary-navigation .sub-menu a,
body.isrand-rtl .hero-badge span,
body.isrand-rtl .hero-stat-label,
body.isrand-rtl .announcement-strip-label,
body.isrand-rtl .announcement-strip-link,
body.isrand-rtl .mem-type,
body.isrand-rtl .footer-quick-links a,
body.isrand-rtl .footer-col h5,
body.isrand-rtl .contact-info-card-label,
body.isrand-rtl .detail-list strong,
body.isrand-rtl .filter-btn {
  letter-spacing: 0;
  text-transform: none;
}

body.isrand-rtl h1,
body.isrand-rtl h2,
body.isrand-rtl .page-hero-title,
body.isrand-rtl .archive-header h1,
body.isrand-rtl .hero-section h1 {
  line-height: 1.22;
  font-weight: 700;
}

body.isrand-rtl h3,
body.isrand-rtl h4 {
  line-height: 1.4;
}

body.isrand-rtl .section-header-centered,
body.isrand-rtl .section-header-centered .lead,
body.isrand-rtl .cta-band,
body.isrand-rtl .partnership-cta-panel,
body.isrand-rtl .notice-banner {
  text-align: center;
}

body.isrand-rtl .header-inner,
body.isrand-rtl .site-logo,
body.isrand-rtl .header-cta,
body.isrand-rtl #primary-navigation > ul,
body.isrand-rtl .hero-actions,
body.isrand-rtl .news-meta,
body.isrand-rtl .pub-meta,
body.isrand-rtl .person-meta,
body.isrand-rtl .document-meta,
body.isrand-rtl .project-card-meta,
body.isrand-rtl .entry-meta,
body.isrand-rtl .breadcrumbs,
body.isrand-rtl .filter-bar,
body.isrand-rtl .search-form,
body.isrand-rtl .footer-meta,
body.isrand-rtl .footer-social,
body.isrand-rtl .footer-bottom,
body.isrand-rtl .pagination,
body.isrand-rtl .partnership-cta-row {
  flex-direction: row-reverse;
}

html[dir="rtl"] #site-header .header-inner {
  flex-direction: row-reverse;
}

html[dir="rtl"] #site-header .site-logo {
  order: 1;
  flex-direction: row-reverse;
  text-align: right;
}

html[dir="rtl"] #site-header .header-cta {
  order: 3;
  margin-right: auto;
  margin-left: 0;
}

html[dir="rtl"] #site-header #primary-navigation {
  order: 2;
  justify-content: flex-start;
}

html[dir="rtl"] #site-header #primary-navigation > ul {
  flex-direction: row-reverse;
  justify-content: flex-start;
  width: auto;
}

html[dir="rtl"] #site-header #primary-navigation > ul > li > a {
  text-align: right;
}

body.isrand-rtl .logo-text,
body.isrand-rtl .footer-brand,
body.isrand-rtl .footer-col,
body.isrand-rtl .footer-contact {
  text-align: right;
}

body.isrand-rtl .logo-text strong {
  letter-spacing: 0;
}

body.isrand-rtl .hero-badge {
  margin-left: 0;
  margin-right: 0;
}

body.isrand-rtl .hero-badge span,
body.isrand-rtl .hero-stat-label {
  font-size: 0.82rem;
  letter-spacing: 0;
}

body.isrand-rtl .hero-section h1 {
  font-size: clamp(2.8rem, 6vw, 5rem);
  max-width: 12ch;
}

body.isrand-rtl .hero-lead,
body.isrand-rtl .page-hero-lead,
body.isrand-rtl .section-header .lead {
  line-height: 1.95;
}

body.isrand-rtl .hero-stats {
  right: auto;
  left: 0;
  padding-right: 0;
  padding-left: 40px;
  align-items: flex-start;
}

body.isrand-rtl .hero-stat {
  text-align: left;
}

body.isrand-rtl #primary-navigation li {
  text-align: right;
}

body.isrand-rtl #primary-navigation .sub-menu {
  left: auto;
  right: 0;
}

body.isrand-rtl #primary-navigation .sub-menu a {
  text-align: right;
}

html[dir="rtl"] #primary-navigation li {
  text-align: right;
}

html[dir="rtl"] #primary-navigation .sub-menu {
  left: auto;
  right: 0;
}

html[dir="rtl"] #primary-navigation .sub-menu a {
  text-align: right;
}

body.isrand-rtl .announcement-strip-grid {
  display: flex;
  flex-direction: row-reverse;
  align-items: stretch;
}

body.isrand-rtl .announcement-strip-label,
body.isrand-rtl .announcement-strip-link {
  flex: 0 0 auto;
}

body.isrand-rtl .announcement-strip-items {
  flex: 1 1 auto;
}

body.isrand-rtl .announcement-strip-link {
  border-left: 0;
  border-right: 1px solid var(--border);
}

body.isrand-rtl .challenge-card {
  border-left: 0;
  border-right: 3px solid var(--gold);
  border-radius: var(--radius) 0 0 var(--radius);
}

body.isrand-rtl .pillars-row {
  direction: rtl;
}

body.isrand-rtl .pillar-item {
  border-right: 0;
  border-left: 1px solid var(--border);
}

body.isrand-rtl .pillar-item:last-child {
  border-left: 0;
}

body.isrand-rtl .entry-content blockquote {
  border-left: 0;
  border-right: 4px solid var(--gold);
  border-radius: var(--radius) 0 0 var(--radius);
}

body.isrand-rtl .entry-content ul,
body.isrand-rtl .entry-content ol {
  margin: 1em 1.5em 1em 0;
}

body.isrand-rtl .entry-content th,
body.isrand-rtl .entry-content td {
  text-align: right;
}

body.isrand-rtl .membership-checklist li,
body.isrand-rtl .partnership-checklist li {
  padding-left: 0;
  padding-right: 24px;
}

body.isrand-rtl .membership-checklist li::before,
body.isrand-rtl .partnership-checklist li::before {
  left: auto;
  right: 0;
}

body.isrand-rtl .contact-alert {
  border-left: 0;
  border-right: 4px solid var(--navy);
}

body.isrand-rtl .contact-alert.is-warning {
  border-right-color: var(--gold);
}

body.isrand-rtl .search-form input {
  border-right: 1px solid var(--border);
  border-left: 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}

body.isrand-rtl .search-form button {
  border-radius: var(--radius) 0 0 var(--radius);
}

body.isrand-rtl .filter-bar span {
  margin-right: 0;
  margin-left: 4px;
}

body.isrand-rtl .hub-card-link::after {
  content: "<";
}

body.isrand-rtl .news-read-more .dir-arrow {
  display: inline-block;
}

body.isrand-rtl .footer-main {
  direction: rtl;
}

body.isrand-rtl .footer-bottom {
  justify-content: space-between;
}

body.isrand-rtl.nav-open #primary-navigation .sub-menu {
  border-left: 0;
  border-right: 1px solid rgba(134,97,20,0.2);
  margin: 4px 16px 12px 0;
}

body.isrand-rtl .contact-form input,
body.isrand-rtl .contact-form textarea,
body.isrand-rtl .contact-form select {
  text-align: right;
}

@media (min-width: 1101px) {
  html[dir="rtl"] #site-header .header-inner,
  body.isrand-rtl #site-header .header-inner {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    align-items: center;
    column-gap: 28px;
  }

  html[dir="rtl"] #site-header .site-logo,
  body.isrand-rtl #site-header .site-logo {
    grid-column: 1;
    justify-self: end;
    order: unset !important;
    flex-direction: row-reverse;
    text-align: right;
  }

  html[dir="rtl"] #site-header #primary-navigation,
  body.isrand-rtl #site-header #primary-navigation {
    grid-column: 2;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    order: unset !important;
    justify-content: flex-end !important;
  }

  html[dir="rtl"] #site-header #primary-navigation > ul,
  body.isrand-rtl #site-header #primary-navigation > ul {
    flex-direction: row !important;
    justify-content: flex-start !important;
    width: max-content;
    margin-right: 0;
    margin-left: 0;
  }

  html[dir="rtl"] #site-header .header-cta,
  body.isrand-rtl #site-header .header-cta {
    grid-column: 3;
    justify-self: start;
    order: unset !important;
    margin: 0 !important;
    justify-content: flex-start !important;
  }

  html[dir="rtl"] #site-header .logo-text,
  body.isrand-rtl #site-header .logo-text {
    text-align: right;
  }
}

@media (max-width: 1100px) {
  body.isrand-rtl #primary-navigation > ul {
    flex-direction: column;
  }

  html[dir="rtl"] #site-header .header-inner {
    flex-direction: row-reverse;
  }

  html[dir="rtl"] #primary-navigation > ul {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  body.isrand-rtl .hero-section h1 {
    max-width: none;
    font-size: clamp(2.2rem, 10vw, 3.2rem);
  }

  body.isrand-rtl .hero-stats {
    left: auto;
    padding-left: 0;
    align-items: flex-end;
  }

  body.isrand-rtl .hero-stat {
    text-align: right;
  }

  body.isrand-rtl .footer-bottom,
  body.isrand-rtl .footer-meta {
    flex-direction: column;
    align-items: flex-start;
  }

  body.isrand-rtl .announcement-strip-grid {
    flex-direction: column;
  }

  body.isrand-rtl .announcement-strip-link {
    border-right: 0;
    border-top: 1px solid var(--border);
  }
}
