/* =========================================================
   SCVSKM — EVENTS GALLERY & LIGHTBOX STYLESHEET
   Strict Theme: Cinnamon Maroon | Ivory Cream | Gold Accent
   Standard Uniform Typography Scale Applied
   Inherits Local Noto Sans & Global Layout from style.css
   ========================================================= */

/* --- 1. Main Page Card --- */
.events-page-card {
  background: #ffffff;
  border: 1.5px solid var(--card-border, #e2e8f0);
  border-radius: 14px;
  padding: 32px 28px;
  box-shadow: 0 4px 16px rgba(119, 29, 29, 0.05);
  margin-top: 15px;
  margin-bottom: 34px;
}

/* --- 2. 3-Column Event Card Gallery Grid (MeitY Style) --- */
.events-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 26px;
  margin-bottom: 34px;
}

.event-grid-card {
  background: #ffffff;
  border: 1.5px solid var(--card-border, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.event-grid-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 22px rgba(119, 29, 29, 0.12);
  border-color: var(--gold-accent, #dfc39a);
}

.event-thumb-wrap {
  width: 100%;
  height: 200px;
  position: relative;
  background: #f1f5f9;
  overflow: hidden;
}

.event-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}

.event-grid-card:hover .event-thumb-img {
  transform: scale(1.03);
}

.event-photo-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(15, 23, 42, 0.82);
  color: #ffffff;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  backdrop-filter: blur(2px);
  letter-spacing: 0.02em;
}

.event-card-body {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  background: #fffdfa;
}

.event-item-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--cinnamon-dark, #771d1d);
  margin: 0 0 10px 0;
  line-height: 1.4;
  flex: 1;
}

.event-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed var(--card-border, #e2e8f0);
  padding-top: 10px;
  margin-top: auto;
}

.event-date {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted, #475569);
}

