/* ── CEPI Bioeconomy LAB — subpage components ────────────────────── */
/* Loaded after style.css + animations.css on subpages only.          */

/* ── Generic subpage hero (no split) ────────────────────────────── */
.page-hero { padding: 176px 0 64px; }
.page-hero__copy { max-width: 46em; }
.page-hero__copy h1 { margin-bottom: 24px; }
.page-hero__media { margin-top: 56px; }
.page-hero__media .exhibit { min-height: 360px; }
.page-hero--center .page-hero__copy { margin: 0 auto; text-align: center; }
.page-hero--center .lead { margin: 0 auto; }

/* ── Filter bar (products) ──────────────────────────────────────── */
.filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
  padding: 24px 0; border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline);
  margin-bottom: 56px;
}
.filter-bar__group { display: flex; flex-wrap: wrap; gap: 10px; flex: 1; }
.filter-select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  font: 500 13px/1 var(--font-body); color: var(--ink);
  background-color: var(--surface);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%236E7268' stroke-width='1.4' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center;
  border: 1px solid var(--hairline); border-radius: 999px;
  padding: 11px 38px 11px 18px; cursor: pointer;
  transition: border-color 0.5s var(--ease);
}
.filter-select:hover, .filter-select:focus { border-color: var(--ink); outline: none; }
.filter-bar__meta { display: flex; align-items: center; gap: 18px; margin-left: auto; }
.filter-bar__count { font-size: 13px; color: var(--muted); white-space: nowrap; }

/* ── Map section (products) ─────────────────────────────────────── */
.map-section { padding: 0 0 32px; }
.map-section h2 { margin-bottom: 32px; }
.map-section .exhibit--map { min-height: 460px; }
.map-note { margin-top: 24px; font-size: 14px; color: var(--muted); max-width: 40em; }

/* ── Products list (under the map) ──────────────────────────────── */
.product-list { padding: 0 0 144px; }
.product-cards { display: grid; gap: 40px; }
.product-card {
  display: grid; grid-template-columns: 320px 1fr; gap: 40px;
  border-top: 1px solid var(--hairline); padding-top: 40px;
}
.product-card[hidden] { display: none; }
.product-card__media .bezel { height: 100%; }
.product-card__media .exhibit { min-height: 240px; height: 100%; }
.product-card__category {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em;
  color: var(--green-deep); margin-bottom: 10px;
}
.product-card__title { margin-bottom: 14px; }
.product-card__desc { color: var(--muted); max-width: 58em; margin-bottom: 18px; }
.product-card__meta {
  list-style: none; margin: 0 0 18px; padding: 0;
  display: flex; flex-wrap: wrap; gap: 6px 28px;
  font-size: 13px; color: var(--muted);
}
.product-card__meta strong { color: var(--ink); font-weight: 600; }
.product-card__meta a { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }

/* ── Event hero + body ───────────────────────────────────────────── */
.event-hero { padding: 176px 0 96px; }
.event-hero h1 { text-align: center; }
.event-hero__media { margin-top: 56px; }
.event-hero__media .exhibit { min-height: 420px; }
.event-body { padding: 0 0 96px; }
.event-body p { color: var(--muted); max-width: 58em; margin-bottom: 20px; }
.event-body p:last-child { margin-bottom: 0; }
.event-body__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 32px; }
.event-body--center { padding-bottom: 0; }
.event-body--center p { max-width: 46em; margin-left: auto; margin-right: auto; text-align: left; }
.event-body--center .event-body__actions { justify-content: center; }

/* ── Exhibition guide (event pages) ───────────────────────────────── */
.guide-section { padding: 64px 0 96px; text-align: center; }
.guide-section h2 { margin-bottom: 20px; }
.guide-section p { color: var(--muted); max-width: 46em; margin: 0 auto 32px; }

