/* ============ Public site: nav, hero, sections, footer ============ */

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 800;
  background: rgba(31,18,9,.92); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(201,150,46,.25);
}
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav-brand { display: flex; align-items: center; gap: 12px; }
.nav-brand img { width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--gold); }
.nav-brand .org { font-family: var(--f-display); font-weight: 700; color: var(--gold-pale); font-size: 1.1rem; line-height: 1.2; }
.nav-brand .sys { font-size: .68rem; color: var(--gold); letter-spacing: .08em; text-transform: uppercase; }
.nav-links { display: flex; gap: 22px; align-items: center; }
.nav-links a { color: var(--cream); font-size: .92rem; font-weight: 500; position: relative; }
.nav-links a::after {
  content: ''; position: absolute; left: 0; bottom: -4px; width: 0; height: 2px;
  background: var(--gold-bright); transition: width var(--t-fast);
}
.nav-links a:hover::after { width: 100%; }
.nav-toggle { display: none; background: none; border: none; color: var(--gold-bright); font-size: 1.6rem; cursor: pointer; }
.lang-select {
  background: var(--espresso-soft); color: var(--gold-pale); border: 1px solid var(--gold);
  border-radius: 8px; padding: 6px 10px; font-family: var(--f-body); font-size: .85rem; cursor: pointer;
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--espresso-deep); flex-direction: column; padding: 18px;
    border-bottom: 1px solid rgba(201,150,46,.25);
    display: none;
  }
  .nav-links.open { display: flex; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 72px 24px 88px; text-align: center; color: var(--cream);
}
.hero::before {
  content: ''; position: absolute; inset: -50%;
  background: radial-gradient(ellipse at 50% 0%, rgba(232,184,75,.14), transparent 55%);
  pointer-events: none;
}
.hero-inner { position: relative; max-width: 860px; margin: 0 auto; }
.hero-medallion { margin: 0 auto 20px; width: 92px; height: 92px; border-radius: 50%; border: 2px solid var(--gold); padding: 6px; }
.hero-medallion img { border-radius: 50%; width: 100%; height: 100%; object-fit: cover; }
.hero-title-ar {
  font-family: var(--f-arabic); direction: rtl;
  font-size: clamp(1.7rem, 4.6vw, 3rem); color: var(--gold-bright); line-height: 1.8;
}
.hero-title-en {
  font-family: var(--f-display); font-weight: 700;
  font-size: clamp(1.7rem, 4.2vw, 2.9rem); color: var(--cream); margin-top: 6px;
}
.hero-edition { font-family: var(--f-arabic); color: var(--gold-pale); font-size: 1.25rem; margin-top: 10px; direction: rtl; }
.hero-hosted { color: var(--gold-pale); opacity: .85; font-size: .95rem; max-width: 560px; margin: 14px auto 0; }
.girls-only {
  display: inline-flex; align-items: center; gap: 10px; margin-top: 22px;
  background: var(--maroon); color: #fff; padding: 8px 26px; border-radius: 40px;
  font-weight: 600; letter-spacing: .04em; box-shadow: var(--el-2);
}
.girls-only .ar { font-family: var(--f-arabic); font-size: 1.05rem; }
.somali-banner {
  display: inline-block; margin: 30px auto 16px;
  background: linear-gradient(135deg, rgba(201,150,46,.18), rgba(232,184,75,.10));
  border: 1.5px solid var(--gold);
  color: var(--gold-bright); padding: 10px 30px; border-radius: 50px;
  font-weight: 600; font-size: clamp(.95rem, 2.4vw, 1.15rem);
}
.hero-verse { margin-top: 40px; }

/* ---------- Countdown ---------- */
.countdown {
  display: flex; justify-content: center; gap: clamp(8px, 2vw, 18px);
  margin-top: 22px; flex-wrap: wrap;
}
.count-cell {
  background: var(--espresso-soft); border: 1px solid rgba(201,150,46,.4);
  border-radius: var(--radius-sm); padding: 10px 0; min-width: 74px;
}
.count-cell b {
  display: block; font-family: var(--f-display); font-size: clamp(1.5rem, 4vw, 2.2rem);
  color: var(--gold-bright); font-variant-numeric: tabular-nums;
  transition: opacity var(--t-fast);
}
.count-cell span { font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-pale); }
.countdown-label { color: var(--gold-pale); font-size: .85rem; margin-top: 14px; letter-spacing: .06em; text-transform: uppercase; }
.reg-ended-msg {
  margin-top: 18px; background: var(--maroon-soft); color: var(--maroon);
  padding: 12px 24px; border-radius: var(--radius-sm); display: inline-block; font-weight: 500;
}