.event-meta-tag {
  font-size: 11px;
  font-weight: 700;
  color: var(--cinnamon-primary, #a72626);
  background: var(--cinnamon-bg, #fcdada);
  border: 1px solid var(--cinnamon-light, #faaaaa);
  padding: 2px 8px;
  border-radius: 4px;
}

/* --- 3. Clean Minimal Empty State & Placeholder Boxes --- */
.events-empty-state {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  background: #fffdfa;
  border: 1px dashed var(--gold-accent, #dfc39a);
  border-radius: 10px;
  margin: 10px 0 20px 0;
}

.empty-state-text {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-muted, #475569);
  margin: 0;
  text-align: center;
}

.no-photo-box {
  width: 100%;
  height: 100%;
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  color: #94a3b8;
  font-size: 13px;
  font-weight: 600;
  border: 1px dashed var(--card-border, #e2e8f0);
}

.modal-no-photo-state {
  padding: 40px 20px;
  color: #64748b;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  background: #ffffff;
}

/* --- 4. Lightbox Modal Slider (Clean Auto-Fit, Zero Black Bars) --- */
.gallery-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.86);
  backdrop-filter: blur(6px);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.gallery-modal.show {
  display: flex;
}

.gallery-modal-dialog {
  position: relative;
  width: auto;
  max-width: 92vw;
  background: #ffffff;
  border: 2px solid var(--gold-accent, #dfc39a);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: modalZoom 0.22s ease-out;
}

@keyframes modalZoom {
  from { transform: scale(0.95); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.modal-close-btn {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--cinnamon-dark, #771d1d);
  color: #ffffff;
  border: 1.5px solid var(--gold-accent, #dfc39a);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 20px;
  cursor: pointer;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.modal-close-btn:hover {
  transform: scale(1.1);
  background-color: var(--cinnamon-primary, #a72626);
}

.modal-carousel-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
  background: #ffffff;
  overflow: hidden;
}

.carousel-view {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: auto;
}

.carousel-view img {
  width: auto;
  max-width: 90vw;
  max-height: 76vh;
  height: auto;
  object-fit: contain;
  display: block;
}

.carousel-ctrl {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(119, 29, 29, 0.85);
  color: #ffffff;
  border: 1.5px solid var(--gold-accent, #dfc39a);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.carousel-ctrl.prev { left: 14px; }
.carousel-ctrl.next { right: 14px; }

.carousel-ctrl:hover {
  background-color: var(--cinnamon-primary, #a72626);
  transform: translateY(-50%) scale(1.08);
}

.modal-caption-bar {
  background: #fffdfa;
  color: var(--cinnamon-dark, #771d1d);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1.5px solid var(--gold-accent, #dfc39a);
  font-size: 14px;
  font-weight: 700;
}

.modal-caption-title {
  color: var(--cinnamon-dark, #771d1d);
  font-size: 14px;
  line-height: 1.4;
}

.modal-caption-counter {
  font-size: 13px;
  font-weight: 800;
  color: var(--cinnamon-primary, #a72626);
  background: #fef2f2;
  padding: 3px 10px;
  border-radius: 20px;
  border: 1px solid #fecaca;
  white-space: nowrap;
}

/* --- 5. Archive Link Action Section --- */
.archive-action-wrap {
  text-align: center;
  padding-top: 26px;
  border-top: 1.5px dashed var(--card-border, #e2e8f0);
}

.archive-lead-text {
  font-size: 14px;
  color: var(--text-muted, #475569);
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.btn-archive-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--cinnamon-dark, #771d1d);
  color: #ffffff;
  padding: 10px 22px;
  font-size: 14px;
  font-weight: 600;
  border: 1.5px solid var(--gold-accent, #dfc39a);
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(119, 29, 29, 0.2);
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.btn-archive-link:hover {
  background-color: var(--cinnamon-primary, #a72626);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(119, 29, 29, 0.28);
}

/* =========================================================
   6. RESPONSIVE BREAKPOINTS (TABLET & MOBILE)
   ========================================================= */
@media (max-width: 992px) {
  .events-gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
  }
}

@media (max-width: 768px) {
  .events-page-card {
    padding: 22px 16px;
    margin-top: 10px;
  }

  .event-item-title {
    font-size: 15px;
  }

  .archive-lead-text,
  .btn-archive-link {
    font-size: 13px;
  }
}

@media (max-width: 650px) {
  .events-gallery-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .event-thumb-wrap {
    height: 180px;
  }

  .carousel-view img {
    max-height: 65vh;
    max-width: 94vw;
  }

  .carousel-ctrl {
    width: 36px;
    height: 36px;
    font-size: 15px;
  }

  .carousel-ctrl.prev { left: 8px; }
  .carousel-ctrl.next { right: 8px; }

  .modal-caption-bar {
    padding: 10px 14px;
    font-size: 12.5px;
  }

  .event-photo-count {
    font-size: 10px;
    padding: 2px 6px;
  }
}

/* =========================================================
   SIMPLE EVENT PHOTOS LINK CARD
   ========================================================= */
.event-photos-link-card {
  background: #fffdfa;
  border: 1.5px solid var(--gold-accent, #dfc39a);
  border-radius: 10px;
  padding: 18px 22px;
  margin: 20px 0 24px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.photos-link-title {
  color: var(--cinnamon-dark, #771d1d);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 4px 0;
}

.photos-link-desc {
  color: var(--text-muted, #475569);
  font-size: 13.5px;
  margin: 0;
}

.btn-view-photos {
  display: inline-flex;
  align-items: center;
  background: var(--cinnamon-dark, #771d1d);
  color: #ffffff;
  border: 1.5px solid var(--gold-accent, #dfc39a);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 18px;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn-view-photos:hover {
  background: var(--cinnamon-primary, #a72626);
  transform: translateY(-1px);
}

@media (max-width: 650px) {
  .event-photos-link-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    gap: 12px;
  }

  .btn-view-photos {
    width: 100%;
    justify-content: center;
  }
}

/* =========================================================
   STANDALONE LATEST PHOTOS BUTTON (CENTERED & COMPACT)
   ========================================================= */
.latest-photos-btn-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 16px 0 24px 0;
  width: 100%;
}

.btn-latest-event-photos {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--cinnamon-dark, #771d1d);
  color: #ffffff;
  border: 1.5px solid var(--gold-accent, #dfc39a);
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  padding: 10px 22px;
  border-radius: 8px;
  text-decoration: none;
  text-transform: uppercase;
  box-shadow: 0 4px 12px rgba(119, 29, 29, 0.15);
  transition: all 0.2s ease;
}

.btn-latest-event-photos:hover {
  background: var(--cinnamon-primary, #a72626);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(119, 29, 29, 0.25);
  color: #ffffff;
}

@media (max-width: 650px) {
  .latest-photos-btn-wrap {
    margin: 12px 0 18px 0;
  }

  .btn-latest-event-photos {
    width: 100%;
    font-size: 12px;
    padding: 9px 14px;
    letter-spacing: 0.02em;
    text-align: center;
  }
}