/* ==========================================================================
   منصة أمسية الاستقلال — الأنماط الأساسية
   ========================================================================== */

/* ---------- الخطوط ---------- */
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/cairo-arabic-400-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/cairo-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/cairo-arabic-700-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/cairo-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/fonts/cairo-arabic-800-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0898-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Cairo';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/fonts/cairo-latin-800-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Amiri';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/amiri-arabic-700-normal.woff2') format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: 'Amiri';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/amiri-latin-700-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F;
}

/* ---------- المتغيرات ---------- */
:root {
  --green-900: #021b11;
  --green-850: #032416;
  --green-800: #04291a;
  --green-700: #046a38;
  --green-600: #0b8a4b;
  --gold: #f3c64a;
  --gold-soft: #ffe9a3;
  --gold-deep: #c8931f;
  --red: #c8102e;
  --ivory: #fdf9ef;
  --paper: #ffffff;
  --ink: #0b2a1c;
  --muted: #5f7466;
  --line: rgba(4, 106, 56, 0.14);
  --radius-lg: 26px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 8px 24px rgba(2, 27, 17, 0.07);
  --shadow: 0 24px 60px rgba(2, 27, 17, 0.12);
  --font-body: 'Cairo', 'Segoe UI', Tahoma, system-ui, sans-serif;
  --font-display: 'Amiri', 'Cairo', Georgia, serif;
  --container: 1180px;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--ivory);
  color: var(--ink);
  line-height: 1.75;
  font-size: 16px;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.3; margin: 0 0 0.6rem; }
p { margin: 0 0 0.9rem; }
:focus-visible { outline: 3px solid var(--gold-deep); outline-offset: 3px; border-radius: 6px; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2.5rem);
}

/* ---------- شريط العلم ---------- */
.flag-line { display: grid; grid-template-rows: 3px 6px 3px; position: relative; z-index: 60; }
.flag-line span:nth-child(1) { background: var(--red); }
.flag-line span:nth-child(2) { background: linear-gradient(90deg, var(--green-700), var(--green-600), var(--green-700)); }
.flag-line span:nth-child(3) { background: var(--red); }

