/* Sector release pages, Arabic direction. Directive section 35.7, 19 November 2026.
   Linked from the AI Search Authority hub, its ten sector service pages, the ten sector
   Insights articles, the homepage and the four pillar service pages only, so every rule
   here reaches those 156 editions and no other page. Every rule is scoped to [dir="rtl"], so the five left to right editions
   render exactly as before. Rules and gotchas, DBSP 17.15 B17 and B18; edge case E63. */

/* Brand pathway initial. core.css floats ::first-letter to the left, and in Arabic
   ::first-letter cuts the first word's joined letters in Chromium, Firefox and WebKit.
   The generator wraps the first word in .pathway-initial on these pages (pathway_initials()
   in scripts/multilingual/i18n.py), and that whole word is the enlarged initial, on the
   right with the gap on its left. ::first-letter is set back to the paragraph's own style,
   or it would move to the next word and float it to the left. */
[dir="rtl"] .page-service .pathway-section .pathway-intro:has(> .pathway-initial)::first-letter {
  float: none;
  font: inherit;
  line-height: inherit;
  color: inherit;
  padding: 0;
  margin: 0;
}
[dir="rtl"] .page-service .pathway-section .pathway-intro > .pathway-initial {
  float: right;
  font-family: var(--font-display);
  font-size: 3.4rem;
  font-weight: 300;
  line-height: 0.8;
  padding-left: 0.5rem;
  margin-top: 0.15rem;
  color: var(--c-accent);
}

/* Philosophy quotes. The opening quotation mark sits in the start corner and the
   divider between side by side cards on the start side of each later card, the right
   in Arabic. core.css places both with a physical left. The single column band, up to
   900px, keeps its centred horizontal dividers untouched. */
[dir="rtl"] .philosophy-card::before {
  left: auto;
  right: 0.1em;
}
@media not all and (max-width: 900px) {
  [dir="rtl"] .philosophy-grid .philosophy-card:nth-child(n+2)::after {
    left: auto;
    right: calc(clamp(2rem, 5vw, 4rem) / -2);
  }
}

/* Dark section end rule. core.css gives the dark section ::after inset 0 for the
   spotlight, then the end rule sets left 20% and width 60% and leaves right at 0, so the
   box is overconstrained and a right to left page drops left, drawing the rule from 40
   to 100 per cent where it shows, on phones held sideways. right auto centres it again. */
[dir="rtl"] :is(.section--dark, .section--dark-warm, .section--navy)::after {
  right: auto;
}

/* Sector deep dive, one section with two landing points (Hamad, 20 November 2026, DBSP 17.15 H25, superseding the two full
   screen halves of workstream K). The section is height auto with a 100svh floor, centred when shorter than the screen; the
   two halves keep their natural height with the space of two paragraphs between them, and section-landings.js lands on the
   section top, then on its foot with the end rule 2vw above it. */
.page-service .dark-video-wrap .deepdive-split-section.snap-section--200[data-dd-halves] {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: auto;
  min-height: 100svh;
  overflow: visible;
  box-sizing: border-box;
  /* Pattern 2 clearances, scroll snap skill section 33 rules 2 and 3: the measured header plus the approved buffer at the
     top, the scroll button footprint plus clamp(2.5rem, 4vw, 3rem) at the foot, per tier. */
  padding: calc(var(--header-h, 3.5rem) + 1rem + env(safe-area-inset-top, 0px) + clamp(0.5rem, 2svh, 1.5rem)) 0 calc(var(--scroll-indicator-reserve-desktop, 103px) + clamp(2.5rem, 4vw, 3rem));
  gap: 0;
}
@media (max-width: 768px) {
  .page-service .dark-video-wrap .deepdive-split-section.snap-section--200[data-dd-halves] {
    padding-top: calc(var(--header-h, 3.5rem) + 1.125rem + env(safe-area-inset-top, 0px) + clamp(0.5rem, 2svh, 1.5rem));
    padding-bottom: calc(max(1.5rem, env(safe-area-inset-bottom, 0px) + 0.75rem) + 57px + clamp(2.5rem, 4vw, 3rem));
  }
}
@media (orientation: landscape) and (max-height: 500px) {
  .page-service .dark-video-wrap .deepdive-split-section.snap-section--200[data-dd-halves] { padding-bottom: calc(0.5rem + 36px + clamp(2.5rem, 4vw, 3rem)); }
}
.page-service .dark-video-wrap .deepdive-split-section.snap-section--200[data-dd-halves] > .snap-half,
.page-service .dark-video-wrap .deepdive-split-section.snap-section--200[data-dd-halves]:first-of-type > .snap-half {
  display: block;
  height: auto;
  min-height: 0;
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  gap: 0;
}
/* The space between the two halves is the space between two paragraphs. */
.page-service .dark-video-wrap .deepdive-split-section.snap-section--200[data-dd-halves] > .snap-half + .snap-half { margin-top: 1rem; }
.page-service .dark-video-wrap .deepdive-split-section.snap-section--200[data-dd-halves] > .snap-half > .wrap > p:last-child { margin-bottom: 0; }
}
