/* =============================================
   RTL OVERRIDES — Arabic Version
   ============================================= */

html[dir="rtl"] {
  font-family: 'Noto Naskh Arabic', 'DM Sans', sans-serif;
}

html[dir="rtl"] body {
  font-family: 'Noto Naskh Arabic', 'DM Sans', sans-serif;
  line-height: 1.85;
}

/* Headings keep display serif for English, but Arabic uses Naskh */
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3,
html[dir="rtl"] h4,
html[dir="rtl"] h5 {
  font-family: 'Noto Naskh Arabic', serif;
  font-weight: 600;
  line-height: 1.4;
}

html[dir="rtl"] p {
  font-family: 'Noto Naskh Arabic', sans-serif;
  font-size: 1.02rem;
  line-height: 1.95;
}

/* Italic doesn't work well with Arabic — use color/weight instead */
html[dir="rtl"] h1 em,
html[dir="rtl"] h2 em {
  font-style: normal;
  color: var(--clr-accent);
  font-weight: 700;
}

/* Section labels */
html[dir="rtl"] .section-label {
  letter-spacing: 0;
  font-size: 0.85rem;
}

/* Divider in RTL */
html[dir="rtl"] .divider {
  background: linear-gradient(-90deg, var(--clr-gold), var(--clr-accent));
}

/* Nav — flip logo layout */
html[dir="rtl"] .nav-logo span {
  letter-spacing: 0;
}

/* Buttons — flip arrows */
html[dir="rtl"] .btn svg {
  transform: scaleX(-1);
}

/* Quote mark — flip and reposition */
html[dir="rtl"] .quote-mark {
  transform: scaleX(-1);
  display: inline-block;
}

/* Timeline line — flip to right side */
html[dir="rtl"] .timeline::before {
  left: auto;
  right: 15px;
}

/* Pull quotes — flip border */
html[dir="rtl"] .article-pullquote {
  border-left: none;
  border-right: 4px solid var(--clr-primary);
  border-radius: var(--radius-md) 0 0 var(--radius-md);
}

/* Hero stats border */
html[dir="rtl"] .hero-stats {
  text-align: right;
}

/* Hero photo decorations — flip positions */
html[dir="rtl"] .hero-badge-card {
  left: auto;
  right: -40px;
}

html[dir="rtl"] .hero-badge-avail {
  right: auto;
  left: -30px;
}

/* About photo deco */
html[dir="rtl"] .about-photo-deco {
  left: auto;
  right: 20px;
}

html[dir="rtl"] .about-photo-wrap {
  justify-content: flex-start;
}

/* Intro accent card */
html[dir="rtl"] .intro-accent-card {
  right: auto;
  left: -24px;
}

/* Philosophy quote */
html[dir="rtl"] .philosophy-quote {
  right: auto;
  left: -24px;
}

/* Hero blobs */
html[dir="rtl"] .hero-blob-1,
html[dir="rtl"] .about-hero-blob,
html[dir="rtl"] .certs-hero-blob,
html[dir="rtl"] .t-hero-blob,
html[dir="rtl"] .contact-hero-blob,
html[dir="rtl"] .blog-hero-blob,
html[dir="rtl"] .post-hero-blob {
  right: auto;
  left: -100px;
}

html[dir="rtl"] .hero-blob-2 {
  left: auto;
  right: -60px;
}

/* Footer flips naturally */

/* Recent post item — TOC */
html[dir="rtl"] .toc-list a {
  border-left: none;
  border-right: 2px solid transparent;
  padding-left: 0;
  padding-right: 0.75rem;
}

html[dir="rtl"] .toc-list a:hover {
  border-right-color: var(--clr-primary);
  padding-left: 0;
  padding-right: 1rem;
}

/* Recent post number */
html[dir="rtl"] .recent-post-num {
  text-align: left;
}

/* Mobile nav links */
html[dir="rtl"] .mobile-nav a {
  text-align: right;
}

/* Nav links underline */
html[dir="rtl"] .nav-links a::after {
  left: auto;
  right: 0;
}

/* Reading progress bar — flow from right */
html[dir="rtl"] .read-progress {
  left: auto;
  right: 0;
}

/* Featured post in blog — flip image side */
html[dir="rtl"] .featured-post {
  direction: rtl;
}

/* Lightbox info — flex naturally flips */
html[dir="rtl"] .lightbox-close {
  right: auto;
  left: 1rem;
}

/* Form input direction */
html[dir="rtl"] .form-control {
  text-align: right;
}

html[dir="rtl"] input[type="email"],
html[dir="rtl"] input[type="tel"],
html[dir="rtl"] input[type="datetime-local"] {
  direction: ltr;
  text-align: right;
}

/* Send button arrow */
html[dir="rtl"] .form-actions svg,
html[dir="rtl"] .btn svg {
  transform: scaleX(-1);
}

/* Sidebar cards — info-row icons stay positioned right */
html[dir="rtl"] .info-row {
  flex-direction: row;
}

/* Stats bar separator */
html[dir="rtl"] .stat-item + .stat-item {
  border-left: none;
  border-right: 1px solid var(--clr-border);
}

/* Author card */
html[dir="rtl"] .author-card {
  flex-direction: row-reverse;
  text-align: right;
}

/* Timeline items */
html[dir="rtl"] .timeline-item {
  flex-direction: row;
}

/* Hours rows are already flex justify-between */

/* Bio sidebar borders */
html[dir="rtl"] .article-tags {
  justify-content: flex-end;
}

/* Pillar cards — keep number alignment */
html[dir="rtl"] .pillar-num {
  text-align: right;
}

/* Make sure SVG icons in service cards don't flip */
html[dir="rtl"] .service-icon svg,
html[dir="rtl"] .specialty-icon svg,
html[dir="rtl"] .info-row-icon svg,
html[dir="rtl"] .social-link svg,
html[dir="rtl"] .contact-social svg,
html[dir="rtl"] .intro-social svg,
html[dir="rtl"] .pillar-card svg,
html[dir="rtl"] .timeline-dot svg,
html[dir="rtl"] .badge-icon svg,
html[dir="rtl"] .contact-row-icon svg {
  transform: none;
}