/* ---------- الترويسة ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(2, 27, 17, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(243, 198, 74, 0.16);
  transition: box-shadow 0.25s ease, background 0.25s ease;
}
.site-header.scrolled { box-shadow: 0 12px 30px rgba(2, 27, 17, 0.35); background: rgba(2, 27, 17, 0.96); }
.header-inner { display: flex; align-items: center; gap: 1rem; min-height: 74px; }
.brand { display: flex; align-items: center; gap: 0.7rem; color: #fff; min-width: 0; }
.brand-crest { display: inline-flex; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35)); }
.brand-logo { width: 46px; height: 46px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(243, 198, 74, 0.55); background: #04291a; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 1.05rem; font-weight: 800; letter-spacing: 0.2px; }
.brand-text small { font-size: 0.68rem; color: rgba(255, 233, 163, 0.75); }

.main-nav { display: flex; gap: 0.35rem; margin-inline-start: auto; }
.main-nav a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.92rem;
  padding: 0.5rem 0.7rem;
  border-radius: 999px;
  position: relative;
  transition: color 0.2s ease, background 0.2s ease;
}
.main-nav a:hover { color: var(--gold-soft); background: rgba(243, 198, 74, 0.1); }
.header-actions { display: flex; align-items: center; gap: 0.6rem; }
.admin-entry {
  white-space: nowrap;
  border-color: rgba(243, 198, 74, 0.4);
  color: var(--gold-soft);
}
.admin-entry:hover { background: rgba(243, 198, 74, 0.14); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(243, 198, 74, 0.35);
  background: transparent;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle span { display: block; height: 2px; background: var(--gold-soft); margin: 4px 0; border-radius: 2px; transition: transform 0.25s ease, opacity 0.25s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- الأزرار ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease;
  white-space: nowrap;
  text-align: center;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.btn-gold {
  background: linear-gradient(135deg, #fff2c4, var(--gold) 45%, var(--gold-deep));
  color: #04291a;
  box-shadow: 0 14px 28px rgba(243, 198, 74, 0.28);
}
.btn-gold:hover { box-shadow: 0 18px 34px rgba(243, 198, 74, 0.4); transform: translateY(-1px); }
.btn-ghost {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(243, 198, 74, 0.45);
  color: var(--gold-soft);
}
.btn-ghost:hover { background: rgba(243, 198, 74, 0.16); }
.btn-outline {
  background: transparent;
  border-color: rgba(4, 106, 56, 0.35);
  color: var(--green-700);
}
.btn-outline:hover { background: rgba(4, 106, 56, 0.07); }
.btn-link { background: none; color: var(--muted); padding: 0.5rem 0.75rem; text-decoration: underline; }
.btn-sm { padding: 0.6rem 1.15rem; font-size: 0.85rem; }
.btn-icon {
  width: 48px; height: 48px;
  padding: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(243, 198, 74, 0.4);
}
.btn-icon svg { width: 22px; height: 22px; fill: var(--gold-soft); }
.btn-icon:hover { background: rgba(243, 198, 74, 0.18); }
.btn.full { width: 100%; }

/* ---------- الواجهة الرئيسية ---------- */
.hero {
  position: relative;
  color: #fff;
  padding-block: clamp(3rem, 8vw, 6rem) clamp(3.5rem, 9vw, 7rem);
  overflow: hidden;
  background:
    radial-gradient(900px 480px at 78% -8%, rgba(243, 198, 74, 0.18), transparent 62%),
    radial-gradient(760px 420px at 6% 104%, rgba(11, 138, 75, 0.4), transparent 60%),
    linear-gradient(165deg, #021b11, #04291a 46%, #063a24);
  isolation: isolate;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 233, 163, 0.16) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(circle at 50% 40%, #000 20%, transparent 75%);
  opacity: 0.55;
  z-index: -1;
}
.hero-glow {
  position: absolute;
  inset-inline-end: -12%;
  top: -18%;
  width: 62vw;
  height: 62vw;
  max-width: 720px;
  max-height: 720px;
  border-radius: 50%;
  border: 1px solid rgba(243, 198, 74, 0.2);
  box-shadow: 0 0 0 42px rgba(243, 198, 74, 0.04), 0 0 0 96px rgba(243, 198, 74, 0.03);
  z-index: -1;
}
.hero-inner { max-width: 900px; margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  letter-spacing: 0.4px;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.38rem 1rem;
  border-radius: 999px;
  margin-bottom: 1.1rem;
}
.eyebrow.gold { color: var(--gold-deep); background: rgba(243, 198, 74, 0.12); border-color: rgba(200, 147, 31, 0.32); }
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(243, 198, 74, 0.18); }

.hero-title {
  font-size: clamp(2.4rem, 7vw, 4.9rem);
  margin-bottom: 0.6rem;
  letter-spacing: -0.5px;
  text-wrap: balance;
}
.hero-title span {
  background: linear-gradient(120deg, #fff7dc, var(--gold) 40%, var(--gold-deep));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  display: inline-block;
}
.hero-sub {
  color: rgba(255, 255, 255, 0.78);
  font-size: clamp(1rem, 2vw, 1.18rem);
  max-width: 680px;
  margin: 0 auto 1.6rem;
}
.hero-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.6rem; margin-bottom: 1.9rem; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.87rem;
  color: rgba(255, 255, 255, 0.9);
}
.chip svg { width: 17px; height: 17px; fill: none; stroke: var(--gold); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* العد التنازلي */
.countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(0.4rem, 1.4vw, 0.9rem);
  max-width: 560px;
  margin: 0 auto 0.8rem;
}
.cd-cell {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(243, 198, 74, 0.28);
  border-radius: 18px;
  padding: 0.85rem 0.3rem 0.7rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
}
.cd-num {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 5.2vw, 2.6rem);
  font-variant-numeric: tabular-nums;
  color: var(--gold-soft);
  line-height: 1.1;
}
.cd-label { font-size: 0.72rem; color: rgba(255, 255, 255, 0.65); }
.countdown-note { font-size: 0.8rem; color: rgba(255, 255, 255, 0.55); margin-bottom: 1.7rem; }

