/* =====================================================================
   SINGLE EVENT  — ported from surfside-single-event.html
   Loaded on single tribe_events (see functions.php).
   Shared chrome + .btn-coral-full/.btn-outline-full/.section-link live in style.css.
   ===================================================================== */

/* GALLERY HERO (shared component with single listings — adaptive to photo count) */
.gallery-hero { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 380px 200px; gap: 3px; max-height: 585px; }
.gallery-main { grid-row: span 2; position: relative; overflow: hidden; cursor: pointer; }
.gallery-thumb { position: relative; overflow: hidden; cursor: pointer; }
.gallery-img { width: 100%; height: 100%; background-size: cover; background-position: center; transition: transform .4s ease; }
.gallery-img--event-fallback { background: linear-gradient(160deg, var(--teal) 0%, var(--ocean) 55%, var(--ocean-dark) 100%); }
.gallery-main:hover .gallery-img, .gallery-thumb:hover .gallery-img { transform: scale(1.04); }
.gallery-hero--single { grid-template-columns: 1fr; grid-template-rows: clamp(340px, 44vw, 520px); }
.gallery-hero--duo { grid-template-columns: 2fr 1fr; grid-template-rows: clamp(340px, 40vw, 520px); }
.gallery-hero--single .gallery-main, .gallery-hero--duo .gallery-main { grid-row: auto; }
.gallery-view-all { position: absolute; bottom: 1rem; right: 1rem; background: rgba(255,255,255,.92); color: var(--text); font-size: .65rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .5rem 1rem; border-radius: 4px; cursor: pointer; transition: background .2s; border: none; }
.gallery-view-all:hover { background: #fff; }
.gallery-breadcrumb { position: absolute; top: 1.25rem; left: 1.25rem; background: rgba(15,74,99,.8); backdrop-filter: blur(8px); color: #fff; font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: .45rem .9rem; border-radius: 4px; display: flex; align-items: center; gap: .4rem; z-index: 10; }
.gallery-breadcrumb a { color: rgba(255,255,255,.85); text-decoration: none; }
.gallery-breadcrumb a:hover { color: #fff; }
.gallery-breadcrumb span { color: rgba(255,255,255,.35); }

/* LIGHTBOX (shared with single listings) */
.gallery-main[data-lb-index], .gallery-thumb[data-lb-index] { cursor: pointer; }
.gallery-main[data-lb-index]:focus-visible, .gallery-thumb[data-lb-index]:focus-visible { outline: 3px solid var(--teal); outline-offset: -3px; }
.vsb-lightbox { position: fixed; inset: 0; z-index: 9999; background: rgba(10,25,35,.94); display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: opacity .25s ease; }
.vsb-lightbox.is-open { opacity: 1; visibility: visible; }
.vsb-lightbox-img { max-width: 90vw; max-height: 82vh; border-radius: 6px; box-shadow: 0 12px 48px rgba(0,0,0,.55); object-fit: contain; }
.vsb-lb-btn { position: absolute; background: rgba(255,255,255,.12); color: #fff; border: none; cursor: pointer; width: 48px; height: 48px; border-radius: 50%; font-size: 1.6rem; line-height: 1; display: flex; align-items: center; justify-content: center; transition: background .2s; }
.vsb-lb-btn:hover { background: rgba(255,255,255,.28); }
.vsb-lb-prev { left: 2vw; top: 50%; transform: translateY(-50%); }
.vsb-lb-next { right: 2vw; top: 50%; transform: translateY(-50%); }
.vsb-lb-close { top: 1.5rem; right: 1.5rem; width: 42px; height: 42px; font-size: 1.1rem; }
.vsb-lb-count { position: absolute; bottom: 1.5rem; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.75); font-size: .8rem; letter-spacing: .1em; }

/* PAST EVENT — visual cue that the event has already happened */
.gallery-hero.is-past .gallery-img { filter: grayscale(.55) brightness(.96); }
.event-past-notice { display: flex; align-items: center; gap: .7rem; background: var(--coral); border-radius: 8px; padding: .95rem 1.25rem; font-size: .9rem; font-weight: 700; color: #fff; margin-bottom: 1.35rem; line-height: 1.4; box-shadow: 0 3px 14px rgba(232,98,42,.28); }
.event-past-notice i { color: #fff; font-size: 1.15rem; flex-shrink: 0; }
.event-past-notice a { color: #fff; text-decoration: underline; }
.event-tag-past { background: var(--coral); color: #fff; }

/* TITLE BLOCK (sits below the gallery now, like single listings) */
.event-title-block { margin-bottom: 1.75rem; }
.event-hero-tags { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.event-tag { font-size: .6rem; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; padding: .3rem .8rem; border-radius: 3px; }
.event-tag-category { background: var(--teal); color: #fff; }
.event-tag-featured { background: var(--coral); color: #fff; }
.event-tag-free { background: var(--sky); color: var(--ocean); border: 1px solid var(--border); }
.event-title { font-family: var(--font-head); font-size: clamp(1.8rem, 3.5vw, 3rem); font-weight: 700; color: var(--text); line-height: 1.1; }

/* BODY */
.event-body { max-width: var(--wrap); margin: 0 auto; padding: 3rem 2rem; display: grid; grid-template-columns: 1fr 360px; gap: 3rem; align-items: start; }
.event-description { font-size: 1rem; color: var(--text-mid); line-height: 1.9; margin-bottom: 2.5rem; }
.event-description p { margin-bottom: 1.2rem; }
.event-description p:last-child { margin-bottom: 0; }
.event-description strong { color: var(--text); font-weight: 700; }
.event-section-title { font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; color: var(--text); margin-bottom: 1.25rem; padding-bottom: .75rem; border-bottom: 2px solid var(--border); }

/* WHAT TO KNOW */
.know-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2.5rem; }
.know-item { background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 1.25rem; display: flex; gap: 1rem; align-items: flex-start; }
.know-icon { font-size: 1.2rem; flex-shrink: 0; }
.know-icon i { color: var(--teal); }
.know-label { font-size: .6rem; letter-spacing: .15em; text-transform: uppercase; color: var(--text-light); font-weight: 700; display: block; margin-bottom: .2rem; }
.know-value { font-size: .9rem; font-weight: 700; color: var(--text); display: block; line-height: 1.3; }
.know-sub { font-size: .75rem; color: var(--text-light); display: block; margin-top: .2rem; }

/* MAP */
.event-map { border-radius: 10px; overflow: hidden; height: 280px; border: 1px solid var(--border); background: var(--sky); margin-bottom: .75rem; }
.event-map-frame { width: 100%; height: 100%; border: 0; display: block; }
.event-map-caption { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .5rem; margin-bottom: 2.5rem; }
.event-map-location { font-weight: 700; color: var(--ocean); font-size: .9rem; line-height: 1.3; }

/* SIDEBAR */
.sidebar-card { background: #fff; border-radius: 10px; box-shadow: 0 4px 24px rgba(0,0,0,.08); overflow: hidden; margin-bottom: 1.5rem; position: sticky; top: 90px; }
.sidebar-card-header { background: var(--ocean); padding: 1.5rem; }
.sidebar-date-display { display: flex; align-items: center; gap: 1.25rem; }
.sidebar-date-block { background: #fff; border-radius: 8px; padding: .8rem 1rem; text-align: center; flex-shrink: 0; }
.sidebar-date-day { font-family: var(--font-head); font-size: 2rem; font-weight: 700; color: var(--coral-deep); line-height: 1; display: block; }
.sidebar-date-month { font-size: .55rem; letter-spacing: .2em; text-transform: uppercase; color: var(--text-light); display: block; }
.sidebar-date-year { font-size: .55rem; color: var(--text-light); display: block; }
.sidebar-event-name { font-family: var(--font-head); font-size: 1.1rem; font-weight: 700; color: #fff; line-height: 1.2; }
.sidebar-card-body { padding: 1.5rem; }
.sidebar-detail { display: flex; align-items: flex-start; gap: .75rem; padding: .9rem 0; border-bottom: 1px solid var(--border); font-size: .85rem; }
.sidebar-detail:last-of-type { border-bottom: none; }
.sidebar-detail-icon { font-size: 1rem; flex-shrink: 0; margin-top: .1rem; width: 1.2rem; text-align: center; }
.sidebar-detail-icon i { color: var(--ocean); }
.sidebar-detail-label { font-size: .6rem; letter-spacing: .15em; text-transform: uppercase; color: var(--text-light); font-weight: 700; display: block; margin-bottom: .15rem; }
.sidebar-detail-value { color: var(--text); font-weight: 600; line-height: 1.4; }
.sidebar-cta { padding: 1.5rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: .75rem; }

/* SHARE (not in global stylesheet) */
.share-row { display: flex; align-items: center; justify-content: center; gap: .75rem; padding-top: .5rem; }
.share-label { font-size: .6rem; letter-spacing: .15em; text-transform: uppercase; color: var(--text-light); font-weight: 700; }
.share-btn { width: 32px; height: 32px; border-radius: 50%; background: var(--sky); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; font-size: .85rem; cursor: pointer; transition: background .2s; text-decoration: none; }
.share-btn i { color: var(--ocean); font-size: .8rem; transition: color .2s; }
.share-btn:hover { background: var(--teal-light); }
.share-btn:hover i { color: #fff; }

/* MORE EVENTS */
.more-events { max-width: var(--wrap); margin: 0 auto 4rem; padding: 0 2rem; }
.more-events-header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 1.5rem; gap: 1rem; flex-wrap: wrap; }
.more-events-title { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: var(--text); }
.more-events-title em { font-style: italic; color: var(--ocean); }
.more-events-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.mini-event-card { background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 2px 12px rgba(0,0,0,.07); display: flex; transition: transform .3s, box-shadow .3s; text-decoration: none; }
.mini-event-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(0,0,0,.1); }
.mini-event-date { background: var(--ocean); color: #fff; padding: 1rem .75rem; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 60px; flex-shrink: 0; }
.mini-date-day { font-family: var(--font-head); font-size: 1.5rem; font-weight: 700; line-height: 1; display: block; }
.mini-date-month { font-size: .5rem; letter-spacing: .15em; text-transform: uppercase; opacity: .8; display: block; }
.mini-event-body { padding: 1rem 1.25rem; }
.mini-event-title { font-weight: 700; font-size: .9rem; color: var(--text); line-height: 1.3; margin-bottom: .3rem; }
.mini-event-meta { font-size: .7rem; color: var(--text-light); }

/* RESPONSIVE */
@media (max-width: 1000px) {
  .event-body { grid-template-columns: 1fr; }
  .sidebar-card { position: static; }
  .more-events-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  .gallery-hero, .gallery-hero--duo { grid-template-columns: 1fr; grid-template-rows: 280px; }
  .gallery-thumb { display: none; }
}
@media (max-width: 640px) {
  .know-grid { grid-template-columns: 1fr; }
  .more-events-grid { grid-template-columns: 1fr; }
}