/* ---------- Sections ---------- */
.section { padding: 76px 0; }
.section-dark { color: var(--cream); }

/* Category cards */
.cat-card {
  padding: 34px 24px; text-align: center; position: relative;
  border: 1.5px solid var(--gold-pale); background: #fff;
}
.cat-card .ar-label { font-family: var(--f-arabic); font-size: 1.5rem; color: var(--gold); direction: rtl; }
.cat-card h3 { font-family: var(--f-display); font-size: 1.45rem; color: var(--espresso); margin-top: 6px; }
.cat-card .note {
  margin-top: 12px; display: inline-block; font-size: .8rem;
  background: var(--gold-pale); color: #7A5A14; padding: 4px 14px; border-radius: 40px; font-weight: 600;
}
.cat-card::before {
  content: ''; position: absolute; top: 10px; left: 10px; right: 10px; bottom: 10px;
  border: 1px solid rgba(201,150,46,.25); border-radius: 10px; pointer-events: none;
}

/* How it works */
.how-strip { display: grid; gap: 20px; grid-template-columns: repeat(4, 1fr); }
@media (max-width: 719px) { .how-strip { grid-template-columns: 1fr 1fr; } }
.how-step { text-align: center; padding: 26px 14px; }
.how-step .icon {
  width: 66px; height: 66px; margin: 0 auto 14px; border-radius: 50%;
  background: var(--espresso); border: 1.5px solid var(--gold);
  display: flex; align-items: center; justify-content: center;
  transition: transform var(--t-med), box-shadow var(--t-med);
}
.how-step:hover .icon { transform: translateY(-4px); box-shadow: var(--el-gold); }
.how-step h4 { font-family: var(--f-display); font-size: 1.15rem; color: var(--espresso); }
.how-step .num { font-size: .72rem; letter-spacing: .12em; color: var(--gold); font-weight: 600; }

/* Timeline */
.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; position: relative; }
.timeline::before {
  content: ''; position: absolute; top: 33px; left: 12%; right: 12%; height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--gold-bright), var(--gold));
}
@media (max-width: 719px) {
  .timeline { grid-template-columns: 1fr; }
  .timeline::before { left: 32px; right: auto; top: 10%; bottom: 10%; width: 2px; height: auto; background: linear-gradient(180deg, var(--gold), var(--gold-bright)); }
}
.tl-item { text-align: center; position: relative; padding-top: 70px; }
.tl-dot {
  position: absolute; top: 18px; left: 50%; transform: translateX(-50%);
  width: 32px; height: 32px; border-radius: 50%; background: var(--espresso);
  border: 2px solid var(--gold-bright); z-index: 1;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-bright); font-family: var(--f-display); font-weight: 700;
}
@media (max-width: 719px) {
  .tl-item { text-align: left; padding: 0 0 8px 72px; }
  .tl-dot { left: 16px; top: 0; transform: none; }
  [dir="rtl"] .tl-item { text-align: right; padding: 0 72px 8px 0; }
  [dir="rtl"] .tl-dot { left: auto; right: 16px; }
}
.tl-item h4 { font-family: var(--f-display); font-size: 1.2rem; color: var(--gold-pale); }
.tl-item .date { color: var(--gold-bright); font-weight: 600; font-size: 1.05rem; margin-top: 2px; }
.tl-item p { font-size: .85rem; color: var(--cream); opacity: .8; margin-top: 8px; max-width: 300px; margin-left: auto; margin-right: auto; }
.dates-explain {
  max-width: 720px; margin: 44px auto 0; text-align: center;
  background: rgba(201,150,46,.10); border: 1px solid rgba(201,150,46,.3);
  border-radius: var(--radius); padding: 22px 28px; color: var(--gold-pale); font-size: .95rem;
}

/* Gallery */
.gallery-placeholder {
  border: 1.5px dashed var(--gold); border-radius: var(--radius);
  padding: 70px 24px; text-align: center; color: var(--ink-soft);
  background: rgba(201,150,46,.04);
}

/* FAQ */
.faq-list { max-width: 780px; margin: 0 auto; }
.faq-item { border-bottom: 1px solid var(--gold-pale); }
.faq-q {
  width: 100%; background: none; border: none; text-align: left; cursor: pointer;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 20px 8px; font-family: var(--f-body); font-size: 1.04rem; font-weight: 500; color: var(--espresso);
  transition: color var(--t-fast);
}
[dir="rtl"] .faq-q { text-align: right; }
.faq-q:hover { color: var(--gold); }
.faq-q .chev { transition: transform var(--t-med); flex-shrink: 0; color: var(--gold); }
.faq-item.open .faq-q .chev { transform: rotate(180deg); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height var(--t-med);
}
.faq-a p { padding: 0 8px 20px; color: var(--ink-soft); }

