/*
Theme Name: EPCM Meeting
Theme URI: https://european-post-chicago-meeting.org/
Author: Yaway / Thomas Opp
Description: Schlankes WordPress-Theme für das European Post-Chicago Melanoma / Skin Cancer Meeting. Startseite mit zwei Veranstaltungsgrafiken, schlichtem Menü und Landingpage mit Text und Galerie.
Version: 1.7.4
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: epcm-meeting
License: GPL-2.0-or-later
*/

:root {
  --epcm-indigo: #26204c;
  --epcm-indigo-2: #34306e;
  --epcm-blue: #21449a;
  --epcm-cyan: #3bc1ff;
  --epcm-cyan-dark: #0b93d1;
  --epcm-yellow: #ffca08;
  --epcm-white: #ffffff;
  --epcm-offwhite: #f7f9fc;
  --epcm-text: #20243a;
  --epcm-muted: #6c7385;
  --epcm-border: #dce4ee;
  --epcm-radius: 18px;
  --epcm-shadow: 0 18px 50px rgba(27, 34, 73, .13);
  --epcm-width: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--epcm-text);
  background: var(--epcm-offwhite);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--epcm-blue); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--epcm-cyan-dark); }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  clip: auto !important; width: auto; height: auto; margin: 8px;
  padding: 10px 14px; background: #fff; color: #111; z-index: 100000;
}

.site-header {
  position: relative;
  z-index: 20;
  background: rgba(255,255,255,.96);
  border-bottom: 1px solid var(--epcm-border);
}
.site-header::after {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(90deg, var(--epcm-indigo) 0 38%, var(--epcm-cyan) 38% 78%, var(--epcm-yellow) 78% 100%);
}
.header-inner {
  width: min(calc(100% - 40px), var(--epcm-width));
  min-height: 76px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.site-branding { display: flex; align-items: center; min-width: 0; }
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { max-height: 46px; width: auto; }
.site-title {
  margin: 0;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.02em;
}
.site-title a { color: var(--epcm-indigo); text-decoration: none; }

.menu-toggle {
  display: none;
  border: 0;
  background: var(--epcm-indigo);
  color: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.primary-menu,
.primary-menu ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-menu { display: flex; align-items: center; gap: 6px; }
.primary-menu a {
  display: block;
  padding: 10px 12px;
  border-radius: 9px;
  color: var(--epcm-indigo);
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
}
.primary-menu a:hover,
.primary-menu .current-menu-item > a,
.primary-menu .current_page_item > a {
  background: #eaf8ff;
  color: var(--epcm-blue);
}

.site-main { min-height: calc(100vh - 160px); }

/* Startseite */
.home-showcase {
  width: min(calc(100% - 40px), 1480px);
  margin: 0 auto;
  padding: clamp(30px, 5vw, 70px) 0 clamp(40px, 6vw, 86px);
}
.home-showcase-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.5vw, 34px);
  align-items: stretch;
}
.event-card {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: var(--epcm-radius);
  background: var(--epcm-indigo);
  box-shadow: var(--epcm-shadow);
  isolation: isolate;
  outline: 0;
}
.event-card picture { display: block; width: 100%; height: 100%; }
.event-card img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1667 / 990;
  object-fit: cover;
  transition: transform .35s ease, filter .35s ease;
}
.event-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  border-radius: inherit;
  pointer-events: none;
  transition: border-color .25s ease, background .25s ease;
}
.event-card:hover img,
.event-card:focus-visible img { transform: scale(1.025); filter: saturate(1.05); }
.event-card:hover::after,
.event-card:focus-visible::after { border-color: var(--epcm-cyan); }
.event-card:focus-visible { box-shadow: 0 0 0 4px rgba(59,193,255,.35), var(--epcm-shadow); }
.event-card-badge {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  padding: 8px 12px;
  background: rgba(38,32,76,.91);
  color: #fff;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .02em;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity .25s ease, transform .25s ease;
}
.event-card:hover .event-card-badge,
.event-card:focus-visible .event-card-badge { opacity: 1; transform: translateY(0); }

/* Inhaltsseiten */
.content-shell {
  width: min(calc(100% - 40px), 1120px);
  margin: 0 auto;
  padding: clamp(42px, 7vw, 92px) 0;
}
.page-card {
  background: #fff;
  border: 1px solid var(--epcm-border);
  border-radius: var(--epcm-radius);
  box-shadow: 0 14px 44px rgba(27,34,73,.08);
  padding: clamp(26px, 5vw, 64px);
}
.entry-header { margin-bottom: clamp(26px, 4vw, 46px); }
.entry-title {
  margin: 0;
  color: var(--epcm-indigo);
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.02;
  letter-spacing: -.035em;
}
.entry-title::after {
  content: "";
  display: block;
  width: 82px;
  height: 7px;
  margin-top: 22px;
  border-radius: 999px;
  background: var(--epcm-cyan);
}
.entry-content { max-width: 860px; }
.entry-content > :first-child { margin-top: 0; }
.entry-content > :last-child { margin-bottom: 0; }
.entry-content h2,
.entry-content h3 { color: var(--epcm-indigo); line-height: 1.18; }
.entry-content h2 { margin-top: 1.8em; font-size: clamp(28px, 3vw, 38px); }
.entry-content h3 { margin-top: 1.55em; font-size: 24px; }
.entry-content p { margin: 0 0 1.2em; }
.entry-content .wp-block-button__link,
.epcm-button {
  display: inline-block;
  border-radius: 999px;
  background: var(--epcm-blue);
  color: #fff;
  padding: 12px 20px;
  font-weight: 800;
  text-decoration: none;
}
.entry-content .wp-block-button__link:hover,
.epcm-button:hover { background: var(--epcm-indigo); color: #fff; }

/* Landingpage-Galerie */
.epcm-gallery-section { margin-top: clamp(42px, 6vw, 72px); }
.epcm-gallery-heading {
  margin: 0 0 20px;
  color: var(--epcm-indigo);
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
}
.epcm-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.epcm-gallery-item {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 12px;
  background: #e9eef6;
  aspect-ratio: 4 / 3;
  cursor: zoom-in;
}
.epcm-gallery-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease, filter .35s ease;
}
.epcm-gallery-item:hover img,
.epcm-gallery-item:focus-visible img { transform: scale(1.045); filter: saturate(1.06); }
.epcm-gallery-item:focus-visible { outline: 4px solid rgba(59,193,255,.45); outline-offset: 3px; }

/* Native WordPress galleries bekommen denselben Look */
.entry-content .wp-block-gallery,
.entry-content .gallery {
  gap: 14px !important;
}
.entry-content .wp-block-gallery figure,
.entry-content .gallery-item {
  overflow: hidden;
  border-radius: 12px;
}
.entry-content .wp-block-gallery img,
.entry-content .gallery img { border: 0 !important; }

