:root {
  --cream: #f7f1e4;
  --sand: #e8dcc4;
  --gold: #c7a24a;
  --gold-dark: #9a7428;
  --gold-light: #e4c878;
  --crimson: #9b1b2e;
  --forest: #1f5c3a;
  --forest-dark: #143c26;
  --ink: #16120c;
  --white: #fffdf8;
}

* { box-sizing: border-box; }

html, body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: Cairo, Tahoma, sans-serif;
  min-height: 100vh;
}

img { max-width: 100%; }
h1, h2, h3, p { overflow-wrap: break-word; }
.amiri, .page-title, .section-title, .card-title, .brand-full, .brand-short {
  font-family: Amiri, serif;
}

.wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 0.85rem;
}

.page-title { font-size: clamp(1.7rem, 1.15rem + 2.6vw, 3.15rem); line-height: 1.25; }
.section-title { font-size: clamp(1.45rem, 1.05rem + 1.8vw, 2.35rem); line-height: 1.3; }
.card-title { font-size: clamp(1.15rem, 1rem + 0.7vw, 1.45rem); line-height: 1.4; }

a.paper { color: inherit; text-decoration: none; display: block; }
.paper {
  background: linear-gradient(180deg, rgba(255,252,246,.96), rgba(247,241,228,.92));
  border: 1px solid rgba(199,162,74,.28);
  border-radius: 1.25rem;
  box-shadow: 0 18px 40px rgba(22,18,12,.12);
}

.gold-ring {
  box-shadow: 0 0 0 3px #f7f1e4, 0 0 0 5px rgba(199,162,74,.7), 0 12px 28px rgba(0,0,0,.16);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247,241,228,.95);
  border-bottom: 1px solid rgba(199,162,74,.3);
  backdrop-filter: blur(10px);
}

.header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .55rem .85rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 999px;
  object-fit: cover;
}

.brand span { min-width: 0; line-height: 1.2; }
.brand-short { display: block; color: var(--forest-dark); }
.brand-full { display: none; color: var(--forest-dark); }
.brand small { display: none; color: var(--gold-dark); font-size: .75rem; }

