/* Sadra public UI review: RTL imagery, trustworthy metrics, and calmer cards. */

@media (min-width: 1024px) {
  .home-block.home-block--hero-desktop {
    position: relative;
    background-image: none !important;
  }

  .home-block.home-block--hero-desktop::after {
    position: absolute;
    z-index: 0;
    inset: 0;
    background-image: url("/static/images/sadra-hero-care.webp");
    background-position: center;
    background-size: cover;
    content: "";
    pointer-events: none;
  }

  [dir="rtl"] .home-block.home-block--hero-desktop::after {
    transform: scaleX(-1);
  }

  .home-block.home-block--hero-desktop::before {
    z-index: 1;
  }

  .home-block--hero-desktop .hero-copy,
  .home-block--hero-desktop .hero-kpi-strip {
    z-index: 2;
  }

  .hero-kpi-card__value--languages {
    font-size: 1.08rem;
    letter-spacing: 0;
    white-space: nowrap;
  }
}

body.site-body .home-page .service-card,
body.site-body .home-page .insight-card,
body.site-body .home-page .provider-card {
  border: 1px solid #d9e5e7;
  color: #12303b;
  background: #ffffff;
  box-shadow: 0 8px 26px rgba(18, 48, 59, 0.05);
}

[dir="rtl"] .page-hero--image .v2-page-media img,
[dir="rtl"] .v2-directory-hero .v2-page-media img {
  transform: scaleX(-1);
}

body.site-body .site-page .insight-card,
body.site-body .site-page .story-card {
  border: 1px solid #d9e5e7;
  color: #12303b;
  background: #ffffff;
  box-shadow: 0 8px 26px rgba(18, 48, 59, 0.05);
}

body.site-body .site-page .insight-card h3,
body.site-body .site-page .story-card__title {
  color: #12303b;
}

body.site-body .site-page .insight-card p,
body.site-body .site-page .story-card__body {
  color: #58707a;
}

body.site-body .site-page .insight-card:hover,
body.site-body .site-page .story-card:hover {
  border-color: #9fc5c9;
  box-shadow: 0 14px 34px rgba(18, 48, 59, 0.09);
  transform: translateY(-2px);
}

body.site-body .home-page .service-card__title,
body.site-body .home-page .insight-card h3,
body.site-body .home-page .provider-card__title {
  color: #12303b;
}

body.site-body .home-page .service-card__body,
body.site-body .home-page .insight-card p,
body.site-body .home-page .provider-card__desc,
body.site-body .home-page .provider-card__meta {
  color: #58707a;
}

body.site-body .home-page .service-card__cta,
body.site-body .home-page .service-card__eyebrow {
  color: #087f8c;
}

body.site-body .home-page .service-card:nth-child(3n + 1) .service-card__icon-wrap {
  color: #087f8c;
  border-color: #c9e6e4;
  background: #e9f6f4;
}

body.site-body .home-page .service-card:nth-child(3n + 2) .service-card__icon-wrap {
  color: #2c6390;
  border-color: #d4e2f0;
  background: #edf4fb;
}

body.site-body .home-page .service-card:nth-child(3n) .service-card__icon-wrap {
  color: #8a651c;
  border-color: #eadcb9;
  background: #fff8e9;
}

body.site-body .home-page .service-card:hover,
body.site-body .home-page .insight-card:hover,
body.site-body .home-page .provider-card:hover {
  border-color: #9fc5c9;
  box-shadow: 0 14px 34px rgba(18, 48, 59, 0.09);
  transform: translateY(-2px);
}

/* Decision paths: clear, high-contrast actions instead of decorative dark tiles. */
body.site-body .home-page .pathway-card {
  min-height: 7.25rem;
  padding: 1.1rem 1.15rem;
  border: 1px solid #d9e5e7;
  border-inline-start: 4px solid #1696a3;
  border-radius: 8px !important;
  color: #12303b;
  background: #ffffff !important;
  box-shadow: 0 7px 20px rgba(18, 48, 59, 0.045);
}

body.site-body .home-page .pathway-card--service {
  border-inline-start-color: #5475a5;
}

body.site-body .home-page .pathway-card--hospital {
  border-inline-start-color: #3d8b7f;
}

body.site-body .home-page .pathway-card--doctor {
  border-inline-start-color: #276ca1;
}

