/* Events: shared section styles and behaviour (all themes).
 * event_types (sticky tabs + rows), event_packages, event_gallery + lightbox.
 * Drawn with the theme's --prt-* tokens; a theme restyles them in its own CSS. */

/* ---------- event_types: sticky tab bar ---------- */
.pe-types { position: relative; }
.pe-types [data-pe-row] { scroll-margin-top: var(--pe-margin, 140px); }
.pe-tabs { position: sticky; top: var(--pe-top, 0px); z-index: 30; padding: 10px 0; margin: 0 0 clamp(24px, 4vw, 48px); background: transparent; border-block: 1px solid transparent; transition: border-color .25s, box-shadow .25s, background-color .25s; }
.pe-tabs.is-stuck { background: color-mix(in srgb, var(--prt-bg, #fff) 92%, transparent); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom-color: var(--prt-line); box-shadow: 0 10px 24px -18px rgba(0, 0, 0, .35); }
.pe-tabs__list { list-style: none; margin: 0 auto; padding: 4px 2px; display: flex; gap: 8px; justify-content: center; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; }
.pe-tabs__list::-webkit-scrollbar { display: none; }
.pe-tabs__list li { flex: none; }
.pe-tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--prt-line); background: var(--prt-surface); color: var(--prt-ink); font-family: var(--prt-font-display); font-weight: 700; font-size: .95rem; text-decoration: none; white-space: nowrap; transition: background .2s, color .2s, border-color .2s; }
.pe-tab .ic { width: 1.1em; height: 1.1em; color: var(--prt-primary-text); }
.pe-tab:hover { border-color: var(--prt-primary); }
.pe-tab.is-active { background: var(--prt-primary); border-color: var(--prt-primary); color: var(--prt-primary-ink); }
.pe-tab.is-active .ic { color: currentColor; }
.pe-tab:focus-visible { outline: 3px solid var(--prt-primary-text); outline-offset: 2px; }
@media (max-width: 860px) {
	.pe-tabs__list { justify-content: flex-start; padding-inline: 2px; }
	.pe-tabs { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 22px), transparent); }
}

/* ---------- event_types: rows ---------- */
.pe-rows { display: grid; gap: clamp(48px, 7vw, 96px); }
.pe-row { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; border-radius: calc(var(--prt-radius, 18px) + 8px); transition: box-shadow .4s; }
.pe-row.is-flip .pe-row__media { order: 2; }
.pe-types .pe-row__media img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--prt-radius, 18px); display: block; }
.pe-row h3 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.pe-row h3:focus { outline: none; }
.pe-row h3 em { font-style: normal; color: var(--prt-primary-text); }
.pe-row__label { margin: 18px 0 8px !important; font-size: .78rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--prt-ink) !important; }
.pe-row__pop { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; }
.pe-row__pop li { display: flex; gap: 8px; align-items: flex-start; color: var(--prt-ink); font-weight: 600; line-height: 1.4; }
.pe-row__pop .ic { width: 1.1em; height: 1.1em; flex: none; margin-top: .12em; color: var(--prt-primary-text); }
.pe-row.is-flash { box-shadow: 0 0 0 3px var(--prt-primary), 0 0 0 14px color-mix(in srgb, var(--prt-primary) 16%, transparent); }
@media (max-width: 860px) {
	.pe-row { grid-template-columns: 1fr; }
	.pe-row.is-flip .pe-row__media { order: 0; }
}
@media (max-width: 480px) { .pe-row__pop { grid-template-columns: 1fr; } }