.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.7rem; margin-bottom: 2.2rem; }
.hero-stats {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 4vw, 2.6rem);
  padding: 1.1rem 0 0;
  margin: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.hero-stats li { display: flex; flex-direction: column; align-items: center; }
.hero-stats strong { font-family: var(--font-display); font-size: clamp(1.3rem, 3.6vw, 1.8rem); color: var(--gold); line-height: 1.1; }
.hero-stats span { font-size: 0.75rem; color: rgba(255, 255, 255, 0.6); }

/* ---------- الشريط المتحرك ---------- */
.messages {
  background: var(--green-800);
  color: var(--gold-soft);
  padding-block: 0.85rem;
  overflow: hidden;
  border-block: 1px solid rgba(243, 198, 74, 0.2);
}
.messages-track {
  display: flex;
  gap: 3rem;
  width: max-content;
  animation: marquee 42s linear infinite;
  white-space: nowrap;
  font-family: var(--font-display);
  font-size: 1.05rem;
}
.messages:hover .messages-track { animation-play-state: paused; }
.messages-track span { display: inline-flex; align-items: center; gap: 0.8rem; }
.messages-track span::after { content: "✦"; color: var(--gold); font-size: 0.8rem; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(50%); }
}

/* ---------- شريط أسماء المحتفلين ---------- */
.celebrants-band {
  background: linear-gradient(90deg, rgba(243, 198, 74, 0.16), var(--green-900) 22%, var(--green-900) 78%, rgba(243, 198, 74, 0.16));
  border-block: 1px solid rgba(243, 198, 74, 0.3);
  overflow: hidden;
}
.celebrants-inner {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding-block: 0.65rem;
}
.celebrants-label {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-inline-start: clamp(0.7rem, 4vw, 1.8rem);
  padding: 0.28rem 0.85rem;
  border-radius: 999px;
  background: linear-gradient(135deg, #fff2c4, var(--gold) 55%, var(--gold-deep));
  color: var(--green-900);
  font-weight: 700;
  font-size: 0.76rem;
  white-space: nowrap;
}
.celebrants-label::before { content: "✦"; font-size: 0.7rem; }
.celebrants-viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.celebrants-track {
  display: flex;
  gap: 2.2rem;
  width: max-content;
  white-space: nowrap;
  animation: marquee 65s linear infinite;
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
}
.celebrants-band:hover .celebrants-track { animation-play-state: paused; }
.celebrants-track span { display: inline-flex; align-items: center; gap: 0.7rem; }
.celebrants-track span::after { content: "•"; color: var(--gold); }

/* ---------- شريط تبريكات أعضاء الجمعية ---------- */
.greetings-band {
  background:
    radial-gradient(520px 200px at 88% 0%, rgba(243, 198, 74, 0.16), transparent 70%),
    linear-gradient(160deg, #032416, #04331f 60%, #021b11);
  border-bottom: 1px solid rgba(243, 198, 74, 0.25);
  padding-block: clamp(1.1rem, 2.6vw, 1.8rem);
  text-align: start;
}
.greetings-band[hidden] { display: none !important; }
.greetings-inner {
  display: grid;
  grid-template-columns: minmax(180px, 240px) 1fr;
  gap: 1.2rem;
  align-items: center;
}
.greetings-head h2 {
  font-size: 1.12rem;
  color: #fff;
  margin: 0.15rem 0 0.25rem;
  font-family: var(--font-display);
}
.greetings-head .eyebrow { font-size: 0.66rem; padding: 0.22rem 0.7rem; margin: 0; }
.greetings-sub { margin: 0; font-size: 0.78rem; color: rgba(255, 255, 255, 0.6); line-height: 1.7; }
.greetings-body { min-width: 0; }
.greetings-scroll {
  min-width: 0;
  overflow: hidden;
  padding-block: 0.15rem;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}
.greetings-scroll::-webkit-scrollbar { display: none; }
.greetings-track {
  display: flex;
  gap: 0.7rem;
  width: max-content;
  animation: marquee 70s linear infinite;
  will-change: transform;
}
.greetings-band:hover .greetings-track,
.greetings-band:focus-within .greetings-track { animation-play-state: paused; }
.greeting-card {
  flex: 0 0 clamp(210px, 22vw, 260px);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(243, 198, 74, 0.22);
  border-radius: 14px;
  padding: 0.7rem 0.85rem;
}
.greeting-top { display: flex; align-items: center; gap: 0.5rem; margin-bottom: 0.35rem; }
.greeting-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 800;
  color: #04291a;
  background: linear-gradient(135deg, #fff2c4, var(--gold));
  flex: none;
}
.greeting-name { display: block; color: #fff; font-size: 0.85rem; line-height: 1.3; }
.greeting-role { display: block; color: rgba(243, 198, 74, 0.85); font-size: 0.68rem; font-style: normal; }
/* زر إعجاب واحد أسفل الشريط */
.greetings-like { margin-top: 0.55rem; display: flex; justify-content: flex-start; }
.greetings-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(243, 198, 74, 0.4);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.88);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.greetings-like-btn:hover,
.greetings-like-btn:focus-visible {
  background: rgba(243, 198, 74, 0.16);
  border-color: var(--gold);
  color: #fff;
}
.greetings-like-btn:disabled { opacity: 0.7; cursor: default; }
.greetings-like-icon {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.9rem;
  line-height: 1;
  transition: color 0.18s ease, transform 0.18s ease;
}
.greetings-like-btn:hover .greetings-like-icon { color: #ff8a80; }
.greetings-like-btn.liked {
  background: rgba(243, 198, 74, 0.92);
  border-color: var(--gold);
  color: #04291a;
}
.greetings-like-btn.liked .greetings-like-icon { color: #b3261e; transform: scale(1.1); }
.greetings-like-btn.liked .greetings-like-count { background: rgba(4, 41, 26, 0.16); color: #04291a; }
.greetings-like-count {
  min-width: 1.5rem;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.7rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.greeting-body {
  margin: 0;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8rem;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- الأقسام ---------- */
.section[hidden],
.messages[hidden],
.celebrants-band[hidden],
.cta-section[hidden] { display: none !important; }

.section { padding-block: clamp(3.2rem, 7vw, 6rem); position: relative; }
.section-dark { background: linear-gradient(170deg, #021b11, #04291a 60%, #032416); color: #fff; }
.section-dark .section-sub { color: rgba(255, 255, 255, 0.62); }
.section-dark h2 { color: #fff; }
.section-green {
  background:
    radial-gradient(700px 380px at 88% 10%, rgba(243, 198, 74, 0.16), transparent 60%),
    linear-gradient(160deg, #032416, #046a38 120%);
  color: #fff;
}
.section-green .section-sub { color: rgba(255, 255, 255, 0.7); }
.section-head { max-width: 720px; margin-bottom: clamp(1.8rem, 4vw, 2.8rem); }
.section-head h2 { font-size: clamp(1.8rem, 4.2vw, 2.7rem); }
.section-sub { color: var(--muted); font-size: 0.98rem; margin: 0; }

/* ---------- الإحصائيات ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin-bottom: 1.4rem;
}
.stat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.2rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-deep), var(--gold), var(--gold-deep));
  opacity: 0.85;
}
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.stat-icon { font-size: 1.4rem; display: block; margin-bottom: 0.35rem; }
.stat-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.5rem);
  color: var(--green-700);
  line-height: 1.1;
}
.stat-card span:last-child { font-size: 0.82rem; color: var(--muted); }

.engagement { display: grid; grid-template-columns: 1fr 1.1fr; gap: 1rem; }
.engagement-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  box-shadow: var(--shadow-sm);
}
.engagement-card h3 { font-size: 1.15rem; margin-bottom: 1rem; color: var(--green-700); }
.engagement-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; text-align: center; }
.engagement-row strong { display: block; font-family: var(--font-display); font-size: 1.7rem; color: var(--ink); }
.engagement-row span { font-size: 0.78rem; color: var(--muted); }

.chart { display: flex; align-items: flex-end; gap: 0.5rem; height: 120px; padding-top: 0.4rem; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 0.3rem; height: 100%; }
.chart-bars { flex: 1; display: flex; align-items: flex-end; gap: 3px; width: 100%; justify-content: center; }
.chart-bar { width: 42%; border-radius: 5px 5px 2px 2px; min-height: 3px; transition: height 0.5s ease; }
.chart-bar.views { background: linear-gradient(180deg, var(--green-600), var(--green-700)); }
.chart-bar.regs { background: linear-gradient(180deg, var(--gold), var(--gold-deep)); }
.chart-day { font-size: 0.66rem; color: var(--muted); }
.chart-legend { display: flex; gap: 1rem; font-size: 0.75rem; color: var(--muted); margin-top: 0.6rem; }
.chart-legend span::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-inline-end: 5px; }
.lg-views::before { background: var(--green-600); }
.lg-regs::before { background: var(--gold); }

/* ---------- البرنامج ---------- */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute;
  inset-block: 10px;
  inset-inline-start: 92px;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(243, 198, 74, 0.55), transparent);
}
.timeline li {
  display: grid;
  grid-template-columns: 82px 1fr;
  gap: 1.6rem;
  padding-block: 0.95rem;
  position: relative;
}
.timeline li::after {
  content: "";
  position: absolute;
  inset-inline-start: 86px;
  top: 1.65rem;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 5px rgba(243, 198, 74, 0.16);
}
.timeline time {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--gold);
  text-align: end;
  font-variant-numeric: tabular-nums;
  padding-top: 0.1rem;
}
.timeline .tl-body { padding-inline-start: 1rem; }
.timeline h3 { font-size: 1.15rem; margin-bottom: 0.15rem; color: #fff; }
.timeline p { margin: 0; color: rgba(255, 255, 255, 0.6); font-size: 0.9rem; }

/* ---------- المعرض ---------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 1rem; }
.gallery figure {
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  cursor: zoom-in;
  background: var(--green-800);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  aspect-ratio: 4 / 5;
}
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1); }
.gallery figure:hover img { transform: scale(1.06); }
.gallery figcaption {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  padding: 1.6rem 1rem 0.9rem;
  background: linear-gradient(180deg, transparent, rgba(2, 27, 17, 0.9));
  color: #fff;
  font-size: 0.85rem;
}
.gallery figcaption strong { display: block; font-family: var(--font-display); font-size: 1.02rem; }
.gallery figcaption span { color: rgba(255, 255, 255, 0.65); font-size: 0.76rem; }

/* ---------- التسجيل ---------- */
.register-wrap { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; }
.register-intro h2 { font-size: clamp(1.8rem, 4.4vw, 2.8rem); }
.register-intro p { color: rgba(255, 255, 255, 0.76); }
.register-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(243, 198, 74, 0.35);
  border-radius: 18px;
  padding: 0.75rem 1.2rem;
  margin-top: 0.5rem;
}
.register-badge strong { font-family: var(--font-display); font-size: 1.9rem; color: var(--gold); line-height: 1; }
.register-badge span { font-size: 0.85rem; color: rgba(255, 255, 255, 0.8); }
.hint { font-size: 0.8rem; color: rgba(255, 255, 255, 0.55); margin-top: 0.7rem; }

.card {
  background: var(--paper);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--ink);
}
.form-card { padding: clamp(1.3rem, 3vw, 1.9rem); }
.form-card h3 { font-size: 1.2rem; color: var(--green-700); margin-bottom: 1rem; }

.field { display: block; margin-bottom: 1rem; }
.field > span { display: block; font-size: 0.85rem; font-weight: 700; color: var(--ink); margin-bottom: 0.4rem; }
.field input, .field textarea {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  border: 1.5px solid rgba(4, 106, 56, 0.18);
  background: #fcfdfb;
  color: var(--ink);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--green-600);
  box-shadow: 0 0 0 4px rgba(11, 138, 75, 0.12);
}
.form-msg { min-height: 1.4rem; font-size: 0.85rem; margin: 0.7rem 0 0; color: var(--muted); }
.form-msg.error { color: #b3261e; }
.form-msg.ok { color: var(--green-700); font-weight: 700; }

.success { text-align: center; padding: 0.6rem 0; }
.success-mark {
  width: 62px; height: 62px;
  margin: 0 auto 0.8rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  color: #fff;
  background: linear-gradient(135deg, var(--green-600), var(--green-700));
  box-shadow: 0 12px 26px rgba(4, 106, 56, 0.28);
}
.success h3 { color: var(--green-700); font-size: 1.35rem; }
.success p { color: var(--muted); font-size: 0.92rem; }
.code-line { font-size: 0.9rem; }
.code-line code {
  font-family: ui-monospace, monospace;
  background: rgba(243, 198, 74, 0.18);
  border: 1px dashed rgba(200, 147, 31, 0.5);
  padding: 0.2rem 0.55rem;
  border-radius: 8px;
  color: #7a5710;
  font-weight: 700;
  letter-spacing: 1px;
}
.success-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; justify-content: center; margin-top: 1rem; }

/* ---------- المشاركة بضغطة واحدة ---------- */
.participate-wrap { text-align: center; display: grid; justify-items: center; gap: 0.4rem; }
.participate-wrap h2 { margin-bottom: 0.2rem; }
.participate-text { color: rgba(255, 255, 255, 0.78); max-width: 620px; margin: 0 auto 1.2rem; }
.participate-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.95rem 2.4rem;
  border: 3px solid var(--gold);
  border-radius: 999px;
  background: linear-gradient(140deg, var(--gold-soft), var(--gold));
  color: #04291a;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 4vw, 1.7rem);
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 0 0 10px rgba(243, 198, 74, 0.14), 0 16px 34px rgba(0, 0, 0, 0.3);
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.2s ease;
}
.participate-btn:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 0 0 14px rgba(243, 198, 74, 0.18), 0 20px 40px rgba(0, 0, 0, 0.34); }
.participate-btn:active:not(:disabled) { transform: scale(0.97); }
.participate-btn:disabled { cursor: default; opacity: 0.82; }
.participate-btn.done { background: linear-gradient(140deg, #d7f5e4, #9fe0bd); border-color: #7fd0a4; }
.participate-icon { font-size: 1.6em; line-height: 1; }
.participate-count { margin-top: 1.1rem; }
.participate-count strong { display: block; font-family: var(--font-display); font-size: clamp(2rem, 6vw, 2.9rem); color: var(--gold); line-height: 1.1; }
.participate-count span { font-size: 0.9rem; color: rgba(255, 255, 255, 0.78); }

.avatar {
  width: 38px; height: 38px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
  color: #04291a;
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
}
.empty { color: var(--muted); font-size: 0.9rem; }

/* ---------- الآراء ---------- */
.voices-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 1.4rem; align-items: start; }
.voice-form h3 { color: var(--green-700); }
.voices-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 0.9rem; }
.voice-card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(243, 198, 74, 0.2);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  position: relative;
}
.voice-card::before {
  content: "”";
  font-family: var(--font-display);
  position: absolute;
  inset-inline-end: 1rem;
  top: 0.1rem;
  font-size: 3rem;
  color: rgba(243, 198, 74, 0.25);
  line-height: 1;
}
.voice-card p { color: rgba(255, 255, 255, 0.86); font-size: 0.94rem; margin-bottom: 0.7rem; position: relative; }
.voice-meta { display: flex; align-items: center; gap: 0.55rem; font-size: 0.78rem; color: rgba(255, 255, 255, 0.55); }
.voice-meta .avatar { width: 30px; height: 30px; font-size: 0.75rem; }
.section-dark .empty { color: rgba(255, 255, 255, 0.5); }

/* ---------- الدعوة ---------- */
.cta-section {
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(243, 198, 74, 0.22), transparent 70%),
    linear-gradient(160deg, #fdf9ef, #f7ecd2);
  border-block: 1px solid rgba(200, 147, 31, 0.2);
}
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }
.cta-inner h2 { font-size: clamp(1.6rem, 3.6vw, 2.3rem); margin-bottom: 0.3rem; }
.cta-inner p { color: var(--muted); margin: 0; max-width: 520px; }
.cta-actions { display: flex; gap: 0.7rem; flex-wrap: wrap; }

/* ---------- التذييل ---------- */
.site-footer { background: var(--green-900); color: rgba(255, 255, 255, 0.7); padding-block: 2.6rem 1.6rem; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.6rem; }
.footer-brand strong { display: block; color: #fff; font-family: var(--font-display); font-size: 1.15rem; margin-bottom: 0.4rem; }
.footer-brand p { font-size: 0.83rem; margin: 0 0 0.4rem; }
.hashtag { color: var(--gold); font-weight: 700; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.1rem; justify-content: flex-start; align-content: start; }
.footer-nav a { font-size: 0.86rem; color: rgba(255, 255, 255, 0.75); }
.footer-nav a:hover { color: var(--gold); }
.footer-copy { grid-column: 1 / -1; font-size: 0.75rem; color: rgba(255, 255, 255, 0.42); border-top: 1px solid rgba(255, 255, 255, 0.1); padding-top: 1rem; margin: 0; }

/* ---------- النوافذ ---------- */
.modal, .lightbox { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 1rem; }
.modal[hidden], .lightbox[hidden] { display: none; }
.modal-backdrop, .lightbox-backdrop { position: absolute; inset: 0; background: rgba(2, 27, 17, 0.72); backdrop-filter: blur(4px); }
.modal-card {
  position: relative;
  background: var(--paper);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  width: min(420px, 100%);
  text-align: center;
  box-shadow: var(--shadow);
  animation: pop 0.25s ease;
}
@keyframes pop { from { transform: scale(0.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-card h3 { color: var(--green-700); font-size: 1.3rem; }
.modal-card p { color: var(--muted); font-size: 0.88rem; }
.modal-close {
  position: absolute;
  inset-inline-end: 0.8rem;
  top: 0.5rem;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(4, 106, 56, 0.08);
  color: var(--green-700);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.qr-box { display: grid; place-items: center; padding: 1rem; background: #fff; border-radius: var(--radius); border: 1px solid var(--line); margin: 0.8rem 0 1.1rem; }
.qr-box svg, .qr-box img, .qr-box canvas { width: 220px; height: 220px; }
.modal-actions { display: flex; gap: 0.6rem; justify-content: center; flex-wrap: wrap; }

.lightbox-figure { position: relative; margin: 0; max-width: min(920px, 96vw); max-height: 92vh; text-align: center; }
.lightbox-figure img { max-height: 82vh; width: auto; margin-inline: auto; border-radius: var(--radius); box-shadow: var(--shadow); background: #04291a; }
.lightbox-figure figcaption { color: rgba(255, 255, 255, 0.85); margin-top: 0.8rem; font-size: 0.9rem; }
.lightbox .modal-close { inset-inline-end: -6px; top: -46px; background: rgba(255, 255, 255, 0.14); color: #fff; }

/* ---------- التنبيه ---------- */
.toast {
  position: fixed;
  inset-inline: 0;
  bottom: 1.4rem;
  margin-inline: auto;
  width: max-content;
  max-width: 92vw;
  background: #04291a;
  color: #fff;
  padding: 0.75rem 1.3rem;
  border-radius: 999px;
  border: 1px solid rgba(243, 198, 74, 0.4);
  box-shadow: var(--shadow);
  z-index: 200;
  font-size: 0.88rem;
  animation: pop 0.2s ease;
}
.toast[hidden] { display: none; }
.toast.error { background: #6b1111; border-color: rgba(255, 255, 255, 0.25); }

/* ---------- الاستجابة ---------- */
@media (max-width: 1000px) {
  .main-nav {
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    background: rgba(2, 27, 17, 0.98);
    border-bottom: 1px solid rgba(243, 198, 74, 0.2);
    padding: 0.8rem clamp(1rem, 4vw, 2.5rem) 1.2rem;
    display: none;
    gap: 0.2rem;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 0.7rem 0.4rem; border-radius: 10px; font-size: 1rem; }
  .nav-toggle { display: block; }
  .header-actions .btn-gold { display: none; }
  .header-inner { min-height: 66px; }
  html { scroll-padding-top: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  .greetings-track { animation: none; }
  .greetings-scroll { overflow-x: auto; scroll-snap-type: x proximity; }
  .greeting-card { scroll-snap-align: start; }
}

@media (max-width: 900px) {
  #installBtn { display: none; }
  .greetings-inner { grid-template-columns: 1fr; gap: 0.7rem; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .engagement { grid-template-columns: 1fr; }
  .register-wrap, .voices-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  body { font-size: 15px; }
  .brand-text strong { font-size: 0.95rem; }
  .brand-text small { display: none; }
  .header-inner { gap: 0.5rem; }
  .header-actions { gap: 0.35rem; }
  .hero { padding-block: 2.4rem 3rem; }
  .hero-title { font-size: clamp(2.1rem, 10vw, 3rem); }
  .hero-stats { gap: 1.2rem; }
  .countdown { gap: 0.4rem; }
  .cd-cell { border-radius: 14px; padding: 0.6rem 0.2rem; }
  .eyebrow { font-size: 0.72rem; padding: 0.3rem 0.8rem; }
  .hero-actions .btn { flex: 1 1 46%; }
  .greeting-card { flex-basis: 200px; }
  .timeline::before { inset-inline-start: 68px; }
  .timeline li { grid-template-columns: 58px 1fr; gap: 1.2rem; }
  .timeline li::after { inset-inline-start: 63px; }
  .timeline time { font-size: 1rem; }
  .gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.7rem; }
  .gallery figcaption { padding: 1.2rem 0.7rem 0.6rem; }
  .gallery figcaption strong { font-size: 0.9rem; }
  .stat-card { padding: 1.1rem 0.8rem; }
  .engagement-row strong { font-size: 1.4rem; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .modal-card { padding: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .messages-track { animation: none; }
  .celebrants-track { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

.main-nav .nav-admin { display: none; }

@media (max-width: 1000px) {
  .main-nav.open .nav-admin { display: flex; align-items: center; justify-content: space-between; }
  .main-nav.open .nav-admin::after { content: '↗'; font-size: 0.9rem; opacity: 0.7; }
}

@media (max-width: 700px) {
  .brand-text strong { white-space: nowrap; font-size: 0.92rem; }
  .brand-crest svg { width: 34px; height: 34px; }
  .brand-logo { width: 38px; height: 38px; }
  .header-actions { gap: 0.3rem; }
  .header-actions .admin-entry { display: none; }
}

/* ---------- صورة الشهادة ونافذة تثبيت التطبيق ---------- */
.photo-upload { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.photo-upload label { cursor: pointer; }
.photo-hint { font-size: 0.78rem; color: var(--muted); text-align: center; line-height: 1.7; }
.install-steps { margin: 0.9rem 0 0; padding-inline-start: 1.2rem; color: var(--muted); font-size: 0.9rem; line-height: 1.9; }
.install-steps li { margin-bottom: 0.45rem; }
.install-steps strong { color: var(--green-700); }
