/* ============================================================
   EVENTS PAGE – Improved UI
   Font: Playfair Display (headings) + DM Sans (body)
   ============================================================ */

:root {
  --green-primary: #4caf50;
  --green-light:   #e8f5e9;
  --green-mid:     #81c784;
  --green-deep:    #2e7d32;
  --accent-orange: #e65c00;
  --text-dark:     #1a2a1a;
  --text-mid:      #3d4f3d;
  --text-muted:    #6b7c6b;
  --border-color:  #d8e8d8;
  --card-bg:       #ffffff;
  --page-bg:       #f5faf5;
  --radius-card:   16px;
  --radius-sm:     8px;
  --shadow-card:   0 2px 12px rgba(46, 125, 50, 0.08), 0 1px 3px rgba(0,0,0,0.06);
  --shadow-hover:  0 8px 32px rgba(46, 125, 50, 0.18), 0 2px 8px rgba(0,0,0,0.08);
}

/* ---- Base ---- */
body {
  font-family: 'DM Sans', Arial, sans-serif;
  background-color: var(--page-bg);
  margin: 0;
  padding: 0;
  color: var(--text-dark);
}

/* ============================================================
   HERO / PARA SECTION
   ============================================================ */
.para {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3rem;
  max-width: 1100px;
  margin: 2.5rem auto 0;
  padding: 0 2rem;
}

.para-left { flex: 1; }

.para-left img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 0 40px 0 40px;
  border: 1.5px solid var(--border-color);
  box-shadow: var(--shadow-card);
  animation-name: none;
}

.para-right { flex: 1.2; }

.section-eyebrow {
  display: inline-block;
  font-family: 'DM Sans', sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2.5px;
  text-transform: uppercase;
  color: var(--green-primary);
  background: var(--green-light);
  border: 1px solid var(--green-mid);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.para-right h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 2rem;
  color: var(--text-dark);
  margin: 0 0 0.75rem;
  line-height: 1.25;
}

.para-right p {
  font-size: 15px;
  color: var(--text-mid);
  line-height: 1.7;
  margin: 0;
}

/* ============================================================
   SECTION HEADING
   ============================================================ */
.head {
  width: 100%;
  max-width: 640px;
  margin: 4rem auto 2.5rem;
  text-align: center;
  padding: 0 1rem;
}

.head-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--green-deep);
  background: var(--green-light);
  border: 1px solid var(--green-mid);
  padding: 5px 16px;
  border-radius: 20px;
  margin-bottom: 1rem;
}

h1 {
  font-family: 'Playfair Display', Georgia, serif;
  max-width: 100%;
  font-size: 28px;
  margin: 0.5rem auto 1rem;
  text-align: center;
  color: var(--text-dark);
  font-weight: 700;
  letter-spacing: -0.3px;
}

.head p {
  margin: auto;
  max-width: 90%;
  color: var(--text-muted);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.7;
}

.head a {
  text-decoration: none;
  color: var(--accent-orange);
  font-weight: 600;
}

/* ============================================================
   EVENTS GRID
   ============================================================ */
.events {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  padding: 2.5rem 1.5rem;
  justify-content: center;
  gap: 1.5rem;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  width: 90%;
  max-width: 1200px;
  margin: 0 auto 3rem;
}

/* ============================================================
   EVENT CARD
   ============================================================ */
.events-inner {
  position: relative;
  background: var(--card-bg);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius-card);
  min-width: 220px;
  max-width: 260px;
  flex: 1 1 220px;
  padding: 0 0 1.2rem;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  display: flex;
  flex-direction: column;
}

.events-inner:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
  border-color: var(--green-mid);
}

.card-top-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--green-primary), var(--green-mid));
  width: 100%;
}

.card-header {
  display: flex;
  align-items: flex-start;
  padding: 1rem 1.2rem 0.4rem;
  gap: 0.5rem;
}

.card-header img {
  height: 44px;
  width: 44px;
  object-fit: contain;
  opacity: 0.88;
  flex-shrink: 0;
}

.date {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--green-light);
  border: 1px solid var(--green-mid);
  color: var(--green-deep);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.5px;
  white-space: nowrap;
  position: static;
  margin: 0;
  margin-top: 6px;
  box-shadow: none;
}

.card-body {
  padding: 0.6rem 1.2rem 0.4rem;
  flex: 1;
}

.events-inner .card-body h2 {
  font-family: 'Playfair Display', serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  color: var(--green-deep);
  margin: 0 0 0.75rem;
}

.card-meta {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.events-inner .card-meta span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text-mid);
  font-weight: 400;
  font-size: 13px;
}

.fa-clock {
  padding: 5px;
  background: #e8f5e9;
  color: var(--green-deep);
  border-radius: 6px;
  font-size: 11px;
}

.fa-location-dot {
  padding: 5px 7px;
  background: #fbe9e7;
  color: #c62828;
  border-radius: 6px;
  font-size: 11px;
}

.card-footer {
  padding: 0.9rem 1.2rem 0;
}

