/* =========================================================================
   MCI Design System — Public site theme layer
   =========================================================================
   The bridge between the design system and the existing Bootstrap 5 public
   site. This is the ONLY file permitted to style bare elements or reach into
   legacy selectors; mci-tokens.css and mci-components.css stay pure so they
   can also be loaded inside the portals.

   Loaded after style.css, so declarations here win on equal specificity.
   ========================================================================= */

/* -------------------------------------------------------------------------
   1. TYPOGRAPHY UPGRADE
   style.css sets `body { font-family: "Raleway", sans-serif }`. Raleway and
   Cairo are no longer fetched, so that rule is repointed at the design system
   stack rather than left to fall back to a system font.
   ------------------------------------------------------------------------- */

body {
  font-family: var(--mci-font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* The layout previously hard-coded Cairo for RTL in an inline <style>. The
   token layer already swaps to IBM Plex Sans Arabic under [dir="rtl"], so
   this simply keeps legacy headings in step. */
h1, h2, h3, h4, h5, h6,
.btn, .navbar, input, select, textarea, button {
  font-family: var(--mci-font-sans);
}

/* -------------------------------------------------------------------------
   2. FOCUS VISIBILITY
   The legacy stylesheet removes outlines in several places. A keyboard user
   must always be able to see where they are — this restores a consistent
   focus indicator site-wide without affecting mouse users.
   ------------------------------------------------------------------------- */

:focus-visible {
  outline: 2px solid var(--mci-focus-ring);
  outline-offset: 2px;
}
/* Never leave a focusable element with no indicator. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--mci-focus-ring);
  outline-offset: 2px;
  border-radius: var(--mci-radius-xs);
}

/* -------------------------------------------------------------------------
   3. MOTION SAFETY
   style.css sets `scroll-behavior: smooth` on body and AOS animates on
   scroll. Both are disabled for users who ask for reduced motion.
   ------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html, body { scroll-behavior: auto !important; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  /* AOS adds inline transition delays; neutralise them so content is never
     left invisible when animation is suppressed. */
  [data-aos] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* -------------------------------------------------------------------------
   4. PAGE SHELL
   ------------------------------------------------------------------------- */

/* Anchor targets clear the sticky public header. */
:target { scroll-margin-block-start: 100px; }

/* No page should ever scroll sideways on a phone. */
body { overflow-x: hidden; }

/* -------------------------------------------------------------------------
   5. HERO — calm, no stock-photo backdrop
   A quiet navy field with a very low-contrast radial wash. No gradient
   spectacle, no parallax, no full-bleed photograph of a stranger.
   ------------------------------------------------------------------------- */

.mci-hero {
  position: relative;
  background: var(--mci-navy-950);
  color: var(--mci-text-inverse);
  padding-block: clamp(3.5rem, 9vw, 7.5rem);
  overflow: hidden;
  isolation: isolate;
}
.mci-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(60% 80% at 78% 20%, rgba(26, 122, 201, 0.22), transparent 60%),
    radial-gradient(50% 70% at 10% 90%, rgba(82, 127, 40, 0.10), transparent 65%);
}
.mci-hero__inner {
  display: grid;
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 1000px) {
  .mci-hero__inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}

.mci-hero__title {
  font-size: var(--mci-text-display);
  font-weight: var(--mci-weight-semibold);
  line-height: var(--mci-leading-tight);
  letter-spacing: var(--mci-tracking-tight);
  color: #fff;
  margin: 0 0 var(--mci-space-5);
  text-wrap: balance;
  max-width: 18ch;
}
.mci-hero__lead {
  font-size: var(--mci-text-lg);
  line-height: var(--mci-leading-relaxed);
  color: var(--mci-navy-200);
  margin: 0 0 var(--mci-space-8);
  max-width: 54ch;
  text-wrap: pretty;
}
.mci-hero__actions { display: flex; flex-wrap: wrap; gap: var(--mci-space-3); }
@media (max-width: 520px) {
  .mci-hero__actions { flex-direction: column; align-items: stretch; }
  .mci-hero__actions .mci-btn { width: 100%; }
}

/* Reassurance strip under the hero CTAs. Statements of process only —
   no counts, no claims, nothing that would need verification. */
.mci-hero__assurances {
  display: flex;
  flex-wrap: wrap;
  gap: var(--mci-space-3) var(--mci-space-6);
  margin-block-start: var(--mci-space-8);
  padding-block-start: var(--mci-space-6);
  border-block-start: 1px solid rgba(255, 255, 255, 0.12);
  list-style: none;
  padding-inline: 0;
}
.mci-hero__assurance {
  display: flex;
  align-items: center;
  gap: var(--mci-space-2);
  font-size: var(--mci-text-sm);
  color: var(--mci-navy-200);
}
.mci-hero__assurance svg { width: 16px; height: 16px; color: var(--mci-green-300); flex-shrink: 0; }

/* --- Hero journey panel -------------------------------------------------
   The visual is the patient's journey, not a photograph. */
.mci-hero__panel {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--mci-radius-xl);
  padding: clamp(1.5rem, 3vw, 2rem);
  backdrop-filter: blur(6px);
}
.mci-hero__panel-title {
  font-size: var(--mci-text-sm);
  font-weight: var(--mci-weight-semibold);
  letter-spacing: var(--mci-tracking-caps);
  text-transform: uppercase;
  color: var(--mci-navy-200);
  margin: 0 0 var(--mci-space-5);
}
[dir="rtl"] .mci-hero__panel-title { text-transform: none; letter-spacing: normal; font-size: var(--mci-text-base); }

