/* Public individual events only; shared site branding and shell stay in styles.css. */
.event-page { margin-top: 82px; padding-bottom: 72px; background: var(--surface); color: var(--ink); }
.event-container { max-width: 1240px; margin-inline: auto; padding: 0 32px; }
.event-hero { margin: 0 auto; max-width: 1440px; padding: 20px 32px 0; text-align: center; }
.event-hero img { display: block; width: auto; height: auto; max-width: 100%; max-height: 780px; margin-inline: auto; object-fit: contain; border-radius: var(--radius); }
.event-breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; padding-block: 24px; color: var(--muted); font-size: .8rem; overflow-wrap: anywhere; }
.event-page a { color: var(--blue); }
.event-layout { display: grid; grid-template-columns: minmax(0, 2.2fr) minmax(280px, 1fr); gap: 38px; align-items: start; }
.event-layout > *, .event-summary > div > div { min-width: 0; }
.event-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.event-badge { padding: 5px 15px; border: 1px solid #bad4e6; border-radius: 24px; color: var(--blue); background: #edf6fc; font-size: .78rem; font-weight: 600; }
.event-badge:nth-child(even) { color: #176449; background: var(--soft); border-color: #b8d7c6; }
.event-heading h1 { margin: 0 0 12px; font-size: clamp(1.9rem, 3.3vw, 2.8rem); line-height: 1.14; letter-spacing: -.035em; font-weight: 750; overflow-wrap: anywhere; }
.event-excerpt { margin: 0; font-size: 1.08rem; line-height: 1.65; color: #43556b; white-space: pre-line; overflow-wrap: anywhere; }
.event-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-block: 26px; font-size: .93rem; line-height: 1.55; }
.event-summary > div { display: flex; align-items: flex-start; gap: 12px; }
.event-summary span { display: block; color: var(--muted); }
.event-icon { flex: 0 0 24px; color: var(--blue); }
.event-summary .event-icon { width: 30px; height: 30px; flex-basis: 30px; }
.event-actions { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; padding-bottom: 28px; }
.event-calendar { position: relative; max-width: 100%; }
.event-calendar summary, .event-page .event-register { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 13px 18px; background: var(--blue); color: white; border-radius: 28px; cursor: pointer; font: inherit; font-size: .9rem; font-weight: 600; text-decoration: none; list-style: none; }
.event-calendar summary::-webkit-details-marker { display: none; }
.event-calendar summary .event-icon { color: inherit; }
.event-calendar-menu { position: absolute; top: calc(100% + 8px); left: 0; width: 260px; max-width: calc(100vw - 48px); z-index: 5; background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px; box-shadow: var(--shadow); }
.event-calendar-menu a { display: block; padding: 12px; font-size: .9rem; border-radius: 5px; text-decoration: none; }
.event-calendar-menu a:hover { background: var(--soft); }
.event-share-label { display: block; font-size: .8rem; font-weight: 600; margin-bottom: 8px; }
.event-share-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.event-share-buttons a, .event-share-buttons button { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: #f4f7fa; color: var(--ink); font: inherit; font-size: .78rem; text-decoration: none; cursor: pointer; }
.event-share-buttons a:first-child { background: var(--blue); border-color: var(--blue); color: white; }
.event-share-buttons [hidden] { display: none; }
.event-share-buttons a:hover, .event-share-buttons button:hover { box-shadow: inset 0 0 0 1px var(--blue); }
.event-page :is(a, button, summary):focus-visible { outline: 3px solid var(--teal); outline-offset: 4px; }
.event-body { border-top: 1px solid var(--line); padding-top: 24px; font-size: 1rem; line-height: 1.8; }
.event-body > :first-child { margin-top: 0; }
.event-body p { margin: 0 0 1.15em; }
.event-body h2 { font-size: 1.4rem; line-height: 1.3; margin: 1.5em 0 .65em; }
.event-body h3 { font-size: 1.13rem; line-height: 1.4; margin: 1.4em 0 .6em; }
.event-body :is(ul, ol) { padding-left: 1.5em; margin: .6em 0 1.3em; }
.event-body li { padding-left: .25em; margin-block: .4em; }
.event-body blockquote { margin: 24px 0; padding: 16px 20px; border-left: 3px solid var(--blue); border-radius: 4px; background: #edf6fc; color: var(--blue); font-style: italic; }
.event-body blockquote p:last-child { margin-bottom: 0; }
.event-body a, .event-detail-row a, .event-summary a { text-decoration: underline; text-underline-offset: 3px; }
.event-sidebar { display: grid; gap: 20px; }
.event-info-card { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: white; box-shadow: 0 5px 24px rgb(16 38 63 / 5%); overflow-wrap: anywhere; }
.event-info-card h2 { margin: 0 0 20px; font-size: 1.2rem; line-height: 1.3; letter-spacing: -.025em; }
.event-info-card dl { margin: 0 0 24px; }
.event-detail-row { position: relative; padding-left: 38px; margin-top: 22px; line-height: 1.55; font-size: .9rem; }
.event-detail-row .event-icon { position: absolute; left: 0; top: 2px; }
.event-detail-row dt { font-size: .8rem; font-weight: 650; margin-bottom: 2px; }
.event-detail-row dd { margin: 0; color: #43556b; }
.event-detail-row dd a { display: block; }
.event-info-card > p { margin: -10px 0 18px; color: var(--muted); font-size: .9rem; }
.event-info-card .event-register { margin-bottom: 12px; }
.event-info-card .event-calendar-menu { left: auto; right: 0; }
.event-community { display: grid; gap: 8px; text-align: center; background: var(--soft); padding: 25px 16px; border-radius: var(--radius); font-size: .9rem; }
.event-community span { color: var(--muted); }
.event-feedback:empty { display: none; }
.event-feedback:not(:empty) { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 20; width: max-content; max-width: calc(100vw - 32px); margin: 0; padding: 14px 20px; border-radius: var(--radius); background: var(--ink); color: white; box-shadow: var(--shadow); overflow-wrap: anywhere; }
.event-related { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.event-related-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.event-related-heading h2 { font-size: 1.5rem; margin: 0; }
.event-related-heading a { font-size: .9rem; }
.event-related-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.event-related-card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.event-related-card img { width: 100%; height: 190px; object-fit: contain; background: #f3f6f8; display: block; }
.event-related-card > div { padding: 20px; }
.event-related-card h3 { font-size: 1.1rem; line-height: 1.4; margin: 0 0 12px; overflow-wrap: anywhere; }
.event-related-card p { color: var(--muted); margin: 6px 0 0; font-size: .9rem; }
@media (max-width: 920px) {
  .event-layout { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .event-container { padding-inline: 24px; }
  .event-hero { padding-inline: 24px; }
  .event-sidebar { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .event-container { padding-inline: 18px; }
  .event-hero { padding: 12px 12px 0; }
  .event-hero img { max-height: none; }
  .event-breadcrumb { padding-block: 20px; }
  .event-summary { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .event-info-card { padding: 22px; }
  .event-related-grid { grid-template-columns: minmax(0, 1fr); }
  .event-heading h1 { font-size: 2rem; }
}
/* The shared script clears is-scrolled at the top; event & gallery pages need a solid header there too. */
body:has(.event-page, .gallery-album-page, .gallery-archive-section) .site-header { color: var(--ink); background: rgba(255, 255, 255, .97); padding-block: 10px; }
body:has(.event-page, .gallery-album-page, .gallery-archive-section) .site-header .brand img { width: 48px; height: 48px; }

/* Supplemental Cloudinary event photos. */
.event-gallery { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--line); }
.event-gallery-heading { display: flex; justify-content: space-between; gap: 16px; align-items: baseline; margin-bottom: 20px; flex-wrap: wrap; }
.event-gallery-heading h2 { font-size: 1.4rem; margin: 0; }
.event-gallery-meta { display: flex; align-items: baseline; gap: 10px; color: var(--muted); font-size: .88rem; }
.event-gallery-heading > span { color: var(--muted); font-size: .85rem; white-space: nowrap; }
.event-gallery-album-link { font-weight: 700; color: var(--teal); text-decoration: none; }
.event-gallery-album-link:hover { text-decoration: underline; }
.event-gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.event-gallery-photo { display: block; border-radius: var(--radius); overflow: hidden; background: var(--soft); text-decoration: none; }
.event-gallery-photo img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; transition: transform .2s ease; }
.event-gallery-photo:hover img { transform: scale(1.025); }
.event-gallery [hidden] { display: none; }
.event-gallery-more { display: block; margin: 22px auto 0; padding: 12px 24px; background: var(--blue); color: white; border: 0; border-radius: 24px; font: inherit; font-weight: 700; cursor: pointer; transition: background .18s; }
.event-gallery-more:hover { background: #133a5c; }
.event-gallery-progress { color: var(--muted); font-size: .85rem; text-align: center; margin-top: 12px; }
.event-gallery-progress:empty { display: none; }
.event-lightbox { width: min(1100px, calc(100vw - 24px)); max-width: none; max-height: calc(100dvh - 24px); padding: 16px; border: 1px solid #405369; border-radius: 12px; color: white; background: #102033; overflow: auto; }
.event-lightbox::backdrop { background: rgb(0 0 0 / 85%); }
.event-lightbox-toolbar, .event-lightbox-controls { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.event-lightbox button { min-height: 44px; padding: 10px 16px; border: 1px solid #718195; border-radius: 6px; color: white; background: transparent; cursor: pointer; font: inherit; }
.event-lightbox button:disabled { opacity: .45; cursor: default; }
.event-lightbox-stage { display: grid; place-items: center; min-height: 120px; margin-block: 12px; }
.event-lightbox-stage img { display: block; max-width: 100%; width: auto; height: auto; max-height: calc(100dvh - 200px); object-fit: contain; }
.event-lightbox-stage p { text-align: center; }
.event-lightbox :is(button,a):focus-visible { outline-color: #8bdacb; }

/* Public Gallery Archive & Album Pages */
.gallery-container { width: min(1200px, calc(100% - 40px)); margin: 0 auto; }
.gallery-hero { min-height: 240px; }
.gallery-archive-section { padding-block: 40px 64px; }
.gallery-albums-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; }
.gallery-album-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.gallery-album-card:hover { transform: translateY(-4px); box-shadow: 0 20px 48px rgba(16, 38, 63, .12); }
.gallery-album-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--soft); }
.gallery-album-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .22s ease; }
.gallery-album-card:hover .gallery-album-media img { transform: scale(1.03); }
.gallery-album-badge { position: absolute; bottom: 10px; right: 10px; background: rgba(16, 32, 51, .88); backdrop-filter: blur(6px); color: #fff; font-size: .78rem; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.gallery-album-info { padding: 20px; display: flex; flex-direction: column; flex: 1; gap: 10px; }
.gallery-album-date { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: .84rem; font-weight: 600; }
.gallery-album-info h3 { margin: 0; font-size: 1.18rem; line-height: 1.35; }
.gallery-album-info h3 a { color: var(--ink); text-decoration: none; }
.gallery-album-info h3 a:hover { color: var(--teal); }
.gallery-album-excerpt { margin: 0; color: var(--muted); font-size: .9rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.gallery-album-preview-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 4px; }
.gallery-album-thumb { aspect-ratio: 4 / 3; border-radius: 4px; overflow: hidden; background: var(--soft); }
.gallery-album-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery-album-footer { margin-top: auto; padding-top: 14px; }

/* Empty state */
.gallery-empty-state { text-align: center; padding: 64px 20px; max-width: 620px; margin: 0 auto; }
.gallery-empty-icon { font-size: 3.2rem; margin-bottom: 16px; }
.gallery-empty-state h2 { font-size: 1.6rem; margin: 0 0 12px; color: var(--ink); }
.gallery-empty-state p { color: var(--muted); font-size: 1.02rem; line-height: 1.6; margin-bottom: 24px; }
.gallery-empty-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* Individual Gallery Album Page */
.gallery-album-page { padding-block: 24px 64px; }
.gallery-album-header { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.gallery-album-header-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 14px; color: var(--muted); font-size: .9rem; font-weight: 600; }
.gallery-album-header-meta svg { vertical-align: middle; margin-right: 4px; }
.gallery-header-date, .gallery-header-location { display: inline-flex; align-items: center; }
.gallery-album-header h1 { font-size: clamp(1.8rem, 3.8vw, 2.6rem); margin: 0 0 14px; color: var(--ink); line-height: 1.2; }
.gallery-album-desc { color: var(--muted); font-size: 1.05rem; line-height: 1.6; max-width: 820px; margin: 0 0 20px; }
.gallery-album-header-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 12px; }

@media (max-width: 980px) {
  .gallery-albums-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
}
@media (max-width: 920px) {
  .event-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .gallery-albums-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .gallery-album-header h1 { font-size: 1.7rem; }
}
@media (max-width: 400px) {
  .event-gallery-grid { gap: 8px; }
  .event-lightbox { padding: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .event-gallery-photo img, .gallery-album-card, .gallery-album-media img { transition: none; }
}
