/* ==========================================================================
   ZIP — Components
   ========================================================================== */

/* ---- Section heading (56px ExtraBold, red underline) --------------------- */
.section-title {
  font-size: clamp(2rem, 1.1rem + 2.6vw, 3.5rem); /* 56px */
  line-height: 1.14;
  font-weight: 800;
  color: var(--zip-black);
  text-decoration: underline;
  text-decoration-color: var(--zip-red);
  text-decoration-thickness: 2px;
  text-underline-offset: 6px;
  margin: 0;
}

/* ---- Rich text ----------------------------------------------------------- */
.rich-text { font-size: var(--fs-body); line-height: 1.6; color: var(--zip-text); }
.rich-text > *:last-child { margin-bottom: 0; }
.rich-text a { text-decoration: underline; }
.rich-text h2 { font-size: var(--fs-h3); margin: 1.5em 0 .5em; }
.rich-text h3 { font-size: 1.375rem; margin: 1.4em 0 .5em; }
.rich-text ul { list-style: none; padding-left: 0; }
.rich-text ul li { position: relative; padding-left: 24px; }
.rich-text ul li::before {
  content: ''; position: absolute; left: 4px; top: .7em;
  width: 6px; height: 6px; border-radius: 50%; background: var(--zip-red);
}
.rich-text p:empty { display: none; }

/* ---- Article photo gallery ([zip_gallery]) ------------------------------ */
.zip-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 2em 0 0;
}
.zip-gallery__item { margin: 0; }
.zip-gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
}
.zip-gallery__link { display: block; cursor: zoom-in; }
@media (max-width: 600px) {
  .zip-gallery { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ---- Lightbox ----------------------------------------------------------- */
.zip-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.9);
}
.zip-lightbox.is-open { display: flex; }
.zip-lightbox__stage { margin: 0; display: flex; }
.zip-lightbox__img {
  display: block;
  max-width: 92vw;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
}
.zip-lightbox__close {
  position: absolute;
  top: 12px;
  right: 18px;
  padding: 8px;
  background: none;
  border: 0;
  color: #fff;
  font-size: 40px;
  line-height: 1;
  cursor: pointer;
}
.zip-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 38px;
  line-height: 1;
  cursor: pointer;
  transition: background var(--t-fast);
}
.zip-lightbox__nav:hover { background: var(--zip-red); }
.zip-lightbox__prev { left: 16px; }
.zip-lightbox__next { right: 16px; }
.zip-lightbox__counter {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 18px;
  text-align: center;
  color: #fff;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}
.zip-lightbox__nav[hidden],
.zip-lightbox__counter[hidden] { display: none; }
body.zip-lightbox-open { overflow: hidden; }
@media (max-width: 600px) {
  .zip-lightbox__nav { width: 44px; height: 44px; font-size: 30px; }
  .zip-lightbox__close { font-size: 34px; top: 6px; right: 10px; }
}

/* ---- Link with arrow ----------------------------------------------------- */
.link-arrow--light { color: var(--zip-white); }
.link-arrow--light:hover { color: var(--zip-white); }

/* ---- Full-width image band (red base + photo @80%) ----------------------- */
.image-band {
  position: relative;
  width: 100%;
  height: clamp(280px, 38vw, 640px);
  background: var(--zip-red);
  overflow: hidden;
}
.image-band__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: .8;
}

/* ---- Decorative ZIP graphic --------------------------------------------- */
.zip-graphic {
  position: relative;
  width: 100%;
  max-width: 644px;
  aspect-ratio: 1 / 1;
  margin-inline: auto;
}
.zip-graphic__logo {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 59.2%;            /* 381 / 644 */
  height: auto;
}
.zip-graphic__icon {
  position: absolute;
  width: 12.42%;           /* 80 / 644 */
  height: 12.42%;
  object-fit: contain;
}
.zip-graphic__icon--experiment  { left: 9.94%;  top: 9.94%; }    /* 64,64 */
.zip-graphic__icon--crowdsource  { left: 27.33%; top: 9.94%; }   /* 176,64 */
.zip-graphic__icon--psychology   { right: 9.94%; bottom: 9.94%; }/* 500,500 */
.zip-graphic__icon--lab          { left: 60.25%; top: 77.64%; }  /* 388,500 */

