:root {
  --red: #ff2d2d;
  --red2: #ff6b6b;

  --bg: #0b0f17;
  --bg2: #0b1220;

  --text: rgba(255, 255, 255, .92);
  --muted: rgba(255, 255, 255, .70);

  --card: rgba(255, 255, 255, .06);
  --card2: rgba(255, 255, 255, .09);

  --border: rgba(255, 255, 255, .12);
  --line: rgba(255, 255, 255, .10);

  --shadow: 0 18px 70px rgba(0, 0, 0, .55);
  --shadow-soft: 0 10px 30px rgba(0, 0, 0, .35);

  --radius: 20px;
  --radius2: 16px;

  --max: 1040px;
  --pad: 20px;
}

* {
  box-sizing: border-box
}

html,
body {
  height: 100%
}

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  line-height: 1.75;

  /* خلفية أفضل */
  background:
    radial-gradient(1200px 700px at 22% 10%, rgba(255, 45, 45, .22), transparent 60%),
    radial-gradient(900px 600px at 88% 18%, rgba(255, 107, 107, .14), transparent 58%),
    radial-gradient(800px 520px at 55% 96%, rgba(255, 255, 255, .06), transparent 62%),
    linear-gradient(180deg, var(--bg), var(--bg2));
}

a {
  color: inherit
}

.wrap {
  width: min(var(--max), calc(100% - 2*var(--pad)));
  margin: 0 auto;
  padding: 20px 0;
}

/* accessibility */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 14px;
  top: 14px;
  width: auto;
  height: auto;
  background: #fff;
  color: #000;
  padding: 10px 12px;
  border-radius: 12px;
  z-index: 9999;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
}

/* header (sticky + glass) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  background: linear-gradient(180deg, rgba(255, 45, 45, .22), rgba(0, 0, 0, .10));
  border-bottom: 1px solid var(--line);
}

.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}

/* brand */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-text {
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -.6px;
  color: #fff;
}

.brand-text span {
  color: #0b0f17;
  background: #fff;
  padding: 2px 7px;
  border-radius: 10px;
  margin-left: 6px;
}

/* nav */
.main-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.main-nav a {
  color: rgba(255, 255, 255, .78);
  text-decoration: none;
  font-weight: 850;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid transparent;
  transition: background .16s ease, border .16s ease, color .16s ease, transform .08s ease;
}

.main-nav a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .14);
}

.main-nav a:active {
  transform: translateY(1px)
}

/* cards (glass premium) */
.card {
  position: relative;
  background: linear-gradient(180deg, var(--card2), rgba(255, 255, 255, .03));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin: 18px 0;
  box-shadow: var(--shadow);
  overflow: hidden;
}

/* shine subtle */
.card::before {
  content: "";
  position: absolute;
  inset: -2px;
  background:
    radial-gradient(700px 240px at 22% 0%, rgba(255, 45, 45, .16), transparent 60%),
    radial-gradient(650px 260px at 90% 10%, rgba(255, 255, 255, .10), transparent 60%);
  opacity: .75;
  pointer-events: none;
  mask: linear-gradient(#000, transparent 75%);
}

/* hero */
.hero {
  padding: 22px;
  border: 1px solid rgba(255, 45, 45, .22)
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 3.2vw, 44px);
  line-height: 1.12;
  letter-spacing: -.7px;
}

.hero .lede {
  color: var(--muted);
  margin-top: 8px;
  max-width: 72ch
}

.hero .note {
  color: rgba(255, 255, 255, .92);
  font-weight: 900
}

/* meta chips */
.meta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 6px;
}

.chip {
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .05);
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  color: rgba(255, 255, 255, .84);
}

/* toc */
.toc {
  margin-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  padding-top: 14px;
}

.toc ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted)
}

.toc a {
  color: rgba(255, 255, 255, .86);
  text-decoration: none
}

.toc a:hover {
  text-decoration: underline
}

