/* ============================================================
   GALLERY – Shared + per-page styles
   ============================================================ */

/* ---------- shared ---------- */
.gallery-heading {
  font-size: 28px;
  font-weight: 800;
  color: #1b381e;
}
.gallery-intro {
  font-size: 15px;
  color: #374151;
  max-width: 720px;
  margin-inline: auto;
}

/* ============================================================
   INDEX PAGE – category cards
   ============================================================ */
.gallery-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
  transition: transform .35s ease, box-shadow .35s ease;
}
.gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 10px 28px rgba(30,135,86,.18);
}
.gallery-card-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
.gallery-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.gallery-card:hover .gallery-card-img {
  transform: scale(1.06);
}
.gallery-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,.45) 100%);
  pointer-events: none;
}
.gallery-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #e6f4ea;
}
.gallery-card-placeholder-icon {
  font-size: 48px;
  opacity: .35;
}
.gallery-card-body {
  padding: 14px 16px;
}
.gallery-card-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #1b381e;
}

/* ============================================================
   1. TIMELINE PHOTOS – year / month selector + vertical timeline
   ============================================================ */

/* --- floating filter panel (right side) --- */
.tl-filter-bar {
  position: fixed;
  top: calc(var(--topbar-h, 119px) + 20px);
  right: 20px;
  z-index: 90;
  width: 180px;
  background: #2d6a4f;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.22);
  border: 1px solid rgba(255,255,255,.1);
}
.tl-bar-inner {
  position: relative;
}

/* each view */
.tl-bar-view {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tl-bar-hidden {
  display: none;
}

/* label */
.tl-bar-label {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255,255,255,.55);
  text-transform: uppercase;
  letter-spacing: .8px;
  margin-bottom: 2px;
}

/* year / month pill buttons */
.tl-bar-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.tl-bar-btn {
  border: 0;
  padding: 8px 14px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  background: rgba(255,255,255,.1);
  cursor: pointer;
  transition: all .25s ease;
  text-align: center;
  width: 100%;
}
.tl-bar-btn:hover {
  background: rgba(255,255,255,.22);
  transform: translateX(-3px);
}
.tl-bar-btn.active {
  background: #1e8756;
  box-shadow: 0 0 12px rgba(30,135,86,.45);
}

/* back arrow */
.tl-bar-back {
  border: 0;
  background: rgba(255,255,255,.1);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .25s ease;
  flex-shrink: 0;
  align-self: flex-start;
}
.tl-bar-back:hover {
  background: rgba(255,255,255,.22);
  transform: scale(1.1);
}

.tl-period-label {
  font-size: 20px;
  font-weight: 700;
  color: #1b381e;
}

/* mobile: slide panel to bottom as horizontal strip */
@media (max-width: 768px) {
  .tl-filter-bar {
    position: fixed;
    top: auto;
    bottom: 0;
    right: 0;
    left: 0;
    width: 100%;
    border-radius: 16px 16px 0 0;
    padding: 12px 16px;
    box-shadow: 0 -4px 20px rgba(0,0,0,.2);
  }
  .tl-bar-view {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
  }
  .tl-bar-items {
    flex-direction: row;
    flex-wrap: wrap;
  }
  .tl-bar-btn {
    width: auto;
    padding: 6px 14px;
    font-size: 13px;
  }
  /* add padding to page so content isn't hidden behind bottom bar */
  .timeline-page { padding-bottom: 80px; }
}

/* --- timeline --- */
.timeline {
  position: relative;
  padding: 30px 0;
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}
.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #1e8756, #cce8d5);
  transform: translateX(-50%);
  border-radius: 3px;
  z-index: 0;
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 0 40px 50px;
  z-index: 1;
  opacity: 0;
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.timeline-item.tl-left {
  text-align: right;
  align-self: flex-start;
  transform: translateX(-60px);
}
.timeline-item.tl-right {
  text-align: left;
  align-self: flex-end;
  transform: translateX(60px);
}
.timeline-item.tl-visible {
  opacity: 1;
  transform: translateX(0);
}

/* dot on the line */
.timeline-item::before {
  content: "";
  position: absolute;
  top: 18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #1e8756;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px #1e8756;
  z-index: 2;
}
.tl-left::before  { right: -7px; }
.tl-right::before { left: -7px;  }

