/* أكاديمية تايرو — التصميم. قاعدة داكنة كحلية + لون مميز سماوي (من ألوان الطقم) */

/* ---------- الخطوط (مستضافة ذاتيًا) ---------- */
@font-face { font-family: 'Changa'; font-weight: 700; font-display: swap; src: url(fonts/changa-700-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Changa'; font-weight: 700; font-display: swap; src: url(fonts/changa-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
@font-face { font-family: 'Changa'; font-weight: 800; font-display: swap; src: url(fonts/changa-800-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Changa'; font-weight: 800; font-display: swap; src: url(fonts/changa-800-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
@font-face { font-family: 'Tajawal'; font-weight: 400; font-display: swap; src: url(fonts/tajawal-400-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Tajawal'; font-weight: 400; font-display: swap; src: url(fonts/tajawal-400-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
@font-face { font-family: 'Tajawal'; font-weight: 500; font-display: swap; src: url(fonts/tajawal-500-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Tajawal'; font-weight: 500; font-display: swap; src: url(fonts/tajawal-500-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }
@font-face { font-family: 'Tajawal'; font-weight: 700; font-display: swap; src: url(fonts/tajawal-700-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+FB50-FDFF, U+FE70-FEFF; }
@font-face { font-family: 'Tajawal'; font-weight: 700; font-display: swap; src: url(fonts/tajawal-700-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2000-206F, U+2074, U+20AC, U+2212, U+2215; }

/* ---------- الأساس ---------- */
:root {
  --bg0: #060D1A;
  --bg1: #0A1B36;
  --card: #0E2140;
  --card2: #132B52;
  --ink: #EAF2FB;
  --mut: #9FB4CE;
  --accent: #38C6F4;
  --accent-soft: #7FD1F0;
  --gold: #E9C24A;
  --wa: #25D366;
  --line: rgba(140, 180, 230, .15);
  --r: 18px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg0);
  color: var(--ink);
  font: 400 1.02rem/1.75 'Tajawal', 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: 'Changa', 'Tajawal', sans-serif; line-height: 1.25; margin: 0; }
a { color: var(--accent-soft); text-decoration: none; }
.wrap { max-width: 1080px; margin-inline: auto; padding-inline: 18px; }
section { padding-block: 46px 10px; }

/* عنوان قسم: شرطة سماوية مائلة قبل النص */
.sec-t {
  font-size: clamp(1.7rem, 6vw, 2.4rem);
  font-weight: 800;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.sec-t::before {
  content: '';
  width: 14px; height: 38px;
  background: linear-gradient(180deg, var(--accent), #1877B8);
  border-radius: 4px;
  transform: skewX(14deg);
  flex: none;
}

/* ---------- الشريط العلوي ---------- */
#topbar {
  position: fixed; inset-inline: 0; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px;
  padding-top: calc(10px + env(safe-area-inset-top));
  background: transparent;
  transition: background .35s, box-shadow .35s;
}
#topbar.solid {
  background: rgba(6, 13, 26, .88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); font-family: 'Changa'; font-weight: 700; font-size: 1.1rem; }
.brand img { border-radius: 50%; background: #fff; padding: 2px; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.top-login {
  border: 1px solid rgba(140, 180, 230, .4); color: var(--ink);
  font-family: 'Changa'; font-weight: 700; font-size: .9rem;
  padding: 5px 16px 7px; border-radius: 99px;
  background: rgba(6, 13, 26, .35); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.top-cta {
  background: var(--wa); color: #04240F; font-weight: 700; font-family: 'Changa';
  padding: 7px 18px 9px; border-radius: 99px; font-size: .95rem;
  opacity: 0; pointer-events: none; transform: translateY(-6px);
  transition: opacity .3s, transform .3s;
}
#topbar.solid .top-cta { opacity: 1; pointer-events: auto; transform: none; }

/* ---------- الهيرو ---------- */
#hero {
  position: relative; min-height: 100svh; padding: 0;
  display: flex; align-items: flex-end;
}
.hero-bg, .hero-bg img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 30%;
}
#heroVid {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: center 30%;
  opacity: 0; transition: opacity 1.2s;
  pointer-events: none;
}
#heroVid.on { opacity: 1; }
.hero-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(6,13,26,.72) 0%, rgba(6,13,26,.06) 30%, rgba(6,13,26,.18) 55%, rgba(6,13,26,.96) 88%, var(--bg0) 100%),
    radial-gradient(120% 60% at 50% 100%, rgba(10,27,54,.5), transparent 60%);
}
.hero-inner {
  position: relative; width: 100%;
  padding: 0 22px calc(46px + env(safe-area-inset-bottom));
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.hero-crest { border-radius: 24px; background: #fff; padding: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.5); margin-bottom: 8px; }
#heroName {
  font-size: clamp(2.6rem, 12vw, 4.6rem);
  font-weight: 800;
  text-shadow: 0 4px 30px rgba(0,0,0,.65);
}
.hero-sub {
  margin: 0; font-family: 'Changa'; font-weight: 700;
  color: var(--accent-soft); font-size: clamp(1.1rem, 4.5vw, 1.5rem);
  text-shadow: 0 2px 16px rgba(0,0,0,.6);
}
.hero-tag {
  margin: 4px 0 14px; color: #DCE9F8; font-size: clamp(1rem, 4vw, 1.2rem); font-weight: 500;
  text-shadow: 0 2px 14px rgba(0,0,0,.7);
}
.reg-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(37, 211, 102, .16);
  border: 1px solid rgba(37, 211, 102, .55);
  color: #A8F5C4; font-weight: 700; font-size: .88rem;
  border-radius: 99px; padding: 4px 16px 6px; margin-bottom: 14px;
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.reg-pill .dot {
  width: 9px; height: 9px; border-radius: 50%; background: var(--wa);
  animation: regPulse 1.8s ease-in-out infinite;
}
@keyframes regPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, .55); }
  55% { box-shadow: 0 0 0 7px rgba(37, 211, 102, 0); }
}
@media (prefers-reduced-motion: reduce) { .reg-pill .dot { animation: none; } }
.btn-join {
  display: inline-flex; align-items: center; gap: 10px;
  background: var(--wa); color: #04240F;
  font-family: 'Changa'; font-weight: 800; font-size: 1.25rem;
  padding: 13px 42px 16px; border-radius: 99px;
  box-shadow: 0 8px 30px rgba(37, 211, 102, .38);
  transition: transform .15s;
}
.btn-join:active { transform: scale(.96); }
.hero-hint { color: var(--mut); font-size: .82rem; margin-top: 10px; }

/* ---------- إعلان الأكاديمية ---------- */
#adS { padding-block: 34px 0; }
.ad-card {
  background: linear-gradient(160deg, var(--card), var(--bg1));
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 18px; text-align: center;
}
.ad-card h2 { font-size: clamp(1.3rem, 5vw, 1.7rem); font-weight: 800; }
.ad-card .al { color: var(--mut); margin: 4px 0 14px; font-size: .95rem; }
.ad-card video {
  width: 100%; max-width: 380px; aspect-ratio: 9 / 16;
  border-radius: 14px; background: #000;
  margin-inline: auto; display: block;
  box-shadow: 0 14px 44px rgba(0, 0, 0, .45);
}

/* ---------- عن الأكاديمية ---------- */
#aboutBody p { color: #C9D8EC; margin: 0 0 12px; max-width: 62ch; }
.facts {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px;
  margin-top: 22px;
}
.fact {
  background: linear-gradient(160deg, var(--card), var(--bg1));
  border: 1px solid var(--line); border-radius: var(--r);
  padding: 14px 16px;
}
.fact .fi { font-size: 1.4rem; }
.fact .fl { color: var(--mut); font-size: .82rem; margin-top: 2px; }
.fact .fv { font-family: 'Changa'; font-weight: 700; font-size: 1.02rem; margin-top: 2px; }
.map-btn {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 18px;
  border: 1px solid var(--accent); color: var(--accent-soft);
  padding: 9px 22px 11px; border-radius: 99px; font-weight: 700; font-family: 'Changa';
}

/* ---------- التدريبات ---------- */
#trainCards { display: grid; gap: 16px; grid-template-columns: repeat(2, 1fr); }
.tcard {
  position: relative; border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  min-height: 210px;
  display: flex; align-items: flex-end;
}
.tcard.big { grid-column: 1 / -1; min-height: 300px; }
.tcard img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; transition: transform .6s;
}
.tcard::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(5, 11, 22, .93) 92%);
}
.tcard:hover img { transform: scale(1.05); }
.tbody { position: relative; z-index: 1; padding: 16px; }
.tcard h3 { font-size: 1.35rem; font-weight: 800; }
.tcard.big h3 { font-size: 1.7rem; }
.tcard.big h3::after {
  content: 'البرنامج الأساسي'; font-family: 'Tajawal'; font-weight: 700; font-size: .72rem;
  background: var(--accent); color: #04121F; border-radius: 99px;
  padding: 2px 12px 4px; margin-inline-start: 12px; vertical-align: 3px;
}
.tcard p { margin: 4px 0 0; color: #C4D4E8; font-size: .92rem; line-height: 1.65; }
.tcard:not(.big) p {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}

/* ---------- الزي الرسمي ---------- */
.kit-line { color: var(--mut); margin: -8px 0 18px; }
.kit-grid { display: grid; gap: 14px; }
.kit-card {
  position: relative; aspect-ratio: 3 / 4; margin: 0;
  border-radius: var(--r); overflow: hidden;
  border: 1px solid var(--line); background: var(--card);
}
.kit-card img, .kit-card video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.kit-card figcaption {
  position: absolute; bottom: 0; inset-inline: 0; padding: 34px 16px 12px;
  background: linear-gradient(transparent, rgba(5, 11, 22, .88));
  font-family: 'Changa'; font-weight: 700; font-size: 1.05rem;
}

/* ---------- الفعاليات ---------- */
.ev-sub { font-family: 'Changa'; font-weight: 700; font-size: 1.15rem; color: var(--accent-soft); margin: 22px 0 12px; }
.ev-grid { display: grid; gap: 14px; }
.ev {
  display: grid; grid-template-columns: 132px 1fr; overflow: hidden;
  background: linear-gradient(160deg, var(--card), var(--bg1));
  border: 1px solid var(--line); border-radius: var(--r);
}
.ev img { width: 100%; height: 100%; object-fit: cover; min-height: 130px; }
.ev .eb { padding: 13px 16px; align-self: center; }
.ev h3 { font-size: 1.08rem; font-weight: 700; }
.ev .em { color: var(--mut); font-size: .85rem; margin: 3px 0 0; }
.ev .en { color: #C4D4E8; font-size: .88rem; margin: 6px 0 0; line-height: 1.6; }
.ev .badge {
  display: inline-block; background: var(--gold); color: #2A1F04;
  font-weight: 700; font-size: .78rem; border-radius: 99px; padding: 1px 12px 3px;
  margin-bottom: 6px; font-family: 'Changa';
}
.ev .res {
  display: inline-block; background: var(--card2); border: 1px solid var(--line);
  font-family: 'Changa'; font-weight: 800; font-size: 1.05rem; color: var(--accent-soft);
  border-radius: 10px; padding: 2px 14px 4px; margin-top: 6px;
}

/* ---------- السحوبات ---------- */
.give-none {
  background: linear-gradient(160deg, var(--card), var(--bg1));
  border: 1px dashed var(--line); border-radius: var(--r);
  padding: 26px 20px; text-align: center; color: var(--mut);
}
.give-none a { font-weight: 700; }
.give-cur {
  background: linear-gradient(150deg, #1B2B10, #0C1A0A);
  border: 1px solid rgba(120, 200, 90, .35); border-radius: var(--r); padding: 20px;
}
.give-cur h3 { color: #C9F29B; font-size: 1.3rem; }
.give-cur ol { margin: 10px 0 0; padding-inline-start: 20px; color: #D9E8CC; }
.give-ends { color: var(--gold); font-size: .88rem; margin-top: 10px; }
.win-list { margin: 14px 0 0; padding: 0; list-style: none; }
.win-list li {
  display: flex; justify-content: space-between; gap: 10px;
  border-bottom: 1px solid var(--line); padding: 9px 4px;
}
.win-list .wp { color: var(--gold); }

/* ---------- الفانتازيا ---------- */
.fpl-hero { border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); margin-bottom: 18px; }
.fpl-code-row {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: linear-gradient(160deg, var(--card), var(--bg1));
  border: 1px solid var(--line); border-radius: var(--r); padding: 16px;
}
.fpl-code-row .lbl { color: var(--mut); font-size: .9rem; }
.fpl-code {
  font-family: 'Changa'; font-weight: 800; font-size: 1.7rem; letter-spacing: 2px;
  color: var(--accent); direction: ltr;
}
.fpl-copy, .fpl-join {
  font-family: 'Changa'; font-weight: 700; border-radius: 99px; cursor: pointer;
  padding: 8px 22px 10px; font-size: .95rem; border: 0;
}
.fpl-copy { background: var(--card2); color: var(--ink); border: 1px solid var(--accent); }
.fpl-join { background: var(--accent); color: #04121F; }
.fpl-steps { margin: 18px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.fpl-steps li {
  counter-increment: s; display: flex; gap: 14px; align-items: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px;
}
.fpl-steps li::before {
  content: counter(s);
  font-family: 'Changa'; font-weight: 800; font-size: 1.2rem; color: var(--accent);
  background: var(--bg1); border: 1px solid var(--line);
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.fpl-prizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 18px; }
.prize {
  text-align: center; border-radius: 14px; padding: 14px 8px;
  background: linear-gradient(170deg, #2A2208, #14110A);
  border: 1px solid rgba(233, 194, 74, .3);
}
.prize:first-child { border-color: var(--gold); background: linear-gradient(170deg, #3A2E08, #171208); }
.prize .pp { color: var(--mut); font-size: .8rem; }
.prize .pv { font-family: 'Changa'; font-weight: 800; color: var(--gold); font-size: 1.05rem; margin-top: 2px; }
.fpl-table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: .95rem; }
.fpl-table th { color: var(--mut); font-weight: 500; font-size: .8rem; text-align: start; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.fpl-table td { padding: 9px 10px; border-bottom: 1px solid var(--line); }
.fpl-table tr:nth-child(1) td:first-child { color: var(--gold); font-weight: 800; }
.fpl-table .pts { font-family: 'Changa'; font-weight: 700; color: var(--accent-soft); }
.fpl-note { color: var(--mut); font-size: .85rem; margin-top: 10px; }
.fpl-wait {
  border: 1px dashed var(--line); border-radius: var(--r); margin-top: 18px;
  padding: 20px; text-align: center; color: var(--mut);
}

/* ---------- النجوم ---------- */
#starRail {
  display: flex; gap: 14px; overflow-x: auto; padding: 4px 18px 18px;
  scroll-snap-type: x mandatory; scrollbar-width: none;
}
#starRail::-webkit-scrollbar { display: none; }
.star {
  flex: none; width: min(66vw, 250px); scroll-snap-align: center;
  border-radius: var(--r); overflow: hidden; position: relative;
  border: 1px solid var(--line); background: var(--card);
  aspect-ratio: 3 / 4.35;
}
.star img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.star::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(5, 11, 22, .95) 88%);
}
.star .sb { position: absolute; bottom: 0; inset-inline: 0; z-index: 1; padding: 14px; }
.star h3 { font-size: 1.25rem; font-weight: 800; }
.star .sm { color: var(--accent-soft); font-size: .8rem; font-weight: 700; margin: 1px 0 2px; }
.star .sl { color: #C4D4E8; font-size: .85rem; margin: 0; }
.star .snum {
  position: absolute; top: 8px; inset-inline-end: 12px; z-index: 1;
  font-family: 'Changa'; font-weight: 800; font-size: 2rem;
  color: rgba(255, 255, 255, .28);
}

/* ---------- الفوتر ---------- */
#foot {
  margin-top: 60px; padding: 40px 20px calc(90px + env(safe-area-inset-bottom));
  text-align: center;
  background: linear-gradient(180deg, var(--bg0), var(--bg1));
  border-top: 1px solid var(--line);
}
#foot > img { margin-inline: auto; background: #fff; border-radius: 20px; padding: 6px; }
.f-name { font-family: 'Changa'; font-weight: 800; font-size: 1.25rem; margin: 12px 0 0; }
.f-tag { color: var(--mut); margin: 2px 0 18px; }
.f-links { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }
.f-links a {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--line);
  padding: 9px 20px 11px; border-radius: 99px; color: var(--ink); font-weight: 700; font-size: .92rem;
}
.f-loc { color: var(--mut); font-size: .88rem; margin-top: 18px; }

/* ---------- زر واتساب العائم ---------- */
#waFab {
  position: fixed; z-index: 60;
  bottom: calc(18px + env(safe-area-inset-bottom)); inset-inline-end: 16px;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--wa); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 26px rgba(37, 211, 102, .45);
  transition: transform .2s;
}
#waFab:active { transform: scale(.9); }

/* ---------- حركة الظهور ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s, transform .7s; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .tcard img, #galGrid img { transition: none; }
}

/* ---------- شاشات أوسع ---------- */
@media (min-width: 760px) {
  section { padding-block: 64px 14px; }
  #trainCards { grid-template-columns: repeat(3, 1fr); }
  .tcard { min-height: 250px; }
  .tcard.big { min-height: 360px; }
  .kit-grid { grid-template-columns: repeat(3, 1fr); }
  .ev { grid-template-columns: 190px 1fr; }
  .ev-grid.two { grid-template-columns: 1fr 1fr; }
  #starRail { padding-inline: calc((100vw - 1080px) / 2 + 18px); }
  .star { width: 250px; }
  .hero-inner { padding-bottom: 70px; }
  .facts { grid-template-columns: repeat(3, 1fr); }
  .fpl-hero { max-width: 620px; }
}
