/* =============================================================================
   THE PSYRCLE — The Events Calendar (TEC / Tribe) Overrides
   File: tribe-overrides.css
   
   HOW TO USE:
   Option A (recommended): Enqueue this file from your child theme functions.php
     wp_enqueue_style(
       'psyrcle-tribe',
       get_stylesheet_directory_uri() . '/css/tribe-overrides.css',
       array('tribe-events-calendar-style'),
       '1.0.0'
     );
   
   Option B: @import this file at the bottom of style-append.css
   
   COVERS:
   1.  TEC Global / Container Reset
   2.  TEC Navigation & Header Bar
   3.  TEC List View  ← thumbnails shown, styled to brand spec
   4.  TEC Month (Grid) View
   5.  TEC Day View
   6.  TEC Single Event Page + Featured Image Slideshow
   7.  TEC Ticket / RSVP Block (Tribe Tickets)
   8.  TEC Sidebar Widgets
   9.  TEC Filter Bar (Events Filter plugin)
   10. TEC Kubio Widget Integration
   11. Slideshow JS (Splide) — enqueue snippet for functions.php
   ============================================================================= */


/* =============================================================================
   1. TEC GLOBAL / CONTAINER RESET
   ============================================================================= */

#tribe-events,
.tribe-events-page-template,
.tribe-events,
.tribe-common {
  font-family: 'DM Sans', sans-serif !important;
  font-weight: 300 !important;
  color: #3B2F24 !important; /* --psyrcle-bark */
  background: transparent !important;
}

/* Remove TEC's built-in border-radius everywhere */
.tribe-events *,
.tribe-common * {
  border-radius: 0 !important;
}

/* TEC main wrapper background */
#tribe-events-content,
.tribe-events-calendar,
.tribe-events-loop {
  background: transparent;
}

/* Tribe heading font override */
.tribe-events h1,
.tribe-events h2,
.tribe-events h3,
.tribe-events h4,
.tribe-common h1,
.tribe-common h2,
.tribe-common h3 {
  font-family: 'Cormorant Garamond', Georgia, serif !important;
  font-weight: 300 !important;
  letter-spacing: -0.01em;
}


/* =============================================================================
   2. TEC NAVIGATION & HEADER BAR
   ============================================================================= */

/* "Events" page main title */
.tribe-events-page-title,
.tribe-events-title,
h1.tribe-events-page-title {
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 300 !important;
  font-size: clamp(2.5rem, 4vw, 4.5rem) !important;
  color: #1A1612 !important; /* --psyrcle-ink */
  line-height: 1.05 !important;
}

/* Prev/Next nav buttons */
.tribe-events-nav-pagination a,
.tribe-events-c-nav__prev,
.tribe-events-c-nav__next,
.tribe-common-c-btn-border,
.tribe-events-c-nav__prev-link,
.tribe-events-c-nav__next-link {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  color: #3B2F24 !important;
  background: transparent !important;
  border: 1px solid #D4CFC7 !important;
  padding: 0.55rem 1.1rem !important;
  transition: all 0.25s !important;
  text-decoration: none !important;
}

.tribe-events-nav-pagination a:hover,
.tribe-events-c-nav__prev:hover,
.tribe-events-c-nav__next:hover,
.tribe-common-c-btn-border:hover {
  border-color: #C5A35C !important;
  color: #C5A35C !important;
}

/* View switcher (List / Month / Day tabs) */
.tribe-events-c-view-selector__list,
.tribe-events-view-selector {
  display: flex;
  gap: 0;
  border: 1px solid #D4CFC7;
}

.tribe-events-c-view-selector__list-item a,
.tribe-events-view-selector a {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: #3B2F24 !important;
  background: transparent !important;
  padding: 0.4rem 0.8rem !important;
  border-right: 1px solid #D4CFC7 !important;
  text-decoration: none !important;
  transition: all 0.2s !important;
}

.tribe-events-c-view-selector__list-item a:last-child,
.tribe-events-view-selector a:last-child {
  border-right: none !important;
}

.tribe-events-c-view-selector__list-item--active a,
.tribe-events-view-selector .tribe-active a,
.tribe-events-c-view-selector__list-item a:hover {
  background: #1A1612 !important;
  color: #F5F0E8 !important;
  border-color: #1A1612 !important;
}

/* "Today" button */
.tribe-events-c-nav__today,
.datepicker .tribe-today {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
  background: #C5A35C !important;
  color: #1A1612 !important;
  border: none !important;
  padding: 0.5rem 1rem !important;
}

/* Tribe datepicker (month/year nav) */
.tribe-events-c-nav__header-title,
.tribe-events-calendar-month__header-column-title {
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 300 !important;
  font-size: 1.2rem !important;
  color: #1A1612 !important;
}


/* =============================================================================
   3. TEC LIST VIEW
   ============================================================================= */

/* Outer list container */
.tribe-events-calendar-list,
.tribe-events-loop {
  background: transparent !important;
}

/* Month divider heading in list view */
.tribe-events-calendar-list__month-separator-text,
.tribe-events-list-separator-month span {
  font-family: 'Cormorant Garamond', serif !important;
  font-style: italic !important;
  font-weight: 300 !important;
  font-size: 1.1rem !important;
  color: #3B2F24 !important;
  opacity: 0.5 !important;
  letter-spacing: 0.05em !important;
  border-bottom: 1px solid #D4CFC7 !important;
  padding-bottom: 0.8rem !important;
  margin-bottom: 1.5rem !important;
  background: transparent !important;
  text-transform: none !important;
}