body.site-body .home-page .pathway-card--visa {
  border-inline-start-color: #a87523;
}

body.site-body .home-page .pathway-card--faq {
  border-inline-start-color: #697b83;
}

body.site-body .home-page .pathway-card__icon-wrap {
  color: #087f8c;
  background: #e9f6f4;
  border-color: #c9e6e4;
}

body.site-body .home-page .pathway-card__label {
  color: #12303b;
  font-weight: 800;
}

body.site-body .home-page .pathway-card__hint {
  color: #58707a;
}

body.site-body .home-page .pathway-card:hover {
  border-color: #9fc5c9;
  background: #fbfefe !important;
  box-shadow: 0 13px 30px rgba(18, 48, 59, 0.08);
  transform: translateY(-2px);
}

/* Featured providers: readable cards and a true grid on wide screens. */
body.site-body .home-page .featured-card {
  min-width: 0;
  min-height: 13rem;
  padding: 1.15rem;
  border: 1px solid #d9e5e7;
  border-radius: 8px !important;
  color: #12303b;
  background: #ffffff !important;
  box-shadow: 0 7px 20px rgba(18, 48, 59, 0.045);
}

body.site-body .home-page .featured-card__title {
  color: #12303b;
  font-weight: 800;
}

body.site-body .home-page .featured-card__subtitle {
  color: #58707a;
}

body.site-body .home-page .featured-card__cta,
body.site-body .home-page .featured-card__rating {
  color: #087f8c;
}

body.site-body .home-page .featured-card__icon-wrap {
  color: #087f8c;
  background: #e9f6f4;
  border-color: #c9e6e4;
}

body.site-body .home-page .featured-card .badge {
  color: #31525c;
  background: #eef6f6;
  border-color: #d7e8e8;
}

body.site-body .home-page .featured-card:hover {
  border-color: #9fc5c9;
  box-shadow: 0 13px 30px rgba(18, 48, 59, 0.08);
}

/* Provider directory preview: unframed columns, compact content cards. */
body.site-body .home-page .provider-column {
  min-width: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  color: #12303b !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.site-body .home-page .provider-column .section-title,
body.site-body .home-page .provider-column h2,
body.site-body .home-page .provider-column h3 {
  color: #12303b;
}

body.site-body .home-page .home-provider-list .provider-card {
  min-height: 0;
  padding: 1.15rem;
  gap: 0.85rem;
}

body.site-body .home-page .home-provider-list .provider-card__desc {
  display: -webkit-box;
  flex: 0 1 auto;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-height: 1.65;
}

body.site-body .home-page .home-provider-list .provider-card__services {
  margin-top: auto;
}

body.site-body .home-page .home-provider-list .provider-card__services .badge {
  color: #31525c;
  background: #f1f7f7;
  border-color: #d7e8e8;
}

.home-page .insight-card {
  overflow: hidden;
  padding: 0 1.25rem 1.35rem;
}

.home-page .insight-card__media {
  width: calc(100% + 2.5rem);
  aspect-ratio: 16 / 9;
  margin: 0 -1.25rem 1.15rem;
  overflow: hidden;
  background: #e8f0f1;
}

.home-page .insight-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 280ms ease;
}

[dir="rtl"] .home-page .insight-card__media img {
  transform: scaleX(-1);
}

.home-page .insight-card:hover .insight-card__media img {
  transform: scale(1.025);
}

[dir="rtl"] .home-page .insight-card:hover .insight-card__media img {
  transform: scaleX(-1) scale(1.025);
}

.home-page .insight-card__icon-wrap {
  margin-top: 0;
}

@media (min-width: 1024px) {
  body.site-body .home-page .featured-carousel__viewport {
    overflow: visible;
  }

  body.site-body .home-page .featured-carousel__track {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    padding: 0;
    transform: none !important;
  }

  body.site-body .home-page .featured-carousel__controls {
    display: none;
  }

  body.site-body .home-page .home-provider-list {
    gap: 0.8rem;
  }
}

