/* Events page: workshops, moving photo strip, past-event galleries,
   "host your workshop" panel and the photo viewer. Shared by
   /events/ and /events/en/. Bump ?v= in both pages when this changes
   (CONV-HLR-006). */

.ev-section-head { max-width: 820px; margin: 0 auto 32px; }
.ev-section-head h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.03em; line-height: 1.1; }
.ev-section-head p { color: var(--ink-500); font-size: 17px; line-height: 1.6; margin: 12px 0 0; max-width: 64ch; }
.ev-section-head .eyebrow { color: var(--teal); margin-bottom: 12px; }

/* Upcoming event cover photo (first photo linked to an upcoming event) */
.event-cover { grid-column: 1 / -1; margin: -30px -30px 0; border-radius: 22px 22px 0 0; overflow: hidden; aspect-ratio: 16 / 7; background: var(--teal-50); }
.event-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---- Workshops ---- */
.s-workshops { background: #fff; padding: 88px 0; }
.workshops-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; max-width: 1080px; margin: 0 auto; }
.workshop-card { background: var(--bg); border: 1px solid var(--hairline); border-radius: 22px; overflow: hidden; box-shadow: var(--shadow-md); display: flex; flex-direction: column; }
.workshop-photo { display: block; aspect-ratio: 4 / 3; background: var(--teal-50); overflow: hidden; }
.workshop-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease-out, ease); }
@media (hover: hover) { a.workshop-photo:hover img { transform: scale(1.04); } }
.workshop-photo.is-empty { display: flex; align-items: center; justify-content: center; font-size: 56px; background: linear-gradient(135deg, var(--teal-50), var(--gold-100)); }
.workshop-body { padding: 24px 24px 28px; }
.workshop-body h3 { font-size: 21px; letter-spacing: -0.02em; margin: 0 0 10px; }
.workshop-body p { color: var(--ink-500); font-size: 16px; line-height: 1.6; margin: 0; }

/* ---- Moving photo strip ---- */
.s-photo-strip { background: var(--teal-900); padding: 56px 0 48px; overflow: hidden; }
.strip-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.strip-head h2 { color: #fff; font-size: clamp(24px, 3vw, 32px); letter-spacing: -0.02em; margin: 0; }
.strip-toggle { font-family: var(--font-display); font-weight: 700; font-size: 14px; background: none; color: #fff; border: 1.5px solid rgba(255,255,255,.6); border-radius: var(--radius-pill); padding: 9px 18px; cursor: pointer; flex-shrink: 0; }
.strip-toggle:hover { background: rgba(255,255,255,.12); }
.strip-toggle:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.strip-viewport { overflow: hidden; }
.strip-track { display: flex; width: max-content; animation: strip-scroll var(--strip-duration, 60s) linear infinite; }
.strip-set { display: flex; gap: 14px; padding-right: 14px; }
.strip-track img { height: 220px; width: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; display: block; background: var(--teal-800); }
.s-photo-strip:hover .strip-track,
.s-photo-strip:focus-within .strip-track,
.s-photo-strip.is-paused .strip-track { animation-play-state: paused; }
@keyframes strip-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  /* No movement: the strip becomes a row people scroll themselves. */
  .strip-viewport { overflow-x: auto; }
  .strip-track { animation: none; }
  .strip-track [aria-hidden="true"] { display: none; }
  .strip-toggle { display: none; }
}

/* ---- Past events ---- */
.s-past-events { background: var(--bg); padding: 88px 0; }
.past-list { display: grid; gap: 28px; max-width: 1080px; margin: 0 auto; }
.past-event { background: #fff; border: 1px solid var(--hairline); border-radius: 22px; padding: 26px; box-shadow: var(--shadow-md); }
.past-event h3 { font-size: 20px; letter-spacing: -0.02em; margin: 0; }
.past-event .when { color: var(--ink-400); font-size: 14px; margin: 4px 0 16px; }
.past-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.past-photos a { position: relative; display: block; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--teal-50); }
.past-photos a[hidden] { display: none; }
.past-photos img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
@media (hover: hover) { .past-photos a:hover img { transform: scale(1.05); } }
.past-photos a:focus-visible { outline: 3px solid var(--teal-deep); outline-offset: 2px; }
.past-photos .more { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: rgba(5,63,63,.62); color: #fff; font-family: var(--font-display); font-weight: 800; font-size: 22px; }

/* ---- Host your workshop ---- */
.s-host { background: var(--gold-100); padding: 88px 0; border-top: 1px solid var(--gold-300); }
.host-card { max-width: 820px; margin: 0 auto; text-align: center; }
.host-card .eyebrow { color: var(--teal); margin-bottom: 12px; }
.host-card h2 { font-size: clamp(28px, 3.6vw, 40px); letter-spacing: -0.03em; line-height: 1.1; }
.host-card p { color: var(--ink-700); font-size: 17px; line-height: 1.6; margin: 16px auto 0; max-width: 64ch; }
.host-card .btn { margin-top: 30px; }

/* ---- Photo viewer ---- */
.lightbox { border: 0; padding: 0; margin: 0; inset: 0; background: transparent; width: 100%; height: 100%; max-width: none; max-height: none; }
.lightbox::backdrop { background: rgba(3,30,30,.92); }
.lightbox-inner { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 56px 64px; box-sizing: border-box; }
.lightbox img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 8px; }
.lightbox button { position: absolute; background: rgba(255,255,255,.14); color: #fff; border: 1.5px solid rgba(255,255,255,.5); border-radius: 50%; width: 48px; height: 48px; font-size: 22px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lightbox button:hover { background: rgba(255,255,255,.28); }
.lightbox button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.lightbox [data-lb-close] { top: 14px; right: 14px; }
.lightbox [data-lb-prev] { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox [data-lb-next] { right: 10px; top: 50%; transform: translateY(-50%); }
.lightbox .lb-count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #fff; font-size: 14px; }

@media (max-width: 900px) {
  .workshops-grid { grid-template-columns: 1fr; max-width: 560px; }
}
@media (max-width: 640px) {
  .event-cover { margin: -30px -30px 0; }
  .strip-track img { height: 160px; }
  .past-photos { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .lightbox-inner { padding: 64px 8px; }
  .lightbox [data-lb-prev], .lightbox [data-lb-next] { top: auto; bottom: 8px; transform: none; }
}
