/* ==========================================================================
   Africangem — Events page styles
   NOTE: This file is self-contained (matching the pattern of index.css,
   contact.css, etc.) since each page loads its own single stylesheet.
   Colors/spacing below are a best-effort match inferred from the shared
   markup (fonts, CSS var names like --ink already used inline elsewhere).
   If this doesn't match your real palette, swap the :root values below —
   everything else references them, so one edit updates the whole page.
   ========================================================================== */

:root {
  --cream: #fbf3e7;
  --cream-alt: #f4e9d8;
  --ink: #2a2118;
  --ink-soft: #6b5d4c;
  --primary: #3f6b4b;
  --primary-dark: #2e4f38;
  --accent: #c1622b;
  --line: #e6dac5;
  --white: #ffffff;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 20px 40px -22px rgba(42, 33, 24, 0.28);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-family: 'Caveat', cursive;
  font-size: 22px;
  font-weight: 700;
  color: var(--accent);
  display: inline-block;
  margin-bottom: 10px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 15px;
  border: 2px solid transparent;
  transition: transform .15s ease, opacity .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn-outline.on-cream { border-color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
.btn-sm { padding: 9px 18px; font-size: 13px; }

.btn-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  color: var(--primary-dark);
  background: none;
  border: none;
  padding: 0;
  font-size: 15px;
}
.btn-link:hover { color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(251, 243, 231, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 24px;
}
.logo {
  font-family: 'Caveat', cursive;
  font-size: 30px;
  font-weight: 700;
  color: var(--primary-dark);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-weight: 600;
  font-size: 15px;
}
.nav-links > a { padding: 6px 2px; border-bottom: 2px solid transparent; }
.nav-links > a:hover, .nav-links > a.current { border-color: var(--accent); color: var(--primary-dark); }

.has-dropdown { position: relative; }
.has-dropdown > button {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + 14px);
  left: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 8px;
  min-width: 210px;
  display: flex;
  flex-direction: column;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all .15s ease;
}
.has-dropdown.open .dropdown-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-menu a { padding: 10px 12px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.dropdown-menu a:hover { background: var(--cream-alt); }

.header-actions { display: flex; align-items: center; gap: 12px; }
.menu-toggle { display: none; background: none; border: none; color: var(--ink); }

.mobile-panel {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 10px 24px 20px;
  border-top: 1px solid var(--line);
}
.mobile-panel a { padding: 12px 4px; font-weight: 600; border-bottom: 1px solid var(--line); }
.mobile-panel a.btn { border-bottom: none; text-align: center; margin-top: 8px; }
.mobile-panel.open { display: flex; }

@media (max-width: 880px) {
  .nav-links, .header-actions .btn { display: none; }
  .menu-toggle { display: block; }
}

/* ---------- Page hero ---------- */
.page-hero {
  padding: 64px 0 40px;
  text-align: center;
}
.page-hero h1 {
  font-size: clamp(34px, 5vw, 52px);
  line-height: 1.08;
  margin: 0 0 16px;
  font-weight: 800;
}
.page-hero p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--ink-soft);
  font-size: 17px;
  line-height: 1.6;
}

/* ---------- Filter bar ---------- */
.filter-bar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 30px;
}
.filter-btn {
  background: var(--white);
  border: 1px solid var(--line);
  color: var(--ink-soft);
  padding: 10px 20px;
  border-radius: 100px;
  font-weight: 700;
  font-size: 14px;
  transition: all .15s ease;
}
.filter-btn:hover { border-color: var(--primary); color: var(--primary-dark); }
.filter-btn.active { background: var(--primary); border-color: var(--primary); color: var(--white); }

/* ---------- Events grid ---------- */
.events-section { padding: 20px 0 80px; }
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 40px;
}
.event-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}
.event-card.hidden { display: none; }