/* ── Editions pagination (card pager) ───────────────────────────── */
.ed-pager {
  display: flex; gap: 48px;
  padding: 56px 0 144px; border-top: 1px solid var(--hairline);
}
.ed-pager__card {
  flex: 1; display: flex; flex-direction: column; gap: 16px;
  transition: transform 0.6s var(--ease);
}
.ed-pager__card:hover { transform: translateY(-4px); }
.ed-pager__card .exhibit { min-height: 220px; }
.ed-pager__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.ed-pager__text { display: grid; gap: 6px; }
.ed-pager__dir {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.2em; color: var(--muted);
}
.ed-pager__city {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em;
  font-size: clamp(1.5rem, 2.4vw, 2.125rem); color: var(--ink);
}
.ed-pager__orb {
  width: 54px; height: 54px; border-radius: 50%; flex: none;
  border: 1px solid var(--hairline); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; font-size: 17px;
  transition: transform 0.5s var(--ease), background 0.5s var(--ease),
              border-color 0.5s var(--ease), color 0.5s var(--ease);
}
.ed-pager__card:hover .ed-pager__orb {
  background: var(--green); border-color: var(--green); color: #fff;
  transform: translate(2px, -2px) scale(1.05);
}

/* ── About us content grid (cepi) ───────────────────────────────── */
.cepi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; }
.cepi-text { display: grid; gap: 22px; align-content: start; }
.cepi-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px 40px; align-content: start; }
.stat { border-bottom: 1px solid var(--hairline); padding-bottom: 20px; }
.stat__value {
  font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(1.9rem, 3vw, 2.75rem); color: var(--green-deep);
}
.stat__label { margin-top: 8px; font-size: 13px; color: var(--muted); }
/* .event-body p (specificity 0-1-1) would tint these; re-assert stat colors */
.cepi-stats .stat p { margin-bottom: 0; max-width: none; }
.cepi-stats .stat__value { color: var(--green-deep); }

/* ── Text link ───────────────────────────────────────────────────── */
.text-link {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 500;
  border-bottom: 1px solid var(--hairline); padding-bottom: 2px;
  transition: border-color 0.5s var(--ease);
}
.text-link:hover { border-color: var(--ink); }

/* ── Contact ─────────────────────────────────────────────────────── */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; padding-bottom: 96px; }
.contact-details { display: grid; gap: 22px; align-content: start; }
.contact-details address { font-size: 16px; line-height: 1.9; color: var(--muted); }
.contact-details address strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.contact-details a { text-decoration: underline; text-underline-offset: 3px; color: var(--ink); }
.contact-map-wrap { margin-top: -6px; }
#contact-map { height: 280px; z-index: 0; }

.wpcf7-form { display: grid; gap: 20px; }
.form__field { display: grid; gap: 8px; }
.form__field label { font-size: 13px; font-weight: 500; color: var(--muted); }
.form__field input, .form__field textarea {
  font: 400 15px/1.5 var(--font-body); color: var(--ink);
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 12px;
  padding: 14px 16px; transition: border-color 0.5s var(--ease);display:block;width:100%;
}
.form__field textarea { resize: vertical; min-height: 140px; }
.form__field input:focus, .form__field textarea:focus {
  outline: 2px solid var(--green-deep); outline-offset: 2px; border-color: var(--green-deep);
}
.form__consent { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--muted); }
.form__consent input { margin-top: 3px; accent-color: var(--green-deep); }
.form__consent a { text-decoration: underline; text-underline-offset: 2px; color: var(--ink); }
.form__submit { justify-self: start; margin-top: 8px;border:none; }

/* ── Responsive ──────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .cepi-grid { gap: 48px; }
  .contact-grid { gap: 48px; }
}
@media (max-width: 768px) {
  .page-hero { padding: 140px 0 64px; }
  .page-hero__media { margin-top: 40px; }
  .page-hero__media .exhibit { min-height: 260px; }
  .product-list { padding-bottom: 80px; }
  .product-card { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; }
  .product-card__media .exhibit { min-height: 200px; }
  .event-hero { padding: 140px 0 64px; }
  .event-hero__media .exhibit { min-height: 280px; }
  .event-body, .map-section { padding-bottom: 80px; }
  .guide-section { padding: 40px 0 80px; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar__meta { margin-left: 0; justify-content: space-between; }
  .ed-pager { flex-direction: column; padding: 40px 0 80px; }
  .cepi-grid { grid-template-columns: 1fr; gap: 48px; }
  .contact-grid { grid-template-columns: 1fr; gap: 56px; padding-bottom: 80px; }
}

/* ── Interactive innovation map ─────────────────────────────────── */
#innovation-map {
  position: relative;
  width: 100%;
  height: 460px;
  z-index: 0;
  background: var(--paper);
}
#innovation-map.leaflet-container { font-family: var(--font-body); }
#innovation-map .leaflet-control-attribution { font-size: 10px; }

