/* =========================================================
   RESEARCH EXPLAINED — INLINE EXPLAINERS
   ========================================================= */

.re-container {
  width: min(1160px, calc(100% - 3rem));
  margin: 0 auto;
}

.re-kicker,
.re-topic,
.re-thirty-label {
  margin: 0;
  color: #2f7173;
  font-size: 0.7rem;
  font-weight: 760;
  letter-spacing: 0.16em;
}

.re-hero {
  margin-top: -1rem;
  padding: 5rem 0 4.3rem;
  background:
    radial-gradient(circle at 88% 18%, rgba(47, 113, 115, 0.11), transparent 28%),
    linear-gradient(135deg, #f7f5f0, #ffffff);
  border-bottom: 1px solid #dfe6e7;
}

.re-hero h1 {
  max-width: 860px;
  margin: 0.7rem 0 1rem;
  color: #17324d;
  font-size: clamp(3rem, 7vw, 5.2rem);
  line-height: 0.99;
  letter-spacing: -0.05em;
}

.re-hero-text {
  max-width: 760px;
  margin: 0;
  color: #5f6d75;
  font-size: 1.14rem;
  line-height: 1.75;
}

.re-list {
  padding-top: 3.8rem;
}

.re-explainer {
  position: relative;
  display: grid;
  grid-template-columns: minmax(410px, 1fr) minmax(410px, 1fr);
  min-height: 590px;
  align-items: stretch;
  margin-bottom: 3rem;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #dfe6e7;
  border-radius: 26px;
  box-shadow: 0 18px 46px rgba(23, 50, 77, 0.09);
}

.re-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem 3.2rem;
}

.re-number {
  position: absolute;
  top: 1.4rem;
  right: 1.7rem;
  color: rgba(23, 50, 77, 0.08);
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
}

