/* =========================================================
   EVENTS PAGE — STYLES
   Same design tokens as the rest of the site.
   Gold accent, white/light-gray background, Cairo font.
========================================================= */

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --gold: #c9a84c;
  --gold-light: #f5ecd4;
  --gold-hover: #b8923e;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-800: #1f2937;

  /* category badge colors */
  --trip-bg: #dbeafe;
  --trip-text: #1d4ed8;
  --match-bg: #dcfce7;
  --match-text: #15803d;
  --competition-bg: #fef9c3;
  --competition-text: #a16207;
  --workshop-bg: #ede9fe;
  --workshop-text: #6d28d9;
  --celebration-bg: #fce7f3;
  --celebration-text: #be185d;

  --radius-card: 16px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07), 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.09);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.14);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 7rem;
}

body {
  font-family: "Cairo", sans-serif;
  background: var(--gray-50);
  color: var(--gray-800);
  direction: rtl;
  min-height: 100vh;
}

/* =========================================================
   HEADER
========================================================= */
.page-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 18px 32px;
  display: flex;
  align-items: center;
  gap: 14px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-icon {
  width: 42px;
  height: 42px;
  background: var(--gold-light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.header-title {
  font-size: 19px;
  font-weight: 700;
}
.header-sub {
  font-size: 12px;
  color: var(--gray-400);
  margin-top: 1px;
}
.back-link {
  margin-right: auto;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
  transition: color 0.2s var(--ease);
}
.back-link:hover {
  color: var(--gold-hover);
}

main {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px 100px;
}

/* =========================================================
   SHARED SECTION HEADERS
========================================================= */
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 6px;
}
.section-label::before {
  content: "";
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--gold);
}
.section-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 22px;
}

/* =========================================================
   HERO
========================================================= */
/* Hero Section Styling */
/* ══ HERO ══ */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
  padding: 120px 28px 80px;

  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #eef2ff 100%);
}
.hero-content {
  max-width: 820px;
  text-align: center;
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  border-radius: 100px;
  background: var(--gold-dim);
  border: 1px solid rgba(201, 168, 76, 0.25);
  color: var(--gold-light);
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 36px;
  opacity: 0;
  animation: fadeUp 0.7s 0.1s forwards;
}
.eyebrow-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse 2s ease infinite;
}
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

.hero-title {
  font-family: "Cairo", sans-serif;
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 28px;
}
.hero-title .line {
  display: block;
  opacity: 0;
  transform: translateY(40px);
  animation: fadeUp 0.7s forwards;
}
.hero-title .line:nth-child(1) {
  animation-delay: 0.2s;
}
.hero-title .line:nth-child(2) {
  animation-delay: 0.35s;
  color: var(--gold);
}
.hero-title .line:nth-child(3) {
  animation-delay: 0.5s;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-sub {
  font-size: 1.15rem;
  color: var(--muted);
  line-height: 1.8;
  max-width: 560px;
  margin: 0 auto 44px;
  opacity: 0;
  animation: fadeUp 0.7s 0.65s forwards;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  opacity: 0;
  animation: fadeUp 0.7s 0.8s forwards;
  margin-bottom: 72px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gold) 0%, #a07828 100%);
  color: #0a0a0f;
  font-weight: 800;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.3s;
  font-family: "Tajawal", sans-serif;
  box-shadow: 0 8px 32px rgba(201, 168, 76, 0.3);
}
.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 48px rgba(201, 168, 76, 0.45);
}
.btn-primary:active {
  transform: translateY(0);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font-weight: 700;
  font-size: 1rem;
  border: 1px solid var(--border2);
  cursor: pointer;
  transition: all 0.3s;
  font-family: "Tajawal", sans-serif;
}
.btn-outline:hover {
  background: var(--surface2);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* ── Hero stats row ── */
.hero-stats {
  display: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  opacity: 0;
  animation: fadeUp 0.7s 1s forwards;
  max-width: 680px;
  margin: 0 auto;
}
.hstat {
  background: var(--surface);
  padding: 24px 16px;
  text-align: center;
  transition: background 0.2s;
}
.hstat:hover {
  background: var(--surface2);
}
.hstat-num {
  font-family: "Cairo", sans-serif;
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 6px;
}
.hstat-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.hero-content {
  max-width: 600px;
  text-align: right; /* النص يمين */
}

.hero-content h1 {
  font-size: 3rem;
  color: #ffd700; /* دهبي */
  margin-bottom: 20px;
  font-weight: 700;
}

.hero-content p {
  font-size: 1.2rem;
  line-height: 1.8;
  margin-bottom: 30px;
}

.cta-btn {
  background-color: #ffd700;
  color: #000;
  padding: 12px 28px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.3s ease;
}

.cta-btn:hover {
  background-color: #fff;
  color: #000;
}

#hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 100px 40px;

  background: url("../../images/احداث المنصة.webp");
  background-size: cover;
  background-position: center;
}