/* Individual event article row
   Grid: [date block] [thumbnail] [event info] [action]
   Thumbnail column only appears when a featured image exists;
   if no image is set, the grid collapses gracefully via auto sizing. */
.tribe-events-calendar-list__event,
.tribe-events-loop .tribe-event-featured,
article.type-tribe_events {
  display: grid !important;
  grid-template-columns: 80px 140px 1fr auto !important;
  gap: 2rem !important;
  align-items: start !important;
  padding: 2rem 0 !important;
  border-bottom: 1px solid rgba(212, 207, 199, 0.5) !important;
  background: transparent !important;
  position: relative !important;
  transition: padding-left 0.2s !important;
  cursor: pointer;
}

/* Collapse thumbnail column when no image is set */
article.type-tribe_events:not(.tribe-events-has-image) {
  grid-template-columns: 80px 1fr auto !important;
}

article.type-tribe_events::before {
  content: '';
  position: absolute;
  left: -24px; top: 0; bottom: 0;
  width: 3px;
  background: #C5A35C;
  transform: scaleY(0);
  transition: transform 0.25s;
  transform-origin: top;
}

article.type-tribe_events:hover::before {
  transform: scaleY(1);
}

/* --- LIST VIEW THUMBNAIL --- */

/* Un-hide the featured image (we hid it in the original) */
.tribe-events-calendar-list__event-featured-image,
.tribe-events-loop .tribe-event-featured .tribe-events-event-image,
article.type-tribe_events .tribe-events-calendar-list__event-featured-image-wrapper {
  display: block !important;
}

/* Thumbnail wrapper */
.tribe-events-calendar-list__event-featured-image-wrapper,
article.type-tribe_events .tribe-event-featured-image {
  width: 140px !important;
  height: 100px !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
  position: relative !important;
  background: #1A1612 !important; /* fallback while loading */
}

/* The image itself */
.tribe-events-calendar-list__event-featured-image-wrapper img,
article.type-tribe_events .tribe-event-featured-image img,
.tribe-events-calendar-list__event-featured-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  object-position: center !important;
  display: block !important;
  transition: transform 0.4s ease !important;
  border-radius: 0 !important;
}

/* Subtle zoom on row hover */
article.type-tribe_events:hover
  .tribe-events-calendar-list__event-featured-image-wrapper img,
article.type-tribe_events:hover
  .tribe-event-featured-image img {
  transform: scale(1.04) !important;
}

/* Category colour bar at the bottom edge of the thumbnail */
.tribe-events-calendar-list__event-featured-image-wrapper::after,
article.type-tribe_events .tribe-event-featured-image::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: #C5A35C; /* default gold; overridden per category below */
}

/* Per-category thumbnail accent bar colours */
.tribe-events-cat-sound-ceremony
  .tribe-events-calendar-list__event-featured-image-wrapper::after { background: #7A8C6E !important; }
.tribe-events-cat-plant-medicine-retreat
  .tribe-events-calendar-list__event-featured-image-wrapper::after,
.tribe-events-cat-retreat
  .tribe-events-calendar-list__event-featured-image-wrapper::after { background: #8C4A2F !important; }
.tribe-events-cat-integration
  .tribe-events-calendar-list__event-featured-image-wrapper::after { background: #C5A35C !important; }
.tribe-events-cat-fellowship
  .tribe-events-calendar-list__event-featured-image-wrapper::after { background: #3B2F24 !important; }

/* On mobile, stack into a single column */
@media (max-width: 768px) {

  #tribe-events article.type-tribe_events,
  #tribe-events article.type-tribe_events:not(.tribe-events-has-image) {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    padding: 1.5rem 0 !important;
  }

  /* Date block sits first */
  #tribe-events .tribe-events-calendar-list__event-datetime-wrapper,
  #tribe-events .tribe-events-schedule {
    order: 0 !important;
    text-align: left !important;
  }

  /* Full-width thumbnail second */
  #tribe-events .tribe-events-calendar-list__event-featured-image-wrapper,
  #tribe-events article.type-tribe_events .tribe-event-featured-image {
    order: 1 !important;
    width: 100% !important;
    height: 180px !important;
    margin-bottom: 0 !important;
  }

  /* Details take full width third */
  #tribe-events .tribe-events-calendar-list__event-details,
  #tribe-events .tribe-events-calendar-list__event-wrapper {
    order: 2 !important;
    width: 100% !important;
    min-width: 0 !important;
  }

}

/* Event date block (left column) */
.tribe-events-calendar-list__event-datetime-wrapper,
.tribe-events-schedule {
  text-align: center !important;
}

.tribe-events-calendar-list__event-datetime-wrapper abbr,
.tribe-events-calendar-list__event-date-tag-daynum {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 2.8rem !important;
  font-weight: 300 !important;
  color: #1A1612 !important;
  line-height: 1 !important;
  display: block !important;
  text-decoration: none !important;
}

.tribe-events-calendar-list__event-date-tag-weekday {
  font-size: 0.58rem !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  color: #3B2F24 !important;
  opacity: 0.5 !important;
  font-family: 'DM Sans', sans-serif !important;
}

