/* ═══════════════════════════════════════════════════════════════════════════
   Diako Home Hero  —  DB-driven hero: image + video  (dh-hero)
   Requires design-system.css loaded first.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────────────────────────────────────
   Shell
   ───────────────────────────────────────────────────────────────────────── */
.dh-hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #0F172A;   /* safe dark fallback while media loads */
}

/* ─────────────────────────────────────────────────────────────────────────
   Background layer
   ───────────────────────────────────────────────────────────────────────── */
.dh-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Image */
.dh-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  animation: dh-kenburns 18s ease-in-out infinite alternate;
}
@keyframes dh-kenburns {
  from { transform: scale(1.00); }
  to   { transform: scale(1.06); }
}

/* Video */
.dh-hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

/* No-media fallback — deep navy gradient */
.dh-hero__no-media {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
}

/* ─────────────────────────────────────────────────────────────────────────
   Overlay
   ───────────────────────────────────────────────────────────────────────── */
.dh-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: var(--overlay-opacity, 0.55);
  mix-blend-mode: var(--overlay-blend, multiply);
}
.dh-hero__overlay--gradient {
  background: linear-gradient(
    var(--overlay-angle, 135deg),
    var(--overlay-color-1, #0F172A) 0%,
    var(--overlay-color-2, #1E293B) 100%
  );
}
.dh-hero__overlay--solid {
  background: var(--overlay-color-1, #0F172A);
}

/* Bottom fade-to-page vignette */
.dh-hero::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 120px;
  background: linear-gradient(to bottom, transparent, var(--bg, #F8FAFC));
  z-index: 3;
  pointer-events: none;
}

/* ─────────────────────────────────────────────────────────────────────────
   Body — text content
   ───────────────────────────────────────────────────────────────────────── */
.dh-hero__body {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 900px;
  padding: 0 1.5rem 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dh-hero--center .dh-hero__body { align-items: center; text-align: center; }
.dh-hero--right  .dh-hero__body { align-items: flex-end; text-align: right; }

.dh-hero__title {
  font-size: var(--title-size-desktop, 56px);
  line-height: 1.15;
  font-weight: 800;
  color: var(--title-color, #FFFFFF);
  letter-spacing: -0.02em;
  margin: 0 0 12px;
  text-shadow: 0 4px 40px rgba(0,0,0,0.30);
}

.dh-hero__sub {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: var(--subtitle-color, #E2E8F0);
  margin: 0 0 24px;
  font-weight: 400;
  max-width: 52ch;
  line-height: 1.85;
  text-shadow: 0 2px 12px rgba(0,0,0,0.20);
}

/* ─────────────────────────────────────────────────────────────────────────
   CTA Buttons
   ───────────────────────────────────────────────────────────────────────── */
.dh-hero__buttons {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 32px;
}

/* Ensure outline hero button is legible on dark backgrounds */
.btn-hero-outline {
  color: #fff !important;
  border-color: rgba(255,255,255,0.60) !important;
  background: rgba(255,255,255,0.08) !important;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.btn-hero-outline:hover {
  background: rgba(255,255,255,0.18) !important;
  border-color: rgba(255,255,255,0.85) !important;
}

/* ─────────────────────────────────────────────────────────────────────────
   Language cards  —  strict 2×2 grid
   ───────────────────────────────────────────────────────────────────────── */
.dh-hero__lang-grid {
  display: grid;
  grid-template-columns: repeat(2, 150px);
  gap: 10px;
  max-width: 320px;
  width: 100%;
  margin: 20px auto 0;
  justify-content: center;
}

.dh-lang-card {
  width: 150px;
  height: 68px;
  border-radius: 14px;
  background: rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.18);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 2px;
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.2s ease;
  box-shadow: none;
}
.dh-lang-card:hover {
  transform: scale(1.03);
  color: #fff;
}

.dh-lang-card__flag { font-size: 1.25rem; line-height: 1; }
.dh-lang-card__fa   { font-size: 0.88rem; font-weight: 700; }
.dh-lang-card__en   {
  font-size: 0.68rem;
  font-weight: 500;
  opacity: 0.8;
  letter-spacing: 0.04em;
  direction: ltr;
}

/* RTL: keep grid centered */
.dh-hero--right .dh-hero__lang-grid { margin-inline: auto; }

/* ─────────────────────────────────────────────────────────────────────────
   Responsive
   ───────────────────────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .dh-hero__title     { font-size: var(--title-size-mobile, 34px) !important; }
  .dh-hero__sub       { font-size: 0.95rem; }
  .dh-hero__buttons   { flex-direction: column; align-items: center; }
  .dh-hero__lang-grid {
    grid-template-columns: repeat(2, 140px);
    max-width: 300px;
    gap: 8px;
  }
  .dh-lang-card {
    width: 140px;
    height: 62px;
    padding: 8px 10px;
  }
}

/* ─────────────────────────────────────────────────────────────────────────
   Lead form page
   ───────────────────────────────────────────────────────────────────────── */
.lead-page {
  min-height: 80vh;
  display: flex;
  align-items: center;
  padding: 80px 0 60px;
  background: var(--bg);
}

.lead-page__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  max-width: 560px;
  margin-inline: auto;
}

.lead-page__brand   { text-align: center; }
.lead-page__icon    { font-size: 3rem; display: block; margin-bottom: 12px; }
.lead-page__title   {
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 800;
  color: var(--text);
  margin: 0 0 10px;
}
.lead-page__desc    {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  margin: 0;
}

/* Form card */
.lead-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px;
  box-shadow: 0 8px 40px -12px rgba(15,23,42,0.12);
}

.lead-form          { display: flex; flex-direction: column; gap: 20px; }
.lead-form__group   { display: flex; flex-direction: column; gap: 6px; }
.lead-form__label   { font-size: 0.88rem; font-weight: 600; color: var(--text); }
.lead-form__req     { color: var(--ds-red-600); }
.lead-form__errors  {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  color: var(--ds-red-600);
  font-size: 0.82rem;
}
.lead-form__submit  { margin-top: 8px; width: 100%; justify-content: center; }

/* form-control inputs */
.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
  box-sizing: border-box;
}
.form-control:focus {
  outline: none;
  border-color: var(--cta);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.15);
}
textarea.form-control { resize: vertical; min-height: 100px; }

/* Trust signals */
.lead-trust {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Success page */
.lead-success {
  text-align: center;
  padding: 60px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.lead-success__icon  { font-size: 4rem; }
.lead-success__title { font-size: 1.8rem; font-weight: 800; color: var(--text); margin: 0; }
.lead-success__desc  { color: var(--text-muted); line-height: 1.85; margin: 0; font-size: 1rem; }

/* ═══════════════════════════════════════════════════════════════════════════
   Promo Section — HeroBelowCards  (حضوری / آنلاین)
   ═══════════════════════════════════════════════════════════════════════════ */

.promo-section {
  padding: 40px 0 52px;
  background: var(--bg);
}

/* Clean gap between promo cards and the next section */
.promo-section + .section,
.promo-section + section {
  margin-top: 0;
  padding-top: 56px;
}

.promo-section__inner { width: 100%; }

/* Optional heading */
.promo-section__header {
  text-align: center;
  margin-bottom: 32px;
}
.promo-section__title {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 800;
  color: var(--text);
  margin: 0 0 6px;
}
.promo-section__sub {
  font-size: 0.97rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Grid ── */
.promo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: stretch;   /* both columns always same height */
}

/* ── Card shell ── */
.promo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  /* Consistent height: each card stretches to fill its grid cell.
     aspect-ratio provides a stable shape when no content forces a taller box. */
  min-height: 260px;
  aspect-ratio: 16 / 9;
  border-radius: 20px;
  overflow: hidden;
  text-decoration: none;
  color: var(--card-text, #fff);
  cursor: pointer;
  box-shadow: 0 6px 32px -8px rgba(15, 23, 42, 0.18);
  transition: transform 0.26s ease, box-shadow 0.26s ease;
  /* isolate stacking context so overlay doesn't bleed */
  isolation: isolate;
}
.promo-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 48px -12px rgba(15, 23, 42, 0.30);
  color: var(--card-text, #fff);
}

/* Content alignment variants */
.promo-card--align-right  .promo-card__body { text-align: right; align-items: flex-end; }
.promo-card--align-left   .promo-card__body { text-align: left;  align-items: flex-start; }
.promo-card--align-center .promo-card__body { text-align: center; align-items: center; }

/* ── Background image (<img> path) ── */
/* Fills the card, center-crops, scales smoothly on hover */
.promo-card__media-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;   /* default focal point — keep center until per-card support added */
  z-index: 0;
  pointer-events: none;
  transform-origin: center center;
  will-change: transform;
  transition: transform 0.40s ease;
}
.promo-card:hover .promo-card__media-bg {
  transform: scale(1.04);
}

/* ── Background fallback (solid color when no image uploaded) ── */
.promo-card__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-color: var(--ds-navy-800, #0f172a);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform-origin: center center;
  transition: transform 0.40s ease;
}
.promo-card:hover .promo-card__bg {
  transform: scale(1.04);
}

/* Two-color gradient overlay (z-index:1) — sits above bg (z:0), below content (z:2) */
.promo-card__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    180deg,
    var(--overlayTop, var(--card-color-2, #111827)) 0%,
    var(--overlayBottom, var(--card-color-1, #0F172A)) 100%
  );
  opacity: var(--overlayOpacity, var(--card-opacity, 0.55));
  pointer-events: none;
  border-radius: inherit;
  transition: opacity 0.26s ease;
}
.promo-card:hover .promo-card__overlay {
  opacity: calc(var(--overlayOpacity, var(--card-opacity, 0.55)) + 0.06);
}

/* ── Badge ── */
.promo-card__badge {
  position: absolute;
  top: 16px;
  right: 16px;     /* RTL: top-right = top-left visually */
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.25);
}
.promo-card__badge--inperson {
  background: rgba(124, 58, 237, 0.72);   /* purple tint — حضوری */
  color: #fff;
}
.promo-card__badge--online {
  background: rgba(29, 78, 216, 0.72);    /* blue tint — آنلاین */
  color: #fff;
}

/* ── Body / text (z-index:2 — above overlay and bg) ── */
.promo-card__body {
  position: relative;
  z-index: 2;
  padding: 24px 24px 26px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.promo-card__title {
  font-size: clamp(1.05rem, 2.2vw, 1.25rem);
  font-weight: 800;
  line-height: 1.3;
  margin: 0;
  color: var(--card-text, #fff);
  text-shadow: 0 2px 8px rgba(0,0,0,0.65), 0 4px 24px rgba(0,0,0,0.45);
}

.promo-card__subtitle {
  font-size: 0.88rem;
  color: color-mix(in srgb, var(--card-text, #fff) 90%, transparent);
  margin: 0;
  line-height: 1.6;
  text-shadow: 0 1px 6px rgba(0,0,0,0.55);
}

/* ── CTA button inside card — navy/white, NOT orange ── */
.btn-promo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 20px;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  font-family: var(--font-body);
  text-decoration: none;
  cursor: pointer;
  width: fit-content;
  margin-top: 4px;
  /* navy-white style */
  background: rgba(255,255,255,0.15);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.20s ease, border-color 0.20s ease, color 0.20s ease;
}
.promo-card:hover .btn-promo,
.btn-promo:hover {
  background: rgba(255,255,255,0.28);
  border-color: rgba(255,255,255,0.85);
  color: #fff;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .promo-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .promo-card {
    /* On mobile, aspect-ratio alone is enough — no extra min-height needed */
    min-height: unset;
    aspect-ratio: 16 / 9;
  }
  .promo-card__body {
    padding: 18px 16px 20px;
  }
}
