/* ==========================================================
   box-style.css
   Image + content boxes (all pages)
   - Every image sits in its own SQUARE box -> full image visible
   - Title / text sit BELOW the image -> no overlap
   - Used by: .wh-box-gallery > .wh-box > .wh-box-img + .wh-box-cap

   Layouts (by number of boxes):
   .wh-box-count-5 / -6 : big box on left spanning 2 rows + small boxes
   .wh-box-count-4      : 4 equal boxes in a row
   .wh-box-count-3      : 3 equal boxes in a row
   ========================================================== */
   
  :is(.tpl-leadership,.tpl-premium) main .premium-stage .floating-thumb{
    display: none!important;
   }
   
   :is(.tpl-eid,.tpl-festive) main .holi-stage .mini, .tpl-leadership main .leadership-stage .mini {
    display: none;
   }
   :is(.tpl-eid,.tpl-festive) main .holi-stage .floating-card {
    position: absolute;
    right: 2%!important;
	left:inherit!important;
    top: 2%!important;
   }

.wh-box-gallery {
  /* --cap-h : minimum height of the text area below each image
     --gap   : space between boxes */
  --cap-h: 150px;
  --gap: 16px;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  align-items: stretch;
  margin-top: 28px;
}

/* ---------- Layout: big left box (5 or 6 boxes) ----------
   Big column width is calculated so: square image + text area
   = height of the two boxes stacked beside it. */
.wh-box-gallery.wh-box-count-5,
.wh-box-gallery.wh-box-count-6 {
  grid-template-columns:
    calc(50% + (var(--cap-h) - var(--gap)) / 2)
    minmax(0, 1fr)
    minmax(0, 1fr);
}

.wh-box-gallery.wh-box-count-5 > .wh-box:first-child,
.wh-box-gallery.wh-box-count-6 > .wh-box:first-child {
  grid-column: 1;
  grid-row: 1 / span 2;
}

/* ---------- Layout: 4 boxes ---------- */
.wh-box-gallery.wh-box-count-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* ---------- Layout: 3 boxes ---------- */
.wh-box-gallery.wh-box-count-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* ---------- Card ---------- */
.wh-box-gallery > .wh-box {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 6px 22px rgba(15, 31, 61, 0.08);
}

/* ---------- Square image box ---------- */
.wh-box-gallery .wh-box-img {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  flex: 0 0 auto;
  overflow: hidden;
  background: #f4f1ec;
}

.wh-box-gallery .wh-box-img img {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}

/* ---------- Text below image ---------- */
.wh-box-gallery .wh-box-cap {
  position: static;
  flex: 1 1 auto;
  padding: 16px 18px 18px;
  box-sizing: border-box;
  background: #ffffff;
}

/* Keep captions of the big-left layout the same minimum height,
   so the big box lines up with the two boxes beside it */
.wh-box-gallery.wh-box-count-5 .wh-box-cap,
.wh-box-gallery.wh-box-count-6 .wh-box-cap {
  min-height: var(--cap-h);
}

.wh-box-gallery .wh-box-cap b,
.wh-box-gallery .wh-box-cap h3 {
	font-family: Georgia, "Times New Roman", serif;
  display: block;
  margin: 0 0 6px;
  font-size: 17px;
  line-height: 1.35;
  color: var(--ink, #0f1f3d);
}

.wh-box-gallery .wh-box-cap span,
.wh-box-gallery .wh-box-cap p {
  display: block;
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
  color: var(--text, #5b6475);
}

.wh-box-gallery .wh-box-cap p + p {
  margin-top: 8px;
}

/* ---------- Responsive ---------- */

/* Small laptop - text wraps more, give it more room */
@media (max-width: 1199px) {
  .wh-box-gallery {
    --cap-h: 175px;
  }
}

/* Tablet */
@media (max-width: 991px) {
  .wh-box-gallery,
  .wh-box-gallery.wh-box-count-4,
  .wh-box-gallery.wh-box-count-5,
  .wh-box-gallery.wh-box-count-6 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wh-box-gallery.wh-box-count-5 > .wh-box:first-child,
  .wh-box-gallery.wh-box-count-6 > .wh-box:first-child {
    grid-column: auto;
    grid-row: auto;
  }

  .wh-box-gallery.wh-box-count-5 .wh-box-cap,
  .wh-box-gallery.wh-box-count-6 .wh-box-cap {
    min-height: 0;
  }
}

/* Mobile */
@media (max-width: 575px) {
  .wh-box-gallery,
  .wh-box-gallery.wh-box-count-3,
  .wh-box-gallery.wh-box-count-4,
  .wh-box-gallery.wh-box-count-5,
  .wh-box-gallery.wh-box-count-6 {
    --gap: 14px;
    grid-template-columns: 1fr;
    margin-top: 22px;
  }

  .wh-box-gallery > .wh-box {
    border-radius: 14px;
  }

  .wh-box-gallery .wh-box-cap {
    padding: 14px 16px 16px;
  }

  .wh-box-gallery .wh-box-cap b,
  .wh-box-gallery .wh-box-cap h3 {
    font-size: 16px;
  }
}