/* Event category pill / tag */
.tribe-events-calendar-list__event-category,
.tribe-cat,
a[class*="tribe-events-cat-"] {
  display: inline-block !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.58rem !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  padding: 0.25rem 0.65rem !important;
  margin-bottom: 0.6rem !important;
  border-radius: 0 !important;
  text-decoration: none !important;
}

/* Category colour mapping — match your TEC category slugs */
.tribe-events-cat-sound-ceremony,
.tribe-cat-sound-ceremony a {
  background: rgba(122, 140, 110, 0.15) !important;
  color: #7A8C6E !important;
}

.tribe-events-cat-plant-medicine-retreat,
.tribe-events-cat-retreat,
.tribe-cat-retreat a {
  background: rgba(140, 74, 47, 0.12) !important;
  color: #8C4A2F !important;
}

.tribe-events-cat-integration,
.tribe-cat-integration a {
  background: rgba(197, 163, 92, 0.15) !important;
  color: #8B7235 !important;
}

.tribe-events-cat-fellowship,
.tribe-cat-fellowship a {
  background: rgba(59, 47, 36, 0.1) !important;
  color: #3B2F24 !important;
}

/* Event title in list */
.tribe-events-calendar-list__event-title,
.tribe-event-url,
.tribe-events-loop h2.tribe-events-list-event-title a {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1.5rem !important;
  font-weight: 400 !important;
  color: #1A1612 !important;
  line-height: 1.2 !important;
  margin-bottom: 0.4rem !important;
  text-decoration: none !important;
  display: block !important;
}

.tribe-events-calendar-list__event-title a:hover,
.tribe-events-loop h2.tribe-events-list-event-title a:hover {
  color: #C5A35C !important;
}

/* Event meta (time, location) */
.tribe-events-calendar-list__event-datetime,
.tribe-events-schedule abbr,
.tribe-events-calendar-list__event-venue,
.tribe-venue {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.78rem !important;
  color: #3B2F24 !important;
  opacity: 0.6 !important;
  text-decoration: none !important;
}

/* Event featured image thumbnail — display handled in the grid rules above.
   We do suppress the legacy .tribe-events-loop img fallback to avoid
   double-rendering on older TEC template versions. */
.tribe-events-loop .tribe-event-schedule-details img {
  display: none !important;
}

/* "Register" / CTA link in list */
.tribe-events-calendar-list__event-website-link a,
.tribe-events-cal-links a.tribe-event-url {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
  color: #F5F0E8 !important;
  background: #3B2F24 !important;
  border: none !important;
  padding: 0.6rem 1.2rem !important;
  text-decoration: none !important;
  display: inline-block !important;
  transition: background 0.25s !important;
  white-space: nowrap !important;
}

.tribe-events-calendar-list__event-website-link a:hover,
.tribe-events-cal-links a.tribe-event-url:hover {
  background: #8C4A2F !important;
  color: #F5F0E8 !important;
}


/* =============================================================================
   4. TEC MONTH (GRID) VIEW
   ============================================================================= */

/* Month grid outer wrapper */
.tribe-events-calendar-month__calendar-body,
.tribe-events-calendar {
  border: 1px solid #D4CFC7 !important;
  background: #FAF8F3 !important;
}

/* Day-of-week header row */
.tribe-events-calendar-month__header-column,
.tribe-events-calendar th {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.6rem !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  color: #3B2F24 !important;
  opacity: 0.5 !important;
  text-align: center !important;
  padding: 0.6rem !important;
  background: transparent !important;
  border: none !important;
}

/* Calendar cell */
.tribe-events-calendar-month__calendar-body-cell,
.tribe-events-calendar td {
  border: 1px solid rgba(212, 207, 199, 0.4) !important;
  padding: 0.5rem !important;
  vertical-align: top !important;
  min-height: 80px;
  background: #FAF8F3 !important;
  transition: background 0.15s !important;
}

.tribe-events-calendar-month__calendar-body-cell:hover,
.tribe-events-calendar td:hover {
  background: #F5F0E8 !important;
}

/* Today's cell */
.tribe-events-calendar-month__calendar-body-cell--current,
.tribe-events-calendar td.tribe-events-present {
  background: rgba(197, 163, 92, 0.06) !important;
}

/* Day number inside cell */
.tribe-events-calendar-month__calendar-body-cell-date,
.tribe-events-calendar td .tribe-events-month-grid-cell__date {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1rem !important;
  font-weight: 300 !important;
  color: #1A1612 !important;
}

/* Current day number accent */
.tribe-events-calendar-month__calendar-body-cell--current
  .tribe-events-calendar-month__calendar-body-cell-date {
  color: #8C4A2F !important;
  font-weight: 500 !important;
}

/* Event pill inside month cell */
.tribe-events-calendar-month__calendar-event,
.tribe-events-calendar-month-cell-events__event,
.tribe-events-calendar td .tribe-events-month-grid-cell__event {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.6rem !important;
  letter-spacing: 0.05em !important;
  background: rgba(197, 163, 92, 0.18) !important;
  color: #1A1612 !important;
  padding: 0.15rem 0.4rem !important;
  margin-bottom: 2px !important;
  border-left: 2px solid #C5A35C !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  cursor: pointer !important;
  transition: background 0.15s !important;
}

.tribe-events-calendar-month__calendar-event:hover {
  background: rgba(197, 163, 92, 0.32) !important;
}

