/* فرصة تك — liquid-glass system (from Landing Liquid.dc.html, owner-approved). */

.g-page {
  position: relative;
  background: var(--lq-ground, #EEF2F9);
  overflow: hidden;
  --lq-orb: 1; --lq-blur: 28px;
  --lq-fill-a: 0.55; --lq-fill-b: 0.18; --lq-fill-c: 0.32;
  --lq-rim: 0.75; --lq-anim: running;
}

/* Floating colour orbs */
.lq-orb {
  position: absolute; border-radius: 50%;
  filter: blur(60px) saturate(var(--lq-orb));
  pointer-events: none; z-index: 0;
  animation: lqFloat 18s ease-in-out infinite alternate;
  animation-play-state: var(--lq-anim);
  opacity: calc(var(--lq-o, 0.4) * var(--lq-orb));
}
@keyframes lqFloat {
  from { transform: translate3d(0,0,0) scale(1); }
  to   { transform: translate3d(40px,60px,0) scale(1.12); }
}
@keyframes lqShine {
  0%   { transform: translateX(-140%) skewX(-18deg); }
  100% { transform: translateX(240%) skewX(-18deg); }
}
.g-page > *:not(.lq-orb) { position: relative; z-index: 1; }

/* Glass card */
.glass {
  position: relative;
  background: linear-gradient(135deg,
    rgba(255,255,255,var(--lq-fill-a)),
    rgba(255,255,255,var(--lq-fill-b)) 40%,
    rgba(255,255,255,var(--lq-fill-c))) !important;
  border: 1px solid rgba(255,255,255,var(--lq-rim)) !important;
  backdrop-filter: blur(var(--lq-blur)) saturate(190%) brightness(1.05);
  -webkit-backdrop-filter: blur(var(--lq-blur)) saturate(190%) brightness(1.05);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,0.95),
              inset 0 -1px 0 rgba(11,31,58,0.10),
              inset 2px 0 8px rgba(255,255,255,0.5),
              0 12px 40px rgba(11,31,58,0.12),
              0 1px 2px rgba(11,31,58,0.08) !important;
  color: #0A1424;
  border-radius: 28px !important;
  overflow: hidden;
}
.glass::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 30%,
    rgba(255,255,255,0.35) 45%, rgba(255,255,255,0.12) 50%, transparent 62%);
  opacity: 0; transition: opacity .3s;
}
.glass:hover::after { opacity: 1; }

/* Dark glass (navy) */
.glass-strong {
  position: relative;
  background: linear-gradient(135deg, rgba(11,31,58,0.82), rgba(20,42,74,0.72)) !important;
  border: 1px solid rgba(255,255,255,0.35) !important;
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-shadow: inset 0 1.5px 0 rgba(255,255,255,0.5),
              inset 0 -1px 0 rgba(0,0,0,0.3),
              0 20px 60px rgba(11,31,58,0.3) !important;
  border-radius: 28px !important;
  color: #fff;
}

.lq-pill { border-radius: 999px !important; }