@media (max-width: 1023px) {
  body.site-body .home-page .featured-carousel__viewport {
    overflow-x: auto;
    scrollbar-width: none;
  }

  body.site-body .home-page .featured-carousel__viewport::-webkit-scrollbar {
    display: none;
  }

  body.site-body .home-page .featured-carousel__track {
    gap: 0.75rem;
    padding-bottom: 0.4rem;
  }

  body.site-body .home-page .featured-card {
    flex: 0 0 min(82vw, 20rem);
    min-height: 12rem;
  }

  body.site-body .home-page .provider-column {
    padding: 0 !important;
  }

  body.site-body .home-page .provider-column .h-scroll-rail {
    scrollbar-width: none;
  }

  body.site-body .home-page .provider-column .h-scroll-rail::-webkit-scrollbar {
    display: none;
  }

  .home-page .home-block--bento {
    opacity: 1 !important;
    transform: none !important;
  }

  html[data-mobile-app] .home-page .home-block.home-block--hero-mobile {
    background-image: none;
    isolation: isolate;
    position: relative;
    min-height: min(42rem, calc(100svh - 8rem));
  }

  html[data-mobile-app] .home-page .home-block.home-block--hero-mobile::before {
    position: absolute;
    z-index: 0;
    inset: 0;
    background-image: url("/static/images/sadra-hero-care.webp");
    background-position: 64% center;
    background-size: cover;
    content: "";
  }

  html[data-mobile-app] .home-page .home-block.home-block--hero-mobile::after {
    position: absolute;
    z-index: 1;
    inset: 0;
    background: linear-gradient(180deg, rgba(5, 48, 66, 0.95), rgba(7, 74, 91, 0.82) 58%, rgba(5, 45, 58, 0.92));
    content: "";
  }

  html[dir="rtl"][data-mobile-app] .home-page .home-block.home-block--hero-mobile::before {
    background-position: 36% center;
    transform: scaleX(-1);
  }

  html[data-mobile-app] .home-page .home-block--hero-mobile .mobile-hero__content {
    position: relative;
    z-index: 2;
  }

  .home-block--hero-mobile .home-stat__value {
    font-size: 1.05rem;
  }

  .home-block--hero-mobile .home-stat__icon {
    width: 1.45rem;
    height: 1.45rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-page .insight-card__media img {
    transition: none;
  }
}

/* Theme system: explicit system/light/dark control with one resolved palette. */
:root,
html[data-resolved-theme="light"] {
  --theme-page: #f5f8fa;
  --theme-surface: #ffffff;
  --theme-surface-raised: #ffffff;
  --theme-surface-soft: #eef6f6;
  --theme-ink: #12303b;
  --theme-muted: #58707a;
  --theme-line: #d9e5e7;
  --theme-accent: #087f8c;
  --theme-accent-soft: #e9f6f4;
  --theme-header: rgba(255, 255, 255, 0.97);
  --theme-footer: #fbfdfd;
  --theme-shadow: 0 8px 26px rgba(18, 48, 59, 0.055);
}

html[data-resolved-theme="dark"] {
  color-scheme: dark;
  --theme-page: #081619;
  --theme-surface: #102328;
  --theme-surface-raised: #142b31;
  --theme-surface-soft: #19343a;
  --theme-ink: #eef7f8;
  --theme-muted: #adc0c5;
  --theme-line: #29464c;
  --theme-accent: #62d4d0;
  --theme-accent-soft: #173a3d;
  --theme-header: rgba(8, 22, 25, 0.96);
  --theme-footer: #0a1c20;
  --theme-shadow: 0 12px 30px rgba(0, 0, 0, 0.28);
  --u-accent: var(--theme-accent);
  --u-accent-deep: #92e5e2;
  --u-accent-soft: var(--theme-accent-soft);
  --u-ink: var(--theme-ink);
  --u-muted: var(--theme-muted);
  --u-line: var(--theme-line);
  --u-surface: var(--theme-surface);
  --u-page: var(--theme-page);
  --u-shadow: var(--theme-shadow);
  --header-bg: var(--theme-header);
  --surface-card: var(--theme-surface);
  --line: var(--theme-line);
  --ink-900: var(--theme-ink);
  --ink-700: var(--theme-muted);
}

html {
  background: var(--theme-page);
}

body.site-body {
  color: var(--theme-ink);
  isolation: isolate;
  background: transparent !important;
  transition: color 180ms ease, background-color 180ms ease;
}

body.site-body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background-color: var(--theme-page);
  background-image: url("/static/images/sadra-page-bg-light.webp");
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  content: "";
  pointer-events: none;
}

html[data-resolved-theme="dark"] body.site-body::before {
  background-image: url("/static/images/sadra-page-bg-dark.webp");
}