/* Category-coloured left border on month pills */
.tribe-events-cat-retreat .tribe-events-calendar-month__calendar-event,
.tribe-events-calendar-month__calendar-event.tribe-events-cat-retreat {
  border-left-color: #8C4A2F !important;
  background: rgba(140, 74, 47, 0.1) !important;
}

.tribe-events-cat-sound-ceremony .tribe-events-calendar-month__calendar-event {
  border-left-color: #7A8C6E !important;
  background: rgba(122, 140, 110, 0.1) !important;
}

.tribe-events-cat-integration .tribe-events-calendar-month__calendar-event {
  border-left-color: #C5A35C !important;
}

/* "+N more" overflow link */
.tribe-events-calendar-month__calendar-event--more-events,
.tribe-events-more-link {
  font-size: 0.58rem !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: #C5A35C !important;
  text-decoration: none !important;
}


/* =============================================================================
   5. TEC DAY VIEW
   ============================================================================= */

.tribe-events-day__event,
.tribe-events-day .type-tribe_events {
  border-bottom: 1px solid rgba(212, 207, 199, 0.4) !important;
  padding: 1.5rem 0 !important;
  background: transparent !important;
}

.tribe-events-day__time-section-title {
  font-family: 'Cinzel', serif !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.3em !important;
  text-transform: uppercase !important;
  color: #C5A35C !important;
  margin-bottom: 1rem !important;
}


/* =============================================================================
   6. TEC SINGLE EVENT PAGE + FEATURED IMAGE SLIDESHOW
   
   SLIDESHOW APPROACH — Splide.js (lightweight, no jQuery dependency)
   CDN: https://cdn.jsdelivr.net/npm/@splidejs/splide@4/dist/css/splide.min.css
        https://cdn.jsdelivr.net/npm/@splidejs/splide@4/dist/js/splide.min.js
   
   HOW IT WORKS:
   - TEC outputs the featured image via get_the_post_thumbnail() into
     .tribe-events-single--image wrapper.
   - For the slideshow, you add extra images to the event using a plugin such as:
       • "Meta Box" with an image field (free)
       • "Advanced Custom Fields" (ACF) with a gallery field (free/pro)
       • "Tribe Events Image Gallery" (paid TEC add-on)
   - The functions.php snippet at the bottom of this file (section 11)
     outputs those extra images as .splide__slide items beneath the
     featured image, then initialises Splide on page load.
   - If only one image exists (just the featured image), Splide renders
     as a static single image with no nav arrows — no empty carousel.
   ============================================================================= */

/* Single event wrapper */
.single-tribe_events #tribe-events,
.single-tribe_events .tribe-events {
  background: #FAF8F3 !important;
  padding: 0 !important;
}

/* ---- SLIDESHOW CONTAINER ---- */

.psyrcle-event-slideshow {
  position: relative;
  margin-bottom: 3rem;
  background: #1A1612;
  overflow: hidden;
}

/* Splide track — force 16:9 on all slides */
.psyrcle-event-slideshow .splide__track {
  /* height is controlled by the slide aspect ratio below */
}

.psyrcle-event-slideshow .splide__slide {
  position: relative;
  overflow: hidden;
}

/* Aspect ratio container for each slide */
.psyrcle-event-slideshow .psyrcle-slide-inner {
  position: relative;
  width: 100%;
  padding-top: 52%; /* ~19:10 — slightly wider than 16:9, feels cinematic */
  overflow: hidden;
  background: #1A1612;
}

.psyrcle-event-slideshow .psyrcle-slide-inner img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: 0 !important;
  transition: transform 0.6s ease;
}

.psyrcle-event-slideshow .splide__slide.is-active .psyrcle-slide-inner img {
  transform: scale(1.02); /* very subtle Ken Burns on active slide */
}

/* Dark overlay at bottom for caption legibility */
.psyrcle-event-slideshow .psyrcle-slide-inner::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 35%;
  background: linear-gradient(to top, rgba(26,22,18,0.55), transparent);
  pointer-events: none;
}

/* Optional caption (populated via alt text or ACF caption field) */
.psyrcle-event-slideshow .psyrcle-slide-caption {
  position: absolute;
  bottom: 1.2rem;
  left: 1.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  color: rgba(250,248,243,0.75);
  text-transform: uppercase;
  pointer-events: none;
  z-index: 2;
}

/* ---- SPLIDE NAVIGATION ARROWS ---- */

.psyrcle-event-slideshow .splide__arrow {
  background: rgba(26,22,18,0.65) !important;
  border: 1px solid rgba(197,163,92,0.3) !important;
  border-radius: 0 !important;
  width: 44px !important;
  height: 44px !important;
  opacity: 1 !important;
  transition: background 0.2s, border-color 0.2s !important;
}

.psyrcle-event-slideshow .splide__arrow:hover {
  background: rgba(197,163,92,0.2) !important;
  border-color: #C5A35C !important;
}

.psyrcle-event-slideshow .splide__arrow svg {
  fill: #E2C98A !important;
  width: 14px !important;
  height: 14px !important;
}

.psyrcle-event-slideshow .splide__arrow--prev { left: 1.2rem !important; }
.psyrcle-event-slideshow .splide__arrow--next { right: 1.2rem !important; }

