/* =========================================================
   EVENT PAGE, Foundation for Better Education
   Two layouts: Listing (event.html) + Detail (../Event_cmc_camp)
   ========================================================= */

/* ============================================
   LISTING PAGE STYLES (event.html)
   ============================================ */

/* Page hero (used on listing page) */
.page-hero {
  background:
    radial-gradient(circle at 85% 10%, rgba(22,163,74,.08), transparent 55%),
    radial-gradient(circle at 15% 90%, rgba(220,38,38,.06), transparent 55%),
    linear-gradient(180deg, var(--gray-50), #fff);
  padding: 60px 0 50px;
  text-align: center;
}
.page-hero__inner {
  max-width: 720px;
  margin: 0 auto;
}
.page-hero__title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 14px 0 14px;
  color: var(--dark);
}
.page-hero__text {
  font-size: 1.05rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

/* Events grid section */
.events-grid-section {
  padding: 40px 0 80px;
  background: var(--gray-50);
}
.events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* Event Card (box) */
.event-card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 18px;
  overflow: hidden;
  transition: all .35s cubic-bezier(.4,0,.2,1);
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow-sm);
}
.event-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--primary);
}

.event-card__img {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--gray-100);
}
.event-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.event-card:hover .event-card__img img {
  transform: scale(1.05);
}

.event-card__tag {
  position: absolute;
  top: 14px;
  left: 14px;
  background: var(--primary-light);
  color: var(--primary-dark);
  padding: 6px 14px;
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: .03em;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

.event-card__body {
  padding: 18px 20px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.event-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 8px;
  font-size: .78rem;
  color: var(--gray-500);
  font-weight: 600;
}
.event-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.event-card__meta i {
  color: var(--primary);
  font-size: .8rem;
}

.event-card__title {
  font-size: 1.15rem;
  color: var(--dark);
  margin-bottom: 8px;
  line-height: 1.3;
}
.event-card__desc {
  font-size: .88rem;
  color: var(--gray-600);
  line-height: 1.5;
  margin-bottom: 14px;
}

.event-card__cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary-dark);
  font-weight: 700;
  font-size: .88rem;
  padding-top: 12px;
  border-top: 1px solid var(--gray-100);
  transition: gap .3s ease, color .3s ease;
}
.event-card__cta i {
  font-size: .8rem;
  transition: transform .3s ease;
}
.event-card:hover .event-card__cta {
  color: var(--primary);
  gap: 12px;
}
.event-card:hover .event-card__cta i {
  transform: translateX(4px);
}

/* Empty state / more coming */
.events-more {
  background: #fff;
  border: 2px dashed var(--gray-200);
  border-radius: 16px;
  padding: 36px 28px;
  text-align: center;
  margin-top: 32px;
}
.events-more i {
  font-size: 2rem;
  color: var(--gray-300);
  margin-bottom: 10px;
}
.events-more p {
  color: var(--gray-500);
  font-size: .95rem;
  margin: 0;
  font-weight: 500;
}

/* ============================================
   DETAIL PAGE STYLES (../Event_cmc_camp)
   ============================================ */

/* ---------- HERO ---------- */
.ev-hero {
  background:
    radial-gradient(circle at 85% 10%, rgba(22,163,74,.08), transparent 55%),
    radial-gradient(circle at 15% 90%, rgba(220,38,38,.06), transparent 55%),
    linear-gradient(180deg, var(--gray-50), #fff);
  padding: 60px 0 50px;
}
.ev-hero__inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.breadcrumb {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  font-size: .85rem;
  color: var(--gray-500);
  flex-wrap: wrap;
  justify-content: center;
}
.breadcrumb a {
  color: var(--gray-600);
  font-weight: 600;
  transition: color .3s ease;
}
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb i { font-size: .65rem; color: var(--gray-400); }
.breadcrumb span:last-of-type { color: var(--primary); font-weight: 600; }

.ev-hero__tags {
  display: inline-flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
  justify-content: center;
}
.ev-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-radius: 100px;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
}
.ev-badge--success {
  background: var(--primary-light);
  color: var(--primary-dark);
}
.ev-badge--category {
  background: var(--accent-light);
  color: var(--accent-dark);
}

.ev-hero__title {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  color: var(--dark);
  margin-bottom: 10px;
  line-height: 1.2;
}
.ev-hero__sub {
  font-size: 1.1rem;
  color: var(--gray-600);
  margin-bottom: 36px;
  font-weight: 500;
}

