/* ============================================================
   Home page — v37 enhanced editorial treatment
   Loaded after the legacy stylesheet.
   ============================================================ */

/* ── Slider ── */
.gd-home-slider {
  position: relative;
  width: min(1200px, calc(100% - 40px));
  height: clamp(240px, 27vw, 340px);
  margin: clamp(0.8rem, 1.8vw, 1.35rem) auto 0;
  overflow: hidden;
  background: var(--gd-ocean);
  border-radius: 0;
}

.gd-home-slider::before {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    100deg,
    rgba(0, 0, 0, 0.72) 0%,
    rgba(0, 0, 0, 0.36) 55%,
    rgba(0, 0, 0, 0.18) 100%
  );
  content: "";
  pointer-events: none;
}

/* ── Slide elements ── */
.gd-home-slider__slide {
  display: block;
  height: 100%;
  margin: 0;
}

.gd-home-slider__slide:not(:first-of-type) {
  display: none;
}

.has-js .gd-home-slider__slide {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 640ms ease;
}

.has-js .gd-home-slider__slide.is-active {
  z-index: 0;
  opacity: 1;
}

.gd-home-slider__slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

/* ── Slider overlay / heading ── */
.gd-home-slider__overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-items: center;
  padding: 1.5rem 5rem;
  text-align: center;
  pointer-events: none;
}

.gd-home-slider h1 {
  max-width: 26ch;
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  font-weight: 800;
  line-height: 1.07;
  text-align: center;
  text-shadow: 0 2px 20px rgba(0, 18, 35, 0.42);
  animation: gd-fade-up 700ms ease both;
}

/* ── Slider controls ── */
.gd-home-slider__controls {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  z-index: 3;
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.has-js .gd-home-slider__controls {
  display: flex;
}

.gd-home-slider__controls > button,
.gd-home-slider__dots button {
  display: grid;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: var(--gd-radius-sm, 3px);
  background: rgba(0, 0, 0, 0.58);
  color: #fff;
  font: inherit;
  line-height: 1;
  place-items: center;
  transition: background-color var(--gd-transition-fast, 160ms ease),
              border-color var(--gd-transition-fast, 160ms ease);
}

.gd-home-slider__controls > button:hover,
.gd-home-slider__controls > button:focus-visible,
.gd-home-slider__dots button:hover,
.gd-home-slider__dots button:focus-visible {
  border-color: #fff;
  background: rgba(0, 0, 0, 0.84);
}

.gd-home-slider__dots {
  display: flex;
  gap: 0.3rem;
  padding: 0.32rem 0.48rem;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--gd-radius-sm, 3px);
  background: rgba(0, 0, 0, 0.58);
}

.gd-home-slider__dots button {
  width: 7px;
  height: 7px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.52);
  transition: background-color var(--gd-transition-fast, 160ms ease);
}

.gd-home-slider__dots button.is-active,
.gd-home-slider__dots button[aria-current="true"] {
  background: var(--gd-terracotta);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7);
}

/* ── Static hero (non-slider pages) ── */
.gd-home-hero {
  position: relative;
  width: min(1200px, calc(100% - 40px));
  height: clamp(240px, 27vw, 340px);
  margin: clamp(0.8rem, 1.8vw, 1.35rem) auto 0;
  overflow: hidden;
  background: var(--gd-ocean);
}

.gd-home-hero::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.28));
  content: "";
}

.gd-home-hero img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 42%;
}

.gd-home-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  text-align: center;
}

.gd-home-hero h1 {
  max-width: 26ch;
  margin: 0;
  color: #fff;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 1.07;
  text-align: center;
  text-shadow: 0 2px 20px rgba(0, 18, 35, 0.42);
}

/* ── Home content section ── */
#informatii.gd-home-page {
  padding: clamp(1.1rem, 2.2vw, 1.75rem) 0 clamp(2rem, 3.2vw, 3rem) !important;
}

.gd-home-page .gd-container {
  width: min(100ch, calc(100% - 48px));
}

.gd-home-layout {
  display: block;
}

.gd-home-narrative {
  width: 100%;
  border-top: 0;
}

.gd-home-narrative__header {
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: center;
  padding: clamp(1.35rem, 2.7vw, 2rem) 0 clamp(1.15rem, 2.2vw, 1.6rem);
  border-bottom: 0;
  background: transparent;
  text-align: left;
}

.gd-home-narrative h1 {
  max-width: 32ch;
  margin: 0;
  padding-left: 0;
  border-left: 0;
  color: var(--gd-ocean);
  font-size: clamp(1.8rem, 3.25vw, 2.55rem);
  line-height: 1.08;
  text-align: center;
}

/* ── Home sections ── */
.gd-home-section {
  padding: clamp(1.15rem, 2.4vw, 1.7rem) 0;
  border-bottom: 1px solid var(--gd-line);
  text-align: left;
  scroll-margin-top: 6rem;
}

.gd-home-section:first-child {
  padding-top: clamp(1.3rem, 2.6vw, 2rem);
}

.gd-home-section--tint {
  position: relative;
  margin-inline: -1.25rem;
  padding-inline: 1.25rem;
  background: rgba(0, 0, 0, 0.028);
}

/* Replace brittle inset-shadow with proper border */
.gd-home-section--tint::before,
.gd-home-section--tint::after {
  position: absolute;
  right: 0;
  left: 0;
  height: 1px;
  background: rgba(0, 0, 0, 0.055);
  content: "";
  pointer-events: none;
}

