
/* ---------- Base gallery ---------- */

.gallery {
  border-bottom: 1px solid #ddd;
  padding: 0.5rem 0;
}

/* ---------- Label / title row ---------- */

.gallery > label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 1.1rem;
  user-select: none;
}

/* Hide the checkbox visually but keep it accessible */
.gallery > label > input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

/* Optional indicator arrow */
.gallery > label::after {
  content: "▾";
  margin-left: auto;
  transition: transform 0.25s ease;
}

/* Rotate arrow when open */
.gallery > label:has(input:checked)::after {
  transform: rotate(180deg);
}

/* ---------- Collapsible content ---------- */

.gallery-content {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition:
    max-height 0.4s ease,
    opacity 0.25s ease;
}

/* Expand when checked */
.gallery > label:has(input:checked) + .gallery-content {
  max-height: 2000px; /* large enough for content */
  opacity: 1;
  margin-top: 1rem;
}

/* ---------- Images ---------- */

.gallery-content {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.gallery-content img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}


