/* ═══════════════════════════════════════
   Classroom Gallery Widget
   ═══════════════════════════════════════ */

.cs-gallery {
  padding: 60px 0;
}

.cs-gallery__title {
  text-align: center;
  font-family: "Montserrat", sans-serif;
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 40px;
  letter-spacing: 1px;
}

/* ── Grid Layout ── */
.cs-gallery__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 300px;
  gap: 10px;
}

/* Wide items span 2 columns */
.cs-gallery__item--wide {
  grid-column: span 2;
}

/* ── Item Style ── */
.cs-gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
}

.cs-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.cs-gallery__item:hover img {
  transform: scale(1.05);
}

/* ── Caption Overlay ── */
.cs-gallery__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 14px 12px;
  color: #fff;
  font-family: "Montserrat", sans-serif;
  font-size: 14px;
  font-weight: 500;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
  pointer-events: none;
}

/* ═══════════════════════════════════════
   Tablet
   ═══════════════════════════════════════ */
@media (max-width: 1024px) {
  .cs-gallery__grid {
    grid-auto-rows: 250px;
  }
}

/* ═══════════════════════════════════════
   Mobile
   ═══════════════════════════════════════ */
@media (max-width: 767px) {
  .cs-gallery {
    padding: 40px 0;
  }

  .cs-gallery__title {
    font-size: 22px;
    margin-bottom: 24px;
  }

  .cs-gallery__grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 220px;
    gap: 12px;
  }

  /* Reset wide items to single column on mobile */
  .cs-gallery__item--wide {
    grid-column: span 1;
  }

  .cs-gallery__item {
    border-radius: 12px;
  }

  .cs-gallery__caption {
    font-size: 13px;
    padding: 12px 10px;
  }
}