/* ---- News card ----------------------------------------------------------- */
.news-card {
  background: var(--zip-white);
  border: 1px solid var(--zip-red);
}
.news-card__photo {
  position: relative;
  display: block;
  background: #e0e0e0;
  overflow: hidden;
}
.news-card__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t);
}
.news-card:hover .news-card__photo img { transform: scale(1.04); }

.news-card__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 12px 16px;
}
.news-card__date {
  margin: 0;
  font-size: 0.875rem;
  line-height: 22px;
  color: var(--zip-black);
}
.news-card__title {
  margin: 0;
  font-size: 1.5rem;
  line-height: 32px;
  font-weight: 700;
  color: var(--zip-black);
  flex: 1 0 auto;
}
.news-card__title a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--zip-red);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.news-card__title a:hover { color: var(--zip-red); }
.news-card__excerpt { margin: 0; font-size: 1rem; line-height: 24px; color: var(--zip-text-muted); }

.news-card__more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: auto;
  padding: 12px;
  border-top: 1px solid var(--zip-red);
  color: var(--zip-red);
  font-size: 1rem;
  font-weight: 700;
  line-height: 24px;
}
.news-card__more .icon { width: 24px; height: 24px; transition: transform var(--t); }
.news-card__more:hover { color: var(--zip-red); }
.news-card__more:hover .icon { transform: translate(2px, -2px); }

/* Horizontal variant (home + featured grid item) */
.news-card--horizontal {
  display: flex;
  gap: 16px;
  padding: 12px;
}
.news-card--horizontal .news-card__photo {
  flex: 1 1 0;
  min-width: 0;
  align-self: stretch;
  min-height: 300px;
}
.news-card--horizontal .news-card__content {
  flex: 1 1 0;
  min-width: 0;
}

/* Vertical variant (archive grid) */
.news-card--vertical {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 16px;
  background: transparent;          /* shows pink archive bg through */
}
.news-card--vertical .news-card__photo {
  aspect-ratio: 448 / 320;
  width: 100%;
}
.news-card--vertical .news-card__content { padding: 8px 16px; gap: 24px; flex: 1 0 auto; }
.news-card--vertical .news-card__title { font-size: 1.5rem; line-height: 32px; flex: 0 0 auto; }
.news-card--vertical .news-card__date,
.news-card--vertical .news-card__title a {
  text-decoration: underline;
  text-decoration-color: var(--zip-red);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Featured variant (red, white text, large title, excerpt) */
.news-card--featured {
  display: flex;
  gap: 80px;
  padding: 32px;
  background: var(--zip-red);
  border-color: var(--zip-red);
}
.news-card--featured .news-card__photo {
  flex: 1 1 0;
  min-width: 0;
  align-self: stretch;
  min-height: 480px;
}
.news-card--featured .news-card__content {
  flex: 1 1 0;
  min-width: 0;
  padding: 24px 16px;
  gap: 16px;
}
.news-card--featured .news-card__date { color: var(--zip-white); }
.news-card--featured .news-card__title { color: var(--zip-white); font-size: clamp(1.75rem, 1.1rem + 1.8vw, 2.5rem); line-height: 1.2; }
.news-card--featured .news-card__title a { color: var(--zip-white); text-decoration-color: rgba(255,255,255,.55); }
.news-card--featured .news-card__title a:hover { color: var(--zip-white); }
.news-card--featured .news-card__excerpt { color: var(--zip-white); font-size: 1.125rem; line-height: 26px; flex: 1 0 auto; }
.news-card--featured .news-card__more { color: var(--zip-white); border-top-color: var(--zip-white); }
.news-card--featured .news-card__more:hover { color: var(--zip-white); }

/* Responsive cards */
@media (max-width: 900px) {
  .news-card--featured { gap: 32px; }
}
@media (max-width: 700px) {
  .news-card--horizontal,
  .news-card--featured { flex-direction: column; gap: 16px; }
  .news-card--horizontal .news-card__photo,
  .news-card--featured .news-card__photo { aspect-ratio: 16 / 10; min-height: 0; align-self: auto; }
}