/* Hide arrows when only 1 slide */
.psyrcle-event-slideshow.splide--single-slide .splide__arrow {
  display: none !important;
}

/* ---- SPLIDE PAGINATION DOTS ---- */

.psyrcle-event-slideshow .splide__pagination {
  bottom: 1rem !important;
  gap: 6px !important;
}

.psyrcle-event-slideshow .splide__pagination__page {
  background: rgba(212,207,199,0.4) !important;
  border-radius: 0 !important;
  width: 20px !important;
  height: 2px !important;
  margin: 0 !important;
  transition: all 0.25s !important;
  opacity: 1 !important;
}

.psyrcle-event-slideshow .splide__pagination__page.is-active {
  background: #C5A35C !important;
  width: 32px !important;
  transform: none !important;
}

/* ---- SPLIDE THUMBNAIL TRACK (below main slideshow) ---- */

.psyrcle-event-thumbs {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  overflow-x: auto;
  scrollbar-width: none;
}

.psyrcle-event-thumbs::-webkit-scrollbar { display: none; }

.psyrcle-event-thumbs .splide__slide {
  width: 80px !important;
  height: 56px !important;
  overflow: hidden;
  cursor: pointer;
  opacity: 0.5;
  transition: opacity 0.2s;
  border: 2px solid transparent;
  flex-shrink: 0;
}

.psyrcle-event-thumbs .splide__slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0 !important;
}

.psyrcle-event-thumbs .splide__slide.is-active {
  opacity: 1;
  border-color: #C5A35C;
}

/* ---- SINGLE EVENT — REST OF PAGE ---- */

/* Event title (h1) */
.tribe-events-single-event-title,
h1.tribe-events-single-event-title {
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 300 !important;
  font-size: clamp(2.5rem, 4.5vw, 4.5rem) !important;
  color: #1A1612 !important;
  line-height: 1.05 !important;
  margin-bottom: 1.5rem !important;
}

/* Event date/time block */
.tribe-events-single-section,
.tribe-events-schedule {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.85rem !important;
  color: #3B2F24 !important;
}

.tribe-events-abbr,
.tribe-events-schedule abbr {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.78rem !important;
  letter-spacing: 0.08em !important;
  color: #C5A35C !important;
  text-decoration: none !important;
  border-bottom: none !important;
}

/* Event description body */
.tribe-events-single .tribe-events-content,
.tribe-events-single-section--description {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.95rem !important;
  line-height: 1.85 !important;
  color: #3B2F24 !important;
}

.tribe-events-single .tribe-events-content h2,
.tribe-events-single .tribe-events-content h3 {
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 300 !important;
  color: #1A1612 !important;
}

/* Venue / Organiser meta block */
.tribe-venue-map-link,
.tribe-events-single .tribe-venue,
.tribe-organizer-url a {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.82rem !important;
  color: #3B2F24 !important;
}

.tribe-events-single-section--map {
  border: 1px solid #D4CFC7 !important;
  overflow: hidden !important;
}

/* Related events section */
.tribe-events-related-events-title {
  font-family: 'Cinzel', serif !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.3em !important;
  text-transform: uppercase !important;
  color: #C5A35C !important;
  margin-bottom: 2rem !important;
}

/* "Back to events" link */
#tribe-events-footer a,
.tribe-events-back a {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.18em !important;
  text-transform: uppercase !important;
  color: #3B2F24 !important;
  text-decoration: none !important;
  opacity: 0.6 !important;
  transition: opacity 0.2s !important;
}

#tribe-events-footer a:hover,
.tribe-events-back a:hover {
  opacity: 1 !important;
  color: #C5A35C !important;
}

/* ---- SINGLE EVENT — RESPONSIVE ---- */

@media (max-width: 768px) {
  .psyrcle-event-slideshow .psyrcle-slide-inner {
    padding-top: 66%; /* taller crop on mobile */
  }

  .psyrcle-event-thumbs .splide__slide {
    width: 60px !important;
    height: 44px !important;
  }
}


/* =============================================================================
   7. TEC TICKET / RSVP BLOCK (Tribe Tickets)
   ============================================================================= */

/* Ticket container */
#tribe-tickets,
.tribe-tickets,
.tribe-tickets__tickets-wrapper {
  background: #1A1612 !important;
  border: 1px solid rgba(197, 163, 92, 0.15) !important;
  padding: 2.5rem !important;
  margin-top: 3rem !important;
}

/* Ticket section heading */
.tribe-tickets__title,
#tribe-tickets h2 {
  font-family: 'Cinzel', serif !important;
  font-size: 0.7rem !important;
  letter-spacing: 0.3em !important;
  text-transform: uppercase !important;
  color: #C5A35C !important;
  margin-bottom: 1.5rem !important;
  padding-bottom: 0.8rem !important;
  border-bottom: 1px solid rgba(212, 207, 199, 0.12) !important;
}

/* Individual ticket row */
.tribe-tickets__item,
.tribe-tickets-list > li {
  border: 1px solid rgba(212, 207, 199, 0.12) !important;
  background: rgba(255, 255, 255, 0.04) !important;
  padding: 1.5rem !important;
  margin-bottom: 1rem !important;
}

/* Ticket name */
.tribe-tickets__item-title,
.tribe-tickets-attendees__item-name {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1.3rem !important;
  font-weight: 400 !important;
  color: #FAF8F3 !important;
  line-height: 1.2 !important;
  margin-bottom: 0.4rem !important;
}

