/* Dubai Quiz — self-contained styles (no external fonts/CDN) */

:root {
  --bg: #070b14;
  --bg-2: #0d1526;
  --gold: #e6b450;
  --gold-2: #c9992f;
  --gold-soft: rgba(230, 180, 80, 0.14);
  --text: #eef2f8;
  --muted: #9aa7bd;
  --line: rgba(255, 255, 255, 0.09);
  --card: rgba(255, 255, 255, 0.045);
  --card-hover: rgba(255, 255, 255, 0.075);
  --ok: #35c17b;
  --bad: #e05a5a;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  --font: "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Kufi Arabic", "Dubai", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(1100px 620px at 78% -12%, rgba(230, 180, 80, 0.10), transparent 62%),
    radial-gradient(900px 520px at 8% 8%, rgba(64, 122, 255, 0.10), transparent 60%),
    linear-gradient(180deg, var(--bg-2) 0%, var(--bg) 42%, #05080f 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: #f5cf88; }

.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(7, 11, 20, 0.72);
  border-bottom: 1px solid var(--line);
}

.site-header .bar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 0;
}

.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 19px; letter-spacing: .2px; }
.brand .mark {
  width: 38px; height: 38px; border-radius: 11px;
  display: grid; place-items: center;
  background: linear-gradient(145deg, var(--gold), var(--gold-2));
  color: #14100a; font-size: 20px; font-weight: 800;
  box-shadow: 0 8px 22px rgba(230, 180, 80, .28);
}
.brand small { display: block; font-size: 11.5px; font-weight: 500; color: var(--muted); letter-spacing: .3px; }

nav.main-nav { margin-inline-start: auto; display: flex; align-items: center; gap: 6px; }
nav.main-nav a {
  color: var(--muted); font-size: 15px; padding: 8px 13px; border-radius: 10px;
  transition: background .18s ease, color .18s ease;
}
nav.main-nav a:hover, nav.main-nav a.active { color: var(--text); background: rgba(255,255,255,.06); }

.lang-switch { display: flex; border: 1px solid var(--line); border-radius: 11px; overflow: hidden; margin-inline-start: 10px; }
.lang-switch button {
  appearance: none; border: 0; cursor: pointer;
  background: transparent; color: var(--muted);
  font-family: var(--font); font-size: 13.5px; font-weight: 700;
  padding: 8px 13px;
}
.lang-switch button[aria-pressed="true"] { background: var(--gold); color: #14100a; }

/* ---------- Hero (background video slot) ---------- */
.hero {
  position: relative;
  min-height: min(88vh, 780px);
  display: grid;
  place-items: center;
  text-align: center;
  overflow: hidden;
  padding: 70px 0 90px;
}
.hero-bg {
  position: absolute; inset: 0;
  /* сюда кладётся фоновое видео: media/bg.mp4 */
  background: linear-gradient(180deg, rgba(7,11,20,.55), rgba(7,11,20,.86));
  z-index: 0;
}
.hero-bg video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .5;
}
.hero-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(900px 420px at 50% 18%, rgba(230,180,80,.16), transparent 70%),
    linear-gradient(180deg, rgba(5,8,15,.55) 0%, rgba(5,8,15,.82) 62%, var(--bg) 100%);
}
.hero .wrap { position: relative; z-index: 2; }
.hero .kicker {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--line); background: var(--card);
  border-radius: 999px; padding: 7px 16px;
  font-size: 13.5px; color: var(--gold); letter-spacing: .4px;
  margin-bottom: 22px;
}
.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(34px, 6vw, 62px);
  line-height: 1.15;
  font-weight: 800;
  text-shadow: 0 10px 40px rgba(0,0,0,.5);
}
.hero h1 .accent {
  background: linear-gradient(120deg, #f6d68f, var(--gold) 55%, #b98423);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero p.lead { margin: 0 auto 30px; max-width: 640px; color: #c8d2e2; font-size: clamp(15px, 2.2vw, 19px); line-height: 1.75; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  border-radius: 13px; padding: 13px 26px;
  font-family: var(--font); font-size: 16px; font-weight: 700;
  cursor: pointer; border: 1px solid transparent;
  transition: transform .16s ease, box-shadow .16s ease, background .16s ease;
}
.btn-primary { background: linear-gradient(145deg, var(--gold), var(--gold-2)); color: #14100a; box-shadow: 0 12px 30px rgba(230,180,80,.24); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(230,180,80,.32); color: #14100a; }
.btn-ghost { background: var(--card); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: var(--card-hover); color: var(--text); }

.hero-stats {
  margin-top: 46px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap;
}
.hero-stats .stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 13px;
  padding: 12px 20px; min-width: 150px;
}
.hero-stats .stat b { display: block; font-size: 21px; color: var(--gold); }
.hero-stats .stat span { font-size: 12.5px; color: var(--muted); }

/* ---------- Sections ---------- */
section.block { padding: 66px 0; }
.section-head { text-align: center; margin-bottom: 38px; }
.section-head h2 { margin: 0 0 10px; font-size: clamp(25px, 3.6vw, 36px); font-weight: 800; }
.section-head p { margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }

/* ---------- Quiz ---------- */
.quiz-card {
  max-width: 780px; margin-inline: auto;
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.028));
  border: 1px solid var(--line); border-radius: 22px;
  box-shadow: var(--shadow); overflow: hidden;
}
.quiz-top { padding: 22px 26px 0; }
.quiz-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 14px; color: var(--muted); }
.quiz-meta .count { font-weight: 700; color: var(--gold); font-size: 15px; }
.progress { height: 7px; background: rgba(255,255,255,.08); border-radius: 99px; margin-top: 14px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--gold), #f3d493); transition: width .3s ease; }