/* buttons (better) */
.cta {
  display: flex;
  gap: 12px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border-radius: 16px;
  text-decoration: none;
  font-weight: 950;
  border: 1px solid transparent;
  box-shadow: var(--shadow-soft);
  transition: transform .10s ease, filter .12s ease, background .16s ease, border .16s ease;
  will-change: transform;
}

.btn:active {
  transform: translateY(1px)
}

.btn-primary {
  background: linear-gradient(135deg, var(--red), var(--red2));
  color: #0b0f17;
  border-color: rgba(255, 255, 255, .14);
}

.btn-primary:hover {
  filter: brightness(1.04)
}

.btn-ghost {
  background: rgba(255, 255, 255, .06);
  border-color: rgba(255, 255, 255, .16);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, .10);
  border-color: rgba(255, 255, 255, .22);
}

/* grid */
.grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: 12px;
}

/* mini cards (lift hover) */
.mini-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .04));
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: var(--radius2);
  padding: 16px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .22);
  transition: transform .14s ease, box-shadow .14s ease, border .14s ease, background .14s ease;
}

.mini-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .35);
  border-color: rgba(255, 255, 255, .18);
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, .05));
}

.mini-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  letter-spacing: -.2px
}

/* text */
.small {
  font-size: 13px;
  color: var(--muted)
}

.text-link {
  display: inline-block;
  margin-top: 10px;
  color: rgba(255, 255, 255, .90);
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, .26);
  text-underline-offset: 3px;
  font-weight: 900;
}

.text-link:hover {
  text-decoration-color: rgba(255, 255, 255, .66);
}

.bullets {
  line-height: 1.9;
  margin: 12px 0 0;
  padding-left: 18px
}

.legal {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .12)
}

/* faq */
details {
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .05);
  border-radius: 16px;
  padding: 10px 12px;
  margin: 10px 0;
}

summary {
  cursor: pointer;
  font-weight: 950
}

details p {
  margin: 8px 0 0
}

/* footer */
.site-footer {
  text-align: center;
  padding: 26px 0 34px;
  opacity: .92;
}

/* focus */
:focus-visible {
  outline: 3px solid rgba(255, 45, 45, .45);
  outline-offset: 3px;
  border-radius: 12px;
}

::selection {
  background: rgba(255, 45, 45, .35)
}

/* responsive */
@media (max-width:720px) {
  .wrap {
    padding: 16px 0
  }

  .header-flex {
    padding: 12px 0
  }

  .brand-text {
    font-size: 20px
  }

  .main-nav a {
    padding: 7px 9px
  }

  .card {
    padding: 16px
  }

  .hero {
    padding: 18px
  }
}

@media (max-width:520px) {
  .btn {
    width: 100%
  }
}

/* ✅ Responsive Header (no HTML changes) */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
}

.header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* nav default (desktop/tablet) */
.main-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.main-nav a {
  white-space: nowrap;
  /* يمنع كسر الكلمات */
}

/* ✅ Mobile */
@media (max-width: 640px) {
  .header-flex {
    flex-direction: column;
    /* اللوجو فوق + المنيو تحت */
    align-items: stretch;
    gap: 10px;
    padding: 10px 0;
  }

  .brand {
    justify-content: center;
    /* وسط الشاشة */
  }

  .main-nav {
    width: 100%;
    justify-content: center;
    gap: 8px;
  }

  .main-nav a {
    flex: 1;
    /* كل زر يأخذ مساحة */
    text-align: center;
    padding: 10px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .06);
  }

  .main-nav a:hover {
    background: rgba(255, 255, 255, .10);
  }
}

/* ✅ Very small phones */
@media (max-width: 420px) {
  .main-nav {
    gap: 6px;
  }

  .main-nav a {
    padding: 9px 8px;
    font-size: 13px;
  }
}

.search-hint {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #1a1a2e;
  border: 2px solid #e63946;
  border-radius: 50px;
  padding: 12px 24px;
  font-size: 0.95rem;
  color: #fff;
  margin-top: 12px;
}

.search-hint strong {
  color: #e63946;
  font-size: 1rem;
  letter-spacing: 0.5px;
}

.search-icon {
  font-size: 1.1rem;
}
