/* =========
   Events Cards + Countdown (scoped)
   ========= */

/* ---- Countdown ---- */
.ec-countdown {
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 16px;
  padding: 16px;
  margin: 0 0 20px;
}

/* Hero variant used on Home + Events pages */
.ec-countdown--hero{
  position: relative;
  border: 1px solid rgba(255,255,255,0.12);
  background-size: cover;
  background-position: center;
  overflow: hidden;
  color: #fff;
  /* Make the hero ~1.5× taller and give the content more breathing room */
  min-height: 240px;
  padding: 26px 24px;
}

.ec-countdown--hero::before{
  content:"";
  position:absolute;
  inset:0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.68) 0%,
    rgba(0,0,0,0.42) 40%,
    rgba(0,0,0,0.18) 70%,
    rgba(0,0,0,0.00) 100%
  );
  z-index: 0;
}

.ec-countdown--hero > *{ position: relative; z-index: 1; }

/* NEXT EVENT label should look like other section titles */
.ec-countdown--hero .ec-countdown__label{
  position: absolute;
  left: 24px;
  top: 20px;
  margin: 0;
  opacity: 1;
  font-family: "Orbitron", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  /* Label should be bigger than the event title */
  font-size: 34px;
  line-height: 1.1;
  text-shadow: 0 6px 18px rgba(0,0,0,0.55);
}

/* Event title: left, vertically centered */
.ec-countdown--hero .ec-countdown__title{
  position: absolute;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  margin: 0;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 800;
  max-width: calc(100% - 40px);
}

/* Timer: left bottom */
.ec-countdown--hero .ec-countdown__timer{
  position: absolute;
  left: 24px;
  bottom: 20px;
  margin: 0;
  gap: 8px;
  font-size: 26px;
}

/* Optional "View all events" link (Home) */
.ec-countdown--hero .ec-countdown__all{
  position: absolute;
  right: 18px;
  bottom: 20px;
  font-weight: 700;
  font-size: 14px;
  color: rgba(255,255,255,0.88);
  text-decoration: none;
  text-shadow: 0 6px 18px rgba(0,0,0,0.55);
  transition: color 160ms ease;
}


.ec-countdown__status {
  position: absolute;
  left: 24px;
  bottom: 20px;
  margin: 0;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 6px 18px rgba(0,0,0,0.55);
}

.ec-countdown--hero .ec-countdown__all:hover{
  color: rgba(255,255,255,1);
}

.ec-countdown--hero .ec-countdown__title a{
  color: rgba(255,255,255,0.90);
  text-decoration: none;
  transition: color 160ms ease;
}

.ec-countdown--hero .ec-countdown__title a:hover{
  color: var(--brand-blue-light);
}

.ec-countdown__label {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 6px;
}

.ec-countdown__title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
}

.ec-countdown__title a {
  text-decoration: none;
  color: inherit;
}

.ec-countdown__timer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  font-size: 22px;
  font-weight: 700;
}

.ec-countdown .ec-t {
  min-width: 2ch;
  display: inline-block;
}

.ec-countdown .ec-u {
  margin-right: 8px;
  opacity: 0.7;
  font-size: 14px;
  font-weight: 600;
}

.ec-empty {
  opacity: 0.75;
  padding: 10px 0;
}

/* ---- Grid ---- */
.ec-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

@media (max-width: 1024px) {
  .ec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .ec-grid { grid-template-columns: 1fr; }
}

/* ---- Card ---- */
.ec-card {
  /* hoogte van het hover-tekstvak; JS kan dit per kaart overschrijven */
  --ec-desc-height: 70px;

  display: block;
  text-decoration: none;
  color: inherit;

  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
  background: #fff;

  transform: translateZ(0);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.ec-card:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

/* ---- Image area ---- */
.ec-card__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: rgba(0,0,0,.45);   /* dark backdrop: hides any sub-pixel seam */
}

.ec-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;

  transform: scale(1.02);
  transition: transform 220ms ease;
}

.ec-card:hover .ec-card__img {
  transform: scale(1.08);
}

.ec-card__img--placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0,0,0,0.06), rgba(0,0,0,0.02));
}