.epcm-lightbox[hidden] { display: none; }
.epcm-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 30px;
  background: rgba(18,16,44,.94);
}
.epcm-lightbox-inner { position: relative; max-width: min(1200px, 94vw); max-height: 90vh; }
.epcm-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 86vh;
  width: auto;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 20px 70px rgba(0,0,0,.4);
}
.epcm-lightbox-close,
.epcm-lightbox-prev,
.epcm-lightbox-next {
  position: fixed;
  border: 0;
  background: rgba(255,255,255,.95);
  color: var(--epcm-indigo);
  width: 48px;
  height: 48px;
  border-radius: 999px;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 6px 22px rgba(0,0,0,.2);
}
.epcm-lightbox-close { top: 22px; right: 22px; }
.epcm-lightbox-prev { left: 22px; top: 50%; transform: translateY(-50%); }
.epcm-lightbox-next { right: 22px; top: 50%; transform: translateY(-50%); }

.site-footer {
  border-top: 1px solid var(--epcm-border);
  background: #fff;
  color: var(--epcm-muted);
}
.footer-inner {
  width: min(calc(100% - 40px), var(--epcm-width));
  min-height: 74px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 14px;
}
.footer-inner a { color: var(--epcm-muted); }

@media (max-width: 860px) {
  .home-showcase-grid { grid-template-columns: 1fr; }
  .epcm-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .menu-toggle { display: inline-block; }
  .site-navigation { position: relative; }
  .primary-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 12px);
    min-width: 230px;
    padding: 8px;
    background: #fff;
    border: 1px solid var(--epcm-border);
    border-radius: 12px;
    box-shadow: var(--epcm-shadow);
    flex-direction: column;
    align-items: stretch;
  }
  .site-navigation.is-open .primary-menu { display: flex; }
  .primary-menu a { padding: 11px 13px; }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .header-inner { width: min(calc(100% - 28px), var(--epcm-width)); min-height: 68px; }
  .site-title { font-size: 17px; }
  .home-showcase { width: min(calc(100% - 24px), 1480px); padding-top: 22px; }
  .home-showcase-grid { gap: 14px; }
  .event-card { border-radius: 12px; }
  .event-card-badge { display: none; }
  .content-shell { width: min(calc(100% - 24px), 1120px); padding: 28px 0 46px; }
  .page-card { padding: 24px 20px 30px; border-radius: 14px; }
  .epcm-gallery { grid-template-columns: 1fr; gap: 10px; }
  .footer-inner { width: min(calc(100% - 28px), var(--epcm-width)); flex-direction: column; align-items: flex-start; justify-content: center; padding: 18px 0; gap: 6px; }
  .epcm-lightbox { padding: 16px; }
  .epcm-lightbox-prev { left: 10px; }
  .epcm-lightbox-next { right: 10px; }
  .epcm-lightbox-close { top: 10px; right: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* 1.2.0: Editorial-Galerie als Auftakt der Landingpage */
.meeting-landing { padding: 0; overflow: hidden; }
.epcm-landing-body { padding: clamp(28px, 5vw, 64px); }
.meeting-landing .epcm-gallery-section { margin: 0; padding: clamp(22px, 3vw, 38px); background: #26204c; color: #fff; }
.meeting-landing .epcm-gallery-intro { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin: 0 0 22px; flex-wrap: wrap; }
.meeting-landing .epcm-gallery-kicker { font-size: 12px; font-weight: 850; letter-spacing: .14em; color: #64d3ff; }
.meeting-landing .epcm-gallery-heading { color: #fff; margin: 0; font-size: clamp(34px, 5vw, 58px); line-height: 1.1; }
.meeting-landing .epcm-gallery { grid-template-columns: repeat(4, minmax(0,1fr)); grid-auto-rows: clamp(130px, 16vw, 190px); gap: 10px; }
.meeting-landing .epcm-gallery-item { aspect-ratio: auto; border-radius: 9px; }
.meeting-landing .epcm-gallery-item:first-child { grid-column: span 2; grid-row: span 2; }
.meeting-landing .epcm-gallery-item:nth-child(2),
.meeting-landing .epcm-gallery-item:nth-child(3) { grid-column: span 2; }
.meeting-landing .epcm-gallery-item::after { content: ''; position: absolute; inset: 0; pointer-events: none; border: 1px solid rgba(255,255,255,.15); border-radius: inherit; }
.meeting-landing .epcm-gallery-item img { transition: transform .45s ease, filter .45s ease; }
.footer-text { flex: 1 1 0; min-width: 0; overflow-wrap: anywhere; }
.footer-text-right { text-align: right; }
@media (max-width: 760px) {
 .meeting-landing .epcm-gallery { grid-template-columns: repeat(2, minmax(0,1fr)); grid-auto-rows: clamp(125px, 24vw, 185px); }
 .meeting-landing .epcm-gallery-item:first-child { grid-column: span 2; grid-row: span 2; }
 .meeting-landing .epcm-gallery-item:nth-child(2), .meeting-landing .epcm-gallery-item:nth-child(3) { grid-column: span 1; }
}
@media (max-width: 560px) {
 .meeting-landing .epcm-gallery-section { padding: 18px; }
 .meeting-landing .epcm-gallery { gap: 7px; grid-auto-rows: 118px; }
 .meeting-landing .epcm-gallery-item:first-child { grid-row: span 2; }
 .meeting-landing .epcm-landing-body { padding: 27px 21px 34px; }
 .footer-text-right { text-align: left; }
}

/* 1.2.1: Galerie als interaktiver, bildfüllender Landingpage-Header */
.meeting-landing .epcm-gallery-section { padding: 0; background: #26204c; }
.meeting-landing .epcm-gallery { gap: 5px; }
.meeting-landing .epcm-gallery-item { border-radius: 0; }
.meeting-landing .epcm-gallery-item::after { border-radius: 0; }
@media (max-width: 560px) {
  .meeting-landing .epcm-gallery-section { padding: 0; }
  .meeting-landing .epcm-gallery { gap: 4px; }
}

/* 1.3.0: Full-bleed gallery hero; content stays in readable centered shell. */
.epcm-landing-main { overflow: clip; }
.epcm-landing-main > .epcm-gallery-hero { width: 100%; margin: 0; padding: 0; background: var(--epcm-indigo); }
.epcm-landing-main .epcm-gallery { gap: 5px; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: clamp(115px, 14vw, 240px); }
.epcm-landing-main .epcm-gallery-item { border-radius: 0; aspect-ratio: auto; }
.epcm-landing-main .epcm-gallery-item:first-child { grid-column: span 2; grid-row: span 2; }
.epcm-landing-main .epcm-gallery-item:nth-child(2),
.epcm-landing-main .epcm-gallery-item:nth-child(3) { grid-column: span 2; }
.epcm-landing-main .epcm-gallery-item::after { content: ''; position: absolute; inset: 0; pointer-events: none; border: 1px solid rgba(255,255,255,.14); }
.epcm-landing-content-shell { padding-top: clamp(32px, 5vw, 70px); }
.epcm-landing-content-shell .meeting-landing { padding: 0; }
@media (max-width: 760px) {
  .epcm-landing-main .epcm-gallery { grid-template-columns: repeat(2,minmax(0,1fr)); grid-auto-rows: clamp(115px, 26vw, 200px); gap: 4px; }
  .epcm-landing-main .epcm-gallery-item:nth-child(2),
  .epcm-landing-main .epcm-gallery-item:nth-child(3) { grid-column: span 1; }
}
@media (max-width: 560px) {
  .epcm-landing-main .epcm-gallery { grid-auto-rows: clamp(92px, 25vw, 150px); gap: 3px; }
  .epcm-landing-content-shell { padding-top: 24px; }
}

/* 1.4.0: Full-width, lightweight horizontal gallery; accessible controls. */
.epcm-landing-main > .epcm-gallery-hero { position:relative; background:#fff; padding:clamp(14px,2.5vw,30px) 0; overflow:hidden; }
.epcm-landing-main .epcm-gallery {
  display:flex; flex-wrap:nowrap; align-items:stretch; gap:clamp(8px,1vw,15px);
  overflow-x:auto; overflow-y:hidden; scroll-snap-type:x mandatory; scroll-padding-inline:clamp(16px,8vw,120px);
  overscroll-behavior-inline:contain; scrollbar-width:none; padding:0 clamp(16px,8vw,120px);
  -webkit-overflow-scrolling:touch; background:#fff;
}
.epcm-landing-main .epcm-gallery::-webkit-scrollbar { display:none; }
.epcm-landing-main .epcm-gallery-item,
.epcm-landing-main .epcm-gallery-item:first-child,
.epcm-landing-main .epcm-gallery-item:nth-child(2),
.epcm-landing-main .epcm-gallery-item:nth-child(3) {
  grid-column:auto; grid-row:auto; flex:0 0 clamp(260px,50vw,780px);
  width:clamp(260px,50vw,780px); height:clamp(245px,38vw,530px);
  border-radius:8px; scroll-snap-align:center; background:#f1f4f8;
}
.epcm-landing-main .epcm-gallery-item::after { display:none; }
.epcm-gallery-controls { display:flex; align-items:center; justify-content:center; gap:16px; padding:15px 18px 0; }
.epcm-gallery-arrow { display:grid; place-items:center; width:42px; height:42px; border:1px solid #d9e1e9; border-radius:50%; background:white; color:#26204c; font-size:27px; line-height:1; cursor:pointer; transition:background .2s, border-color .2s; }
.epcm-gallery-arrow:hover,.epcm-gallery-arrow:focus-visible { background:#eef8ff; border-color:#3bc1ff; }
.epcm-gallery-count { font-size:13px; font-weight:700; min-width:75px; text-align:center; color:#404967; font-variant-numeric:tabular-nums; }
.epcm-gallery-progress { width:clamp(70px,15vw,150px); height:3px; background:#e2e9f0; border-radius:5px; overflow:hidden; }
.epcm-gallery-progress-bar { display:block; width:100%; height:100%; background:#21449a; transform:scaleX(0); transform-origin:left; transition:transform .2s; }
.epcm-next-event { margin:clamp(40px,6vw,85px) auto 0; padding:clamp(30px,5vw,65px) 20px; background:#eef3f9; overflow:hidden; }
.epcm-next-event-inner { max-width:1000px; margin:auto; transform:translateY(55px); opacity:0; transition:transform .75s cubic-bezier(.2,.8,.2,1),opacity .75s ease; }
.epcm-next-event.is-visible .epcm-next-event-inner { transform:translateY(0); opacity:1; }
.epcm-next-event-label { margin:0 0 16px; text-align:center; color:#393d63; font-size:clamp(18px,2vw,25px); font-weight:700; }
.epcm-next-event-link { display:block; overflow:hidden; border-radius:10px; box-shadow:0 15px 38px rgba(30,31,73,.13); }
.epcm-next-event-link img { display:block; width:100%; height:auto; transition:transform .4s ease; }
.epcm-next-event-link:hover img { transform:scale(1.025); }
.epcm-footer-nav .menu { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:6px 19px; list-style:none; padding:0; margin:0; }
.epcm-footer-nav a { text-decoration:none; }
.epcm-footer-nav a:hover { text-decoration:underline; }
@media(max-width:700px) {
  .epcm-landing-main .epcm-gallery { scroll-padding-inline:14px; padding:0 14px; gap:8px; }
  .epcm-landing-main .epcm-gallery-item,.epcm-landing-main .epcm-gallery-item:first-child,.epcm-landing-main .epcm-gallery-item:nth-child(2),.epcm-landing-main .epcm-gallery-item:nth-child(3) { flex-basis:84vw; width:84vw; height:clamp(240px,65vw,390px); }
  .epcm-footer-nav .menu { justify-content:flex-start; }
}
@media(prefers-reduced-motion:reduce) {
  .epcm-next-event-inner { opacity:1; transform:none; transition:none; }
  .epcm-landing-main .epcm-gallery { scroll-behavior:auto; }
}

/* 1.4.1: Full-width collage carousel, lighter spacing and refined controls. */
.epcm-landing-main > .epcm-gallery-hero {
  width: 100%;
  margin: 0;
  padding: clamp(14px, 2vw, 26px) 0 0;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  overflow: hidden;
}
.epcm-landing-main .epcm-gallery {
  width: 100%;
  padding: 0 clamp(16px, 4vw, 56px);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: clamp(16px, 4vw, 56px);
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  background: transparent;
}
.epcm-landing-main .epcm-gallery::-webkit-scrollbar { display: none; }
.epcm-landing-main .epcm-gallery-track {
  display: flex;
  align-items: stretch;
  gap: clamp(14px, 1.8vw, 22px);
  padding-bottom: 6px;
}
.epcm-landing-main .epcm-gallery-slide {
  flex: 0 0 min(84vw, 1080px);
  width: min(84vw, 1080px);
  min-height: clamp(310px, 42vw, 560px);
  display: grid;
  gap: clamp(8px, 1vw, 14px);
  grid-auto-flow: dense;
  scroll-snap-align: center;
  padding: 0;
}
.epcm-landing-main .epcm-gallery-slide.layout-a {
  grid-template-columns: 1.6fr 1fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.epcm-landing-main .epcm-gallery-slide.layout-b {
  grid-template-columns: 1.2fr 1.2fr .9fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.epcm-landing-main .epcm-gallery-slide.layout-c {
  grid-template-columns: 1.35fr 1fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
}
.epcm-landing-main .epcm-gallery-slide > .epcm-gallery-item,
.epcm-landing-main .epcm-gallery-slide > .epcm-gallery-item:first-child,
.epcm-landing-main .epcm-gallery-slide > .epcm-gallery-item:nth-child(2),
.epcm-landing-main .epcm-gallery-slide > .epcm-gallery-item:nth-child(3) {
  width: auto;
  height: auto;
  min-height: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(30, 43, 79, 0.08);
  background: #e7edf5;
  aspect-ratio: auto;
  position: relative;
}
.epcm-landing-main .epcm-gallery-slide > .epcm-gallery-item::after { display: none; }
.epcm-landing-main .epcm-gallery-slide > .epcm-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.epcm-landing-main .epcm-gallery-slide.layout-a > .slot-1 { grid-column: 1; grid-row: 1 / span 2; }
.epcm-landing-main .epcm-gallery-slide.layout-a > .slot-2 { grid-column: 2; grid-row: 1; }
.epcm-landing-main .epcm-gallery-slide.layout-a > .slot-3 { grid-column: 3; grid-row: 1; }
.epcm-landing-main .epcm-gallery-slide.layout-a > .slot-4 { grid-column: 2 / span 2; grid-row: 2; }
.epcm-landing-main .epcm-gallery-slide.layout-a > .slot-5 { grid-column: 3; grid-row: 2; }

.epcm-landing-main .epcm-gallery-slide.layout-b > .slot-1 { grid-column: 1 / span 2; grid-row: 1; }
.epcm-landing-main .epcm-gallery-slide.layout-b > .slot-2 { grid-column: 3; grid-row: 1 / span 2; }
.epcm-landing-main .epcm-gallery-slide.layout-b > .slot-3 { grid-column: 1; grid-row: 2; }
.epcm-landing-main .epcm-gallery-slide.layout-b > .slot-4 { grid-column: 2; grid-row: 2; }
.epcm-landing-main .epcm-gallery-slide.layout-b > .slot-5 { grid-column: 1 / span 2; grid-row: 2; }

.epcm-landing-main .epcm-gallery-slide.layout-c > .slot-1 { grid-column: 1 / span 2; grid-row: 1 / span 2; }
.epcm-landing-main .epcm-gallery-slide.layout-c > .slot-2 { grid-column: 3; grid-row: 1; }
.epcm-landing-main .epcm-gallery-slide.layout-c > .slot-3 { grid-column: 3; grid-row: 2; }
.epcm-landing-main .epcm-gallery-slide.layout-c > .slot-4 { grid-column: 2; grid-row: 1; }
.epcm-landing-main .epcm-gallery-slide.layout-c > .slot-5 { grid-column: 2; grid-row: 2; }

.epcm-gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 16px 18px 4px;
}
.epcm-gallery-arrow {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid #d8e1eb;
  border-radius: 50%;
  background: rgba(255,255,255,.95);
  color: #26204c;
  font-size: 27px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(30, 43, 79, 0.08);
  transition: transform .2s ease, background .2s ease, border-color .2s ease, opacity .2s ease;
}
.epcm-gallery-arrow:hover,
.epcm-gallery-arrow:focus-visible {
  background: #eef8ff;
  border-color: #3bc1ff;
  transform: translateY(-1px);
}
.epcm-gallery-arrow:disabled {
  opacity: .45;
  cursor: default;
  transform: none;
}
.epcm-gallery-count {
  font-size: 13px;
  font-weight: 750;
  min-width: 72px;
  text-align: center;
  color: #4b5577;
  font-variant-numeric: tabular-nums;
}
.epcm-gallery-progress {
  width: clamp(80px, 18vw, 170px);
  height: 4px;
  background: #dfe7f0;
  border-radius: 999px;
  overflow: hidden;
}
.epcm-gallery-progress-bar {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, #3bc1ff 0%, #21449a 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

@media (max-width: 920px) {
  .epcm-landing-main .epcm-gallery-slide {
    flex-basis: min(88vw, 860px);
    width: min(88vw, 860px);
    min-height: clamp(300px, 56vw, 520px);
  }
}
@media (max-width: 700px) {
  .epcm-landing-main .epcm-gallery {
    padding: 0 14px;
    scroll-padding-inline: 14px;
  }
  .epcm-landing-main .epcm-gallery-track {
    gap: 10px;
  }
  .epcm-landing-main .epcm-gallery-slide,
  .epcm-landing-main .epcm-gallery-slide.layout-a,
  .epcm-landing-main .epcm-gallery-slide.layout-b,
  .epcm-landing-main .epcm-gallery-slide.layout-c {
    flex-basis: 88vw;
    width: 88vw;
    min-height: clamp(280px, 98vw, 460px);
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(3, minmax(88px, 1fr));
  }
  .epcm-landing-main .epcm-gallery-slide > .slot-1 { grid-column: 1 / span 2 !important; grid-row: 1 / span 2 !important; }
  .epcm-landing-main .epcm-gallery-slide > .slot-2 { grid-column: 1 !important; grid-row: 3 !important; }
  .epcm-landing-main .epcm-gallery-slide > .slot-3 { grid-column: 2 !important; grid-row: 3 !important; }
  .epcm-landing-main .epcm-gallery-slide > .slot-4,
  .epcm-landing-main .epcm-gallery-slide > .slot-5 { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .epcm-gallery-arrow,
  .epcm-gallery-progress-bar { transition: none; }
}

/* 1.4.2 – Explicit, compact hero height: original image dimensions must never stretch grid tracks. */
.epcm-landing-main .epcm-gallery-track { align-items: stretch; }
.epcm-landing-main .epcm-gallery-slide,
.epcm-landing-main .epcm-gallery-slide.layout-a,
.epcm-landing-main .epcm-gallery-slide.layout-b,
.epcm-landing-main .epcm-gallery-slide.layout-c {
  height: clamp(290px, 30vw, 430px);
  min-height: 0;
  max-height: 430px;
  grid-template-columns: 1.5fr 1fr 1fr;
  grid-template-rows: repeat(2, minmax(0, 1fr));
  align-content: stretch;
}
.epcm-landing-main .epcm-gallery-slide > .epcm-gallery-item,
.epcm-landing-main .epcm-gallery-slide > .epcm-gallery-item:first-child,
.epcm-landing-main .epcm-gallery-slide > .epcm-gallery-item:nth-child(2),
.epcm-landing-main .epcm-gallery-slide > .epcm-gallery-item:nth-child(3) {
  min-width: 0;
  min-height: 0;
  max-height: none;
  align-self: stretch;
  justify-self: stretch;
}
.epcm-landing-main .epcm-gallery-slide > .epcm-gallery-item img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  object-fit: cover;
}
/* Five images per panel: one large portrait and four smaller images. */
.epcm-landing-main .epcm-gallery-slide.layout-a > .slot-1 { grid-area: 1 / 1 / 3 / 2; }
.epcm-landing-main .epcm-gallery-slide.layout-a > .slot-2 { grid-area: 1 / 2 / 2 / 3; }
.epcm-landing-main .epcm-gallery-slide.layout-a > .slot-3 { grid-area: 1 / 3 / 2 / 4; }
.epcm-landing-main .epcm-gallery-slide.layout-a > .slot-4 { grid-area: 2 / 2 / 3 / 3; }
.epcm-landing-main .epcm-gallery-slide.layout-a > .slot-5 { grid-area: 2 / 3 / 3 / 4; }
.epcm-landing-main .epcm-gallery-slide.layout-b > .slot-1 { grid-area: 1 / 3 / 3 / 4; }
.epcm-landing-main .epcm-gallery-slide.layout-b > .slot-2 { grid-area: 1 / 1 / 2 / 2; }
.epcm-landing-main .epcm-gallery-slide.layout-b > .slot-3 { grid-area: 1 / 2 / 2 / 3; }
.epcm-landing-main .epcm-gallery-slide.layout-b > .slot-4 { grid-area: 2 / 1 / 3 / 2; }
.epcm-landing-main .epcm-gallery-slide.layout-b > .slot-5 { grid-area: 2 / 2 / 3 / 3; }
.epcm-landing-main .epcm-gallery-slide.layout-c > .slot-1 { grid-area: 1 / 2 / 3 / 3; }
.epcm-landing-main .epcm-gallery-slide.layout-c > .slot-2 { grid-area: 1 / 1 / 2 / 2; }
.epcm-landing-main .epcm-gallery-slide.layout-c > .slot-3 { grid-area: 2 / 1 / 3 / 2; }
.epcm-landing-main .epcm-gallery-slide.layout-c > .slot-4 { grid-area: 1 / 3 / 2 / 4; }
.epcm-landing-main .epcm-gallery-slide.layout-c > .slot-5 { grid-area: 2 / 3 / 3 / 4; }
@media(max-width:700px) {
  .epcm-landing-main .epcm-gallery-slide,
  .epcm-landing-main .epcm-gallery-slide.layout-a,
  .epcm-landing-main .epcm-gallery-slide.layout-b,
  .epcm-landing-main .epcm-gallery-slide.layout-c {
    height: clamp(265px, 72vw, 340px);
    min-height: 0;
    max-height: 340px;
    grid-template-columns: 1.25fr 1fr 1fr;
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }
  .epcm-landing-main .epcm-gallery-slide > .slot-1,
  .epcm-landing-main .epcm-gallery-slide > .slot-2,
  .epcm-landing-main .epcm-gallery-slide > .slot-3,
  .epcm-landing-main .epcm-gallery-slide > .slot-4,
  .epcm-landing-main .epcm-gallery-slide > .slot-5 {
    display: block;
    grid-column: auto !important;
    grid-row: auto !important;
  }
  .epcm-landing-main .epcm-gallery-slide.layout-a > .slot-1 { grid-area: 1 / 1 / 3 / 2 !important; }
  .epcm-landing-main .epcm-gallery-slide.layout-a > .slot-2 { grid-area: 1 / 2 / 2 / 3 !important; }
  .epcm-landing-main .epcm-gallery-slide.layout-a > .slot-3 { grid-area: 1 / 3 / 2 / 4 !important; }
  .epcm-landing-main .epcm-gallery-slide.layout-a > .slot-4 { grid-area: 2 / 2 / 3 / 3 !important; }
  .epcm-landing-main .epcm-gallery-slide.layout-a > .slot-5 { grid-area: 2 / 3 / 3 / 4 !important; }
  .epcm-landing-main .epcm-gallery-slide.layout-b > .slot-1 { grid-area: 1 / 3 / 3 / 4 !important; }
  .epcm-landing-main .epcm-gallery-slide.layout-b > .slot-2 { grid-area: 1 / 1 / 2 / 2 !important; }
  .epcm-landing-main .epcm-gallery-slide.layout-b > .slot-3 { grid-area: 1 / 2 / 2 / 3 !important; }
  .epcm-landing-main .epcm-gallery-slide.layout-b > .slot-4 { grid-area: 2 / 1 / 3 / 2 !important; }
  .epcm-landing-main .epcm-gallery-slide.layout-b > .slot-5 { grid-area: 2 / 2 / 3 / 3 !important; }
  .epcm-landing-main .epcm-gallery-slide.layout-c > .slot-1 { grid-area: 1 / 2 / 3 / 3 !important; }
  .epcm-landing-main .epcm-gallery-slide.layout-c > .slot-2 { grid-area: 1 / 1 / 2 / 2 !important; }
  .epcm-landing-main .epcm-gallery-slide.layout-c > .slot-3 { grid-area: 2 / 1 / 3 / 2 !important; }
  .epcm-landing-main .epcm-gallery-slide.layout-c > .slot-4 { grid-area: 1 / 3 / 2 / 4 !important; }
  .epcm-landing-main .epcm-gallery-slide.layout-c > .slot-5 { grid-area: 2 / 3 / 3 / 4 !important; }
}

/* 1.4.4: Orientierungsbewusste Collagen mit flacher, konstanter Hero-Höhe. */
.epcm-landing-main .epcm-gallery-slide,
.epcm-landing-main .epcm-gallery-slide.layout-a,
.epcm-landing-main .epcm-gallery-slide.layout-b,
.epcm-landing-main .epcm-gallery-slide.layout-c {
  display:grid;
  height:clamp(290px,30vw,430px);
  min-height:0;
  max-height:430px;
  grid-template-rows:repeat(2,minmax(0,1fr));
  grid-template-columns:repeat(2,minmax(0,1fr));
}
.epcm-landing-main .epcm-gallery-slide > .epcm-gallery-item,
.epcm-landing-main .epcm-gallery-slide > .epcm-gallery-item:first-child,
.epcm-landing-main .epcm-gallery-slide > .epcm-gallery-item:nth-child(2),
.epcm-landing-main .epcm-gallery-slide > .epcm-gallery-item:nth-child(3) {
  grid-area:auto;
  min-width:0;
  min-height:0;
  display:block;
  position:relative;
}
.epcm-landing-main .epcm-gallery-slide.epcm-orientation-mixed {
  grid-template-columns:minmax(0, 0.92fr) minmax(0, 1.65fr);
}
.epcm-landing-main .epcm-gallery-slide.epcm-orientation-mixed > .slot-1 { grid-area:1 / 1 / 3 / 2 !important; }
.epcm-landing-main .epcm-gallery-slide.epcm-orientation-mixed > .slot-2 { grid-area:1 / 2 / 2 / 3 !important; }
.epcm-landing-main .epcm-gallery-slide.epcm-orientation-mixed > .slot-3 { grid-area:2 / 2 / 3 / 3 !important; }
.epcm-landing-main .epcm-gallery-slide.epcm-orientation-landscape { grid-template-columns:repeat(2,minmax(0,1fr)); }
.epcm-landing-main .epcm-gallery-slide.epcm-orientation-landscape > .slot-1 { grid-area:1 / 1 / 2 / 2 !important; }
.epcm-landing-main .epcm-gallery-slide.epcm-orientation-landscape > .slot-2 { grid-area:1 / 2 / 2 / 3 !important; }
.epcm-landing-main .epcm-gallery-slide.epcm-orientation-landscape > .slot-3 { grid-area:2 / 1 / 3 / 2 !important; }
.epcm-landing-main .epcm-gallery-slide.epcm-orientation-landscape > .slot-4 { grid-area:2 / 2 / 3 / 3 !important; }
.epcm-landing-main .epcm-gallery-slide.epcm-orientation-portrait {
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.epcm-landing-main .epcm-gallery-slide.epcm-orientation-portrait > .slot-1 { grid-area:1 / 1 / 3 / 2 !important; }
.epcm-landing-main .epcm-gallery-slide.epcm-orientation-portrait > .slot-2 { grid-area:1 / 2 / 3 / 3 !important; }
.epcm-landing-main .epcm-gallery-slide.epcm-orientation-portrait > .slot-3 { grid-area:1 / 3 / 3 / 4 !important; }
.epcm-landing-main .epcm-gallery-slide.epcm-slide-count-1 > .slot-1 { grid-area:1 / 1 / 3 / -1 !important; }
.epcm-landing-main .epcm-gallery-slide.epcm-orientation-portrait.epcm-slide-count-2 {grid-template-columns:repeat(2,minmax(0,1fr));}
.epcm-landing-main .epcm-gallery-slide.epcm-orientation-portrait.epcm-slide-count-2 > .slot-2 {grid-area:1 / 2 / 3 / 3 !important;}
.epcm-landing-main .epcm-gallery-slide.epcm-orientation-landscape.epcm-slide-count-2 > .slot-1 {grid-area:1 / 1 / 3 / 2 !important;}
.epcm-landing-main .epcm-gallery-slide.epcm-orientation-landscape.epcm-slide-count-2 > .slot-2 {grid-area:1 / 2 / 3 / 3 !important;}
.epcm-landing-main .epcm-gallery-slide.epcm-orientation-landscape.epcm-slide-count-3 > .slot-3 {grid-area:2 / 1 / 3 / 3 !important;}
.epcm-landing-main .epcm-gallery-slide.epcm-orientation-mixed.epcm-slide-count-2 > .slot-2 {grid-area:1 / 2 / 3 / 3 !important;}
@media(max-width:700px) {
  .epcm-landing-main .epcm-gallery-slide,
  .epcm-landing-main .epcm-gallery-slide.layout-a,
  .epcm-landing-main .epcm-gallery-slide.layout-b,
  .epcm-landing-main .epcm-gallery-slide.layout-c {
    height:clamp(265px,72vw,340px);
    max-height:340px;
  }
}

/* 1.4.5 – Social profile links in the header. */
.header-inner .site-navigation { margin-left: auto; }
.epcm-header-social { display:flex; align-items:center; flex:0 0 auto; gap:6px; }
.epcm-social-link { display:inline-flex; align-items:center; justify-content:center; width:38px; height:38px; border-radius:10px; color:var(--epcm-indigo); background:#f0f5fb; text-decoration:none; transition:color .2s ease, background .2s ease, transform .2s ease; }
.epcm-social-link:hover { color:var(--epcm-blue); background:#e0f5ff; transform:translateY(-1px); }
.epcm-social-link:focus-visible { outline:3px solid var(--epcm-cyan); outline-offset:2px; }
.epcm-social-link svg { display:block; }
@media(max-width:760px) { .header-inner { gap:12px; } .epcm-header-social { gap:3px; } .epcm-social-link { width:36px; height:36px; } }
@media(prefers-reduced-motion: reduce) { .epcm-social-link { transition:none; } .epcm-social-link:hover { transform:none; } }


/* 1.4.6 – Ruhiger, fließender Übergang vom Rückblick zur nächsten Veranstaltung. */
.epcm-landing-main .epcm-landing-content-shell {
  padding-bottom: clamp(34px, 4vw, 52px);
}
.epcm-landing-main .epcm-next-event {
  position: relative;
  isolation: isolate;
  margin: 48px 0 0;
  padding: clamp(30px, 4vw, 54px) 20px clamp(54px, 6vw, 88px);
  overflow: visible;
  background: #eef3f9;
}
.epcm-landing-main .epcm-next-event::before {
  content: "";
  position: absolute;
  z-index: -1;
  bottom: calc(100% - 1px);
  left: 0;
  width: 100%;
  height: clamp(54px, 7vw, 96px);
  background: #eef3f9;
  clip-path: ellipse(82% 100% at 58% 100%);
  pointer-events: none;
}
.epcm-landing-main .epcm-next-event-inner {
  width: min(100%, 1000px);
}
.epcm-landing-main .epcm-next-event-link {
  border-radius: 15px;
  box-shadow: 0 22px 56px rgba(28, 40, 87, .12);
}
@media (max-width: 700px) {
  .epcm-landing-main .epcm-landing-content-shell { padding-bottom: 30px; }
  .epcm-landing-main .epcm-next-event { margin-top: 32px; padding: 26px 16px 48px; }
  .epcm-landing-main .epcm-next-event::before { height: 56px; }
}

/* 1.4.7: Editorial overlap instead of decorative wave / empty colour block. */
.epcm-landing-main .epcm-landing-content-shell {
  position: relative;
  z-index: 1;
  padding-bottom: 0;
}
.epcm-landing-main .epcm-next-event {
  position: relative;
  z-index: 2;
  isolation: auto;
  overflow: visible;
  margin: -34px 0 0;
  padding: 0 20px clamp(58px, 6vw, 96px);
  background: transparent;
}
.epcm-landing-main .epcm-next-event::before { content: none; display: none; }
.epcm-landing-main .epcm-next-event-inner {
  width: min(100%, 920px);
  max-width: 920px;
}
.epcm-landing-main .epcm-next-event-link {
  border: 7px solid var(--epcm-offwhite);
  border-radius: 18px;
  box-shadow: 0 24px 58px rgba(28, 40, 87, .16);
}
@media (max-width: 700px) {
  .epcm-landing-main .epcm-landing-content-shell { padding-bottom: 0; }
  .epcm-landing-main .epcm-next-event { margin-top: -15px; padding: 0 16px 50px; }
  .epcm-landing-main .epcm-next-event-link { border-width: 4px; border-radius: 13px; }
}

/* 1.4.8: subtle world-line background to anchor teaser areas on home and landing page. */
.home-showcase {
  position: relative;
  isolation: isolate;
  padding-inline: clamp(16px, 2.2vw, 28px);
  padding-top: clamp(34px, 5vw, 74px);
  padding-bottom: clamp(44px, 6vw, 92px);
}
.home-showcase::before {
  content: "";
  position: absolute;
  inset: 10px 0 0;
  z-index: -2;
  border-radius: clamp(24px, 3vw, 34px);
  background: linear-gradient(180deg, rgba(255,255,255,.92) 0%, rgba(246,249,253,.98) 72%, rgba(241,246,251,1) 100%);
  box-shadow: 0 22px 60px rgba(35, 42, 76, .05);
}
.home-showcase::after {
  content: "";
  position: absolute;
  left: clamp(6px, 1vw, 18px);
  right: clamp(6px, 1vw, 18px);
  bottom: clamp(16px, 2vw, 28px);
  top: clamp(28px, 4vw, 56px);
  z-index: -1;
  border-radius: clamp(20px, 2.5vw, 30px);
  pointer-events: none;
  background-image: linear-gradient(180deg, rgba(255,255,255,.35) 0%, rgba(255,255,255,.65) 100%), image-set(url('assets/images/epcm-world-bg.webp') type('image/webp'), url('assets/images/epcm-world-bg.png') type('image/png'));
  background-repeat: no-repeat;
  background-size: cover;
  background-position: left center;
  opacity: .15;
  filter: saturate(.88);
}
.home-showcase-grid { position: relative; z-index: 1; }
.event-card { backdrop-filter: blur(0px); }

.epcm-landing-main .epcm-next-event {
  position: relative;
  z-index: 2;
  overflow: visible;
  margin: -20px 0 0;
  padding: clamp(18px, 2vw, 26px) 20px clamp(58px, 6vw, 96px);
  background: transparent;
}
.epcm-landing-main .epcm-next-event::before {
  content: "";
  display: block;
  position: absolute;
  z-index: -1;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  width: min(100%, 1180px);
  height: calc(100% - clamp(8px, 1.4vw, 20px));
  border-radius: 30px 30px 0 0;
  background-image: linear-gradient(180deg, rgba(243,247,251,.76) 0%, rgba(238,243,249,.94) 55%, rgba(238,243,249,1) 100%), image-set(url('assets/images/epcm-world-bg.webp') type('image/webp'), url('assets/images/epcm-world-bg.png') type('image/png'));
  background-repeat: no-repeat;
  background-size: cover;
  background-position: left center;
  opacity: 1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5);
}
.epcm-landing-main .epcm-next-event-inner {
  width: min(100%, 940px);
  max-width: 940px;
  position: relative;
}
.epcm-landing-main .epcm-next-event-link {
  position: relative;
  border: 7px solid rgba(247,249,252,.96);
  border-radius: 18px;
  box-shadow: 0 24px 58px rgba(28, 40, 87, .13);
}
.epcm-landing-main .epcm-next-event-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35);
  pointer-events: none;
}

@media (max-width: 900px) {
  .home-showcase {
    padding-inline: 14px;
  }
  .home-showcase::before,
  .home-showcase::after {
    border-radius: 20px;
  }
}
@media (max-width: 700px) {
  .home-showcase {
    width: min(calc(100% - 20px), 1480px);
    padding-inline: 10px;
    padding-top: 18px;
    padding-bottom: 34px;
  }
  .home-showcase::before {
    inset: 0;
    border-radius: 18px;
  }
  .home-showcase::after {
    top: 18px;
    bottom: 12px;
    left: 0;
    right: 0;
    border-radius: 16px;
    opacity: .12;
  }
  .epcm-landing-main .epcm-next-event {
    margin-top: -8px;
    padding: 14px 16px 50px;
  }
  .epcm-landing-main .epcm-next-event::before {
    width: calc(100% - 10px);
    border-radius: 20px 20px 0 0;
    background-position: 22% center;
  }
  .epcm-landing-main .epcm-next-event-link {
    border-width: 4px;
    border-radius: 14px;
  }
}

/* 1.4.9: full-bleed atmospheric background across the viewport. */
.home-showcase::before,
.home-showcase::after {
  width: 100vw;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  border-radius: 0;
}
.home-showcase::before { top: 0; bottom: 0; }
.home-showcase::after { top: 0; bottom: 0; }
.epcm-landing-main .epcm-next-event::before {
  left: 0;
  width: 100%;
  transform: none;
  border-radius: 0;
  height: 100%;
}
@media (max-width: 900px) {
  .home-showcase::before,
  .home-showcase::after { border-radius: 0; }
}
@media (max-width: 700px) {
  .home-showcase::before,
  .home-showcase::after {
    left: 50%;
    right: auto;
    width: 100vw;
    transform: translateX(-50%);
    border-radius: 0;
    top: 0;
    bottom: 0;
  }
  .epcm-landing-main .epcm-next-event::before {
    width: 100%;
    border-radius: 0;
  }
}

/* 1.5.0: Only faint linework, never a dark or photographic background. */
.home-showcase::before {
  background: linear-gradient(180deg, #f7f9fc 0%, #f1f6fa 100%);
  box-shadow: none;
}
.home-showcase::after {
  background: url('assets/images/epcm-line-network.svg') center center / 100% 100% no-repeat;
  opacity: .53;
  filter: none;
}
.epcm-landing-main .epcm-next-event::before {
  background: linear-gradient(180deg, rgba(247,249,252,.98), rgba(241,246,250,.98));
  box-shadow: none;
}
.epcm-landing-main .epcm-next-event::after {
  content: "";
  display: block;
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: url('assets/images/epcm-line-network.svg') center center / 100% 100% no-repeat;
  opacity: .53;
}
@media (max-width: 700px) {
  .home-showcase::after,
  .epcm-landing-main .epcm-next-event::after { opacity: .38; }
}

/* 1.5.1: clean straight transition; separate editorial teaser from the text card. */
.epcm-landing-main .epcm-landing-content-shell {
  padding-bottom: 0;
}
.epcm-landing-main .epcm-next-event {
  margin-top: clamp(28px, 3.5vw, 56px);
  padding-top: clamp(18px, 2.5vw, 34px);
}
.epcm-landing-main .epcm-next-event::before {
  content: "";
  display: block;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  border-radius: 0;
  clip-path: none;
  background: linear-gradient(180deg, #f7f9fc 0%, #f1f6fa 100%);
}
.epcm-landing-main .epcm-next-event::after {
  border-radius: 0;
  clip-path: none;
}
@media (max-width: 700px) {
  .epcm-landing-main .epcm-next-event {
    margin-top: 24px;
    padding-top: 18px;
  }
}


/* 1.7.0: global dark colour mode. Scoped to body class to preserve the light theme. */
body.epcm-mode-dark {
  color-scheme: dark;
  --epcm-offwhite: #15142b;
  --epcm-text: #eef2ff;
  --epcm-muted: #bec8dc;
  --epcm-border: #424464;
  --epcm-blue: #6ed2ff;
  --epcm-cyan-dark: #8ce1ff;
  --epcm-shadow: 0 18px 50px rgba(2, 4, 20, .35);
  background: #15142b;
  color: #eef2ff;
}
body.epcm-mode-dark a { color: #8bdcff; }
body.epcm-mode-dark a:hover { color: #ffce56; }
body.epcm-mode-dark .site-header { background: #201e41; border-color: #40446a; }
body.epcm-mode-dark .site-title a,
body.epcm-mode-dark .primary-menu a { color: #f4f5ff; }
body.epcm-mode-dark .primary-menu a:hover,
body.epcm-mode-dark .primary-menu .current-menu-item > a,
body.epcm-mode-dark .primary-menu .current_page_item > a { background: #34365e; color: #9ce5ff; }
body.epcm-mode-dark .menu-toggle { background: #353463; color: #fff; }
body.epcm-mode-dark .epcm-header-social a { color: #a2e5ff; }
body.epcm-mode-dark .epcm-social-link { color: #a2e5ff; }
body.epcm-mode-dark .page-card { background: #242443; border-color: #444866; box-shadow: 0 18px 42px rgba(3,4,16,.24); }
body.epcm-mode-dark .entry-title,
body.epcm-mode-dark .entry-content h2,
body.epcm-mode-dark .entry-content h3 { color: #f5f6ff; }
body.epcm-mode-dark .entry-content { color: #e2e8f5; }
body.epcm-mode-dark .entry-content .wp-block-button__link,
body.epcm-mode-dark .epcm-button { background: #357fb2; color: #fff; }
body.epcm-mode-dark .entry-content .wp-block-button__link:hover,
body.epcm-mode-dark .epcm-button:hover { background: #225b83; }
body.epcm-mode-dark .site-footer { background: #1b1a36; color: #cbd3e5; border-color: #40446a; }
body.epcm-mode-dark .footer-inner a { color: #d5e4f8; }
body.epcm-mode-dark .footer-inner a:hover { color: #ffce56; }
body.epcm-mode-dark .home-showcase::before { background: linear-gradient(180deg, #242342 0%, #1b1c38 100%); }
body.epcm-mode-dark .home-showcase::after { opacity: .26; }
body.epcm-mode-dark .event-card { box-shadow: 0 22px 60px rgba(2, 4, 19, .5); }
body.epcm-mode-dark .epcm-landing-main > .epcm-gallery-hero { background: #1c1c37; }
body.epcm-mode-dark .epcm-landing-main .epcm-gallery,
body.epcm-mode-dark .epcm-landing-main .epcm-gallery-section { background: transparent; }
body.epcm-mode-dark .epcm-gallery-count { color: #e2e8f5; }
body.epcm-mode-dark .epcm-gallery-progress { background: #444769; }
body.epcm-mode-dark .epcm-gallery-arrow { color: #f3f6ff; border-color: #535879; background: #303150; }
body.epcm-mode-dark .epcm-gallery-arrow:hover,
body.epcm-mode-dark .epcm-gallery-arrow:focus-visible { background: #414870; border-color: #6ed2ff; }
body.epcm-mode-dark .epcm-landing-main .epcm-next-event::before { background: linear-gradient(180deg, #1e1e3b, #191932); }
body.epcm-mode-dark .epcm-landing-main .epcm-next-event::after { opacity: .24; }
body.epcm-mode-dark .epcm-landing-main .epcm-next-event-link { border-color: #303150; box-shadow: 0 24px 58px rgba(1,3,17,.35); }
body.epcm-mode-dark .epcm-next-event { background: #191932; }
body.epcm-mode-dark .epcm-next-event-label { color: #ecf3ff; }
body.epcm-mode-dark .epcm-gallery-slide > .epcm-gallery-item { background: #393d60; }
body.epcm-mode-dark .entry-content blockquote,
body.epcm-mode-dark .entry-content pre,
body.epcm-mode-dark .entry-content .wp-block-group.has-background { border-color: #474b6d; }
body.epcm-mode-dark .entry-content input,
body.epcm-mode-dark .entry-content textarea,
body.epcm-mode-dark .entry-content select { background: #252643; color: #fff; border-color: #62678d; }
body.epcm-mode-dark :focus-visible { outline-color: #ffce56; }
@media (max-width: 860px) {
 body.epcm-mode-dark .primary-menu { background: #29294c; border-color: #54577a; }
}

/* 1.7.1: homepage event headings and refined dark social buttons. */
.home-showcase-grid {
  align-items: start;
}
.event-card-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}
.event-card-heading {
  margin: 0;
  padding: 0 2px;
  color: var(--epcm-indigo);
  font-size: clamp(18px, 1.9vw, 26px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.02em;
}
.event-card-heading::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--epcm-cyan);
}

body.epcm-mode-dark .event-card-heading {
  color: #f2f5ff;
}
body.epcm-mode-dark .event-card-heading::after {
  background: linear-gradient(90deg, #6ed2ff 0%, #ffca08 100%);
}
body.epcm-mode-dark .epcm-header-social {
  display: flex;
  align-items: center;
  gap: 8px;
}
body.epcm-mode-dark .epcm-social-link {
  color: #b8ecff;
  background: linear-gradient(180deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,.03) 100%);
  border: 1px solid rgba(129, 216, 255, .26);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 8px 18px rgba(0,0,0,.18);
}
body.epcm-mode-dark .epcm-social-link:hover,
body.epcm-mode-dark .epcm-social-link:focus-visible {
  color: #ffffff;
  background: linear-gradient(180deg, rgba(110,210,255,.22) 0%, rgba(110,210,255,.1) 100%);
  border-color: rgba(110,210,255,.7);
  transform: translateY(-1px);
}
body.epcm-mode-dark .epcm-social-link svg {
  filter: drop-shadow(0 0 0 rgba(0,0,0,0));
}
@media (max-width: 760px) {
  .event-card-group { gap: 10px; }
  .event-card-heading { font-size: clamp(17px, 5vw, 22px); }
  .event-card-heading::after { width: 48px; height: 3px; margin-top: 8px; }
}

/* 1.7.2: Clear visual hierarchy for upcoming event and photo recap. */
.event-card-topline { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:10px; min-height:45px; }
.event-card-status { display:inline-flex; align-items:center; justify-content:center; padding:5px 12px; border-radius:99px; font-weight:800; font-size:11px; letter-spacing:.1em; line-height:1.5; white-space:nowrap; }
.event-card-group--left .event-card-status { color:#142b50; background:#76dbff; }
.event-card-group--right .event-card-status { color:#566078; background:#edf0f5; border:1px solid #d6dfea; }
.event-card-group--left .event-card { box-shadow:0 20px 52px rgba(18,61,126,.2), 0 0 0 2px rgba(59,193,255,.28); }
.event-card-group--right .event-card { box-shadow:0 12px 34px rgba(27,34,73,.085); }
.event-card-group--left .event-card-heading::after { background:#38c6fb; }
.event-card-group--right .event-card-heading::after { background:#a1acc1; }
.event-card-action { display:inline-flex; align-self:flex-start; align-items:center; gap:9px; padding:5px 2px; min-height:36px; font-size:15px; font-weight:750; text-decoration:none; transition:gap .2s ease,color .2s ease; }
.event-card-group--left .event-card-action { color:#16539a; }
.event-card-group--right .event-card-action { color:#51617f; }
.event-card-action:hover, .event-card-action:focus-visible { gap:14px; text-decoration:underline; text-underline-offset:4px; }
.event-card-action svg { flex:none; }
body.epcm-mode-dark .event-card-group--left .event-card { box-shadow:0 22px 54px rgba(0,0,0,.5),0 0 0 2px rgba(110,210,255,.4); }
body.epcm-mode-dark .event-card-group--right .event-card { box-shadow:0 14px 38px rgba(0,0,0,.28); }
body.epcm-mode-dark .event-card-group--left .event-card-status { background:#6ed2ff; color:#152444; }
body.epcm-mode-dark .event-card-group--right .event-card-status { background:#343650; border-color:#555977; color:#e3e8f5; }
body.epcm-mode-dark .event-card-group--left .event-card-action { color:#8addff; }
body.epcm-mode-dark .event-card-group--right .event-card-action { color:#d4dbee; }
body.epcm-mode-dark .event-card-group--right .event-card-heading::after { background:#7a83a8; }
@media (prefers-reduced-motion:reduce) { .event-card-action { transition:none; } }