.theme-switch {
  display: inline-grid;
  grid-template-columns: repeat(3, 2rem);
  gap: 0.2rem;
  width: max-content;
  padding: 0.2rem;
  border: 1px solid var(--theme-line);
  border-radius: 8px;
  color: var(--theme-muted);
  background: var(--theme-surface-soft);
}

.theme-switch__button {
  display: grid;
  width: 2rem;
  height: 2rem;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 6px;
  color: inherit;
  background: transparent;
  cursor: pointer;
  transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.theme-switch__button svg {
  width: 1rem;
  height: 1rem;
}

.theme-switch__button:hover {
  color: var(--theme-ink);
  background: color-mix(in srgb, var(--theme-surface-raised) 75%, transparent);
}

.theme-switch__button.is-active {
  color: var(--theme-accent);
  background: var(--theme-surface-raised);
  box-shadow: 0 1px 5px rgba(18, 48, 59, 0.12);
}

.theme-switch__button:focus-visible {
  outline: 2px solid var(--theme-accent);
  outline-offset: 2px;
}

.is-home .theme-switch--header {
  display: inline-grid;
}

.site-header {
  color: var(--theme-ink);
  background: var(--theme-header);
  border-bottom-color: var(--theme-line);
}

.site-footer {
  color: var(--theme-ink);
  background: var(--theme-footer);
  border-color: var(--theme-line);
}

html[data-resolved-theme="dark"] .brandmark__title,
html[data-resolved-theme="dark"] .brandmark__subtitle,
html[data-resolved-theme="dark"] .navlink--pill,
html[data-resolved-theme="dark"] .site-footer__col-label,
html[data-resolved-theme="dark"] .footer-brandmark__title,
html[data-resolved-theme="dark"] .footer-link,
html[data-resolved-theme="dark"] .footer-contact__item {
  color: var(--theme-ink);
}

html[data-resolved-theme="dark"] .navlink--pill:hover,
html[data-resolved-theme="dark"] .nav-dropdown--pill[open] > .navlink--pill {
  color: var(--theme-accent);
  background: var(--theme-accent-soft);
}

html[data-resolved-theme="dark"] .nav-dropdown__menu,
html[data-resolved-theme="dark"] .site-search__form,
html[data-resolved-theme="dark"] .site-search__panel,
html[data-resolved-theme="dark"] .lang-switch,
html[data-resolved-theme="dark"] .address-bar,
html[data-resolved-theme="dark"] .shell-message {
  color: var(--theme-ink);
  background: var(--theme-surface-raised);
  border-color: var(--theme-line);
}

html[data-resolved-theme="dark"] .site-search__input,
html[data-resolved-theme="dark"] input,
html[data-resolved-theme="dark"] textarea,
html[data-resolved-theme="dark"] select {
  color: var(--theme-ink);
  background-color: var(--theme-surface);
  border-color: var(--theme-line);
}

html[data-resolved-theme="dark"] .lang-switch__button {
  color: var(--theme-muted);
}

html[data-resolved-theme="dark"] .lang-switch__button.is-active {
  color: #061518;
  background: var(--theme-accent);
}

html[data-resolved-theme="dark"] body.site-body .home-page .service-card,
html[data-resolved-theme="dark"] body.site-body .home-page .insight-card,
html[data-resolved-theme="dark"] body.site-body .home-page .provider-card,
html[data-resolved-theme="dark"] body.site-body .home-page .pathway-card,
html[data-resolved-theme="dark"] body.site-body .home-page .featured-card,
html[data-resolved-theme="dark"] body.site-body .site-page .service-card,
html[data-resolved-theme="dark"] body.site-body .site-page .provider-card,
html[data-resolved-theme="dark"] body.site-body .site-page .insight-card,
html[data-resolved-theme="dark"] body.site-body .site-page .story-card,
html[data-resolved-theme="dark"] body.site-body .site-page .blog-card,
html[data-resolved-theme="dark"] body.site-body .site-page .support-tile,
html[data-resolved-theme="dark"] body.site-body .site-page .card,
html[data-resolved-theme="dark"] body.site-body .site-page .v2-panel {
  color: var(--theme-ink);
  background: var(--theme-surface-raised) !important;
  border-color: var(--theme-line);
  box-shadow: var(--theme-shadow);
}

html[data-resolved-theme="dark"] body.site-body .site-page .v2-grid--services .service-card {
  color: var(--theme-ink);
  background: var(--theme-surface-raised);
  border-color: var(--theme-line);
}

html[data-resolved-theme="dark"] body.site-body .home-page .service-card__title,
html[data-resolved-theme="dark"] body.site-body .home-page .provider-card__title,
html[data-resolved-theme="dark"] body.site-body .home-page .featured-card__title,
html[data-resolved-theme="dark"] body.site-body .home-page .pathway-card__label,
html[data-resolved-theme="dark"] body.site-body .home-page .insight-card h3,
html[data-resolved-theme="dark"] body.site-body .site-page .service-card__title,
html[data-resolved-theme="dark"] body.site-body .site-page .provider-card__title,
html[data-resolved-theme="dark"] body.site-body .site-page .story-card__title,
html[data-resolved-theme="dark"] .section-title,
html[data-resolved-theme="dark"] .page-title,
html[data-resolved-theme="dark"] .v2-section-title {
  color: var(--theme-ink);
}

html[data-resolved-theme="dark"] body.site-body .home-page .service-card__body,
html[data-resolved-theme="dark"] body.site-body .home-page .provider-card__desc,
html[data-resolved-theme="dark"] body.site-body .home-page .provider-card__meta,
html[data-resolved-theme="dark"] body.site-body .home-page .featured-card__subtitle,
html[data-resolved-theme="dark"] body.site-body .home-page .pathway-card__hint,
html[data-resolved-theme="dark"] body.site-body .home-page .insight-card p,
html[data-resolved-theme="dark"] body.site-body .site-page .service-card__body,
html[data-resolved-theme="dark"] body.site-body .site-page .provider-card__desc,
html[data-resolved-theme="dark"] body.site-body .site-page .provider-card__meta,
html[data-resolved-theme="dark"] body.site-body .site-page .story-card__body,
html[data-resolved-theme="dark"] .section-copy,
html[data-resolved-theme="dark"] .v2-section-copy {
  color: var(--theme-muted);
}

html[data-resolved-theme="dark"] .badge,
html[data-resolved-theme="dark"] body.site-body .home-page .featured-card .badge,
html[data-resolved-theme="dark"] body.site-body .home-page .home-provider-list .provider-card__services .badge {
  color: #c9e8e8;
  background: var(--theme-surface-soft);
  border-color: var(--theme-line);
}

html[data-resolved-theme="dark"] body.site-body .home-page .pathway-card:hover,
html[data-resolved-theme="dark"] body.site-body .home-page .featured-card:hover,
html[data-resolved-theme="dark"] body.site-body .home-page .provider-card:hover,
html[data-resolved-theme="dark"] body.site-body .home-page .service-card:hover {
  background: #18353b !important;
  border-color: #3d666d;
}

html[data-resolved-theme="dark"] .footer-map,
html[data-resolved-theme="dark"] .footer-map__placeholder {
  color: var(--theme-muted);
  background: var(--theme-surface);
  border-color: var(--theme-line);
}

html[data-resolved-theme="dark"] .mobile-drawer__panel,
html[data-resolved-theme="dark"] .mobile-drawer__body {
  color: var(--theme-ink);
  background: var(--theme-page);
}

html[data-resolved-theme="dark"] .mobile-drawer__hero,
html[data-resolved-theme="dark"] .mobile-nav-card,
html[data-resolved-theme="dark"] .mobile-drawer__link,
html[data-resolved-theme="dark"] .mobile-drawer__tools {
  color: var(--theme-ink);
  background: var(--theme-surface-raised);
  border-color: var(--theme-line);
}

.theme-switch--drawer {
  grid-template-columns: repeat(3, 2.25rem);
  margin-inline-start: auto;
}

.theme-switch--drawer .theme-switch__button {
  width: 2.25rem;
  height: 2.25rem;
}

@media (max-width: 1279px) and (min-width: 1024px) {
  .theme-switch--header {
    grid-template-columns: repeat(3, 1.85rem);
  }

  .theme-switch--header .theme-switch__button {
    width: 1.85rem;
    height: 1.85rem;
  }
}

@media (max-width: 1023px) {
  body.site-body::before {
    background-position: 64% center;
  }

  html[dir="rtl"] body.site-body::before {
    background-position: 36% center;
  }

  .theme-switch--header {
    display: none !important;
  }
}