.desktop-nav { display: none; gap: .2rem; }
.desktop-nav a {
  color: var(--forest-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: .9rem;
  padding: .5rem .7rem;
  border-radius: 999px;
  white-space: nowrap;
}
.desktop-nav a:hover { background: rgba(199,162,74,.15); color: var(--crimson); }

.menu-btn {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 999px;
  border: 1px solid rgba(199,162,74,.4);
  background: transparent;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: .28rem;
}
.menu-btn span { display: block; width: 1.15rem; height: 2px; background: var(--forest-dark); }

.mobile-nav {
  display: flex;
  flex-direction: column;
  padding: .75rem 1rem 1rem;
  background: var(--cream);
  border-top: 1px solid rgba(199,162,74,.2);
}
.mobile-nav[hidden] { display: none !important; }
.mobile-nav a {
  padding: .85rem 1rem;
  text-decoration: none;
  color: var(--forest-dark);
  font-weight: 700;
  border-radius: 1rem;
}

.hero {
  background:
    radial-gradient(circle at 12% 20%, rgba(199,162,74,.18), transparent 36%),
    radial-gradient(circle at 88% 8%, rgba(155,27,46,.16), transparent 32%),
    radial-gradient(circle at 70% 90%, rgba(31,92,58,.14), transparent 34%),
    linear-gradient(180deg, #143c26 0%, #1f5c3a 42%, #0f2418 100%);
  color: var(--cream);
  overflow: hidden;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem .85rem;
  gap: 1.5rem;
}
.pill {
  display: inline-flex;
  border: 1px solid rgba(199,162,74,.4);
  background: rgba(255,255,255,.1);
  border-radius: 999px;
  padding: .3rem .9rem;
  color: var(--gold-light);
  font-size: .8rem;
}
.hero h1 { margin: .6rem 0 0; }
.hero .slogan { color: var(--gold-light); font-size: 1.15rem; }
.hero .intro { max-width: 40rem; line-height: 2; color: var(--sand); font-size: .95rem; }
.hero-actions { display: flex; flex-direction: column; gap: .75rem; width: 100%; }
.btn {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  padding: .8rem 1.4rem;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  font-family: inherit;
}
.btn-gold { background: var(--gold); color: var(--ink); }
.btn-line { background: transparent; color: var(--cream); border: 1px solid rgba(247,241,228,.4); }
.btn-forest { background: var(--forest); color: var(--cream); }
.btn-crimson { background: var(--crimson); color: var(--cream); }
.hero-logo {
  width: min(72vw, 22rem);
  height: min(72vw, 22rem);
  border-radius: 999px;
  object-fit: cover;
  background: var(--cream);
}

.section { padding: 2rem 0; }
.section-head { margin-bottom: 1.25rem; }
.muted { color: var(--gold-dark); font-weight: 700; font-size: .9rem; margin: 0; }
.grid { display: grid; gap: 1rem; }
.stats { display: grid; gap: .75rem; }
.stat { text-align: center; padding: 1.1rem; }
.stat p { margin: 0; }
.stat .v { margin-top: .4rem; color: var(--forest-dark); font-size: 1.2rem; }

.card { overflow: hidden; min-width: 0; }
.card img.cover { width: 100%; height: 11rem; object-fit: cover; display: block; }
.card-body { padding: 1rem; }
.card a { color: inherit; text-decoration: none; }
.meta { color: var(--gold-dark); font-size: .9rem; font-weight: 700; }

.leaders { display: grid; gap: 1rem; }
.leader { padding: 1.2rem; text-align: center; }
.avatar {
  width: 6rem;
  height: 6rem;
  border-radius: 999px;
  object-fit: cover;
  border: 4px solid rgba(199,162,74,.4);
  margin: 0 auto;
  display: block;
  background: var(--cream);
}
.role { color: var(--crimson); font-size: .8rem; font-weight: 700; }

.site-footer {
  background: var(--forest-dark);
  color: var(--cream);
  border-top: 1px solid rgba(199,162,74,.3);
}
.footer-grid { display: grid; gap: 1.5rem; padding: 2.2rem .85rem; }
.footer-brand { display: flex; gap: .8rem; }
.footer-brand img { width: 3.5rem; height: 3.5rem; border-radius: 999px; background: var(--cream); object-fit: cover; }
.footer-title { color: var(--gold-light); font-weight: 700; }
.site-footer a { display: block; color: var(--cream); text-decoration: none; margin: .35rem 0; }
.copy { text-align: center; border-top: 1px solid rgba(255,255,255,.1); margin: 0; padding: 1rem; font-size: .8rem; color: var(--sand); }

.marquee {
  overflow: hidden;
  background: var(--forest-dark);
  color: var(--cream);
  border-top: 1px solid rgba(199,162,74,.25);
  border-bottom: 1px solid rgba(199,162,74,.25);
  padding: 1.4rem 0;
}
.marquee > p { text-align: center; color: var(--gold-light); font-weight: 700; margin: 0 0 1rem; }
.marquee-mask { overflow: hidden; }
.marquee-track { display: flex; width: max-content; gap: 1.5rem; animation: marquee-rtl 42s linear infinite; }
.marquee-item { width: 6rem; text-align: center; font-size: .7rem; color: var(--sand); }
.marquee-photo {
  display: block;
  width: 4rem;
  height: 4rem;
  margin: 0 auto .4rem;
  border-radius: 999px;
  border: 2px solid rgba(199,162,74,.6);
  background: var(--cream) center/cover;
}

@keyframes marquee-rtl {
  from { transform: translateX(-50%); }
  to { transform: translateX(0); }
}

.form { display: grid; gap: 1rem; padding: 1.2rem; }
label span { display: block; font-weight: 700; color: var(--forest-dark); font-size: .9rem; }
input, textarea, select {
  width: 100%;
  margin-top: .35rem;
  border: 1px solid rgba(199,162,74,.3);
  border-radius: .8rem;
  padding: .75rem .85rem;
  font-family: inherit;
  background: #fff;
}
.err { color: var(--crimson); font-weight: 700; }
.ok { color: var(--forest); font-weight: 700; }

.gallery-grid { display: grid; gap: .75rem; }
.gallery-grid a, .gallery-grid button { position: relative; min-height: 180px; border: 0; padding: 0; border-radius: 1.25rem; overflow: hidden; cursor: pointer; display: block; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 180px; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.2rem; }
.filters button { border: 0; border-radius: 999px; padding: .5rem 1rem; font-weight: 700; cursor: pointer; background: #fff; color: var(--forest-dark); }
.filters button.on { background: var(--forest); color: var(--cream); }

.status-pill {
  display: inline-block;
  border-radius: 999px;
  padding: .2rem .7rem;
  font-size: .75rem;
  font-weight: 700;
  width: fit-content;
}
.status-scheduled { background: rgba(31,92,58,.12); color: var(--forest-dark); }
.status-coordinating { background: rgba(199,162,74,.2); color: var(--gold-dark); }
.status-unscheduled { background: rgba(155,27,46,.1); color: var(--crimson); }

.schedule-list {
  display: grid;
  gap: .55rem;
}
.schedule-head, .schedule-row {
  display: grid;
  grid-template-columns: 1.4fr .7fr 1fr .7fr .9fr;
  gap: .5rem;
  align-items: center;
  padding: .85rem 1rem;
}
.schedule-head {
  font-size: .78rem;
  font-weight: 700;
  color: var(--gold-dark);
}
.schedule-row {
  background: linear-gradient(180deg, rgba(255,252,246,.96), rgba(247,241,228,.92));
  border: 1px solid rgba(199,162,74,.28);
  border-radius: 1rem;
  color: inherit;
  text-decoration: none;
  box-shadow: 0 10px 24px rgba(22,18,12,.08);
}
.schedule-row strong { color: var(--forest-dark); }
@media (max-width: 720px) {
  .schedule-head { display: none; }
  .schedule-row {
    grid-template-columns: 1fr 1fr;
    gap: .35rem .75rem;
  }
  .schedule-row strong { grid-column: 1 / -1; }
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(22,18,12,.8);
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.lightbox figure { background: var(--cream); border-radius: 1.25rem; max-width: 56rem; width: 100%; overflow: auto; }
.lightbox img { width: 100%; max-height: 72vh; object-fit: contain; }
.lightbox figcaption { text-align: center; padding: 1rem; }

.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: linear-gradient(180deg, #143c26, #1f5c3a);
  color: var(--cream);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: .45rem;
  padding: 1.25rem;
}
.splash[hidden] { display: none !important; }
.splash img {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 999px;
  background: var(--cream);
  object-fit: cover;
}
.splash-brand { font-family: Amiri, serif; font-size: 1.15rem; margin: 0; }
.splash-to { color: var(--gold-light); font-weight: 700; margin: 0; font-size: .95rem; }
.splash-from { color: var(--sand); margin: 0; font-size: .8rem; }
.splash.fade { opacity: 0; transition: opacity .12s linear; pointer-events: none; }

.admin-bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .8rem;
  padding: .8rem;
  background: rgba(247,241,228,.95);
  border-bottom: 1px solid rgba(199,162,74,.3);
  position: sticky;
  top: 0;
  z-index: 40;
}
.tabs { display: flex; gap: .4rem; overflow-x: auto; padding: 0 .8rem .8rem; }
.tabs a, .tabs button {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: .45rem 1rem;
  text-decoration: none;
  font-weight: 700;
  border: 0;
  background: #fff;
  color: var(--forest-dark);
  cursor: pointer;
  font-family: inherit;
}
.tabs a.on, .tabs button.on { background: var(--forest); color: var(--cream); }
.admin-box { padding: 1rem; }
.thumb { width: 5rem; height: 5rem; object-fit: cover; border-radius: .8rem; border: 1px solid rgba(199,162,74,.3); }
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 1rem; overflow: hidden; }
th, td { text-align: right; padding: .75rem; border-bottom: 1px solid rgba(199,162,74,.2); font-size: .9rem; }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.login-card { width: 100%; max-width: 26rem; padding: 1.6rem; }

.center { text-align: center; }
.mt { margin-top: 1rem; }
.mb { margin-bottom: 1rem; }
.flex-between { display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap; align-items: end; }
.line-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.badge {
  display: inline-block;
  border-radius: 999px;
  background: rgba(155,27,46,.1);
  color: var(--crimson);
  padding: .2rem .7rem;
  font-size: .75rem;
  font-weight: 700;
}
.tag {
  display: inline-block;
  border-radius: 999px;
  background: rgba(199,162,74,.18);
  color: var(--gold-dark);
  padding: .25rem .7rem;
  font-size: .85rem;
}
.sand-band { background: rgba(232,220,196,.45); }
.cover-logo { object-fit: contain; padding: 1.5rem; background: var(--cream); }
.gallery-grid button .cap {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  text-align: right;
  color: var(--cream);
  padding: .85rem;
  background: linear-gradient(transparent, rgba(22,18,12,.8));
}
.gallery-grid button .cap small { display: block; color: var(--gold-light); }
.lead a { color: inherit; text-decoration: none; }
.check { display: flex; align-items: center; gap: .6rem; }
.admin-list { display: grid; gap: .5rem; }
.admin-list a, .admin-list button {
  display: block;
  width: 100%;
  text-align: right;
  border: 0;
  border-radius: 1rem;
  padding: .8rem 1rem;
  background: #fff;
  color: var(--forest-dark);
  font-weight: 700;
  text-decoration: none;
  font-family: inherit;
  cursor: pointer;
}
.admin-list a.on { background: var(--forest); color: var(--cream); }

@media (min-width: 640px) {
  .wrap { padding: 0 1.5rem; }
  .hero-inner { padding: 3.2rem 1.5rem; }
  .hero-actions { flex-direction: row; justify-content: center; width: auto; }
  .stats { grid-template-columns: repeat(3, 1fr); }
  .grid-2 { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .card img.cover { height: 13rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .brand img { width: 3rem; height: 3rem; }
}

@media (min-width: 1024px) {
  .hero-inner { flex-direction: row; text-align: right; }
  .hero-inner > div:first-child { flex: 1; }
  .hero-actions { justify-content: flex-start; }
  .menu-btn, .mobile-nav { display: none !important; }
  .desktop-nav { display: flex; }
  .brand-short { display: none; }
  .brand-full { display: block; }
  .brand small { display: block; }
  .grid-3 { grid-template-columns: 1fr 1fr 1fr; }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
  .gallery-grid { grid-template-columns: 1fr 1fr 1fr; }
  .leaders-top { grid-template-columns: 1fr 1fr; }
  .leaders-rest { grid-template-columns: 1fr 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .leader.featured { display: flex; text-align: right; gap: 1rem; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
  .splash.fade { transition: none; }
}