/* Ticket price */
.tribe-tickets__item-price,
.tribe-tickets-list__ticket-price {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 2rem !important;
  font-weight: 300 !important;
  color: #E2C98A !important;
  line-height: 1 !important;
}

/* Ticket description */
.tribe-tickets__item-description,
.tribe-tickets-list__ticket-description {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.8rem !important;
  line-height: 1.7 !important;
  color: #D4CFC7 !important;
  opacity: 0.7 !important;
}

/* Quantity input */
.tribe-tickets__item-quantity-stepper input,
.tribe-tickets-list__ticket-quantity input {
  background: rgba(255, 255, 255, 0.06) !important;
  border: 1px solid rgba(212, 207, 199, 0.2) !important;
  color: #FAF8F3 !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.9rem !important;
  text-align: center !important;
  width: 60px !important;
  padding: 0.5rem !important;
}

/* Quantity stepper +/- buttons */
.tribe-tickets__item-quantity-stepper button,
.tribe-common-c-btn-icon {
  background: rgba(197, 163, 92, 0.15) !important;
  border: 1px solid rgba(197, 163, 92, 0.25) !important;
  color: #C5A35C !important;
  width: 32px !important;
  height: 32px !important;
  transition: background 0.2s !important;
}

.tribe-tickets__item-quantity-stepper button:hover {
  background: rgba(197, 163, 92, 0.3) !important;
}

/* "Get Tickets" / submit button */
.tribe-tickets__buy,
.tribe-common-c-btn,
#tribe-tickets .tribe-button,
#tribe-tickets input[type="submit"],
#tribe-tickets button[type="submit"] {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.72rem !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  color: #1A1612 !important;
  background: #C5A35C !important;
  border: none !important;
  padding: 1rem 2rem !important;
  cursor: pointer !important;
  transition: background 0.25s !important;
  border-radius: 0 !important;
  width: 100% !important;
  margin-top: 1rem !important;
}

.tribe-tickets__buy:hover,
#tribe-tickets input[type="submit"]:hover,
#tribe-tickets button[type="submit"]:hover {
  background: #E2C98A !important;
  color: #1A1612 !important;
}

/* Sold-out / availability notice */
.tribe-tickets__item--inactive,
.tribe-tickets-list__ticket--soldout {
  opacity: 0.5 !important;
  pointer-events: none !important;
}

.tribe-tickets__sold-out {
  font-size: 0.65rem !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  color: #8C4A2F !important;
}

/* Post-registration medical screener notice */
/* Add this class to a custom HTML block below the ticket form */
.psyrcle-post-ticket-notice {
  background: rgba(197, 163, 92, 0.07) !important;
  border: 1px solid rgba(197, 163, 92, 0.2) !important;
  padding: 1.2rem 1.5rem !important;
  margin-top: 1.2rem !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.78rem !important;
  line-height: 1.75 !important;
  color: #E2C98A !important;
}

.psyrcle-post-ticket-notice strong {
  font-family: 'Cinzel', serif !important;
  font-size: 0.62rem !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase !important;
  display: block !important;
  margin-bottom: 0.3rem !important;
}

/* HIPAA badge in ticket area */
.tribe-tickets .psyrcle-hipaa {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #7A8C6E;
  opacity: 0.75;
  margin-top: 0.75rem;
  justify-content: center;
}

.tribe-tickets .psyrcle-hipaa::before { content: '🔒'; font-size: 0.75rem; }


/* =============================================================================
   8. TEC SIDEBAR WIDGETS
   ============================================================================= */

/* Upcoming events widget */
.tribe_events_list_widget .tribe-event-title a,
.tribe-events-list-widget__event-title a {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1rem !important;
  font-weight: 400 !important;
  color: #1A1612 !important;
  text-decoration: none !important;
  line-height: 1.3 !important;
  transition: color 0.2s !important;
}

.tribe_events_list_widget .tribe-event-title a:hover {
  color: #C5A35C !important;
}

.tribe_events_list_widget li,
.tribe-events-list-widget__event {
  padding: 1rem 0 !important;
  border-bottom: 1px solid #D4CFC7 !important;
  background: transparent !important;
}

.tribe_events_list_widget .tribe-events-schedule,
.tribe-events-list-widget__event-datetime {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.68rem !important;
  letter-spacing: 0.05em !important;
  color: #3B2F24 !important;
  opacity: 0.6 !important;
}

/* Mini calendar widget */
.tribe-mini-calendar {
  background: #FAF8F3 !important;
  border: 1px solid #D4CFC7 !important;
  font-family: 'DM Sans', sans-serif !important;
}

.tribe-mini-calendar-nav {
  background: #1A1612 !important;
  padding: 0.8rem 1rem !important;
}

.tribe-mini-calendar-nav-title {
  font-family: 'Cormorant Garamond', serif !important;
  font-size: 1rem !important;
  font-weight: 300 !important;
  color: #FAF8F3 !important;
}

.tribe-mini-calendar table th {
  font-size: 0.55rem !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  color: #3B2F24 !important;
  opacity: 0.5 !important;
  padding: 0.4rem !important;
  background: transparent !important;
}

.tribe-mini-calendar table td {
  font-size: 0.78rem !important;
  color: #3B2F24 !important;
  text-align: center !important;
  padding: 0.3rem !important;
  transition: background 0.15s !important;
}