/* date badge */
.tl-date-badge {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  background: #1e8756;
  color: #fff;
  padding: 6px 14px;
  border-radius: 10px;
  margin-bottom: 10px;
  line-height: 1.2;
}
.tl-day {
  font-size: 22px;
  font-weight: 800;
}
.tl-month {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.tl-year {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,.75);
  letter-spacing: .3px;
}

/* card */
.tl-card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(0,0,0,.08);
  border: 1px solid rgba(0,0,0,.05);
  text-align: left;
  transition: all .3s ease;
}
.tl-card-clickable {
  display: block;
  text-decoration: none !important;
  color: #212121;
  cursor: pointer;
  position: relative;
  background: #fff;
}
.tl-card-clickable:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
  transform: translateY(-2px);
  text-decoration: none !important;
  color: #212121;
}
.tl-card-clickable:visited {
  color: #212121;
  text-decoration: none !important;
}
.tl-card-clickable:active,
.tl-card-clickable:focus {
  color: #212121;
  text-decoration: none !important;
  outline: none;
}
/* Make child elements non-blocking for clicks */
.tl-card-clickable * {
  pointer-events: none;
}
/* Re-enable pointer events for carousel controls */
.tl-card-clickable .carousel-indicators,
.tl-card-clickable .carousel-indicators button {
  pointer-events: auto;
}
.tl-card-img-wrap {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
.tl-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.tl-card:hover .tl-card-img {
  transform: scale(1.04);
}

/* Bootstrap carousel indicator overrides (round dots) */
.tl-card .carousel-indicators {
  margin-bottom: 8px;
}
.tl-card .carousel-indicators [data-bs-target] {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(255,255,255,.5);
  box-shadow: 0 1px 3px rgba(0,0,0,.3);
  border: 0;
  opacity: 1;
}
.tl-card .carousel-indicators .active {
  background-color: #fff;
}
.tl-card-body {
  padding: 14px 16px;
}
.tl-card-title {
  margin: 0 0 4px;
  font-size: 16px;
  font-weight: 700;
  color: #1b381e;
}
.tl-card-text {
  margin: 0;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
}
/* Ensure text inside clickable card has proper styling */
.tl-card-clickable .tl-card-title {
  text-decoration: none !important;
  color: #1b381e !important;
}
.tl-card-clickable .tl-card-text {
  text-decoration: none !important;
  color: #4b5563 !important;
}
.tl-card-clickable .tl-card-body {
  background: #fff;
}

/* timeline responsive – single column */
@media (max-width: 768px) {
  .timeline-line {
    left: 20px;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #1e8756, #cce8d5);
    border-radius: 2px;
  }
  .timeline-line svg {
    display: none;
  }
  .timeline-item,
  .timeline-item.tl-left,
  .timeline-item.tl-right {
    width: 100%;
    align-self: stretch;
    padding: 0 0 40px 50px;
    text-align: left;
    transform: translateY(40px);
  }
  .timeline-item.tl-visible {
    transform: translateY(0);
  }
  .timeline-item::before,
  .timeline-item.tl-left::before,
  .timeline-item.tl-right::before {
    left: 13px !important;
    right: auto !important;
  }
}

/* ============================================================
   2. THE LIGHTER SIDE – masonry grid
   ============================================================ */
.masonry-grid {
  columns: 3 280px;
  column-gap: 20px;
}
.masonry-item {
  break-inside: avoid;
  margin-bottom: 20px;
}
.masonry-card {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 14px rgba(0,0,0,.07);
  cursor: pointer;
}
.masonry-img {
  width: 100%;
  display: block;
  transition: transform .45s ease;
}
.masonry-card:hover .masonry-img {
  transform: scale(1.05);
}
.masonry-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(0,0,0,.6) 0%, transparent 50%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  opacity: 0;
  transition: opacity .35s ease;
}
.masonry-card:hover .masonry-overlay {
  opacity: 1;
}
.masonry-title {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}
.masonry-caption {
  margin: 0;
  font-size: 13px;
  color: rgba(255,255,255,.85);
  line-height: 1.4;
}

/* ============================================================
   3. SPIRITUAL SIDE – calm card layout
   ============================================================ */
.spirit-card {
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,.06);
  border: 1px solid rgba(45,106,79,.1);
  transition: transform .4s ease, box-shadow .4s ease;
}
.spirit-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 28px rgba(45,106,79,.14);
}
.spirit-img-wrap {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
.spirit-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.spirit-card:hover .spirit-img {
  transform: scale(1.04);
}
.spirit-body {
  padding: 16px 18px;
}
.spirit-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: #1b381e;
}
.spirit-caption {
  margin: 0;
  font-size: 14px;
  color: #4b5563;
  line-height: 1.55;
}