/* طبقة فوق الصورة */
.hero-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.35);
}

/* الكونتينر */
.hero-container {
  position: relative;
  z-index: 2;
  max-width: 1200px;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr 1fr;

  align-items: center;
  gap: 40px;
}

/* النص */
.hero-text {
  color: white;
  text-align: right;
}

/* badge */
.hero-badge {
  display: inline-block;
  background: rgba(201, 168, 76, 0.2);
  color: var(--gold);
  padding: 6px 16px;
  border-radius: 100px;
  font-size: 0.8rem;
  margin-bottom: 20px;
}

/* العنوان */
.hero-title {
  font-size: 3rem;
  font-weight: 900;
  font-family: "Cairo", sans-serif;
  margin-bottom: 20px;

  color: #ffffff;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);

  background: linear-gradient(90deg, #c9a84c, #e8c96d);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* النص */
.hero-desc {
  color: #e5e7eb;
  line-height: 1.8;
  margin-bottom: 30px;
}

/* الأزرار */
.hero-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 30px;
}

/* stats */
.hero-stats {
  display: flex;
  gap: 40px;
}

.hero-stats .num {
  font-size: 1.6rem;
  font-weight: 900;
  color: var(--gold);
}

.hero-stats .label {
  display: block;
  font-size: 0.8rem;
  color: #d1d5db;
}

/* الصورة */
.hero-image img {
  width: 100%;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

/* موبايل */
@media (max-width: 768px) {
  .hero-container {
    grid-template-columns: 1fr;
  }

  .hero-text {
    text-align: center;
  }

  .hero-actions {
    justify-content: center;
  }
}
main {
  max-width: 880px;
  margin: 0 auto;
  padding: 44px 24px 100px;
}

.hero-btns {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--gold);
  color: var(--white);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(201, 168, 76, 0.35);
  transition:
    background 0.2s,
    transform 0.2s,
    box-shadow 0.2s;
}
.btn-primary:hover {
  background: var(--gold-hover);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(201, 168, 76, 0.42);
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  background: var(--white);
  color: var(--gray-800);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  border: 1.5px solid var(--gray-200);
  border-radius: 999px;
  text-decoration: none;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}
/* =========================================================
   EVENTS SECTION
========================================================= */
.events-section {
  margin-bottom: 60px;
}

/* Filter tabs */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}
.filter-tab {
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all 0.2s var(--ease);
}
.filter-tab:hover {
  border-color: var(--gold);
  color: var(--gold);
}
.filter-tab.active {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
  box-shadow: 0 4px 12px rgba(201, 168, 76, 0.3);
}

/* Events grid */
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

/* Event card */
.event-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition:
    border-color 0.2s var(--ease),
    box-shadow 0.2s var(--ease),
    transform 0.2s var(--ease);
}
.event-card:hover {
  border-color: var(--gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.event-card-top {
  background: var(--gold-light);
  padding: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}
.event-emoji {
  font-size: 36px;
  line-height: 1;
}

/* Category badges */
.event-badge {
  font-size: 11px;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 10px;
  flex-shrink: 0;
  margin-top: 4px;
}
.badge-trip {
  background: var(--trip-bg);
  color: var(--trip-text);
}
.badge-match {
  background: var(--match-bg);
  color: var(--match-text);
}
.badge-competition {
  background: var(--competition-bg);
  color: var(--competition-text);
}
.badge-workshop {
  background: var(--workshop-bg);
  color: var(--workshop-text);
}
.badge-celebration {
  background: var(--celebration-bg);
  color: var(--celebration-text);
}

.event-body {
  padding: 16px;
  flex: 1;
}
.event-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}
.event-desc {
  font-size: 12.5px;
  color: var(--gray-600);
  line-height: 1.6;
  margin-bottom: 12px;
}

.event-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.event-detail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--gray-400);
}
.event-detail span:first-child {
  font-size: 13px;
}