.quiz-body { padding: 26px; }
.question { font-size: clamp(19px, 2.8vw, 24px); font-weight: 700; line-height: 1.6; margin: 0 0 22px; }

.options { display: grid; gap: 12px; }
.option {
  display: flex; align-items: center; gap: 14px;
  width: 100%; text-align: start;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: 14px; padding: 15px 17px;
  color: var(--text); font-family: var(--font); font-size: 16px; font-weight: 600;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .12s ease;
}
.option:hover:not(:disabled) { background: var(--card-hover); border-color: rgba(230,180,80,.35); transform: translateY(-1px); }
.option .marker {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.07); font-size: 14px; font-weight: 800; color: var(--muted);
}
.option:disabled { cursor: default; }
.option.correct { border-color: rgba(53,193,123,.6); background: rgba(53,193,123,.14); }
.option.correct .marker { background: var(--ok); color: #04210f; }
.option.wrong { border-color: rgba(224,90,90,.55); background: rgba(224,90,90,.13); }
.option.wrong .marker { background: var(--bad); color: #2a0808; }

.explain {
  margin-top: 18px; border-inline-start: 3px solid var(--gold);
  background: var(--gold-soft); border-radius: 0 12px 12px 0;
  padding: 14px 16px; font-size: 15px; line-height: 1.75; color: #e8eef8;
}
html[dir="rtl"] .explain { border-radius: 12px 0 0 12px; }

.quiz-foot { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 24px; }
.quiz-foot .hint { font-size: 13.5px; color: var(--muted); }

.result { text-align: center; padding: 12px 6px 6px; }
.result .score { font-size: 54px; font-weight: 800; color: var(--gold); line-height: 1; }
.result .score small { font-size: 22px; color: var(--muted); font-weight: 600; }
.result h3 { margin: 16px 0 8px; font-size: 23px; }
.result p { margin: 0 auto 22px; color: var(--muted); max-width: 460px; line-height: 1.75; }

/* ---------- Cards / pages ---------- */
.cards { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; transition: background .18s ease, transform .18s ease;
}
.card:hover { background: var(--card-hover); transform: translateY(-3px); }
.card .ico { font-size: 26px; margin-bottom: 12px; }
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.7; }

.prose { max-width: 780px; margin-inline: auto; }
.prose h2 { font-size: clamp(22px, 3.2vw, 30px); margin: 36px 0 14px; }
.prose h3 { font-size: 19px; margin: 28px 0 10px; color: var(--gold); }
.prose p { color: #c3ccdb; line-height: 1.9; font-size: 16px; margin: 0 0 16px; }
.prose ul { color: #c3ccdb; line-height: 1.9; padding-inline-start: 22px; font-size: 16px; }
.prose li { margin-bottom: 8px; }
.prose .lead-p { font-size: 18px; color: var(--text); }

.form-grid { display: grid; gap: 14px; max-width: 680px; margin-inline: auto; }
.field { display: grid; gap: 7px; }
.field label { font-size: 14px; color: var(--muted); font-weight: 600; }
.field input, .field textarea {
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  border-radius: 12px; padding: 13px 15px; color: var(--text);
  font-family: var(--font); font-size: 15.5px; outline: none;
  transition: border-color .16s ease, background .16s ease;
}
.field input:focus, .field textarea:focus { border-color: rgba(230,180,80,.5); background: rgba(255,255,255,.07); }
.field textarea { min-height: 140px; resize: vertical; }
.form-note { font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 40px; padding: 40px 0 46px; background: rgba(5,8,15,.6); }
.footer-grid { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.site-footer h4 { margin: 0 0 12px; font-size: 15px; color: var(--text); }
.site-footer p, .site-footer li { color: var(--muted); font-size: 14px; line-height: 1.9; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.footer-bottom {
  margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  color: var(--muted); font-size: 13.5px;
}
.credits { margin-top: 18px; color: #7f8ba0; font-size: 12.5px; line-height: 1.8; }

/* ---------- Video carousel ---------- */
.carousel { position: relative; }
.carousel-track {
  position: relative;
  aspect-ratio: 21 / 9;
  border-radius: 18px; overflow: hidden;
  border: 1px solid var(--line);
  background: #05080f;
}
.slide {
  position: absolute; inset: 0;
  margin: 0;
  opacity: 0; pointer-events: none;
  transition: opacity .55s ease;
}
.slide.is-active { opacity: 1; pointer-events: auto; }
.slide video { width: 100%; height: 100%; object-fit: cover; display: block; }
.slide-caption {
  position: absolute; inset-inline: 0; inset-block-end: 0;
  padding: 46px 24px 18px;
  background: linear-gradient(180deg, transparent, rgba(5, 8, 15, .88));
  font-size: clamp(14px, 2vw, 17px); font-weight: 700;
  opacity: 0; transform: translateY(6px);
  transition: opacity .4s ease, transform .4s ease;
}
.slide.is-active .slide-caption { opacity: 1; transform: none; }

.carousel-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--line); background: rgba(7, 11, 20, .6);
  color: #fff; font-size: 24px; line-height: 1; cursor: pointer;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  transition: background .18s ease, color .18s ease;
}
.carousel-btn:hover { background: rgba(230, 180, 80, .9); color: #14100a; }
.carousel-btn.prev { inset-inline-start: 14px; }
.carousel-btn.next { inset-inline-end: 14px; }

.carousel-dots { display: flex; gap: 8px; justify-content: center; margin-top: 16px; }
.carousel-dots button {
  width: 9px; height: 9px; padding: 0; border: 0; cursor: pointer;
  border-radius: 50%; background: rgba(255, 255, 255, .22);
  transition: width .25s ease, background .25s ease;
}
.carousel-dots button.is-active { width: 28px; border-radius: 99px; background: var(--gold); }

@media (max-width: 760px) {
  .carousel-track { aspect-ratio: 16 / 9; }
  .carousel-btn { width: 38px; height: 38px; font-size: 20px; }
  .slide-caption { padding: 34px 16px 14px; }
}

/* ---------- Misc ---------- */
.page-head { padding: 56px 0 10px; text-align: center; }
.page-head h1 { margin: 0 0 12px; font-size: clamp(28px, 4.6vw, 44px); font-weight: 800; }
.page-head p { margin: 0 auto; max-width: 620px; color: var(--muted); font-size: 16.5px; line-height: 1.75; }

.badge { display: inline-block; font-size: 12px; color: var(--gold); border: 1px solid rgba(230,180,80,.35); background: var(--gold-soft); border-radius: 999px; padding: 5px 12px; margin-bottom: 16px; }

[hidden] { display: none !important; }

@media (max-width: 640px) {
  .site-header .bar { flex-wrap: wrap; gap: 10px; padding: 12px 0; }
  nav.main-nav { order: 3; width: 100%; margin-inline-start: 0; overflow-x: auto; }
  .lang-switch { margin-inline-start: auto; }
  .quiz-body { padding: 20px 18px; }
  .quiz-top { padding: 18px 18px 0; }
  .hero-stats .stat { min-width: 128px; padding: 10px 15px; }
}