/*
 * Explore page styles, ported from the 2025 live /explore page.
 * Loaded only by the explore-* templates, and every rule is scoped to
 * .explore-section so it can't leak into other pages/templates (several of
 * these class names, e.g. .carousel-ele, are also used by other templates).
 */

/* ---------- Festival map ----------
 * The map sits flush under its own heading (no section gap above it).
 * .explore-map is only set on the explore page's map sections.
 * - Festival map: straight after the countdown bar (counter-with-link).
 * - Parking map: straight after its own heading-only section
 *   (section-cards-ticket-container, no card children). */
.cms-section--counter-with-link + .cms-section--simple-image:has(.explore-map),
.cms-section--section-cards-ticket-container + .cms-section--simple-image:has(.explore-map) {
  margin-top: 0;
}

/* ---------- Carousels ---------- */
/* Vertical gaps between sections come from .cms-section (app.css), so none here. */
.explore-section.explore-light-carousel {
  overflow: visible;
}

/* Same left offset as the home page carousels (_carousel.scss,
   .cms-section--section-carousel-container .container > *), so the
   left/right edges match them on every screen size. */
.explore-section.explore-light-carousel .container > * {
  margin-inline-start: calc(-0.5 * var(--bs-gutter-x, 1.5rem));
}

.explore-section .carousel-ele {
  width: 800px;
  border-radius: 10px;
}
.explore-section .carousel-ele.w-25 { width: 25vw; }
.explore-section .carousel-ele.w-md { width: 475px; }
.explore-section .carousel-ele.w-lg { width: 585px; }

@media only screen and (max-width: 768px) {
  .explore-section .carousel-ele,
  .explore-section .carousel-ele.w-25 { width: 70vw; }
  .explore-section .carousel-ele.w-md,
  .explore-section .carousel-ele.w-lg { width: 80vw; }
}

/* Image slides (artists, brand partners) */
.explore-section .caro-item {
  background-color: #ffffff;
  overflow: hidden;
}
.explore-section .caro-item img { border-radius: 10px; }
.explore-section .caro-item__text { padding: 1rem; }

/* ---------- Flip cards ---------- */
/* p-carousel clips its slides (overflow: hidden on #splide in its shadow DOM,
   with only 4px of vertical room). Mid-flip, the edge of the card that swings
   towards the viewer grows taller than the slide and gets cut off. A deeper
   perspective keeps that growth small (~10-15% at most), and the vertical
   padding on the slide gives it room inside the clip. */
.explore-section .flipcards {
  padding-block: 32px;
}
.explore-section .ecard {
  perspective: 2000px;
}
.explore-section .ecard__content {
  position: relative;
  transition: transform 1s;
  transform-style: preserve-3d;
}
.explore-section .flipcards .ecard:hover .ecard__content,
.explore-section .flipcards .ecard:focus-within .ecard__content {
  transform: rotateY(180deg);
  transition: transform 0.5s;
}
/* No back image uploaded (explore-flipcard-item.blade.php) - stay on the
   front face instead of flipping to a repeat of it. */
.explore-section .flipcards--no-back .ecard:hover .ecard__content,
.explore-section .flipcards--no-back .ecard:focus-within .ecard__content {
  transform: none;
}
.explore-section .ecard__face {
  margin: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 10px;
  overflow: hidden;
}
.explore-section .ecard__face img { border-radius: 10px; }
.explore-section .ecard__face--back {
  position: absolute;
  inset: 0;
  color: #fff;
  transform: rotateY(180deg);
}
.explore-section .ecard__face--back img {
  height: 100%;
  object-fit: cover;
  filter: brightness(30%);
}
.explore-section .ecard__caption {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 8%;
  text-align: left;
}
/* .rich-text--tinted > p gets 1rem side padding by default - drop it so the
   copy lines up with the headline. */
.explore-section .ecard__caption .rich-text--tinted > p {
  padding-left: 0;
  padding-right: 0;
}

/* ---------- Programme table ----------
 * Tabs reuse the Contact Us FAQ tabs (.faq-tabs*, app.css + script.js).
 * Table values match the live 2025 page's computed styles. */
.explore-section .programTableWrapper figure.table { margin: 0; }
/* The editor wraps tables in <figure class="table">, which pulls in
   Bootstrap's .table row background/borders - cancel those here. */
.explore-section .programTableWrapper .table > :not(caption) > * > * {
  background-color: transparent;
  border-bottom-width: 0;
  box-shadow: none;
}
.explore-section .programTableWrapper table {
  width: 100%;
  border-collapse: collapse;
  color: #000;
}
.explore-section .programTableWrapper td {
  padding: 12px;
  border: 0;
  font-size: 16px;
  line-height: 1.6;
  vertical-align: top;
}
.explore-section .programTableWrapper tr:not(:first-child) td {
  border-top: 1px solid #dee2e6;
}
.explore-section .programTableWrapper h4 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1.2;
}

@media only screen and (max-width: 768px) {
  .explore-section .programTableWrapper tr:first-child td:nth-child(n+2) { display: none; }
  .explore-section .programTableWrapper tr:not(:first-child) td { display: block; }
  .explore-section .programTableWrapper tr:not(:first-child) td:first-child {
    border-top: 1px solid #dbdbd8;
    border-bottom: 0;
    padding-bottom: 0;
  }
  .explore-section .programTableWrapper tr:not(:first-child) td:not(:first-child) {
    display: inline-block;
    border-width: 0;
    margin: 5px 0 20px;
    padding-top: 0;
    padding-bottom: 0;
    color: #6b6d70;
    font-size: 14px;
  }
  .explore-section .programTableWrapper tr:not(:first-child) td:last-child {
    border-left: 1px solid #6b6d70;
  }
}

/* ---------- Programme image ----------
 * A tab holding an image lifts the 800px cap (.container-custom-8) from the
 * panel so the image spans the same width as the Festival Must-Knows cards
 * (the full .container content width). Tabs with the old table keep 800px. */
.explore-section .faq-panel:has(.programImage) {
  max-width: none;
}
.explore-section .programImage,
.explore-section .programImage img {
  display: block;
  width: 100%;
  height: auto;
}

/* ---------- Image + video ---------- */
/* display:block on the picture/img/video: these are inline by default,
   which leaves a few px gap below them (inline line-box descender space) -
   that gap would otherwise separate the image from the video stacked
   directly under it. */
.explore-section .explore-image-video picture,
.explore-section .explore-image-video img,
.explore-section .explore-image-video video {
  display: block;
  width: 100%;
  height: auto;
}