/* Compact journey rail used inside the hero panel. */
.mci-rail { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--mci-space-1); }
.mci-rail__item {
  display: flex;
  align-items: center;
  gap: var(--mci-space-3);
  padding: var(--mci-space-3);
  border-radius: var(--mci-radius-md);
  transition: background-color var(--mci-transition);
}
.mci-rail__item--active { background: rgba(255, 255, 255, 0.07); }
.mci-rail__num {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: var(--mci-radius-pill);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--mci-text-xs);
  font-weight: var(--mci-weight-semibold);
  font-variant-numeric: tabular-nums;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.16);
}
.mci-rail__item--active .mci-rail__num { background: var(--mci-green-600); border-color: var(--mci-green-600); }
.mci-rail__label { font-size: var(--mci-text-sm); color: #fff; font-weight: var(--mci-weight-medium); }
.mci-rail__note { font-size: var(--mci-text-xs); color: var(--mci-navy-200); display: block; margin-block-start: 2px; }

/* -------------------------------------------------------------------------
   6. SECTION HEADER
   ------------------------------------------------------------------------- */

.mci-section__head { max-width: 62ch; margin-block-end: clamp(2rem, 4vw, 3.5rem); }
.mci-section__head--center { margin-inline: auto; text-align: center; }
.mci-section__title {
  font-size: var(--mci-text-3xl);
  font-weight: var(--mci-weight-semibold);
  letter-spacing: var(--mci-tracking-snug);
  line-height: var(--mci-leading-tight);
  color: var(--mci-text);
  margin: 0 0 var(--mci-space-4);
  text-wrap: balance;
}
.mci-section__lead {
  font-size: var(--mci-text-lg);
  line-height: var(--mci-leading-relaxed);
  color: var(--mci-text-secondary);
  margin: 0;
  text-wrap: pretty;
}
.mci-section--inverse .mci-section__title { color: #fff; }
.mci-section--inverse .mci-section__lead { color: var(--mci-navy-200); }

/* -------------------------------------------------------------------------
   7. QUIET CTA BAND
   ------------------------------------------------------------------------- */

.mci-cta-band {
  background: var(--mci-navy-950);
  color: #fff;
  border-radius: var(--mci-radius-xl);
  padding: clamp(2rem, 5vw, 3.5rem);
  display: grid;
  gap: var(--mci-space-6);
  align-items: center;
}
@media (min-width: 900px) {
  .mci-cta-band { grid-template-columns: minmax(0, 1fr) auto; gap: var(--mci-space-10); }
}
.mci-cta-band__title { font-size: var(--mci-text-2xl); font-weight: var(--mci-weight-semibold); margin: 0 0 var(--mci-space-3); color: #fff; line-height: var(--mci-leading-snug); }
.mci-cta-band__body { color: var(--mci-navy-200); margin: 0; line-height: var(--mci-leading-relaxed); max-width: 56ch; }
.mci-cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--mci-space-3); }
@media (max-width: 520px) {
  .mci-cta-band__actions { flex-direction: column; }
  .mci-cta-band__actions .mci-btn { width: 100%; }
}

/* -------------------------------------------------------------------------
   8. MOBILE STICKY ACTION BAR
   A single primary action, always reachable on a phone. Sits above the
   existing floating WhatsApp/phone buttons rather than competing with them.
   ------------------------------------------------------------------------- */

.mci-sticky-cta {
  position: fixed;
  inset-inline: 0;
  inset-block-end: 0;
  z-index: var(--mci-z-sticky);
  display: none;
  gap: var(--mci-space-3);
  padding: var(--mci-space-3) var(--mci-space-4);
  padding-block-end: calc(var(--mci-space-3) + env(safe-area-inset-bottom, 0px));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  border-block-start: 1px solid var(--mci-border);
  box-shadow: 0 -4px 16px rgba(10, 37, 64, 0.06);
}
@media (max-width: 767px) {
  .mci-sticky-cta { display: flex; }
  /* Clear the bar so it never covers footer content or the last CTA. */
  body.mci-has-sticky-cta { padding-block-end: 76px; }
}
.mci-sticky-cta .mci-btn { flex: 1; }

/* -------------------------------------------------------------------------
   9. PRINT
   ------------------------------------------------------------------------- */

@media print {
  .mci-sticky-cta, .mci-hero__panel { display: none !important; }
  .mci-hero { background: none; color: #000; padding-block: 1rem; }
  .mci-hero__title, .mci-hero__lead { color: #000; }
}

/* -------------------------------------------------------------------------
   10. PARTNER LOGO ROW
   Replaces the auto-looping Swiper carousel: a quiet static row that wraps.
   ------------------------------------------------------------------------- */

.mci-partner-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--mci-space-6) var(--mci-space-10);
}
.mci-partner-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--mci-tap-target);
  padding: var(--mci-space-2);
  border-radius: var(--mci-radius-sm);
  transition: opacity var(--mci-transition);
}
.mci-partner-link img {
  max-height: 46px;
  width: auto;
  height: auto;
  /* Desaturated at rest so the row reads as one calm band, full colour on
     hover/focus. Never fully hidden — the logos stay legible either way. */
  filter: grayscale(1);
  opacity: 0.65;
  transition: filter var(--mci-transition), opacity var(--mci-transition);
}
.mci-partner-link:hover img,
.mci-partner-link:focus-visible img { filter: none; opacity: 1; }

/* -------------------------------------------------------------------------
   11. FLAG
   Self-hosted SVG flags in destination card titles.
   ------------------------------------------------------------------------- */

.mci-flag {
  display: inline-block;
  width: 24px;
  height: 18px;
  border-radius: 2px;
  object-fit: cover;
  vertical-align: -2px;
  margin-inline-end: var(--mci-space-2);
  box-shadow: 0 0 0 1px rgba(10, 37, 64, 0.08);
}
