/* ═══════════════════════════════════════════════════════
   SJ Bento Grid – Homepage Section
   Layout:  AA B C
            AA D E
            FF GG
   ═══════════════════════════════════════════════════════ */

.sj-bento-section {
  padding: 2rem 0;
}

/* ── Grid Container ── */

.sj-bento-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: 1fr 1fr 1fr;
  gap: 16px;
  min-height: 720px;
}

/* ── Tile Positions ── */

.sj-bento-tile-a {
  grid-column: 1 / 7;
  grid-row: 1 / 3;
}

.sj-bento-tile-b {
  grid-column: 7 / 10;
  grid-row: 1 / 2;
}

.sj-bento-tile-c {
  grid-column: 10 / 13;
  grid-row: 1 / 2;
}

.sj-bento-tile-d {
  grid-column: 7 / 10;
  grid-row: 2 / 3;
}

.sj-bento-tile-e {
  grid-column: 10 / 13;
  grid-row: 2 / 3;
}

.sj-bento-tile-f {
  grid-column: 1 / 7;
  grid-row: 3 / 4;
}

.sj-bento-tile-g {
  grid-column: 7 / 13;
  grid-row: 3 / 4;
}

/* ── Tile Base ── */

.sj-bento-tile {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #1b1d22;
}

.sj-bento-link {
  display: block;
  width: 100%;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

/* ── Image ── */

.sj-bento-img-wrap {
  position: absolute;
  inset: 0;
}

.sj-bento-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .4s ease;
}

.sj-bento-tile:hover .sj-bento-img-wrap img {
  transform: scale(1.04);
}

/* ── Text Overlay ── */

.sj-bento-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  background: linear-gradient(
    0deg,
    rgba(0, 0, 0, .55) 0%,
    rgba(0, 0, 0, .15) 40%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 1;
}

.sj-bento-title {
  margin: 0;
  font-family: 'Montserrat', sans-serif;
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
}

.sj-bento-tile-a .sj-bento-title {
  font-size: 1.75rem;
}

.sj-bento-tile-b .sj-bento-title,
.sj-bento-tile-c .sj-bento-title,
.sj-bento-tile-d .sj-bento-title,
.sj-bento-tile-e .sj-bento-title,
.sj-bento-tile-f .sj-bento-title,
.sj-bento-tile-g .sj-bento-title {
  font-size: 1.15rem;
}

.sj-bento-subtitle {
  margin: .35rem 0 0;
  font-size: .9rem;
  font-weight: 400;
  color: rgba(255, 255, 255, .85);
  line-height: 1.4;
}

.sj-bento-tile-b .sj-bento-subtitle,
.sj-bento-tile-c .sj-bento-subtitle,
.sj-bento-tile-d .sj-bento-subtitle,
.sj-bento-tile-e .sj-bento-subtitle,
.sj-bento-tile-f .sj-bento-subtitle,
.sj-bento-tile-g .sj-bento-subtitle {
  font-size: .8rem;
}

/* ── Link Arrow Indicator ── */

.sj-bento-link::after {
  content: '→';
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, .15);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  color: #fff;
  font-size: 1.1rem;
  z-index: 2;
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity .3s ease, transform .3s ease;
}

.sj-bento-tile:hover .sj-bento-link::after {
  opacity: 1;
  transform: translateX(0);
}

/* ═══════════════════════════════════════════════════════
   Responsive
   ═══════════════════════════════════════════════════════ */

/* Tablet: A full width, B–G 2-column grid */
@media (max-width: 991px) {
  .sj-bento-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    min-height: 0;
  }

  .sj-bento-tile-a {
    grid-column: 1 / -1;
    grid-row: auto;
    min-height: 280px;
  }

  .sj-bento-tile-b,
  .sj-bento-tile-c,
  .sj-bento-tile-d,
  .sj-bento-tile-e,
  .sj-bento-tile-f,
  .sj-bento-tile-g {
    grid-column: auto;
    grid-row: auto;
    min-height: 200px;
  }
}

/* Mobile: everything stacked */
@media (max-width: 575px) {
  .sj-bento-section {
    padding: 1rem 0;
  }

  .sj-bento-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .sj-bento-tile-a {
    min-height: 240px;
  }

  .sj-bento-tile-b,
  .sj-bento-tile-c,
  .sj-bento-tile-d,
  .sj-bento-tile-e,
  .sj-bento-tile-f,
  .sj-bento-tile-g {
    min-height: 180px;
  }

  .sj-bento-overlay {
    padding: 1rem;
  }

  .sj-bento-tile-a .sj-bento-title {
    font-size: 1.35rem;
  }
}