/* Liquid gold — CTA surface with a travelling shine */
.lq-gold {
  background: linear-gradient(135deg, rgba(255,213,79,0.95),
    rgba(255,202,40,0.85) 60%, rgba(240,184,0,0.9)) !important;
  border: 1px solid rgba(255,255,255,0.7) !important;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.7),
              inset 0 -2px 6px rgba(138,98,0,0.25),
              0 14px 34px rgba(255,202,40,0.4) !important;
  color: #0B1F3A !important;
  position: relative; overflow: hidden;
  backdrop-filter: blur(10px);
  isolation: isolate;
}
.lq-gold > * { position: relative; z-index: 1; }
.lq-gold::before {
  content: ""; position: absolute; z-index: 0; top: 0; bottom: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.55), transparent);
  animation: lqShine 3.6s ease-in-out infinite;
  animation-play-state: var(--lq-anim);
}
.ft-btn.glass { color: #0B1F3A !important; font-weight: 800; }
.g-gold { color: #FFCA28 !important; }

/* Phone frame for real app screenshots (hero) */
.phone {
  border-radius: 40px;
  background: rgba(255,255,255,0.35);
  border: 8px solid rgba(255,255,255,0.7);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.9), 0 40px 80px rgba(11,31,58,0.25);
  overflow: hidden;
  position: relative;
}
.phone .screen-real {
  position: absolute; inset: 0; z-index: 2;
  width: 100%; height: 100%; object-fit: cover; object-position: top;
}
.phone:hover { transform: rotate(0deg) translateY(-8px) !important; }
.phone { transition: transform 500ms var(--ease); }

/* ─── Comparison: two cards, "us" vs "other apps" ───
   Replaces the old 3-column table. RTL-safe: the grid follows document
   direction, so فرصة تك sits first (rightmost) on the Arabic page and
   leftmost on /en/. No fixed widths, so it never needs a scroll container. */
.vs-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  max-width: 960px; margin-inline: auto;
}
.vs-card { border-radius: 22px !important; padding: 26px 24px; }
.vs-head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 18px; margin-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.18);
}
.vs-card--them .vs-head { border-bottom-color: var(--ink-200); }
.vs-head img { width: 30px; height: 30px; }
.vs-title { font-weight: 900; font-size: 20px; }
.vs-card--us .vs-title { color: #fff; }
.vs-card--them .vs-title { color: var(--ink-500); }
.vs-list { display: flex; flex-direction: column; gap: 15px; }
.vs-row { display: flex; align-items: flex-start; gap: 12px; font-size: 15px; line-height: 1.5; }
.vs-card--us .vs-row { color: #EDF1F8; font-weight: 600; }
.vs-card--them .vs-row { color: var(--ink-400); }
.vs-ico {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center; margin-top: 1px;
}
.vs-ico svg { width: 15px; height: 15px; }
.vs-yes { background: var(--gold-500); color: var(--navy-800); }
.vs-no  { background: rgba(138,150,173,0.18); color: var(--ink-400); }

@media (max-width: 700px) {
  .vs-grid { grid-template-columns: 1fr; }
  .vs-card { padding: 22px 20px; }
}

/* ─── Responsive ───
   Breakpoints: ≥1025 desktop (base rules above, unchanged) · 601–1024 tablet · ≤600 phone.
   A narrow ≤900 tier is kept only for the nav-links/toc hide, matching the site's original
   threshold for that unrelated concern. */

/* Header wordmark must never wrap, at any width. */
header img + span { white-space: nowrap !important; }

/* Fluid hero H1. clamp() resolves to exactly 56px (the original) at ≥933px CSS width,
   so it is byte-identical to the old fixed value at ≥1280 desktop. */
.d-h1 { font-size: clamp(30px, 6vw, 56px) !important; }

@media (max-width: 1024px) {
  /* ---- grids ---- */
  .d-grid-2 { grid-template-columns: 1fr !important; }
  .d-grid-3 { grid-template-columns: repeat(2,1fr) !important; }
  .d-grid-6 { grid-template-columns: 1fr 1fr !important; }
  #news .d-grid-2 { grid-template-columns: repeat(2,1fr) !important; }
  .d-cv-row { grid-template-columns: repeat(3,1fr) !important; }
  /* span-2 cards (NEW section) always take a full row, at 2 or 1 columns alike */
  .d-grid-3 > [style*="grid-column:span 2"] { grid-column: 1 / -1 !important; }
  footer [style*="1.4fr 1fr 1fr 1fr"] { grid-template-columns: 1fr 1fr !important; }

  /* ---- spacing ---- */
  .d-pad { padding-inline: 20px !important; }
  [style*="padding:96px 32px"] { padding-block: 56px !important; }
  [style="padding-bottom:88px"] { padding-bottom: 0 !important; }

  /* ---- header ---- */
  header img { width: 56px !important; height: 56px !important; }
  header img + span { font-size: 24px !important; }

  /* ---- section headings ---- */
  section h2 { font-size: clamp(26px, 4.5vw, 40px) !important; }

  /* ---- hero phones: show both, scale the whole composition as one unit
     (scaling each phone separately breaks their overlap/rotation relationship).
     Both .phone children are position:absolute — .d-hero-phones has no in-flow
     content to size itself by, so it needs an explicit `width` (not `max-width`
     alone) or centering it with margin-inline:auto collapses it to 0. ---- */
  .d-hero-phones {
    display: block !important;
    width: min(560px, 100%) !important;
    margin-inline: auto !important;
    transform: scale(0.7) !important;
    transform-origin: top center;
    margin-block-end: -168px !important; /* reclaim the space the scale-down leaves behind */
  }

}

@media (max-width: 900px) {
  .d-nav-links { display: none !important; }
  .d-toc { display: none !important; }
}

@media (max-width: 600px) {
  /* ---- grids: single column on phone ---- */
  .d-grid-3 { grid-template-columns: 1fr !important; }
  #news .d-grid-2 { grid-template-columns: 1fr !important; }
  .d-cv-row { grid-template-columns: repeat(2,1fr) !important; }

  /* ---- spacing ---- */
  [style*="padding:96px 32px"] { padding-block: 40px !important; }
  [style*="padding:72px 48px"] { padding: 48px 20px !important; }
  footer [style*="1.4fr 1fr 1fr 1fr"] { grid-template-columns: 1fr !important; }

  /* ---- header: tighter pill, small logo, still one line ---- */
  header .glass { gap: 6px !important; padding-inline: 10px !important; }
  header .glass > a:first-child { gap: 5px !important; }
  header .glass > div:last-child { gap: 6px !important; }
  header img { width: 38px !important; height: 38px !important; }
  header img + span { font-size: 16px !important; }
  header .glass > div:last-child > a:first-child { padding: 5px 9px !important; font-size: 11.5px !important; }
  header .glass > div:last-child > a:last-child { padding: 6px 11px !important; font-size: 12px !important; }

  /* ---- hero: single phone, centered, nothing clipped ---- */
  .d-hero-phones {
    width: 100% !important;
    margin-inline: 0 !important;
    transform: none !important;
    margin-block-end: 0 !important;
    height: 478px !important;
  }
  .d-hero-phones .phone:nth-of-type(2) { display: none !important; }
  .d-hero-phones .phone:nth-of-type(1) {
    inset-inline-start: 0 !important;
    inset-inline-end: 0 !important;
    margin-inline: auto !important;
    bottom: 10px !important; /* rotate(-4deg) around center-bottom dips a corner ~7.6px; clear #top's overflow:hidden */
    transform: rotate(-4deg) scale(0.78) !important;
    transform-origin: center bottom;
  }

  /* ---- hero CTA row + sources strip: centered, tidy wrap ---- */
  [style="display:flex;flex-wrap:wrap;gap:12px;align-items:center"] { justify-content: center !important; }
  #top + section span[style*="rgba(11,31,58,0.25)"] { display: none !important; }

}

@media (prefers-reduced-motion: reduce) {
  .g-page { --lq-anim: paused; }
  .phone, .phone:hover { transition: none; transform: none !important; }
}