.event-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.event-img img { width: 100%; height: 100%; object-fit: cover; }
.event-date-badge {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--white);
  border-radius: 12px;
  padding: 8px 12px;
  text-align: center;
  line-height: 1.1;
  box-shadow: 0 8px 18px -8px rgba(0,0,0,0.35);
}
.event-date-badge strong { display: block; font-size: 18px; color: var(--ink); }
.event-date-badge span { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); font-weight: 700; }
.event-tag {
  position: absolute;
  bottom: 14px;
  left: 14px;
  background: rgba(42, 33, 24, 0.75);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 100px;
  backdrop-filter: blur(4px);
}
.event-photo-count {
  position: absolute;
  bottom: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(42, 33, 24, 0.75);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 11px;
  border-radius: 100px;
  backdrop-filter: blur(4px);
}

.event-body { padding: 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.event-body h3 { margin: 0; font-size: 20px; line-height: 1.25; }
.event-body > p { margin: 0; color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; flex: 1; }

.event-meta { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.event-meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--ink-soft);
  font-weight: 600;
}
.event-meta-item svg { flex-shrink: 0; color: var(--primary); }

.event-details-btn { margin-top: 6px; align-self: flex-start; }

.events-empty {
  display: none;
  text-align: center;
  color: var(--ink-soft);
  font-size: 15px;
  padding: 40px 0 0;
}
.events-empty.show { display: block; }

@media (max-width: 980px) {
  .events-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .events-grid { grid-template-columns: 1fr; }
}

/* ---------- Event details modal ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 15, 10, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease;
  z-index: 1000;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal-box {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 560px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  position: relative;
}
.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,0.9);
  border: none;
  border-radius: 100px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  z-index: 2;
}
.modal-media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--cream);
}
.modal-carousel-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform .4s ease;
}
.modal-carousel-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; }

.modal-carousel-btn {
  display: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 100%;
  border: none;
  background: rgba(20, 15, 10, 0.5);
  color: var(--white);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
}
.modal-carousel-btn:hover { background: rgba(20, 15, 10, 0.75); }
.modal-carousel-btn.prev { left: 12px; }
.modal-carousel-btn.next { right: 12px; }

.modal-carousel-dots {
  display: none;
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  gap: 6px;
  z-index: 2;
}
.modal-carousel-dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 100%;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
}
.modal-carousel-dot.active { background: var(--white); }

/* Controls only make sense once there's more than one photo. */
.modal-media.has-carousel .modal-carousel-btn,
.modal-media.has-carousel .modal-carousel-dots {
  display: flex;
}

.modal-info { padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.modal-info h3 { margin: 4px 0 0; font-size: 22px; }
.modal-info > p { margin: 0; color: var(--ink-soft); line-height: 1.6; }
.modal-info .event-meta { margin-top: 6px; }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--primary-dark);
  color: var(--white);
  text-align: center;
  padding: 70px 0;
}
.cta-banner h2 { font-size: clamp(26px, 4vw, 36px); margin: 0 0 12px; }
.cta-banner p { margin: 0 0 28px; opacity: .85; }
.cta-banner .btn-outline { border-color: var(--white); color: var(--white); }
.cta-banner .btn-outline:hover { background: var(--white); color: var(--primary-dark); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- Footer ---------- */
footer { background: var(--ink); color: rgba(255,255,255,0.82); padding: 56px 0 26px; }
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 30px;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
footer .logo { color: var(--white); }
.footer-nav { display: flex; flex-wrap: wrap; gap: 22px; font-weight: 600; font-size: 14px; }
.footer-nav a:hover { color: var(--white); }
.social-row { display: flex; gap: 12px; }
.social-row a {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.08);
  border-radius: 100px;
}
.social-row a:hover { background: rgba(255,255,255,0.18); }

.disclaimer {
  font-size: 12.5px;
  line-height: 1.6;
  color: rgba(255,255,255,0.55);
  padding: 26px 0;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  font-size: 13px;
  color: rgba(255,255,255,0.55);
}
.legal-links { display: flex; gap: 18px; }
.legal-links a:hover { color: var(--white); }