.events-inner button,
.events-inner .btnn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: none;
  background: linear-gradient(135deg, var(--green-primary), var(--green-deep));
  color: #fff;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 24px;
  cursor: pointer;
  letter-spacing: 0.3px;
  transition: opacity 0.2s ease, transform 0.2s ease;
  box-shadow: 0 2px 8px rgba(46, 125, 50, 0.25);
}

.events-inner button:hover,
.events-inner .btnn:hover {
  opacity: 0.9;
  transform: scale(1.03);
}

/* ============================================================
   OVERLAY / MODAL
   display:none by default → JS sets display:flex to centre it
   ============================================================ */
.overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(10, 30, 10, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  justify-content: center;   /* horizontal centre */
  align-items: center;       /* vertical centre   */
  z-index: 9999;
  padding: 1rem;
  box-sizing: border-box;
}

.overlay-content {
  background-color: #fff;
  padding: 2rem 2rem 1.5rem;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.25);
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  scroll-behavior: smooth;
  position: relative;
  animation: overlayFadeIn 0.28s ease;
}

@keyframes overlayFadeIn {
  from { opacity: 0; transform: translateY(20px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.close-btn {
  position: absolute;
  top: 1rem; right: 1rem;
  background: #fbe9e7;
  border: none;
  color: #c62828;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.2s;
  z-index: 2;
}

.close-btn:hover { background: #ffcdd2; }

.overlay-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--green-deep);
  background: var(--green-light);
  border: 1px solid var(--green-mid);
  padding: 4px 14px;
  border-radius: 20px;
  margin-bottom: 0.9rem;
}

.overlay-content h3 {
  font-family: 'Playfair Display', serif;
  color: var(--text-dark);
  font-weight: 700;
  font-size: 20px;
  text-align: left;
  max-width: 90%;
  margin: 0 0 1rem;
  line-height: 1.3;
}

.overlay-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0;
}

.overlay-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-mid);
  background: var(--page-bg);
  border: 1px solid var(--border-color);
  padding: 5px 12px;
  border-radius: 20px;
}

.overlay-meta-chip .fa-clock       { background: #e8f5e9; color: var(--green-deep); }
.overlay-meta-chip .fa-location-dot { background: #fbe9e7; color: #c62828; }

.overlay-divider {
  height: 1px;
  background: var(--border-color);
  margin: 1.2rem 0;
}

.overlay-footer-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 1.4rem;
  padding: 10px 14px;
  background: var(--green-light);
  border: 1px solid var(--green-mid);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--green-deep);
  font-weight: 500;
}

/* ============================================================
   EVENT DESCRIPTION  (HTML content from DB)
   ============================================================ */
.event-description {
  color: var(--text-mid);
  font-size: 15px;
  line-height: 1.78;
  text-align: left;
}

/* Reset paragraph spacing from stored HTML */
.event-description p {
  margin: 0 0 1rem;
  color: var(--text-mid);
  font-size: 15px;
  line-height: 1.78;
  text-align: left;
}

.event-description p:last-child { margin-bottom: 0; }

/* Bold highlights inside description */
.event-description strong {
  color: var(--text-dark);
  font-weight: 600;
}

/* Bullet-style lines (🔹 lines) */
.event-description p:has(strong):not(:first-child) {
  padding-left: 0.5rem;
}

/* ============================================================
   IMAGE SLIDER
   ============================================================ */
.slider-wrap {
  position: relative;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-top: 1.2rem;
  background: #111;
  aspect-ratio: 16 / 9;
}

.slider-track {
  display: flex;
  width: 100%;
  height: 100%;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.slide {
  min-width: 100%;
  height: 100%;
  overflow: hidden;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Arrow buttons */
.slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255,255,255,0.9);
  border: none;
  color: var(--text-dark);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
  transition: background 0.2s, transform 0.2s;
  z-index: 10;
}

.slider-arrow:hover {
  background: #fff;
  transform: translateY(-50%) scale(1.1);
}

.slider-prev { left: 10px; }
.slider-next { right: 10px; }

/* Dot indicators */
.slider-dots {
  position: absolute;
  bottom: 10px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 10;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.45);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  border: 1.5px solid rgba(255,255,255,0.7);
}

.dot.active {
  background: #fff;
  transform: scale(1.3);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media screen and (max-width: 900px) {
  .para { flex-direction: column; gap: 1.5rem; padding: 1rem; }
  .para-right h2 { font-size: 1.6rem; }
}

@media screen and (max-width: 768px) {
  #p { padding-top: 5rem; }
  .head { margin: 12% auto 2rem; }

  .events {
    width: 100%;
    flex-direction: column;
    padding: 1rem;
    gap: 1rem;
    align-items: center;
  }

  .events-inner {
    width: 92%;
    max-width: 400px;
    min-width: unset;
  }

  .date { margin-left: 0; }
  .overlay-content { padding: 1.5rem 1.2rem; }
  .slider-arrow { width: 30px; height: 30px; font-size: 11px; }
}

@media screen and (max-width: 500px) {
  nav { height: 65px; }
  #nav_login { margin-left: 10rem; }
  .toggle i { margin-top: -0.23rem; line-height: 10px; }
  h1 { font-size: 22px; }
  .para-right h2 { font-size: 1.35rem; }
}