/*
 * Inventively Witty — /events and /rentals.
 *
 * 🔴 .gallery-grid and .gallery-item are defined HERE, not inherited. They exist in
 * index.css, and index.css is loaded on "/" ONLY — so a grid class reused on these
 * pages would resolve to nothing and the photos would stack as full-width images at a
 * clean 200. That is the same shape as /packages shipping with no stylesheet at all
 * (CLAUDE.md), and no status check or token linter can see it.
 *
 * Every var() carries a literal fallback, per the network token rule: an undefined
 * var() drops the whole declaration silently, and this file is loaded alongside
 * brand.css rather than instead of it.
 */

.iw-event-section {
  margin: 0 0 var(--space-xl, 3rem);
}

.iw-event,
.iw-rental {
  padding: var(--space-lg, 1.5rem) 0;
  border-bottom: 1px solid var(--color-border, #e6e1ec);
}

.iw-event:last-of-type,
.iw-rental:last-of-type {
  border-bottom: 0;
}

.iw-event h3,
.iw-rental h2 {
  margin: 0 0 .25rem;
  color: var(--dark-purple, #2d1b45);
}

.iw-event-when,
.iw-rental-price {
  margin: 0 0 .75rem;
  font-weight: 600;
  /* Not --primary-pink: that is a FILL, and pink text on white is 2.69:1 — it fails
     AA and this site has shipped exactly that mistake before. */
  color: var(--dark-purple, #2d1b45);
}

.iw-event-body,
.iw-rental-body {
  margin: 0 0 1rem;
  line-height: 1.65;
  color: var(--color-text, #3f3a46);
}

/* The grid. Mobile-first: one column at 320px, filling out as room allows. */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-sm, .75rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (min-width: 30rem) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 48rem) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }
}

.gallery-item {
  margin: 0;
  border-radius: var(--radius-md, .6rem);
  overflow: hidden;
  background: var(--color-bg-elevated, #f6f2fa);
}

/* 🔴 aspect-ratio + cover is load-bearing, not decoration. The layout was designed
   around square renders; the real photographs are portrait and landscape, and without
   this a 1320x1589 image renders as a very tall column beside two lines of text. */
.gallery-item img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.gallery-item figcaption {
  padding: .5rem .75rem;
  font-size: .9rem;
  color: var(--color-text-muted, #5d5566);
}

.iw-cta-row {
  margin: var(--space-xl, 3rem) 0 0;
}
