/* ==========================================================================
   Irram Theme — RTL Overrides
   WordPress auto-loads this file when locale is Arabic (is_rtl() = true)
   These rules fix LTR-specific patterns not handled by logical CSS properties.
   Breadcrumb layout is handled in main.css sections 53 + unified block.
   ========================================================================== */

/* --------------------------------------------------------------------------
   Navigation — mobile drawer slides from inline-end (right in RTL)
   -------------------------------------------------------------------------- */
@media (max-width: 991px) {
  .site-nav { transform: translateX(-100%); }
  .site-nav.is-open { transform: translateX(0); }
}

/* --------------------------------------------------------------------------
   Forms — select arrow position
   -------------------------------------------------------------------------- */
.irram-form__select {
  background-position: right 1rem center;
  padding-right: 2.5rem;
  padding-left: 1rem;
}

/* --------------------------------------------------------------------------
   Process timeline — connector line anchored to right side
   -------------------------------------------------------------------------- */
.process-step::before {
  right: 28px;
  left: auto;
}

/* --------------------------------------------------------------------------
   WhatsApp float button — inline-end in RTL = right
   -------------------------------------------------------------------------- */
.whatsapp-float {
  right: 1.5rem;
  left: auto;
}

/* --------------------------------------------------------------------------
   Portfolio type badge — physical position fix
   -------------------------------------------------------------------------- */
.portfolio-card__type-badge {
  left: auto;
  right: 0.75rem;
}

/* --------------------------------------------------------------------------
   Pagination arrows — flip chevrons for RTL reading direction
   -------------------------------------------------------------------------- */
.page-numbers.prev,
.page-numbers.next { transform: scaleX(-1); }

/* --------------------------------------------------------------------------
   CRO comparison arrow — flip for RTL
   -------------------------------------------------------------------------- */
.cro-stat--arrow { transform: scaleX(-1); }

/* --------------------------------------------------------------------------
   Service card "more" arrow — flip direction
   -------------------------------------------------------------------------- */
.service-card__more svg {
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
}
.service-card__more:hover svg { transform: translateX(3px); }

/* --------------------------------------------------------------------------
   Breadcrumb separator — SVG chevron direction handling
   The SVG chevron (drawn pointing right) is correct for RTL by default.
   In LTR layouts the chevron is flipped to point left.
   The .breadcrumb-sep base styles live in main.css.
   -------------------------------------------------------------------------- */

/* LTR: flip the chevron to point left */
[dir="ltr"] .breadcrumb-sep { transform: scaleX(-1); }

/* --------------------------------------------------------------------------
   Tables — text alignment
   -------------------------------------------------------------------------- */
.platform-perf-table th,
.platform-perf-table td { text-align: right; }

/* --------------------------------------------------------------------------
   Breadcrumbs in hero/page-header contexts
   All !important overrides removed. Proper specificity used instead.
   The main breadcrumb layout lives in main.css §53 + §Unified block.
   -------------------------------------------------------------------------- */

/* Breadcrumbs inside dark hero sections use white-toned colours */
.content-archive-hero .breadcrumbs__list,
.single-article-hero .breadcrumbs__list,
.page-header .breadcrumbs__list {
  justify-content: flex-start;
  text-align: start;
}

/* Current page item: truncate with ellipsis if name is long */
.content-archive-hero .breadcrumbs__item--current span,
.single-article-hero .breadcrumbs__item--current span,
.page-header .breadcrumbs__item--current span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* On very narrow screens, hide middle breadcrumb items, keep home + current */
@media (max-width: 420px) {
  .content-archive-hero .breadcrumbs__item:not(:first-child):not(.breadcrumbs__item--current),
  .single-article-hero .breadcrumbs__item:not(:first-child):not(.breadcrumbs__item--current),
  .page-header .breadcrumbs__item:not(:first-child):not(.breadcrumbs__item--current) {
    display: none;
  }
}