.gd-home-section--tint::before {
  top: 0;
}

.gd-home-section--tint::after {
  bottom: 0;
}

.gd-home-section--tint > * {
  max-width: 100ch;
}

.gd-home-section--tint h2 {
  color: var(--gd-ocean);
}

.gd-home-section--tint p:first-of-type {
  font-size: 1.02rem;
  line-height: 1.74;
}

/* ── Section headings ── */
.gd-home-section h2 {
  display: inline-block;
  position: relative;
  margin: 0 0 0.9rem;
  padding-bottom: 0.5rem;
  border: 0;
  color: var(--gd-ocean);
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  text-align: left;
}

.gd-home-section h2::after {
  position: absolute;
  bottom: 0;
  left: 0;
  display: block;
  width: 3rem;
  height: 2px;
  border-radius: 1px;
  background: var(--gd-terracotta);
  content: "";
}

/* ── Body text ── */
.gd-home-section p {
  max-width: 100ch;
  margin: 0 0 0.8rem;
  text-align: justify;
  text-justify: inter-word;
}

.gd-home-section:first-of-type p {
  color: var(--gd-ocean);
  font-size: 1.03rem;
  line-height: 1.74;
}

.gd-home-section p:last-child {
  margin-bottom: 0;
}

/* ── Research directions list ── */
ul.gd-home-cdi-list.clean {
  display: grid;
  max-width: 100ch;
  gap: 0;
  margin: 0.15rem 0 0;
  padding: 0;
  border-left: 2px solid rgba(189, 9, 44, 0.26);
  counter-reset: research-direction;
  list-style: none;
}

ul.gd-home-cdi-list.clean li {
  display: grid;
  grid-template-columns: 2.5rem minmax(0, 1fr);
  gap: 0.85rem;
  min-height: 3rem;
  align-items: center;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--gd-line);
  color: var(--gd-slate);
  font-size: 0.97rem;
  line-height: 1.46;
  counter-increment: research-direction;
  transition: background-color var(--gd-transition-fast, 160ms ease);
}

ul.gd-home-cdi-list.clean li:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

@media (min-width: 880px) {
  ul.gd-home-cdi-list.clean {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(1.25rem, 3vw, 2.5rem);
    border-left: 0;
  }

  ul.gd-home-cdi-list.clean li {
    border-top: 1px solid var(--gd-line);
    border-bottom: 0;
  }

  ul.gd-home-cdi-list.clean li:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--gd-line);
  }
}

ul.gd-home-cdi-list.clean li::before {
  position: static;
  display: block;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  color: var(--gd-terracotta-dk);
  content: counter(research-direction, decimal-leading-zero);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1;
}

/* ── People list ── */
.gd-home-people-list {
  max-width: 100ch;
  margin: 0.4rem 0 0;
  padding: 0;
  border-top: 1px solid var(--gd-line);
  list-style: none;
}

.gd-home-people-list li {
  position: relative;
  padding: 0.75rem 0 0.75rem 1.2rem;
  border-bottom: 1px solid var(--gd-line);
  color: var(--gd-slate);
  font-size: 0.95rem;
  line-height: 1.58;
}

.gd-home-people-list li::before {
  position: absolute;
  top: 1.35rem;
  left: 0;
  width: 0.44rem;
  height: 0.44rem;
  border: 1px solid var(--gd-terracotta);
  background: #fff;
  content: "";
}

/* ── Mobile ── */
@media (max-width: 760px) {
  .gd-home-slider {
    width: min(1200px, calc(100% - 32px));
    height: clamp(195px, 54vw, 255px);
    margin-top: 0.7rem;
  }

  .gd-home-slider__overlay {
    padding: 1rem 3.5rem;
  }

  .gd-home-slider h1 {
    max-width: 20ch;
    font-size: clamp(1.7rem, 8vw, 2.3rem);
  }

  .gd-home-slider__controls {
    right: 0.55rem;
    bottom: 0.55rem;
    gap: 0.25rem;
  }

  .gd-home-slider__controls > button {
    width: 28px;
    height: 28px;
  }

  .gd-home-slider__dots {
    gap: 0.22rem;
    padding: 0.25rem 0.32rem;
  }

  .gd-home-slider__dots button {
    width: 6px;
    height: 6px;
  }

  .gd-home-hero {
    width: min(1200px, calc(100% - 32px));
    height: clamp(195px, 54vw, 255px);
    margin-top: 0.7rem;
  }

  .gd-home-hero__overlay {
    padding: 1rem;
  }

  .gd-home-hero h1 {
    max-width: 20ch;
    font-size: clamp(1.7rem, 8vw, 2.3rem);
  }

  .gd-home-page .gd-container {
    width: min(100ch, calc(100% - 32px));
  }

  .gd-home-narrative__header {
    padding-top: 1rem;
    padding-bottom: 1.1rem;
  }

  .gd-home-narrative h1 {
    padding-left: 0;
    font-size: clamp(1.65rem, 8vw, 2.2rem);
  }

  .gd-home-section {
    padding-top: 1rem;
    padding-bottom: 1rem;
  }

  .gd-home-section--tint {
    margin-inline: -0.65rem;
    padding-inline: 0.65rem;
  }

  ul.gd-home-cdi-list.clean li {
    grid-template-columns: 2.2rem minmax(0, 1fr);
    gap: 0.65rem;
    padding-right: 0.35rem;
    padding-left: 0.65rem;
  }

  .gd-home-people-list li {
    padding-left: 1rem;
  }
}