@media (max-width: 768px) {
  #innovation-map { height: 320px; }
}

.map-pin-icon {
  filter: drop-shadow(0 2px 4px rgba(35, 38, 31, 0.35));
}

.map-popup { color: var(--ink); font: inherit; }
.map-popup__list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  max-height: 180px;
  overflow-y: auto;
  font-size: 13px;
  color: var(--muted);
}
.map-popup__list li { padding: 3px 0; }

/* ── Editions slider (homepage) ───────────────────────────────────── */
.ed-slider__stage {
  display: grid; grid-template-columns: 1fr 1fr; gap: 24px;
  min-height: 560px;
}
.ed-slider__media { position: relative; height: 100%; }
.ed-slide__media-item {
  position: absolute; inset: 0;
  opacity: 0; transform: translateX(-24px); visibility: hidden;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), visibility 0s 0.6s;
}
.ed-slide__media-item.is-active {
  opacity: 1; transform: translateX(0); visibility: visible;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), visibility 0s;
}
.ed-slider__panel {
  position: relative; background: var(--paper); color: var(--ink);
  border-radius: var(--r-outer); padding: 64px; padding-bottom: 96px;
  display: flex; flex-direction: column;
}
.ed-slider__panel-inner { position: relative; flex: 1; min-height: 320px; }
.ed-slide__content {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; gap: 20px;
  opacity: 0; transform: translateX(24px); pointer-events: none; visibility: hidden;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), visibility 0s 0.6s;
}
.ed-slide__content.is-active {
  opacity: 1; transform: translateX(0); pointer-events: auto; visibility: visible;
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease), visibility 0s;
}
.ed-slide__city {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em;
  font-size: clamp(2rem, 3.3vw, 3rem); color: var(--ink);
}
.ed-slide__year {
  font-size: clamp(1.2rem, 1.8vw, 1.65rem); font-weight: 700;
  color: var(--green); letter-spacing: -0.01em;
}
.ed-slide__desc {
  font-size: 16px; line-height: 1.65; color: var(--muted); max-width: 34em;
}
.ed-slider__dots {
  display: flex; justify-content: center; gap: 8px; margin-top: 32px;
}
.ed-slider__dot {
  width: 48px; height: 4px; border-radius: 999px; background: rgba(55, 58, 54, 0.18);
  transition: background 0.5s var(--ease);
}
.ed-slider__dot.is-active { background: var(--green); }
.ed-slider__dot:hover { background: var(--green-deep); }

.ed-slider__arrows {
  position: absolute; right: 40px; bottom: 40px; display: flex; gap: 12px;
}
.ed-slider__arrow {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--hairline);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 17px; color: var(--ink); background: transparent;
  transition: background 0.5s var(--ease), border-color 0.5s var(--ease), color 0.5s var(--ease);
}
.ed-slider__arrow:hover { background: var(--green); border-color: var(--green); color: #fff; }

@media (max-width: 768px) {
  .ed-slider__stage { grid-template-columns: 1fr; min-height: 0; }
  .ed-slider__media { height: 260px; }
  .ed-slider__panel { padding: 32px; padding-bottom: 32px; }
  /* Stack slides in one grid cell so the panel grows to the tallest slide
     instead of clipping absolutely-positioned content at min-height. */
  .ed-slider__panel-inner { display: grid; min-height: 0; }
  .ed-slide__content { position: static; grid-area: 1 / 1; }
  .ed-slider__arrows { position: static; justify-content: center; margin-top: 24px; }
}
