
/* ==========================================
   GURGAON KALI BARI — TEMPLE HISTORY
   Clean, responsive, cascading photo timeline
   ========================================== */

.gkb-temple-history {
  --timeline-terracotta: #9B4935;
  --timeline-gold: #D4AF37;
  --timeline-cream: #FBF7F0;
  --timeline-text: #45352F;

  width: 100%;
  padding: 70px 4%;
  box-sizing: border-box;
  background: var(--timeline-cream);
  color: var(--timeline-text);
}

.gkb-temple-history *,
.gkb-temple-history *::before,
.gkb-temple-history *::after {
  box-sizing: border-box;
}

.gkb-temple-history-container {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
}

.gkb-temple-history-heading {
  margin: 0 0 65px;
  text-align: center;
}

.gkb-temple-history-heading h2 {
  margin: 0 0 14px;
  color: var(--timeline-terracotta);
  font-size: clamp(30px, 3vw, 44px);
  line-height: 1.2;
}

.gkb-temple-history-heading p {
  max-width: 760px;
  margin: 0 auto;
  font-size: 17px;
  line-height: 1.8;
}

/* Main timeline */

.gkb-temple-timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 90px;
  width: 100%;
}

/* Continuous centre line */

.gkb-temple-timeline::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 3px;
  transform: translateX(-50%);
  background: var(--timeline-terracotta);
}

/* Each timeline event */

.gkb-temple-timeline .gkb-temple-event {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px minmax(0, 1fr);
  align-items: start;
  width: 100%;
}

/* Timeline marker */

.gkb-temple-timeline .gkb-temple-event-marker {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
  position: relative;
  z-index: 2;
  width: 24px;
  height: 24px;
  margin-top: 24px;
  border: 5px solid var(--timeline-cream);
  border-radius: 50%;
  background: var(--timeline-gold);
  box-shadow: 0 0 0 3px var(--timeline-terracotta);
}

/* Event text cards */

.gkb-temple-timeline .gkb-temple-event-content {
  width: 100%;
  max-width: 540px;
  padding: 28px 30px;
  border: 1px solid rgba(155, 73, 53, 0.18);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(69, 53, 47, 0.08);
}

.gkb-temple-timeline .gkb-temple-event-content h3 {
  margin: 0 0 14px;
  color: var(--timeline-terracotta);
  font-size: clamp(22px, 2vw, 29px);
  line-height: 1.3;
}

.gkb-temple-timeline .gkb-temple-event-content p {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.8;
}

.gkb-temple-timeline .gkb-temple-event-content p:last-child {
  margin-bottom: 0;
}

/* Photo group: three landscape images */

.gkb-temple-timeline .gkb-temple-photo-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 540px;
  gap: 0;
}

/* Individual image */

.gkb-temple-timeline .gkb-temple-photo {
  position: relative;
  width: 70%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 4px solid #fff;
  border-radius: 9px;
  background: #eee4d7;
  box-shadow: 0 8px 22px rgba(45, 30, 20, 0.16);
}

.gkb-temple-timeline .gkb-temple-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gkb-temple-timeline .gkb-temple-photo:hover img {
  transform: scale(1.04);
}

/* Cascade the second and third photos */

.gkb-temple-timeline .gkb-temple-photo:nth-child(2) {
  align-self: flex-end;
  margin-top: -7%;
}

.gkb-temple-timeline .gkb-temple-photo:nth-child(3) {
  align-self: flex-start;
  margin-top: -7%;
}

/* Odd events: text left, photos right */

.gkb-temple-timeline .gkb-temple-event:nth-child(odd)
.gkb-temple-event-content {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
  margin-right: 0;
}

.gkb-temple-timeline .gkb-temple-event:nth-child(odd)
.gkb-temple-photo-group {
  grid-column: 3;
  grid-row: 1;
  justify-self: start;
}

/* Even events: photos left, text right */

.gkb-temple-timeline .gkb-temple-event:nth-child(even)
.gkb-temple-photo-group {
  grid-column: 1;
  grid-row: 1;
  justify-self: end;
}

.gkb-temple-timeline .gkb-temple-event:nth-child(even)
.gkb-temple-event-content {
  grid-column: 3;
  grid-row: 1;
  justify-self: start;
}

/* View All Photos button */

.gkb-temple-timeline .gkb-temple-view-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 22px;
  padding: 11px 20px;
  border: 0;
  border-radius: 5px;
  background: var(--timeline-terracotta);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}

.gkb-temple-timeline .gkb-temple-view-all:hover {
  background: #7E3728;
  transform: translateY(-2px);
}

/* Single-photo captions, if present */

.gkb-temple-timeline .gkb-temple-photo-caption {
  display: block;
  margin-top: 12px;
  color: var(--timeline-terracotta);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
}

/* ==========================================
   GALLERY POPUP
   ========================================== */

.gkb-temple-gallery-popup[hidden] {
  display: none !important;
}

.gkb-temple-gallery-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(20, 15, 12, 0.92);
}

.gkb-temple-gallery-popup .gkb-temple-gallery-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 1100px;
  max-height: 92vh;
}