/* ============================================================
   4. ELECTION RALLIES – bold grid with overlay label
   ============================================================ */
.rally-card {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(0,0,0,.07);
  transition: transform .3s ease, box-shadow .3s ease;
}
.rally-card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 8px 24px rgba(30,135,86,.16);
}
.rally-img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}
.rally-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s ease;
}
.rally-card:hover .rally-img {
  transform: scale(1.06);
}
.rally-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 10px 12px;
  background: linear-gradient(0deg, rgba(0,0,0,.65), transparent);
}
.rally-label {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.rally-body {
  padding: 10px 12px;
}
.rally-caption {
  margin: 0;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.45;
}

/* ============================================================
   5. GOVERNMENT EVENTS – formal card layout
   ============================================================ */
.govt-card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.06);
  box-shadow: 0 2px 14px rgba(0,0,0,.06);
  transition: transform .35s ease, box-shadow .35s ease;
}
.govt-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(30,135,86,.15);
}
.govt-img-wrap {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
}
.govt-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.govt-card:hover .govt-img {
  transform: scale(1.04);
}
.govt-body {
  padding: 16px;
  border-top: 3px solid #1e8756;
}
.govt-title {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: #1b381e;
}
.govt-caption {
  margin: 0;
  font-size: 13px;
  color: #4b5563;
  line-height: 1.5;
}

/* ============================================================
   GALLERY DETAIL PAGE — Premium Design
   ============================================================ */

/* back link — pill style */
.gd-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #2d6a4f;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  padding: 8px 18px;
  border-radius: 24px;
  background: #f0fdf4;
  border: 1px solid rgba(30,135,86,.12);
  transition: all .3s ease;
}
.gd-back:hover {
  color: #fff;
  background: #1e8756;
  border-color: #1e8756;
  box-shadow: 0 4px 16px rgba(30,135,86,.25);
}
.gd-back-arrow {
  font-size: 18px;
  transition: transform .3s ease;
}
.gd-back:hover .gd-back-arrow { transform: translateX(-4px); }

/* hero — dark cinema background */
.gd-hero {
  background: #0a0a0a;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.gd-hero-img {
  max-height: 72vh;
  object-fit: contain;
  will-change: transform;
}

/* carousel — dark cinema background */
.gd-carousel {
  background: #0a0a0a;
  position: relative;
  overflow: hidden;
}
.gd-carousel .carousel-item {
  text-align: center;
}
.gd-carousel .gd-hero-img {
  max-height: 72vh;
  object-fit: contain;
}

/* carousel controls — glassmorphic circles */
.gd-carousel .carousel-control-prev,
.gd-carousel .carousel-control-next {
  width: 48px;
  height: 48px;
  top: 50%;
  bottom: auto;
  transform: translateY(-50%);
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  opacity: 0;
  transition: opacity .35s, background .3s;
}
.gd-carousel:hover .carousel-control-prev,
.gd-carousel:hover .carousel-control-next {
  opacity: 1;
}
.gd-carousel .carousel-control-prev:hover,
.gd-carousel .carousel-control-next:hover {
  background: rgba(255,255,255,.22);
}
.gd-carousel .carousel-control-prev { left: 16px; }
.gd-carousel .carousel-control-next { right: 16px; }
.gd-carousel .carousel-control-prev-icon,
.gd-carousel .carousel-control-next-icon {
  width: 20px;
  height: 20px;
  background-size: 100%;
  background-color: transparent;
  border-radius: 0;
  padding: 0;
}

/* carousel indicators — dots */
.gd-carousel .carousel-indicators {
  margin-bottom: 16px;
}
.gd-carousel .carousel-indicators [data-bs-target] {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: rgba(255,255,255,.35);
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  border: 2px solid rgba(255,255,255,.55);
  opacity: 1;
  transition: all .3s;
}
.gd-carousel .carousel-indicators .active {
  background-color: #fff;
  transform: scale(1.3);
}

/* image counter badge */
.gd-img-counter {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(0,0,0,.50);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 20px;
  z-index: 5;
  letter-spacing: .3px;
}

/* event info — glass card */
.gd-info {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 36px;
  padding: 28px;
  background: rgba(255,255,255,.80);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  border: 1px solid rgba(30,135,86,.08);
  box-shadow: 0 4px 24px rgba(0,0,0,.06);
}