/* ---------- EVENT META ---------- */
.ev-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  max-width: 760px;
  margin: 0 auto;
}
.ev-meta__item {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  text-align: left;
  transition: all .3s ease;
}
.ev-meta__item:hover {
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}
.ev-meta__item > i {
  width: 42px; height: 42px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.ev-meta__label {
  display: block;
  font-size: .72rem;
  color: var(--gray-500);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.ev-meta__item strong {
  display: block;
  font-size: .95rem;
  color: var(--dark);
}

/* ---------- ABOUT EVENT ---------- */
.ev-about {
  padding: 70px 0 60px;
  background: #fff;
}
.ev-about__inner {
  max-width: 880px;
  margin: 0 auto;
}
.ev-about__content {
  text-align: center;
}
.ev-about__content .section-text {
  margin: 0 auto 18px;
}

.ev-highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 40px;
}
.ev-highlight {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  transition: all .3s ease;
}
.ev-highlight:hover {
  background: #fff;
  border-color: var(--primary);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.ev-highlight i {
  width: 50px; height: 50px;
  background: var(--primary);
  color: #fff;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  margin-bottom: 14px;
}
.ev-highlight strong {
  display: block;
  font-size: 1rem;
  color: var(--dark);
  margin-bottom: 6px;
}
.ev-highlight span {
  font-size: .87rem;
  color: var(--gray-600);
  line-height: 1.5;
}

/* ---------- GALLERY ---------- */
.ev-gallery {
  padding: 80px 0;
  background: var(--gray-50);
}
.section-head--center { text-align: center; }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.gallery-item {
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
  background: var(--gray-200);
  transition: all .3s ease;
}
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s ease;
}
.gallery-item:hover img { transform: scale(1.08); }

.gallery-item__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.5rem;
  opacity: 0;
  transition: opacity .3s ease;
}
.gallery-item:hover .gallery-item__overlay { opacity: 1; }

/* ---------- LIGHTBOX ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 60px 20px 90px;
  overflow: hidden;
}
.lightbox.open {
  display: flex;
  animation: lb-fade .3s ease;
}
@keyframes lb-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
.lightbox__img {
  max-width: 92vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
  cursor: zoom-in;
  transition: transform .35s ease;
  user-select: none;
  -webkit-user-drag: none;
  touch-action: none;
}
.lightbox__img.zoomed {
  cursor: grab;
}
.lightbox__img.zoomed:active,
.lightbox__img.dragging {
  cursor: grabbing;
  transition: none;
}
.lightbox__close {
  position: absolute;
  top: 20px; right: 24px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #ffffff;
  color: var(--dark);
  font-size: 1.2rem;
  cursor: pointer;
  transition: all .3s ease;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.lightbox__close:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: rotate(90deg) scale(1.05);
  box-shadow: 0 6px 20px rgba(220,38,38,.5);
}
.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  border-radius: 50%;
  background: #ffffff;
  border: 2px solid #ffffff;
  color: var(--dark);
  font-size: 1.15rem;
  cursor: pointer;
  transition: all .3s ease;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.lightbox__nav:hover {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 20px rgba(22,163,74,.5);
}
.lightbox__nav:active {
  transform: translateY(-50%) scale(0.95);
}
.lightbox__nav--prev { left: 24px; }
.lightbox__nav--next { right: 24px; }
.lightbox__counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  background: #ffffff;
  border: 2px solid #ffffff;
  color: var(--dark);
  font-size: .85rem;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 100px;
  box-shadow: 0 4px 12px rgba(0,0,0,.3);
  z-index: 10;
}
body.lb-open { overflow: hidden; }

/* ---------- VIDEO ---------- */
.ev-video {
  padding: 80px 0;
  background: #fff;
}
.video-wrap {
  max-width: 900px;
  margin: 0 auto;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #000;
  aspect-ratio: 16 / 9;
  position: relative;
}
.video-wrap video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

/* ---------- CTA ---------- */
.ev-cta {
  padding: 80px 0;
  background:
    linear-gradient(135deg, rgba(22,163,74,.95), rgba(21,128,61,.97)),
    url('https://images.unsplash.com/photo-1488521787991-ed7bbaae773c?w=1600&q=80') center/cover;
  color: #fff;
  text-align: center;
}
.ev-cta__inner {
  max-width: 720px;
  margin: 0 auto;
}
.ev-cta h2 {
  color: #fff;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 14px;
}
.ev-cta p {
  font-size: 1.05rem;
  color: rgba(255,255,255,.9);
  margin-bottom: 26px;
}
.ev-cta__buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}
.ev-cta .btn--ghost {
  color: #fff;
  border-color: rgba(255,255,255,.4);
}
.ev-cta .btn--ghost:hover {
  background: rgba(255,255,255,.1);
  border-color: #fff;
  color: #fff;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
  .events-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }
}

@media (max-width: 768px) {
  .ev-hero { padding: 40px 0 36px; }
  .page-hero { padding: 40px 0 30px; }
  .events-grid-section { padding: 30px 0 60px; }
  .events-grid { grid-template-columns: 1fr; gap: 20px; }
  .event-card__body { padding: 20px 22px 22px; }
  .event-card__title { font-size: 1.2rem; }
  .ev-meta { grid-template-columns: 1fr; gap: 10px; }
  .ev-meta__item { padding: 14px 16px; }

  .ev-about { padding: 50px 0 40px; }
  .ev-highlights { grid-template-columns: 1fr; gap: 12px; margin-top: 28px; }

  .ev-gallery, .ev-video, .ev-cta { padding: 50px 0; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  .lightbox { padding: 50px 12px 80px; }
  .lightbox__img { max-height: 78vh; }
  .lightbox__close { top: 12px; right: 12px; width: 38px; height: 38px; }
  .lightbox__nav { width: 40px; height: 40px; }
  .lightbox__nav--prev { left: 10px; }
  .lightbox__nav--next { right: 10px; }
  .lightbox__counter { bottom: 14px; font-size: .78rem; padding: 6px 14px; }

  .ev-cta__buttons { flex-direction: column; align-items: stretch; }
  .ev-cta .btn { width: 100%; }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .ev-hero__sub { font-size: 1rem; }
}