.re-copy h2 {
  max-width: 560px;
  margin: 0.75rem 0 1.25rem;
  color: #17324d;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.re-thirty-seconds {
  padding: 1.2rem 1.25rem;
  background:
    linear-gradient(145deg, #f7faf9, #ffffff);
  border: 1px solid #dfe6e7;
  border-left: 4px solid #2f7173;
  border-radius: 0 14px 14px 0;
}

.re-thirty-seconds p:last-child {
  margin: 0.65rem 0 0;
  color: #4f5f66;
  font-size: 0.96rem;
  line-height: 1.72;
}

.re-source {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.2rem;
  color: #7a858a;
  font-size: 0.78rem;
}

.re-source a {
  color: #255b5d;
  font-weight: 700;
  text-decoration: none;
}

.re-source a:hover {
  color: #17324d;
  text-decoration: underline;
}

.re-visual {
  position: relative;
  display: flex;
  min-height: 590px;
  align-items: center;
  justify-content: center;
  padding: 1.35rem;
  overflow: hidden;
}

.re-visual-button {
  position: relative;
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 540px;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  background: #ffffff;
  border: 0;
  border-radius: 19px;
  cursor: zoom-in;
  box-shadow: 0 14px 32px rgba(23, 50, 77, 0.12);
}

.re-visual-button:focus-visible {
  outline: 4px solid rgba(47, 113, 115, 0.45);
  outline-offset: 4px;
}

.re-visual-button img {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 555px;
  object-fit: contain;
  transition: transform 0.25s ease;
}

.re-visual-button:hover img {
  transform: scale(1.018);
}

.re-enlarge-label {
  position: absolute;
  right: 0.85rem;
  bottom: 0.85rem;
  padding: 0.45rem 0.7rem;
  color: #ffffff;
  background: rgba(23, 50, 77, 0.86);
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  pointer-events: none;
}

/* Alternating order */

.re-explainer-one .re-visual,
.re-explainer-three .re-visual {
  order: 1;
}

.re-explainer-one .re-copy,
.re-explainer-three .re-copy {
  order: 2;
}

.re-explainer-two .re-copy,
.re-explainer-four .re-copy {
  order: 1;
}

.re-explainer-two .re-visual,
.re-explainer-four .re-visual {
  order: 2;
}

/* Different visual identities */

.re-explainer-one {
  background: linear-gradient(90deg, #eef5f5 0 50%, #ffffff 50%);
  border-color: rgba(47, 113, 115, 0.25);
}

.re-explainer-one .re-visual {
  background:
    radial-gradient(circle at 18% 18%, rgba(47, 113, 115, 0.11), transparent 23%),
    linear-gradient(145deg, #edf5f5, #f9fbfb);
}

.re-explainer-two {
  background: linear-gradient(90deg, #ffffff 0 50%, #17324d 50%);
  border-color: rgba(47, 113, 115, 0.3);
}

.re-explainer-two .re-visual {
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.08), transparent 30%),
    linear-gradient(145deg, #17324d, #2f7173);
}

.re-explainer-three {
  background: linear-gradient(90deg, #8c493a 0 50%, #fffdfa 50%);
  border-color: rgba(178, 99, 64, 0.3);
}

.re-explainer-three .re-visual {
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.12), transparent 24%),
    linear-gradient(145deg, #8c493a, #d18a65);
}

.re-explainer-four {
  background: linear-gradient(90deg, #fbfdfb 0 50%, #425d47 50%);
  border-color: rgba(91, 125, 94, 0.32);
}

.re-explainer-four .re-visual {
  background:
    radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.1), transparent 24%),
    linear-gradient(145deg, #425d47, #7e9878);
}

/* Pagination */

.re-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.4rem 0 4rem;
}

.re-page,
.re-next-disabled {
  display: inline-flex;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.85rem;
  border: 1px solid #dfe6e7;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.re-page-active {
  color: #ffffff;
  background: #2f7173;
  border-color: #2f7173;
}

.re-page-disabled,
.re-next-disabled {
  color: #9aa3a7;
  background: #f6f8f8;
}

/* Accessible image lightbox */

.re-lightbox {
  width: min(96vw, 1500px);
  max-width: none;
  max-height: 94vh;
  padding: 0;
  overflow: hidden;
  background: #101820;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.42);
}

.re-lightbox::backdrop {
  background: rgba(8, 15, 22, 0.82);
  backdrop-filter: blur(5px);
}

.re-lightbox-inner {
  position: relative;
  display: grid;
  max-height: 94vh;
  grid-template-rows: 1fr auto;
}

.re-lightbox-image-wrap {
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  overflow: auto;
}

.re-lightbox img {
  display: block;
  max-width: 100%;
  max-height: calc(94vh - 78px);
  width: auto;
  height: auto;
  object-fit: contain;
}

.re-lightbox-footer {
  display: flex;
  min-height: 62px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.8rem 1rem;
  color: #ffffff;
  background: #17324d;
}

.re-lightbox-caption {
  margin: 0;
  font-size: 0.9rem;
}

.re-lightbox-close {
  display: inline-flex;
  min-width: 42px;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  font-size: 1.25rem;
  cursor: pointer;
}

.re-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

@media (prefers-reduced-motion: reduce) {
  .re-visual-button img {
    transition: none;
  }
}

@media (max-width: 950px) {
  .re-explainer {
    grid-template-columns: 1fr;
  }

  .re-explainer .re-visual {
    order: 1 !important;
  }

  .re-explainer .re-copy {
    order: 2 !important;
  }

  .re-explainer-one,
  .re-explainer-two,
  .re-explainer-three,
  .re-explainer-four {
    background: #ffffff;
  }

  .re-visual {
    min-height: 470px;
  }

  .re-visual-button {
    min-height: 420px;
  }
}

@media (max-width: 650px) {
  .re-container {
    width: min(100% - 2rem, 1160px);
  }

  .re-hero {
    padding: 3.8rem 0 3.35rem;
  }

  .re-hero h1 {
    font-size: 3rem;
  }

  .re-list {
    padding-top: 2.4rem;
  }

  .re-explainer {
    min-height: auto;
    margin-bottom: 1.6rem;
    border-radius: 20px;
  }

  .re-copy {
    padding: 1.55rem;
  }

  .re-copy h2 {
    font-size: 2rem;
  }

  .re-number {
    top: 1rem;
    right: 1rem;
    font-size: 3.3rem;
  }

  .re-visual {
    min-height: 360px;
    padding: 0.85rem;
  }

  .re-visual-button {
    min-height: 330px;
  }

  .re-visual-button img {
    max-height: 420px;
  }

  .re-lightbox {
    width: 98vw;
    max-height: 96vh;
    border-radius: 12px;
  }

  .re-lightbox img {
    max-height: calc(96vh - 74px);
  }

  .re-lightbox-caption {
    font-size: 0.78rem;
  }
}
/* Direct links from the Home page */

.re-explainer {
  scroll-margin-top: 115px;
}

.re-explainer:target {
  border-color: rgba(47, 113, 115, 0.7);
  box-shadow:
    0 0 0 5px rgba(47, 113, 115, 0.12),
    0 22px 52px rgba(23, 50, 77, 0.16);
  animation: explainer-arrival 1.1s ease;
}

@keyframes explainer-arrival {
  0% {
    transform: translateY(12px);
    opacity: 0.78;
  }

  100% {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .re-explainer:target {
    animation: none;
  }
}