/* ---- Title + date overlay (onderaan op de foto) ---- */
.ec-card__overlay {
  position: absolute;
  left: 0;
  right: 0;
  /* extends 1px past the edge so no hairline of image shows through
     where sub-pixel heights round differently; the parent clips it */
  bottom: -1px;

  padding: 16px 14px 13px;

  background: linear-gradient(
    to top,
    rgba(0,0,0,0.55) 0%,
    rgba(0,0,0,0.40) 30%,
    rgba(0,0,0,0.20) 60%,
    rgba(0,0,0,0.05) 85%,
    rgba(0,0,0,0.00) 100%
  );

  color: #fff;
  z-index: 3;

  transform: translateY(0);
  transition: transform 220ms ease;
}

.ec-card__title {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}

.ec-card__date {
  margin-top: 6px;
  font-size: 13px;
  opacity: 0.9;
}

/* ---- Beschrijving die bij hover omhoog schuift ---- */
.ec-card__desc {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;

  height: var(--ec-desc-height);
  padding: 14px;

  font-size: 14px;
  line-height: 1.45;
  font-weight: 400;
  font-family: inherit;

  background: linear-gradient(
    to top,
    rgba(255,255,255,0.96),
    rgba(255,255,255,0.75)
  );

  color: #222;
  z-index: 2;

  overflow: hidden;

  transform: translateY(var(--ec-desc-height));
  transition: transform 220ms ease;
}

/* “read more” stukje dat via JS wordt toegevoegd */
.ec-card__desc .ec-readmore {
  font: inherit;
  color: inherit;
  white-space: nowrap;
}

/* ---- Hover gedrag ---- */

/* beschrijving schuift omhoog zichtbaar */
.ec-card:hover .ec-card__desc {
  transform: translateY(0);
}

/* titel+datum schuiven exact evenveel omhoog zodat ze boven de tekst blijven */
.ec-card:hover .ec-card__overlay {
  transform: translateY(calc(-1 * var(--ec-desc-height)));
}

/* sterke override als thema iets probeert te overschrijven */
.ec-grid .ec-card:hover .ec-card__overlay {
  transform: translateY(calc(-1 * var(--ec-desc-height))) !important;
}

/* ===== Countdown as image hero card ===== */

.ec-countdown.ec-countdown--hero {
  position: relative;
  border-radius: 18px;
  overflow: hidden;

  padding: 22px 22px 18px;
  margin: 0 0 20px;

  color: #fff;
  /* IMPORTANT: avoid a visible border seam that isn't covered by the overlay.
     Use an inset border so it sits *under* the overlay, like the event cards. */
  border: none;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.10);

  /* image background comes from inline style */
  background-color: #111;
  background-size: cover;
  background-position: center;
}

/* Light theme: keep a subtle dark inset border */
html:not([data-theme="dark"]) .ec-countdown.ec-countdown--hero{
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.10);
}

/* dark overlay so text is readable */
.ec-countdown.ec-countdown--hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0,0,0,0.70) 0%,
    rgba(0,0,0,0.35) 55%,
    rgba(0,0,0,0.15) 100%
  );
  z-index: 1;
}

/* subtle bottom fade like your event cards */
.ec-countdown.ec-countdown--hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: calc(55% + 1px);
  background: linear-gradient(to top, rgba(0,0,0,0.55), rgba(0,0,0,0));
  z-index: 1;
  pointer-events: none;
}

/* keep content above overlays */
.ec-countdown.ec-countdown--hero > * {
  position: relative;
  z-index: 2;
}

.ec-countdown.ec-countdown--hero .ec-countdown__label {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.95;

  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.20);
  padding: 5px 10px;
  border-radius: 999px;
  margin: 0 0 10px;
}

.ec-countdown.ec-countdown--hero .ec-countdown__title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 14px;
}

.ec-countdown.ec-countdown--hero .ec-countdown__title a {
  color: #fff;
  text-decoration: none;
}

/* timer as neat “chips” */
.ec-countdown.ec-countdown--hero .ec-countdown__timer {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: baseline;

  font-size: 34px;
  font-weight: 900;
}