.event-card-footer {
  padding: 10px 16px 14px;
  border-top: 1px solid var(--gray-100);
}
.event-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 4px 10px;
}
.status-upcoming {
  background: #fef9c3;
  color: #a16207;
}
.status-past {
  background: #dcfce7;
  color: #15803d;
}

/* Empty events */
.empty-events {
  text-align: center;
  padding: 60px 0;
}
.empty-icon {
  font-size: 48px;
  margin-bottom: 14px;
}
.empty-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--gray-800);
  margin-bottom: 8px;
}
.empty-sub {
  font-size: 13px;
  color: var(--gray-400);
  line-height: 1.7;
}

/* =========================================================
   GALLERY SECTION
========================================================= */
.gallery-section {
  margin-bottom: 60px;
}

/* Empty gallery state */
.empty-gallery-inner {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-card);
  padding: 40px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.gallery-empty-icon {
  font-size: 44px;
  margin-bottom: 12px;
}
.gallery-placeholder-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
  margin-top: 20px;
  opacity: 0.35;
}
.placeholder-cell {
  aspect-ratio: 1;
  background: var(--gray-100);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

/* Gallery group */
.gallery-group {
  margin-bottom: 36px;
}
.gallery-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--gold-light);
}
.gallery-group-title {
  font-size: 16px;
  font-weight: 700;
}
.gallery-group-date {
  font-size: 12px;
  color: var(--gray-400);
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.gallery-item {
  border-radius: 12px;
  overflow: hidden;
  background: var(--gray-100);
  aspect-ratio: 4/3;
  cursor: pointer;
  position: relative;
  transition:
    transform 0.2s var(--ease),
    box-shadow 0.2s var(--ease);
}
.gallery-item:hover {
  transform: scale(1.02);
  box-shadow: var(--shadow-md);
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.gallery-caption {
  position: absolute;
  bottom: 0;
  right: 0;
  left: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.6));
  color: #fff;
  font-size: 11.5px;
  padding: 20px 10px 8px;
  opacity: 0;
  transition: opacity 0.2s var(--ease);
}
.gallery-item:hover .gallery-caption {
  opacity: 1;
}

.gallery-video {
  cursor: default;
}
.gallery-video:hover {
  transform: none;
}
.gallery-video iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* =========================================================
   LIGHTBOX
========================================================= */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  flex-direction: column;
  gap: 12px;
}
.lightbox.is-hidden {
  display: none;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  left: 18px;
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  border-radius: 10px;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.lightbox-caption {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

/* =========================================================
   UTILITIES
========================================================= */
.is-hidden {
  display: none !important;
}

/* =========================================================
   RESPONSIVE
========================================================= */
@media (max-width: 900px) {
  .events-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .gallery-placeholder-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}
@media (max-width: 640px) {
  main {
    padding: 0 16px 80px;
  }
  .page-header {
    padding: 14px 18px;
  }
  .hero-title {
    font-size: 24px;
  }
  .events-grid {
    grid-template-columns: 1fr;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  .gallery-placeholder-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .hero-pills {
    gap: 8px;
  }
}
.logo-img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 50%;
}
.whatsapp-btn {
  display: inline-block;
  margin-right: 10px;
  padding: 6px 12px;
  background-color: #25d366;
  color: white;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
}
.whatsapp-btn:hover {
  background-color: #1ebe5d;
}
.gallery-items {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

.gallery-items .gallery-item {
  border-radius: 12px;
  overflow: hidden;
  background: var(--gray-100);
  aspect-ratio: 4/3;
  position: relative;
}

.gallery-items img,
.gallery-items video,
.gallery-items iframe {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: none;
}

/* موبايل */
@media (max-width: 640px) {
  .gallery-items {
    grid-template-columns: 1fr;
  }
}