/* ---------- Footer ---------- */
.footer { color: var(--cream); padding: 60px 0 22px; }
.footer-grid { display: grid; gap: 36px; grid-template-columns: 1.4fr 1fr 1fr; }
@media (max-width: 719px) { .footer-grid { grid-template-columns: 1fr; } }
.footer h5 { font-family: var(--f-display); color: var(--gold-bright); font-size: 1.15rem; margin-bottom: 14px; }
.footer p, .footer a { color: var(--cream); opacity: .85; font-size: .92rem; }
.footer a:hover { opacity: 1; color: var(--gold-bright); }
.social-row { display: flex; gap: 14px; margin-top: 10px; }
.social-row a {
  width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--gold);
  display: flex; align-items: center; justify-content: center; color: var(--gold-bright);
  transition: background var(--t-fast), transform var(--t-fast);
}
.social-row a:hover { background: rgba(201,150,46,.15); transform: translateY(-2px); }
.footer-credit {
  margin-top: 44px; padding-top: 18px; border-top: 1px solid rgba(201,150,46,.2);
  text-align: center; font-size: .68rem; color: rgba(245,239,227,.35);
}

/* Public gallery grid (populated once the admin uploads photos) */
.gallery-grid-public {
  display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
}
.gallery-item {
  position: relative; border-radius: var(--radius-sm); overflow: hidden;
  box-shadow: var(--el-1); transition: box-shadow var(--t-med), transform var(--t-med);
}
.gallery-item:hover { box-shadow: var(--el-2); transform: translateY(-3px); }
.gallery-item img { width: 100%; height: 190px; object-fit: cover; display: block; }
.gallery-item figcaption {
  position: absolute; inset: auto 0 0; padding: 10px 14px;
  background: linear-gradient(0deg, rgba(43,27,18,.82), transparent);
  color: var(--cream); font-size: .82rem;
}

/* ================= Inline registration form ================= */
.reg-form { max-width: 720px; margin: 0 auto; padding: 34px clamp(20px, 4vw, 40px) 36px; }
.reg-form .field { margin-bottom: 18px; }
.reg-form .spinner {
  width: 16px; height: 16px; border: 2.5px solid rgba(43,27,18,.25);
  border-top-color: var(--espresso-deep); border-radius: 50%;
  display: inline-block; animation: spin .7s linear infinite; vertical-align: -2px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-feedback { margin-top: 6px; border-radius: var(--radius-sm); font-size: .93rem; }
.form-feedback.fb-ok, .form-feedback.fb-err {
  padding: 14px 18px; animation: fbIn 250ms ease both;
}
.form-feedback.fb-ok  { background: var(--green-soft); color: var(--green); border: 1px solid var(--green); }
.form-feedback.fb-err { background: var(--maroon-soft); color: var(--maroon); border: 1px solid var(--maroon); }
@keyframes fbIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ================= Inline status check ================= */
.status-heading {
  font-family: var(--f-display); font-size: 1.15rem; color: var(--espresso);
  margin: 26px 0 12px; text-align: center;
}
.status-card {
  background: #fff; border: 1.5px solid var(--gold-pale); border-left: 4px solid var(--gold);
  border-radius: var(--radius); padding: 20px 24px; margin-bottom: 12px; text-align: center;
  box-shadow: var(--el-1); animation: fbIn 250ms ease both;
}
[dir="rtl"] .status-card { border-left: 1.5px solid var(--gold-pale); border-right: 4px solid var(--gold); }
.status-name { font-family: var(--f-display); font-size: 1.35rem; color: var(--espresso); }
.status-badge-row { margin-top: 10px; }
.status-badge-row .badge { font-size: .92rem; padding: 6px 20px; }
.status-card .status-note { margin-top: 10px; font-size: .9rem; color: var(--ink-soft); }
.status-empty {
  margin-top: 22px; text-align: center; color: var(--ink-soft);
  background: var(--cream); border-radius: var(--radius); padding: 22px 24px;
  animation: fbIn 250ms ease both;
}
.status-loading { text-align: center; padding: 24px; }
.status-loading .spinner {
  width: 22px; height: 22px; border: 3px solid var(--cream-deep);
  border-top-color: var(--gold); border-radius: 50%;
  display: inline-block; animation: spin .7s linear infinite;
}