.tribe-mini-calendar table td a {
  color: #1A1612 !important;
  font-weight: 500 !important;
  text-decoration: none !important;
}

.tribe-mini-calendar table td a:hover,
.tribe-mini-calendar table td.tribe-events-present {
  background: rgba(197, 163, 92, 0.15) !important;
  color: #C5A35C !important;
}

.tribe-mini-calendar table td.tribe-events-othermonth {
  opacity: 0.3 !important;
}


/* =============================================================================
   9. TEC FILTER BAR (Events Filter plugin add-on)
   ============================================================================= */

/* Filter bar wrapper */
.tribe_events_filter_view,
#tribe_events_filters_wrapper {
  background: #FAF8F3 !important;
  border-bottom: 1px solid #D4CFC7 !important;
  padding: 1rem 0 !important;
}

/* Filter heading */
#tribe_events_filters_wrapper h3,
.tribe-events-filters-heading {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.25em !important;
  text-transform: uppercase !important;
  color: #3B2F24 !important;
  opacity: 0.6 !important;
}

/* Filter checkboxes / select elements */
#tribe_events_filters_wrapper input[type="checkbox"],
#tribe_events_filters_wrapper input[type="radio"],
#tribe_events_filters_wrapper select {
  accent-color: #C5A35C !important;
  border-color: #D4CFC7 !important;
}

/* Filter submit button */
#tribe_events_filters_wrapper input[type="submit"],
.tribe-events-filters-form__submit {
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.65rem !important;
  letter-spacing: 0.2em !important;
  text-transform: uppercase !important;
  background: #1A1612 !important;
  color: #F5F0E8 !important;
  border: none !important;
  padding: 0.6rem 1.2rem !important;
  cursor: pointer !important;
  border-radius: 0 !important;
  transition: background 0.2s !important;
}

#tribe_events_filters_wrapper input[type="submit"]:hover,
.tribe-events-filters-form__submit:hover {
  background: #C5A35C !important;
  color: #1A1612 !important;
}


/* =============================================================================
   10. TEC KUBIO WIDGET INTEGRATION
   (For the Tribe Events Kubio widget blocks)
   ============================================================================= */

/* Kubio events grid block */
.kb-tribe-events-grid .tribe-events-calendar-list__event-title a,
.kubio-tribe-events .tribe-event-title a {
  font-family: 'Cormorant Garamond', serif !important;
  font-weight: 300 !important;
  color: #1A1612 !important;
  font-size: 1.3rem !important;
}

/* Strip Kubio card styling from event cards */
.kb-tribe-events-grid article,
.kubio-tribe-events article {
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #FAF8F3 !important;
  border: 1px solid #D4CFC7 !important;
  transition: box-shadow 0.25s, transform 0.25s !important;
}

.kb-tribe-events-grid article:hover,
.kubio-tribe-events article:hover {
  box-shadow: 0 8px 32px rgba(26, 22, 18, 0.08) !important;
  transform: translateY(-3px) !important;
}


/* =============================================================================
   11. SLIDESHOW JS — FUNCTIONS.PHP SNIPPET
   
   Copy the PHP block below into your Aqua1 functions.php.
   It does three things:
     a) Enqueues Splide.js CSS + JS from CDN on single event pages only
     b) Reads the ACF gallery field (or Meta Box) attached to the event
     c) Wraps the featured image + extra images in a .psyrcle-event-slideshow
        Splide structure, then inits the carousel
   
   GALLERY FIELD SETUP — Meta Box (free, recommended):
   
   Plugin needed: "Meta Box" (free, wordpress.org/plugins/meta-box)
   No paid extensions required for a basic image gallery field.
   
   Setup steps:
     1. Install & activate the Meta Box plugin
     2. Go to Meta Box → Field Groups → Add New
     3. Title it "Event Gallery"
     4. Click "Add Field" → choose "Image Advanced"
        - Field label: Event Gallery
        - Field ID:    event_gallery   ← must match exactly
        - Max images:  leave blank (unlimited)
     5. In the "Location" tab:
        - Show if: Post Type → is → tribe_events
     6. Save the field group
     7. Edit any event — you'll see "Event Gallery" below the editor
        where you can upload multiple space/ceremony photos
   
   The featured image (set in the standard WP sidebar) always appears
   as slide 1. Gallery field images follow as slides 2, 3, etc.
   
   Alternative — Tribe Events Image Gallery (paid TEC add-on):
     If you already have this add-on, replace the gallery-building
     loop below with tribe_get_event_images().
   ============================================================================= */