/* ---------- event_packages ---------- */
.pe-packs__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; align-items: stretch; }
.pe-pack { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 28px 26px; background: var(--prt-surface); border: 1px solid var(--prt-line); border-radius: var(--prt-radius, 18px); }
.pe-pack.is-featured { border: 2px solid var(--prt-primary); box-shadow: 0 18px 40px -20px rgba(0, 0, 0, .35); }
.pe-pack__badge { position: absolute; top: -13px; left: 24px; padding: 4px 12px; border-radius: 999px; background: var(--prt-primary); color: var(--prt-primary-ink); font-size: .8rem; font-weight: 800; }
.pe-pack h3 { margin: 0; }
.pe-pack__blurb { margin: 0 !important; }
.pe-pack__price { margin: 10px 0 6px !important; color: var(--prt-muted); display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.pe-pack__price b { font-family: var(--prt-font-display); font-size: 2.4rem; line-height: 1; color: var(--prt-ink); }
.pe-pack__price span { font-weight: 700; }
.pe-pack__list { list-style: none; margin: 8px 0 22px; padding: 16px 0 0; border-top: 1px solid var(--prt-line); display: grid; gap: 10px; flex: 1; align-content: start; }
.pe-pack__list li { display: flex; gap: 10px; align-items: flex-start; color: var(--prt-ink); line-height: 1.45; }
.pe-pack__list .ic { width: 1.1em; height: 1.1em; flex: none; margin-top: .15em; color: var(--prt-primary-text); }
.pe-pack .prts-btn { justify-content: center; }
.pe-packs__note { text-align: center; max-width: 640px; margin: 26px auto 0 !important; font-size: .92rem; }
@media (max-width: 900px) { .pe-packs__grid { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; gap: 30px; } }

/* ---------- event_gallery ---------- */
.pe-gal { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(150px, 16vw, 230px); grid-auto-flow: dense; gap: 14px; }
.pe-gal__item { min-width: 0; }
.pe-gal__item:nth-child(10n + 1), .pe-gal__item:nth-child(10n + 8) { grid-column: span 2; grid-row: span 2; }
.pe-gal__link { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; border-radius: var(--prt-radius, 18px); background: var(--prt-surface-alt); }
.pe-gal .pe-gal__link img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; transition: transform .5s ease; }
.pe-gal__link:hover img, .pe-gal__link:focus-visible img { transform: scale(1.05); }
.pe-gal__link:focus-visible { outline: 3px solid var(--prt-primary-text); outline-offset: 3px; }
.pe-gal__zoom { position: absolute; right: 10px; bottom: 10px; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; opacity: 0; transform: scale(.8); transition: opacity .25s, transform .25s; }
.pe-gal__zoom .ic { width: 18px; height: 18px; }
.pe-gal__link:hover .pe-gal__zoom, .pe-gal__link:focus-visible .pe-gal__zoom { opacity: 1; transform: none; }
@media (hover: none) { .pe-gal__zoom { opacity: 1; transform: none; } }
@media (max-width: 760px) {
	.pe-gal { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 44vw; gap: 10px; }
	.pe-gal__item:nth-child(10n + 1), .pe-gal__item:nth-child(10n + 8) { grid-column: span 2; grid-row: span 1; }
}

/* ---------- lightbox (built by prt-pages-events.js) ---------- */
.pe-lb { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: transparent; color: #fff; overflow: hidden; }
.pe-lb::backdrop { background: rgba(8, 12, 22, .9); }
.pe-lb__stage { position: absolute; inset: 0; display: grid; place-items: center; padding: 64px 76px 56px; }
.pe-lb__fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 100%; max-height: 100%; pointer-events: none; }
.pe-lb__img { display: block; max-width: min(1400px, 100%); max-height: calc(100vh - 150px); max-height: calc(100dvh - 150px); width: auto; height: auto; border-radius: 12px; object-fit: contain; box-shadow: 0 20px 60px rgba(0, 0, 0, .5); pointer-events: auto; transition: opacity .25s; }
.pe-lb.is-loading .pe-lb__img { filter: blur(2px); }
.pe-lb__cap { font-weight: 600; text-align: center; max-width: 60ch; color: #fff; }
.pe-lb__count { position: absolute; top: 18px; left: 50%; transform: translateX(-50%); margin: 0; padding: 4px 12px; border-radius: 999px; background: rgba(255, 255, 255, .14); font-size: .9rem; font-weight: 700; color: #fff; }
.pe-lb__btn { position: absolute; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; cursor: pointer; transition: background .2s, transform .2s; }
.pe-lb__btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.pe-lb__btn:hover { background: rgba(255, 255, 255, .28); }
.pe-lb__btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }
.pe-lb__btn[hidden] { display: none; }
.pe-lb__prev { left: 14px; top: 50%; transform: translateY(-50%); }
.pe-lb__next { right: 14px; top: 50%; transform: translateY(-50%); }
.pe-lb__close { top: 12px; right: 14px; }
.pe-lb.is-open .pe-lb__stage { animation: pe-lb-in .3s ease both; }
@keyframes pe-lb-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
	.pe-lb__stage { padding: 64px 12px 96px; }
	.pe-lb__img { max-height: calc(100dvh - 190px); }
	.pe-lb__prev, .pe-lb__next { top: auto; bottom: 22px; transform: none; }
	.pe-lb__prev { left: calc(50% - 64px); }
	.pe-lb__next { right: calc(50% - 64px); }
}

@media (prefers-reduced-motion: reduce) {
	.pe-tabs, .pe-tab, .pe-row, .pe-gal__link img, .pe-gal__zoom, .pe-lb__img, .pe-lb__btn { transition: none !important; }
	.pe-lb.is-open .pe-lb__stage { animation: none; }
	.pe-gal__link:hover img { transform: none; }
}