.gkb-temple-gallery-popup img {
  display: block;
  max-width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 5px;
}

.gkb-temple-gallery-popup button {
  cursor: pointer;
}

.gkb-temple-gallery-popup .gkb-temple-gallery-close {
  position: absolute;
  top: -42px;
  right: 0;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 36px;
}

.gkb-temple-gallery-popup .gkb-temple-gallery-prev,
.gkb-temple-gallery-popup .gkb-temple-gallery-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: var(--timeline-terracotta);
  font-size: 27px;
}

.gkb-temple-gallery-popup .gkb-temple-gallery-prev {
  left: 12px;
}

.gkb-temple-gallery-popup .gkb-temple-gallery-next {
  right: 12px;
}

.gkb-temple-gallery-popup .gkb-temple-gallery-title,
.gkb-temple-gallery-popup .gkb-temple-gallery-counter {
  margin-top: 12px;
  color: #fff;
  text-align: center;
}

/* ==========================================
   TABLET
   ========================================== */

@media (max-width: 1000px) {
  .gkb-temple-history {
    padding: 55px 3%;
  }

  .gkb-temple-timeline {
    gap: 65px;
  }

  .gkb-temple-timeline .gkb-temple-event {
    grid-template-columns: minmax(0, 1fr) 52px minmax(0, 1fr);
  }

  .gkb-temple-timeline .gkb-temple-event-content {
    padding: 22px;
  }

  .gkb-temple-timeline .gkb-temple-photo {
    width: 82%;
  }
}

/* ==========================================
   MOBILE
   ========================================== */

@media (max-width: 700px) {
  .gkb-temple-history {
    padding: 42px 18px;
  }

  .gkb-temple-history-heading {
    margin-bottom: 42px;
  }

  .gkb-temple-history-heading p {
    font-size: 15px;
  }

  .gkb-temple-timeline {
    gap: 48px;
    padding-left: 30px;
  }

  .gkb-temple-timeline::before {
    left: 10px;
    transform: none;
  }

  .gkb-temple-timeline .gkb-temple-event {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 22px;
    padding-left: 0;
  }

  .gkb-temple-timeline .gkb-temple-event-marker {
    position: absolute;
    top: 20px;
    left: -30px;
    width: 20px;
    height: 20px;
    margin: 0;
  }

  .gkb-temple-timeline .gkb-temple-event:nth-child(odd)
  .gkb-temple-event-content,
  .gkb-temple-timeline .gkb-temple-event:nth-child(even)
  .gkb-temple-event-content {
    grid-column: 1;
    grid-row: auto;
    justify-self: stretch;
    max-width: none;
  }

  .gkb-temple-timeline .gkb-temple-event:nth-child(odd)
  .gkb-temple-photo-group,
  .gkb-temple-timeline .gkb-temple-event:nth-child(even)
  .gkb-temple-photo-group {
    grid-column: 1;
    grid-row: auto;
    justify-self: stretch;
    max-width: none;
  }

  .gkb-temple-timeline .gkb-temple-event-content {
    padding: 22px;
  }

  .gkb-temple-timeline .gkb-temple-photo {
    width: 82%;
  }

  .gkb-temple-timeline .gkb-temple-photo:nth-child(2) {
    margin-top: -5%;
  }

  .gkb-temple-timeline .gkb-temple-photo:nth-child(3) {
    margin-top: -5%;
  }

  .gkb-temple-gallery-popup {
    padding: 14px;
  }

  .gkb-temple-gallery-popup .gkb-temple-gallery-prev {
    left: 5px;
  }

  .gkb-temple-gallery-popup .gkb-temple-gallery-next {
    right: 5px;
  }
}


/* Gallery popup panel */
.gkb-temple-gallery-popup .gkb-temple-gallery-panel {
  position: relative;
  width: 100%;
  max-width: 1100px;
  max-height: 92vh;
  overflow: auto;
  padding: 28px;
  border-radius: 12px;
  background: #FBF7F0;
}

/* Visible close button */
.gkb-temple-gallery-popup .gkb-temple-gallery-close {
  position: absolute;
  top: 10px;
  right: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: #9B4935;
  color: #fff;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
}

.gkb-temple-gallery-popup .gkb-temple-gallery-close:hover {
  background: #7E3728;
}

/* Leave space for the close button */
.gkb-temple-gallery-popup .gkb-temple-gallery-panel h3 {
  margin: 0 55px 22px 0;
  color: #9B4935;
}

/* Gallery image area */
.gkb-temple-gallery-popup .gkb-temple-gallery-view {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.gkb-temple-gallery-popup .gkb-temple-gallery-view img {
  flex: 1;
  min-width: 0;
  max-height: 70vh;
  object-fit: contain;
}

@media (max-width: 600px) {
  .gkb-temple-gallery-popup {
    padding: 12px;
  }

  .gkb-temple-gallery-popup .gkb-temple-gallery-panel {
    padding: 18px 12px;
  }

  .gkb-temple-gallery-popup .gkb-temple-gallery-view {
    gap: 5px;
  }

  .gkb-temple-gallery-popup .gkb-temple-gallery-view button {
    flex-shrink: 0;
  }
}


