/*
 * Research Hub directory layout.
 * The directory is an editorial index, not a project dashboard: the first
 * three routes form a row and the two remaining routes deliberately fill the
 * full second row instead of floating in the middle of unused space.
 */

.gd-research-main.gd-hub-directory .gd-subpage-hero {
  display: grid;
  min-height: clamp(180px, 18vw, 230px) !important;
  place-items: center;
  padding: clamp(2rem, 4vw, 3rem) 0 !important;
  background:
    linear-gradient(112deg, rgba(0, 0, 0, 0.94), rgba(0, 0, 0, 0.78)),
    url("geodinamic-hero-topographic-site.png") center / cover no-repeat !important;
  text-align: center;
}

.gd-research-main.gd-hub-directory .gd-subpage-hero h1 {
  max-width: 830px;
  margin-inline: auto;
  color: #fff !important;
  font-size: clamp(2rem, 3.6vw, 3rem) !important;
  text-shadow: none;
}

.gd-research-main.gd-hub-directory .gd-subpage-hero p {
  max-width: 720px;
  margin-inline: auto;
  color: rgba(255, 255, 255, 0.88) !important;
}

.gd-research-main.gd-hub-directory .gd-section--paper {
  padding-block: clamp(2.4rem, 4.5vw, 3.75rem) !important;
  background: #f8f6f3 !important;
}

.gd-research-main.gd-hub-directory .gd-hub-grid.gd-hub-grid--visual {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  align-items: stretch !important;
  gap: clamp(1rem, 2.2vw, 1.55rem) !important;
  width: min(100%, 1080px) !important;
  margin-inline: auto;
}

.gd-research-main.gd-hub-directory .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card,
.gd-research-main.gd-hub-directory .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card:nth-child(n) {
  grid-column: span 2 !important;
  flex: none !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: none !important;
}

.gd-research-main.gd-hub-directory .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card:nth-child(4),
.gd-research-main.gd-hub-directory .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card:nth-child(5) {
  grid-column: span 3 !important;
}

.gd-research-main.gd-hub-directory .gd-hub-card.gd-hub-card--visual {
  border: 1px solid rgba(0, 0, 0, 0.2) !important;
  border-top: 1px solid rgba(0, 0, 0, 0.2) !important;
  border-radius: 0;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08) !important;
  background: #fff;
}

.gd-research-main.gd-hub-directory .gd-hub-card.gd-hub-card--visual.gd-hub-card--srof {
  border-top: 3px solid var(--gd-terracotta) !important;
}

.gd-research-main.gd-hub-directory .gd-hub-card--visual .gd-hub-card__index {
  display: none !important;
}

.gd-research-main.gd-hub-directory .gd-hub-card--visual .gd-hub-card__visual {
  height: clamp(168px, 13.5vw, 210px) !important;
  aspect-ratio: auto !important;
  object-position: center;
}

.gd-research-main.gd-hub-directory .gd-hub-card--visual .gd-hub-card__copy {
  align-self: stretch !important;
  width: auto !important;
  min-height: 8.85rem !important;
  padding: 1.1rem 1.2rem 1.15rem !important;
  align-items: flex-start !important;
  gap: 0.8rem;
  text-align: left !important;
}

.gd-research-main.gd-hub-directory .gd-hub-card--visual h2 {
  align-self: stretch !important;
  width: 100%;
  margin-inline: 0 !important;
  color: var(--gd-ocean);
  font-size: clamp(1.05rem, 1.3vw, 1.23rem) !important;
  line-height: 1.22;
  text-align: left !important;
}

.gd-research-main.gd-hub-directory .gd-hub-card--visual .gd-hub-card__more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  align-self: flex-start;
  margin-inline: 0 !important;
  padding: 0 0 0.32rem !important;
  border: 0 !important;
  border-bottom: 2px solid var(--gd-terracotta) !important;
  background: transparent !important;
  color: var(--gd-ocean) !important;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.gd-research-main.gd-hub-directory .gd-hub-card--visual .gd-hub-card__more::after {
  content: "\2192";
  font-size: 0.8rem;
}

@media (hover: hover) {
  .gd-research-main.gd-hub-directory .gd-hub-card.gd-hub-card--visual:hover {
    transform: translateY(-3px);
    border-color: rgba(0, 0, 0, 0.34) !important;
    box-shadow: 0 11px 28px rgba(0, 0, 0, 0.14) !important;
  }

  .gd-research-main.gd-hub-directory .gd-hub-card--visual:hover .gd-hub-card__more {
    background: transparent !important;
    color: var(--gd-terracotta-dk) !important;
  }
}

@media (max-width: 860px) {
  .gd-research-main.gd-hub-directory .gd-hub-grid.gd-hub-grid--visual {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .gd-research-main.gd-hub-directory .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card:nth-child(n) {
    grid-column: span 1 !important;
  }

  .gd-research-main.gd-hub-directory .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card:nth-child(5) {
    grid-column: span 2 !important;
  }
}

@media (max-width: 560px) {
  .gd-research-main.gd-hub-directory .gd-subpage-hero {
    min-height: 0 !important;
  }

  .gd-research-main.gd-hub-directory .gd-hub-grid.gd-hub-grid--visual {
    grid-template-columns: 1fr !important;
  }

  .gd-research-main.gd-hub-directory .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card:nth-child(n) {
    grid-column: span 1 !important;
  }

  .gd-research-main.gd-hub-directory .gd-hub-card--visual .gd-hub-card__visual {
    height: clamp(176px, 54vw, 240px) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gd-research-main.gd-hub-directory .gd-hub-card.gd-hub-card--visual {
    transition: none !important;
  }
}