/* date badge — gradient with glow */
.gd-date-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, #1e8756 0%, #14532d 100%);
  color: #fff;
  padding: 16px 22px;
  border-radius: 16px;
  min-width: 85px;
  flex-shrink: 0;
  line-height: 1.1;
  box-shadow: 0 4px 20px rgba(30,135,86,.30);
  position: relative;
}
.gd-date-badge::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 16px;
  border: 2px solid rgba(255,255,255,.12);
  pointer-events: none;
}
.gd-date-day {
  font-size: 36px;
  font-weight: 800;
}
.gd-date-month {
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-top: 3px;
}
.gd-date-year {
  font-size: 11px;
  font-weight: 500;
  opacity: .65;
  margin-top: 3px;
}

.gd-title {
  font-size: 28px;
  font-weight: 800;
  color: #1b381e;
  margin: 0 0 10px;
  line-height: 1.3;
}
.gd-caption {
  font-size: 16px;
  color: #4b5563;
  line-height: 1.7;
  margin: 0;
}

/* thumbnail grid heading — animated underline */
.gd-grid-heading {
  font-size: 18px;
  font-weight: 700;
  color: #1b381e;
  margin-bottom: 18px;
  position: relative;
  display: inline-block;
  /* GSAP start */
  opacity: 0;
  transform: translateY(18px);
}
.gd-grid-heading::after {
  content: "";
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: #1e8756;
  margin-top: 6px;
  transform: scaleX(var(--gd-ul, 0));
  transform-origin: left;
}

/* thumbnail card */
.gd-thumb {
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform .35s ease, box-shadow .35s ease;
}
.gd-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0);
  border-radius: 14px;
  transition: background .3s ease;
  pointer-events: none;
}
.gd-thumb:hover::after {
  background: rgba(30,135,86,.10);
}
.gd-thumb:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 12px 32px rgba(30,135,86,.20);
}
.gd-thumb.gd-thumb-active {
  box-shadow: 0 0 0 3px #1e8756, 0 8px 24px rgba(30,135,86,.22);
  transform: translateY(-3px);
}
.gd-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 4 / 3;
  transition: transform .45s ease;
}
.gd-thumb:hover .gd-thumb-img {
  transform: scale(1.08);
}

/* prev / next navigation */
.gd-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 32px;
  margin-top: 36px;
  border-top: 2px solid #e5e7eb;
  /* GSAP start */
  opacity: 0;
  transform: translateY(18px);
}
.gd-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #2d6a4f;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 30px;
  background: #f0fdf4;
  border: 1px solid rgba(30,135,86,.12);
  transition: all .3s ease;
}
.gd-nav-link:hover {
  background: #1e8756;
  color: #fff;
  border-color: #1e8756;
  box-shadow: 0 6px 20px rgba(30,135,86,.25);
  transform: translateY(-2px);
}
.gd-nav-arrow {
  font-size: 18px;
  display: inline-block;
}

/* detail responsive */
@media (max-width: 768px) {
  .gd-info { flex-direction: column; gap: 16px; padding: 20px; }
  .gd-date-badge { flex-direction: row; gap: 10px; padding: 10px 18px; }
  .gd-title { font-size: 22px; }
  .gd-hero-img, .gd-carousel .gd-hero-img { max-height: 50vh; }
  .gd-carousel .carousel-control-prev,
  .gd-carousel .carousel-control-next { width: 40px; height: 40px; }
}

@media (max-width: 576px) {
  .gd-info { padding: 16px; border-radius: 14px; }
  .gd-date-badge { min-width: auto; padding: 8px 14px; border-radius: 12px; }
  .gd-date-day { font-size: 28px; }
  .gd-nav-link { padding: 10px 18px; font-size: 14px; }
  .gd-thumb { border-radius: 10px; }
}

/* ============================================================
   Scroll sentinel / loading spinner
   ============================================================ */
.scroll-sentinel {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 32px 0;
  min-height: 60px;
}
.scroll-sentinel.loading .scroll-spinner {
  opacity: 1;
}
.scroll-spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(30,135,86,.15);
  border-top-color: #1e8756;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  opacity: 0;
  transition: opacity .25s ease;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 576px) {
  .gallery-heading { font-size: 22px; }
  .masonry-grid { columns: 2 160px; column-gap: 12px; }
  .masonry-item { margin-bottom: 12px; }
}
