@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@400;500;600;700;800&display=swap');

:root {
  --forest: #0b2a24;
  --forest-deep: #061914;
  --emerald: #4f9a83;
  --emerald-dark: #377662;
  --mint: #9bc9ba;
  --gold: #d7b85d;
  --gold-dark: #b79439;
  --cream: #f6f4ec;
  --paper: #ffffff;
  --ink: #102a24;
  --muted: #66766f;
  --line: #d7e1dc;
  --danger: #b42318;
  --success: #28745f;
  --shadow: 0 24px 70px rgba(6, 25, 20, 0.14);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { width: 100%; max-width: 100%; margin: 0; overflow-x: hidden; }
body { font-family: Cairo, Arial, sans-serif; color: var(--ink); line-height: 1.75; background: var(--paper); }
[hidden] { display: none !important; }
a { color: inherit; }
button, input, select, textarea { font: inherit; }

.site-header,
.admin-header {
  min-height: 78px;
  padding: 12px clamp(20px, 7vw, 110px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: #fff;
  background: var(--forest-deep);
  border-bottom: 1px solid rgba(215, 184, 93, 0.35);
}

.brand-logo { display: inline-flex; align-items: center; flex-shrink: 0; text-decoration: none; }
.brand-logo img { width: 170px; height: auto; display: block; }
.brand-logo--center { width: 100%; justify-content: center; }
.brand-logo--center img { width: 190px; }
.brand-logo--footer img { width: 180px; }
.brand-logo--admin img { width: 150px; }

.header-cta {
  padding: 9px 18px;
  color: var(--forest-deep);
  background: var(--gold);
  border-radius: 999px;
  font-weight: 800;
  text-decoration: none;
  transition: transform .2s, background .2s;
}
.header-cta:hover { transform: translateY(-2px); background: #e4c970; }

.btn {
  min-height: 48px;
  padding: 12px 22px;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn.primary { color: var(--forest-deep); background: var(--gold); box-shadow: 0 12px 28px rgba(215, 184, 93, .24); }
.btn.primary:hover { background: #e4c970; box-shadow: 0 15px 32px rgba(215, 184, 93, .32); }
.btn.ghost { color: var(--forest); background: var(--paper); border: 1px solid var(--line); }
.btn.dark { color: #fff; background: var(--forest); }
.btn:disabled { opacity: .6; cursor: wait; transform: none; }

.eyebrow { margin: 0 0 10px; color: var(--emerald); font-size: 14px; font-weight: 800; }
.hero, .learn, .assessment { width: 100%; min-width: 0; }
.hero > *, .learn > *, .assessment > * { min-width: 0; }

.hero {
  min-height: 620px;
  padding: 66px clamp(20px, 7vw, 110px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(38px, 6vw, 86px);
  align-items: center;
  color: #fff;
  background:
    radial-gradient(circle at 12% 20%, rgba(79, 154, 131, .25), transparent 32%),
    radial-gradient(circle at 80% 80%, rgba(215, 184, 93, .12), transparent 28%),
    linear-gradient(135deg, #061914 0%, #0b2a24 58%, #123c32 100%);
}
.hero .eyebrow { color: var(--gold); }
.hero h1, .learn h2, .assessment h2, .result-card h1, .admin-title h1 {
  margin: 0 0 20px;
  font-size: clamp(38px, 5vw, 66px);
  line-height: 1.25;
  letter-spacing: -.8px;
}
.hero h1 { color: #fff; }
.hero h1 em { color: var(--gold); font-style: normal; }
.lead { max-width: 640px; color: #dbe8e3; font-size: 18px; }
.pills { margin: 25px 0; display: flex; flex-wrap: wrap; gap: 10px; }
.pills span { padding: 7px 13px; color: #e9f3ef; background: rgba(255,255,255,.07); border: 1px solid rgba(155,201,186,.34); border-radius: 999px; font-size: 12px; }

.hero-video-wrap { position: relative; }
.video-label { margin-bottom: 12px; display: flex; align-items: center; gap: 9px; color: #dbe8e3; font-size: 13px; font-weight: 700; }
.video-label span { width: 10px; height: 10px; display: inline-block; background: var(--gold); border-radius: 50%; box-shadow: 0 0 0 6px rgba(215,184,93,.13); }
.video-frame { position: relative; overflow: hidden; background: #000; border-radius: 18px; aspect-ratio: 16 / 9; }
.video-frame iframe { width: 100%; height: 100%; position: absolute; inset: 0; border: 0; }
.hero-video { border: 1px solid rgba(255,255,255,.15); box-shadow: 0 28px 70px rgba(0,0,0,.38); }
.hero-video::after { content: ''; position: absolute; inset: -1px; pointer-events: none; border: 1px solid rgba(215,184,93,.24); border-radius: 18px; }

.learn {
  padding: 82px clamp(20px, 7vw, 110px);
  display: grid;
  grid-template-columns: .72fr 1.28fr;
  gap: 62px;
  align-items: start;
  background: #fff;
}
.learn h2, .assessment h2 { color: var(--forest); font-size: clamp(30px, 4vw, 48px); }
.learn-heading > p:last-child { color: var(--muted); }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.features article {
  min-height: 95px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fbfcfb;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-weight: 700;
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.features article:hover { transform: translateY(-3px); border-color: var(--mint); box-shadow: 0 12px 30px rgba(11,42,36,.08); }
.features article:last-child { grid-column: 1 / -1; }
.features b { color: var(--gold-dark); font-size: 18px; }

.assessment {
  padding: 78px clamp(20px, 7vw, 110px);
  display: grid;
  grid-template-columns: .64fr 1.36fr;
  gap: 64px;
  align-items: start;
  background: var(--cream);
}
.assessment aside { position: sticky; top: 25px; }
.assessment aside > p { color: var(--muted); }
dl dt { margin-top: 14px; color: var(--muted); font-size: 11px; }
dl dd { margin: 0; color: var(--forest); font-weight: 800; }

.form-card {
  width: 100%;
  min-width: 0;
  padding: clamp(20px, 4vw, 42px);
  overflow: hidden;
  background: var(--paper);
  border: 1px solid rgba(11,42,36,.06);
  border-radius: 22px;
  box-shadow: var(--shadow);
  scroll-margin-top: 20px;
}
.stepper { margin: 0 0 28px; padding: 0 0 22px; display: flex; align-items: flex-start; direction: rtl; border-bottom: 1px solid var(--line); }
.stepper > i { height: 2px; flex: 1; margin: 21px 8px 0; position: relative; overflow: hidden; background: var(--line); }
.stepper > i::after { content: ''; position: absolute; inset: 0; background: var(--emerald); transform: scaleX(0); transform-origin: right; transition: transform .3s; }
.stepper-item { width: 130px; display: flex; flex-direction: column; align-items: center; color: #81918b; text-align: center; }
.stepper-item span { width: 44px; height: 44px; display: grid; place-items: center; color: #687a74; background: #fff; border: 2px solid #cad7d2; border-radius: 50%; font-weight: 800; transition: .25s; }
.stepper-item strong { margin-top: 8px; font-size: 11px; line-height: 1.5; }
.stepper-item.active { color: var(--forest); }
.stepper-item.active span { color: #fff; background: var(--emerald); border-color: var(--emerald); box-shadow: 0 0 0 6px rgba(79,154,131,.13); }
.stepper-item.done { color: var(--emerald-dark); cursor: pointer; }
.stepper-item.done span { color: var(--emerald-dark); background: #edf7f3; border-color: var(--emerald); }
.stepper-item.done + i::after { transform: scaleX(1); }

.step { display: none; }
.step.active { display: block; }
.step h3 { margin-top: 0; color: var(--forest); font-size: 25px; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.wide { grid-column: 1 / -1; }
.phone-field { display: block; }
.phone-field .iti { width: 100%; direction: ltr; }
.phone-field .iti input[type='tel'] { width: 100%; min-height: 50px; padding-inline-start: 92px; }
.phone-field .iti__country-container { direction: ltr; }
.phone-field .iti__dropdown-content { z-index: 50; }
.field-hint, .rating-note { margin: 0 0 8px; display: block; color: var(--muted); font-size: 12px; font-weight: 400; }
.rating-field { margin-top: 20px; }
.rating-scale { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; }
.rating-option { position: relative; cursor: pointer; }
.rating-option input { position: absolute; opacity: 0; }
.rating-option span { min-height: 82px; padding: 10px 5px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 10px; text-align: center; transition: .18s ease; }
.rating-option b { color: var(--forest); font-size: 22px; line-height: 1.1; }
.rating-option small { color: var(--muted); font-size: 9px; line-height: 1.3; }
.rating-option input:checked + span { border-color: var(--emerald); background: #edf7f3; box-shadow: 0 0 0 2px rgba(79,154,131,.16); }
.rating-option input:focus-visible + span { outline: 3px solid rgba(79,154,131,.3); outline-offset: 2px; }
label:not(.choice, .consent) { font-size: 13px; font-weight: 700; }
input:not([type='radio'], [type='checkbox']), select, textarea { width: 100%; margin-top: 5px; padding: 12px 13px; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 9px; outline: 0; }
input:focus, select:focus, textarea:focus { border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(79,154,131,.12); }
fieldset { margin: 27px 0; padding: 0; border: 0; }
legend { margin-bottom: 11px; color: var(--forest); font-weight: 800; }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span { height: 100%; padding: 11px 13px; display: block; border: 1px solid var(--line); border-radius: 9px; font-size: 12px; cursor: pointer; }
.choice input:checked + span { color: var(--forest); background: #edf7f3; border-color: var(--emerald); font-weight: 700; }
small[data-error] { min-height: 17px; display: block; color: var(--danger); font-size: 10px; }
.conditional { display: none !important; }
.conditional.show { display: block !important; }
.consent { margin-top: 22px; display: flex; align-items: flex-start; gap: 10px; color: var(--muted); font-size: 12px; }
.consent a { color: var(--emerald-dark); font-weight: 700; }
.actions { margin-top: 25px; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 9px; }
.actions button[hidden] { display: none !important; }
.actions button:not([hidden]) { display: inline-flex; }
.actions .primary { min-width: 270px; }
.hp { width: 1px !important; height: 1px !important; margin: 0 !important; padding: 0 !important; position: absolute !important; overflow: hidden !important; border: 0 !important; clip-path: inset(50%) !important; white-space: nowrap !important; }
.alert { margin: 15px 0; padding: 12px; border-radius: 9px; }
.alert.error { color: var(--danger); background: #fef3f2; }
.alert.success { color: var(--success); background: #eaf6f2; }

.notice { padding: 76px 20px; color: #cfe0da; text-align: center; background: var(--forest); }
.notice h2 { margin: 0 0 12px; color: #fff; font-size: 34px; }
.notice p { max-width: 720px; margin: auto; }
footer { padding: 30px clamp(20px, 7vw, 110px); display: flex; align-items: center; justify-content: space-between; gap: 30px; color: #b8ccc5; background: var(--forest-deep); }

.auth-page { min-height: 100vh; padding: 20px; display: grid; place-items: center; background: linear-gradient(145deg, var(--forest-deep), var(--forest)); }
.auth-card, .result-card { width: 100%; max-width: 470px; padding: 44px; background: #fff; border-radius: 22px; box-shadow: var(--shadow); }
.auth-card .brand-logo--center, .result-card .brand-logo--center { margin: -10px 0 22px; padding: 14px 20px; background: var(--forest); border-radius: 14px; }
.auth-card h1 { color: var(--forest); }
.auth-card label { margin: 15px 0; display: block; }
.auth-card .btn { width: 100%; }
.result-card { max-width: 660px; text-align: center; }
.result-card h1 { color: var(--forest); font-size: 44px; }
.success-mark { width: 70px; height: 70px; margin: 22px auto; display: grid; place-items: center; color: var(--success); background: #eaf6f2; border-radius: 50%; font-size: 35px; }
.result-actions { margin-top: 25px; display: flex; justify-content: center; gap: 10px; }

.admin-page { min-height: 100vh; background: #f2f6f4; }
.admin-header a { color: #fff; }
.admin-nav { display: flex; align-items: center; gap: 18px; }
.admin-nav a { text-decoration: none; font-size: 13px; font-weight: 700; }
.admin-nav a[aria-current='page'] { color: var(--gold); }
.admin-main { max-width: 1450px; margin: auto; padding: 40px clamp(15px, 4vw, 60px); }
.admin-title { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.admin-title h1 { color: var(--forest); font-size: 42px; }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 11px; }
.stats article { padding: 20px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.stats span { display: block; color: var(--muted); font-size: 12px; }
.stats strong { color: var(--forest); font-size: 27px; }
.filters { margin: 15px 0; padding: 14px; display: flex; align-items: center; gap: 9px; background: #fff; border-radius: 12px; }
.filters input, .filters select { max-width: 300px; margin: 0; }
.filters select { max-width: 190px; }
.table-wrap { overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th, td { padding: 13px; border-bottom: 1px solid #e3ebe7; font-size: 12px; text-align: right; }
th { color: var(--muted); background: #f8faf9; }
td small { display: block; color: var(--muted); }
.detail-grid { display: grid; grid-template-columns: 1.4fr .6fr; gap: 20px; }
.detail-list, .followup-card, .video-preview-card { padding: 23px; background: #fff; border: 1px solid var(--line); border-radius: 12px; }
.detail-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.detail-list div { padding: 12px 0; border-bottom: 1px solid #e3ebe7; }
.detail-list dt { color: var(--muted); font-size: 11px; }
.detail-list dd { margin: 0; overflow-wrap: anywhere; }
.followup-card label { margin: 14px 0; display: block; }
.followup-card .btn { width: 100%; }
.settings-grid { display: grid; grid-template-columns: .8fr 1.2fr; gap: 20px; align-items: start; }
.settings-card p, .video-preview-card p { color: var(--muted); }
.video-preview-card h2, .settings-card h2 { margin-top: 0; color: var(--forest); }

@media (max-width: 900px) {
  .hero, .learn, .assessment, .detail-grid, .settings-grid { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding-top: 52px; padding-bottom: 55px; }
  .hero-video-wrap { max-width: 760px; width: 100%; }
  .learn, .assessment { padding-top: 58px; padding-bottom: 58px; }
  .assessment aside { position: static; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
  .site-header, .admin-header { min-height: 66px; padding: 10px 18px; }
  .brand-logo img { width: 132px; }
  .header-cta { padding: 7px 13px; font-size: 12px; }
  .hero { padding: 42px 20px 48px; gap: 32px; }
  .hero h1 { font-size: 38px; }
  .lead { font-size: 16px; }
  .learn, .assessment { padding: 54px 20px; }
  .features, .choices, .field-grid { grid-template-columns: 1fr; }
  .rating-scale { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .rating-option span { min-height: 72px; padding: 7px 2px; }
  .rating-option small { font-size: 8px; }
  .features article:last-child, .wide { grid-column: auto; }
  .form-card { padding: 22px 15px; }
  .stepper { margin-inline: -6px; }
  .stepper-item { width: 88px; min-width: 0; }
  .stepper-item span { width: 38px; height: 38px; }
  .stepper-item strong { font-size: 9px; }
  .stepper > i { margin: 18px 2px 0; }
  .actions { display: grid; grid-template-columns: 1fr; position: sticky; bottom: 0; padding: 10px 0; background: #fff; }
  .actions .btn, .actions .primary { width: 100%; min-width: 0; }
  footer { display: block; text-align: center; }
  .brand-logo--footer { justify-content: center; margin-bottom: 14px; }
  .admin-header { align-items: flex-start; }
  .admin-nav { flex-wrap: wrap; justify-content: flex-end; gap: 8px 12px; }
  .admin-nav a { font-size: 11px; }
  .filters { display: grid; }
  .stats { grid-template-columns: 1fr 1fr; }
  .admin-title { align-items: flex-start; }
  .admin-title h1 { font-size: 31px; }
  .detail-list { grid-template-columns: 1fr; }
  .auth-card, .result-card { padding: 28px 20px; }
  .result-actions { flex-direction: column; }
}
