/* Scoped cultural-program prototype; reuse the directory's typography and palette. */
/* This unboxed section must not inherit the global section's rounded clipping. */
#pujoNights { position: relative; margin: 22px 0 28px; padding: 0; border: 0; border-radius: 0; overflow: visible; background: none; box-shadow: none; min-width: 0; }
#pujoNights[hidden] { display: none; }
.pujo-nights-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; padding-inline: 2px; }
#pujoNights h2 { margin: 0; font-family: var(--font-h); font-size: 1.65rem; color: var(--brand-dark); }
#pujoNights .pujo-nights-subtitle { margin: 3px 0 0; font-size: .875rem; color: var(--muted); }
.program-note { font-size: .75rem; line-height: 1.5; color: var(--muted); }
.pujo-nights-controls { display: flex; gap: 6px; flex-shrink: 0; }
.pujo-nights-controls[hidden] { display: none; }
.pujo-nights-controls button { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: var(--cream); color: var(--brand-dark); cursor: pointer; font: inherit; }
.pujo-nights-track { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, calc((100% - (var(--featured-columns, 4) - 1) * 14px) / var(--featured-columns, 4))); gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 3px 2px 12px; scrollbar-width: thin; scrollbar-color: #b69a77 transparent; }
.program-card { overflow: hidden; border-radius: 16px; background: #301b19; color: #fff8ed; border: 1px solid #523631; scroll-snap-align: start; min-width: 0; transition: border-color 160ms ease, box-shadow 160ms ease; }
.program-card--featured { border-color: #9c763b; }
.program-photo { position: relative; height: 145px; background: #594237; overflow: hidden; isolation: isolate; }
.program-photo::after { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(transparent 30%, #301b19); pointer-events: none; }
.program-photo img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1); transition: transform 220ms ease; }
.program-kind { position: absolute; bottom: 10px; left: 16px; right: 10px; z-index: 2; color: #f6d58c; text-transform: uppercase; letter-spacing: .09em; font-size: .75rem; font-weight: 600; }
.program-card-body { padding: 0 16px 10px; }
#pujoNights .program-card h3 { color: #fff8ed; font-family: var(--font-h); font-size: 1.28rem; line-height: 1.25; margin: 0 0 9px; }
.program-date { display: block; margin: 0; font-size: .8125rem; line-height: 1.6; }
#pujoNights .program-host { margin: 14px 0 3px; color: #fff8ed; font-size: .875rem; line-height: 1.45; }
#pujoNights .program-city { margin: 0; color: #dfcabe; font-size: .8125rem; }
.program-link { display: inline-flex; min-height: 44px; align-items: center; font-weight: 600; font-size: .875rem; }
#pujoNights .program-link { color: #f6d58c; margin-top: 5px; }
.program-link:focus-visible, .program-details summary:focus-visible, .pujo-nights-controls button:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
.pujo-featured-program { margin-top: 14px; container-type: inline-size; }
#puja-directory .pujo-featured-program + .puja-actions { padding-top: 0; }
.program-details summary { min-height: 44px; padding: 10px 0; cursor: pointer; font-size: .875rem; line-height: 1.6; color: var(--brand); font-weight: 700; }
.program-attractions-stars { white-space: nowrap; }
.cultural-program-list { padding: 4px 0 12px; }
.cultural-program-list .program-event-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; list-style: none; margin: 0; padding: 0; }
.cultural-program-list .program-event { display: flex; flex-direction: column; gap: 7px; min-width: 0; margin: 0; padding: 12px; border: 1px solid #dfc9ac; border-radius: 10px; background: linear-gradient(145deg, #fffdf8, #fff5e7); overflow-wrap: anywhere; transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease; }
.cultural-program-list .program-event:focus-within { border-color: #ba8b4a; box-shadow: 0 5px 14px rgba(100, 16, 16, .08); }
@media (hover: hover) and (pointer: fine) {
  .cultural-program-list .program-event:hover { transform: translateY(-2px); border-color: #ba8b4a; box-shadow: 0 5px 14px rgba(100, 16, 16, .08); }
}
.program-event:only-child { grid-column: 1 / -1; }
.cultural-program-list .program-event-title { margin: 0; font: 700 .875rem/1.4 var(--font-b); color: var(--brand-dark); }
.cultural-program-list .program-event p { margin: 0; font-size: .75rem; line-height: 1.5; color: var(--muted); }
.cultural-program-list .program-event .program-date { font-size: .6875rem; font-weight: 600; color: #856039; }
.program-event-links { display: flex; flex-wrap: wrap; gap: 0 10px; margin-top: auto; padding-top: 3px; }
.cultural-program-list .program-event-links .program-link { min-height: 32px; font-size: .75rem; line-height: 1.4; }
.cultural-program-list .program-event-links .program-link--disabled { color: #967f70; cursor: not-allowed; text-decoration: none; white-space: nowrap; }
@container (max-width: 330px) { .cultural-program-list .program-event-grid { grid-template-columns: minmax(0, 1fr); } }
.puja-card:focus { outline: 3px solid var(--gold); outline-offset: 3px; }
/* Expanding program details must not re-anchor the viewport to moving content. */
#pujaDirectory { overflow-anchor: none; }
.puja-card { scroll-margin-top: 100px; }
@media (hover: hover) and (pointer: fine) {
  .program-card:hover { border-color: #d7a32f; box-shadow: 0 4px 10px rgba(100, 16, 16, .14); }
  .program-card:hover .program-photo img { transform: scale(1.025); }
}

@media (max-width: 760px) {
  .cultural-program-list .program-event-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .cultural-program-list .program-event { gap: 3px; padding: 10px 12px 6px; }
  .program-event-links { margin-top: 0; padding-top: 0; }
  .cultural-program-list .program-event-links .program-link { min-height: 28px; }
  .pujo-nights-track { grid-auto-columns: 78vw; }
  .program-photo { height: 160px; }
  .pujo-nights-heading { align-items: flex-start; }
  .pujo-nights-controls { display: none; }
  #pujoNights h2 { font-size: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } .pujo-nights-track { scroll-behavior: auto; } .program-card, .program-photo img { transition: none; } .program-card:hover, .program-card:hover .program-photo img { transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .cultural-program-list .program-event { transition: none; }
  .cultural-program-list .program-event:hover { transform: none; }
}
/* Keep the swipe track inside the single-column mobile grid. */
.prototype-directory-layout > #puja-directory { min-width: 0; }
@media (max-width: 1180px) { .prototype-directory-layout > #puja-directory { width: 100%; } }
.program-card { display: flex; flex-direction: column; }
.program-photo { flex-shrink: 0; }
.program-card-body { display: flex; flex-direction: column; flex: 1; }
#pujoNights .program-link { margin-top: auto; padding-top: 8px; }

/* Neutral local artwork until an organizer supplies approved artist imagery. */
.program-photo--neutral { background: radial-gradient(ellipse at 65% 0, rgba(215, 163, 47, .18), transparent 65%), #38251f; }
.program-artwork { position: absolute; width: 118px; height: 118px; top: 5px; left: calc(50% - 59px); background: var(--gold-soft); opacity: .38; -webkit-mask: url('../assets/motifs/alpona-circle.svg') center / contain no-repeat; mask: url('../assets/motifs/alpona-circle.svg') center / contain no-repeat; }
.program-photo img { position: relative; z-index: 0; }
#pujoNights .program-note { color: #dfcabe; }
.cultural-program-list .program-link { display: flex; width: fit-content; }

/* Shared content rows keep every carousel card aligned, including offscreen cards.
   Rows grow together for long names; no title is clipped or shortened. */
#pujoNights .program-card h3 { overflow-wrap: anywhere; }
#pujoNights .program-host { overflow-wrap: anywhere; }
@supports (grid-template-rows: subgrid) {
  .pujo-nights-track {
    grid-template-rows: auto auto auto auto auto auto minmax(52px, 1fr);
    row-gap: 0;
  }
  .pujo-nights-track > .program-card {
    display: grid;
    grid-row: 1 / span 7;
    grid-template-rows: subgrid;
    row-gap: 0;
  }
  .program-card-body {
    display: grid;
    grid-row: 2 / span 6;
    grid-template-rows: subgrid;
    row-gap: 0;
    min-width: 0;
  }
  .program-card-body > h3 { grid-row: 1; }
  .program-card-body > .program-date { grid-row: 2; }
  .program-card-body > .program-host { grid-row: 3; }
  .program-card-body > .program-city { grid-row: 4; }
  .program-card-body > .program-note { grid-row: 5; }
  .program-card-body > .program-link { grid-row: 6; align-self: end; }
}

/* A single feature stays readable instead of stretching across a wide screen. */
.pujo-nights-track[data-event-count="1"] { grid-auto-columns: min(100%, 460px); }

/* Extend the existing tracked link over the card: one destination and tab stop. */
.program-card--featured { position: relative; cursor: pointer; }
.program-card--featured .program-link::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 3;
  border-radius: inherit;
}
.program-card--featured:focus-within { outline: 3px solid var(--gold); outline-offset: 2px; }

/* Pointer activation should not leave a selection ring on the disclosure. */
.program-details summary.is-pointer-activated:focus { outline: none; }

.cultural-program-list .program-entry-free { color: #397347; cursor: default; }