.ec-countdown.ec-countdown--hero .ec-t {
  min-width: 2ch;
  display: inline-block;
}

.ec-countdown.ec-countdown--hero .ec-u {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.9;
  margin-left: 6px;
}


/* =========================
   Hero countdown layout overrides (single source of truth)
   Desired layout:
   - NEXT EVENT top-left (no pill)
   - Title mid-left
   - Timer bottom-left
   - View-all bottom-right
   These rules must win over any earlier legacy “chip” styles.
   ========================= */

.ec-countdown--hero .ec-countdown__label{
  background: none !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin: 0 !important;

  position: absolute !important;
  left: 20px !important;
  top: 16px !important;

  display: block !important;
  font-family: "Orbitron", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
  font-style: italic !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  font-size: 26px !important;
  color: rgba(255,255,255,0.96) !important;
  text-shadow: 0 6px 18px rgba(0,0,0,0.55) !important;
}

.ec-countdown--hero .ec-countdown__title{
  position: absolute !important;
  left: 20px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
  max-width: calc(100% - 40px) !important;

  font-size: 32px !important;
  font-weight: 900 !important;
  line-height: 1.1 !important;
}

.ec-countdown--hero .ec-countdown__title a{
  color: rgba(255,255,255,0.92) !important;
  text-decoration: none !important;
  transition: color 160ms ease;
}

.ec-countdown--hero .ec-countdown__title a:hover{
  color: var(--brand-blue-light) !important;
}

.ec-countdown--hero .ec-countdown__timer{
  position: absolute !important;
  left: 20px !important;
  bottom: 14px !important;
  margin: 0 !important;
  display: flex !important;
  gap: 10px !important;
  flex-wrap: wrap !important;
  align-items: baseline !important;

  font-size: 30px !important;
  font-weight: 900 !important;
}

.ec-countdown--hero .ec-t{
  background: none !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.ec-countdown--hero .ec-u{
  margin: 0 10px 0 6px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  opacity: 0.9 !important;
}

.ec-countdown--hero .ec-countdown__all{
  position: absolute !important;
  right: 18px !important;
  bottom: 14px !important;
}


/* Ongoing/TBA status should sit exactly where the countdown sits */
.ec-countdown--hero .ec-countdown__status{
  position: absolute !important;
  left: 20px !important;
  bottom: 14px !important;
  margin: 0 !important;
  display: block !important;
  font-family: "Orbitron", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif !important;
  font-style: italic !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.06em !important;
  font-size: 30px !important;
  line-height: 1.05 !important;
  color: rgba(255,255,255,0.96) !important;
  text-shadow: 0 6px 18px rgba(0,0,0,0.55) !important;
}

/* ---- Archive ("Previous events" dropdown) ---- */
.ec-archive{
  margin: 32px 0 0;
  border: 1px solid var(--border, rgba(0,0,0,0.10));
  border-radius: 16px;
  background: var(--card, transparent);
  overflow: hidden;
}
.ec-archive__summary{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.ec-archive__summary::-webkit-details-marker{ display: none; }
.ec-archive__summary:hover .ec-archive__title{ color: var(--brand-blue-hover, #2EA9FF); }
.ec-archive__summary:focus-visible{ outline: 2px solid var(--brand-blue-hover, #2EA9FF); outline-offset: -2px; }
.ec-archive__title{
  font-family: "Orbitron", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-style: italic;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 20px;
  line-height: 1.2;
  transition: color 150ms ease;
}
.ec-archive__count{
  min-width: 26px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-orange, #f05a28);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}
.ec-archive__chevron{
  margin-left: auto;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 200ms ease;
}
.ec-archive[open] .ec-archive__chevron{ transform: rotate(180deg); }
.ec-archive__body{ padding: 4px 20px 20px; }
.ec-archive__year{
  margin: 18px 0 12px;
  font-size: 18px;
  font-weight: 800;
  opacity: .75;
}
.ec-archive__year:first-child{ margin-top: 8px; }
@media (max-width: 600px){
  .ec-archive__summary{ padding: 14px 16px; }
  .ec-archive__title{ font-size: 16px; }
  .ec-archive__body{ padding: 4px 12px 16px; }
}
