/* ==========================================================================
   Gallery Section (CtaSection)
   ========================================================================== */

.gallery-sec {
  background-color: var(--smoke-color, #f5f5f5);
  padding: var(--section-space, 80px) 0;
}

/* ---- Section heading ---- */
.gallery-sec .gallery-header {
  text-align: center;
  margin-bottom: 48px;
}

.gallery-sec .gallery-header .sub-title {
  display: block;
  margin-bottom: 12px;
}

.gallery-sec .gallery-header .sec-title {
  margin-bottom: 16px;
}

.gallery-sec .gallery-header .gallery-lead {
  max-width: 560px;
  margin: 0 auto;
  color: var(--body-color);
  font-size: 16px;
  line-height: 1.7;
}

/* ---- Bento Grid ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 280px 280px;
  gap: 16px;
}

/* Cell 1 — large, spans 2 rows on the left */
.gallery-grid .g-item:nth-child(1) {
  grid-column: 1;
  grid-row: 1 / 3;
}

/* Cell 2 — top middle */
.gallery-grid .g-item:nth-child(2) {
  grid-column: 2;
  grid-row: 1;
}

/* Cell 3 — top right */
.gallery-grid .g-item:nth-child(3) {
  grid-column: 3;
  grid-row: 1;
}

/* Cell 4 — bottom middle */
.gallery-grid .g-item:nth-child(4) {
  grid-column: 2;
  grid-row: 2;
}

/* Cell 5 — bottom right */
.gallery-grid .g-item:nth-child(5) {
  grid-column: 3;
  grid-row: 2;
}

/* ---- Individual cell ---- */
.g-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
}

.g-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Dark overlay on hover */
.g-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    160deg,
    rgba(5, 173, 71, 0.55) 0%,
    rgba(22, 25, 33, 0.75) 100%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  border-radius: inherit;
}

/* Hover zoom + reveal overlay */
.g-item:hover img {
  transform: scale(1.08);
}

.g-item:hover::after {
  opacity: 1;
}

/* Caption that slides up on hover */
.g-item-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 24px;
  z-index: 2;
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.g-item:hover .g-item-caption {
  transform: translateY(0);
  opacity: 1;
}

.g-item-caption .g-caption-label {
  display: inline-block;
  background-color: var(--theme-color, #05ad47);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 50px;
  margin-bottom: 8px;
}

.g-item-caption .g-caption-title {
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0;
}

/* ---- Zoom icon badge ---- */
.g-item-icon {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 15px;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.g-item:hover .g-item-icon {
  opacity: 1;
  transform: scale(1);
}

/* ---- CTA strip below gallery ---- */
.gallery-cta-strip {
  margin-top: 48px;
  text-align: center;
}

.gallery-cta-strip p {
  color: var(--body-color);
  margin-bottom: 20px;
  font-size: 16px;
}

/* =====================================================================
   RESPONSIVE
   ===================================================================== */

/* Tablet — 2 columns */
@media (max-width: 991px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 260px 260px 260px;
  }

  /* Large image spans full width on top */
  .gallery-grid .g-item:nth-child(1) {
    grid-column: 1 / 3;
    grid-row: 1;
  }

  .gallery-grid .g-item:nth-child(2) {
    grid-column: 1;
    grid-row: 2;
  }

  .gallery-grid .g-item:nth-child(3) {
    grid-column: 2;
    grid-row: 2;
  }

  .gallery-grid .g-item:nth-child(4) {
    grid-column: 1;
    grid-row: 3;
  }

  .gallery-grid .g-item:nth-child(5) {
    grid-column: 2;
    grid-row: 3;
  }
}

/* Mobile — 1 column stack */
@media (max-width: 575px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, 240px);
    gap: 12px;
  }

  .gallery-grid .g-item {
    grid-column: 1 !important;
    grid-row: auto !important;
  }

  .gallery-sec .gallery-header {
    margin-bottom: 32px;
  }
}