/*

// -----------------------------------------------------------------------
// PASTE THIS INTO YOUR Aqua1 functions.php
// -----------------------------------------------------------------------

// 1. Enqueue Splide on single event pages
add_action( 'wp_enqueue_scripts', 'psyrcle_enqueue_slideshow_assets' );
function psyrcle_enqueue_slideshow_assets() {
    if ( ! function_exists( 'tribe_is_event' ) || ! tribe_is_event() ) {
        return;
    }

    // Splide CSS
    wp_enqueue_style(
        'splide',
        'https://cdn.jsdelivr.net/npm/@splidejs/splide@4/dist/css/splide.min.css',
        array(),
        '4.1.4'
    );

    // Splide JS
    wp_enqueue_script(
        'splide',
        'https://cdn.jsdelivr.net/npm/@splidejs/splide@4/dist/js/splide.min.js',
        array(),
        '4.1.4',
        true  // load in footer
    );
}


// 2. Output the slideshow markup after the event title on single event pages.
//    Hooked into tribe_events_single_event_after_the_meta (fires just above the
//    event description). Move the hook to suit your template if needed.
add_action( 'tribe_events_single_event_after_the_meta', 'psyrcle_render_event_slideshow' );
function psyrcle_render_event_slideshow() {
    if ( ! function_exists( 'tribe_is_event' ) || ! tribe_is_event() ) {
        return;
    }

    $post_id         = get_the_ID();
    $featured_img_id = get_post_thumbnail_id( $post_id );

    // ---- Collect all image IDs ----
    $image_ids = array();

    // Always lead with the featured image
    if ( $featured_img_id ) {
        $image_ids[] = (int) $featured_img_id;
    }

    // Pull extra images from Meta Box image_advanced field.
    // Meta Box stores image_advanced values as a serialised array of
    // attachment IDs in post meta — get_post_meta() with no third arg
    // returns the raw array directly.
    $mb_gallery = get_post_meta( $post_id, 'event_gallery', true );

    if ( ! empty( $mb_gallery ) && is_array( $mb_gallery ) ) {
        foreach ( $mb_gallery as $img_id ) {
            $img_id = (int) $img_id;
            // Skip if this ID is already in the list (avoids duping the featured image)
            if ( $img_id && ! in_array( $img_id, $image_ids, true ) ) {
                $image_ids[] = $img_id;
            }
        }
    }

    // Nothing to show
    if ( empty( $image_ids ) ) {
        return;
    }

    $is_single = count( $image_ids ) === 1;
    $slideshow_class = 'psyrcle-event-slideshow splide' . ( $is_single ? ' psyrcle-event-slideshow--single' : '' );

    echo '<div id="psyrcle-main-slideshow" class="' . esc_attr( $slideshow_class ) . '">';
    echo '  <div class="splide__track">';
    echo '    <ul class="splide__list">';

    foreach ( $image_ids as $img_id ) {
        $src     = wp_get_attachment_image_url( $img_id, 'large' );
        $alt     = get_post_meta( $img_id, '_wp_attachment_image_alt', true );
        $caption = wp_get_attachment_caption( $img_id );

        if ( ! $src ) continue;

        echo '      <li class="splide__slide">';
        echo '        <div class="psyrcle-slide-inner">';
        echo '          <img src="' . esc_url( $src ) . '" alt="' . esc_attr( $alt ) . '" loading="lazy">';
        if ( $caption ) {
            echo '          <span class="psyrcle-slide-caption">' . esc_html( $caption ) . '</span>';
        }
        echo '        </div>';
        echo '      </li>';
    }

    echo '    </ul>';
    echo '  </div>'; // .splide__track

    // Thumbnail track — only shown when 2+ images
    if ( ! $is_single ) {
        echo '  <div id="psyrcle-thumb-track" class="psyrcle-event-thumbs splide">';
        echo '    <div class="splide__track">';
        echo '      <ul class="splide__list">';

        foreach ( $image_ids as $img_id ) {
            $thumb = wp_get_attachment_image_url( $img_id, 'thumbnail' );
            $alt   = get_post_meta( $img_id, '_wp_attachment_image_alt', true );
            if ( ! $thumb ) continue;
            echo '        <li class="splide__slide">';
            echo '          <img src="' . esc_url( $thumb ) . '" alt="' . esc_attr( $alt ) . '">';
            echo '        </li>';
        }

        echo '      </ul>';
        echo '    </div>';
        echo '  </div>'; // .psyrcle-event-thumbs
    }

    echo '</div>'; // .psyrcle-event-slideshow

    // Inline init script — only runs after Splide JS is loaded (footer)
    ?>
    <script>
    document.addEventListener('DOMContentLoaded', function () {
        var mainEl  = document.getElementById('psyrcle-main-slideshow');
        var thumbEl = document.getElementById('psyrcle-thumb-track');

        if (!mainEl || typeof Splide === 'undefined') return;

        var isSingle = mainEl.classList.contains('psyrcle-event-slideshow--single');

        if (isSingle) {
            // Static display — no arrows, no pagination, no drag
            new Splide(mainEl, {
                arrows:     false,
                pagination: false,
                drag:       false,
            }).mount();
            return;
        }

        // Multi-image: main carousel synced to thumbnail strip
        var main = new Splide(mainEl, {
            type:        'fade',
            rewind:      true,
            pagination:  true,
            arrows:      true,
            speed:       600,
            pauseOnHover: true,
        });

        if (thumbEl) {
            var thumbs = new Splide(thumbEl, {
                fixedWidth:  80,
                fixedHeight: 56,
                gap:         6,
                rewind:      true,
                pagination:  false,
                arrows:      false,
                isNavigation: true,
                focus:       'center',
                breakpoints: {
                    768: { fixedWidth: 60, fixedHeight: 44 },
                },
            });

            main.sync(thumbs);
            main.mount();
            thumbs.mount();
        } else {
            main.mount();
        }
    });
    </script>
    <?php
}

// -----------------------------------------------------------------------
// END OF PASTE BLOCK
// -----------------------------------------------------------------------

*/