/* ============================================================
   Research Hub visual route cards — v37 BOLD enhancement
   Dramatically improves card presence, image proportions,
   and the "ACCESEAZĂ" call-to-action.
   ============================================================ */

/* ── Hub grid — flexbox guarantees IDENTICAL card widths ── */
.gd-research-main .gd-hub-grid.gd-hub-grid--visual {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  align-items: stretch !important;
  gap: clamp(1.3rem, 2.5vw, 1.8rem) !important;
  width: min(100%, 980px);
  margin-inline: auto;
  grid-template-columns: none !important;
}

/* Every single card — exact same width — no exceptions */
.gd-research-main .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card:nth-child(1),
.gd-research-main .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card:nth-child(2),
.gd-research-main .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card:nth-child(3),
.gd-research-main .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card:nth-child(4),
.gd-research-main .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card:nth-child(5) {
  flex: 0 0 calc(33.333% - 1.25rem) !important;
  min-width: 0 !important;
  max-width: calc(33.333% - 1.25rem) !important;
  grid-column: auto !important;
}

/* ── Card base ── */
.gd-research-main .gd-hub-card.gd-hub-card--visual {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 0 !important;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-top: 4px solid var(--gd-ocean) !important;
  border-radius: 0;
  background: #fff;
  /* Strong, clearly visible card shadow */
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.13) !important;
  color: var(--gd-slate);
  text-decoration: none;
  text-align: left !important;
  transition:
    transform 260ms ease,
    box-shadow 260ms ease,
    border-top-color 260ms ease;
}

.gd-research-main .gd-hub-card.gd-hub-card--visual::after {
  content: none !important;
}

/* ── SROF card — terracotta top accent ── */
.gd-research-main .gd-hub-card.gd-hub-card--visual.gd-hub-card--srof {
  border-top-color: var(--gd-terracotta) !important;
}

/* ── Card number badge — visible in top-right corner ── */
.gd-research-main .gd-hub-card--visual .gd-hub-card__index {
  display: block !important;
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  width: auto;
  margin: 0;
  padding: 0.18rem 0.48rem;
  border: 1px solid rgba(255, 255, 255, 0.65);
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

/* ── Image — wider cinematic ratio, fills card ── */
.gd-research-main .gd-hub-card--visual .gd-hub-card__visual {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3 !important;
  max-height: none;
  margin: 0;
  border: 0;
  object-fit: cover;
  object-position: center;
  transition: transform 380ms ease;
}

/* ── Card copy area ── */
.gd-research-main .gd-hub-card--visual .gd-hub-card__copy {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.9rem;
  /* Minimum height so short-titled cards ("Comportament",
     "Resurse") match the height of long-titled cards */
  min-height: 10rem !important;
  padding: 1.2rem 1.3rem 1.25rem !important;
  text-align: left !important;
}

/* ── Card title ── */
.gd-research-main .gd-hub-card--visual h2 {
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--gd-ocean);
  font-size: clamp(1.1rem, 1.4vw, 1.28rem) !important;
  font-weight: 800;
  line-height: 1.22;
  text-align: left !important;
}

/* Remove the pseudo-element underline from base .gd-hub-card h2 */
.gd-research-main .gd-hub-card--visual h2::after {
  display: none !important;
}

/* ── "ACCESEAZĂ" — styled as a clear CTA pill ── */
.gd-research-main .gd-hub-card--visual .gd-hub-card__more {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.42rem 0.95rem;
  border: 1.5px solid var(--gd-ocean);
  background: transparent;
  color: var(--gd-ocean);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-decoration: none !important;
  text-transform: uppercase;
  transition: background 200ms ease, color 200ms ease;
}

.gd-research-main .gd-hub-card--visual .gd-hub-card__more::after {
  content: "→";
  font-size: 0.82rem;
  line-height: 1;
}

/* ── Hover states ── */
@media (hover: hover) {
  .gd-research-main .gd-hub-card.gd-hub-card--visual:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.18) !important;
    border-top-color: var(--gd-terracotta) !important;
  }

  .gd-research-main .gd-hub-card.gd-hub-card--visual.gd-hub-card--srof:hover {
    border-top-color: var(--gd-ocean) !important;
  }

  .gd-research-main .gd-hub-card--visual:hover .gd-hub-card__visual {
    transform: scale(1.04);
  }

  .gd-research-main .gd-hub-card--visual:hover .gd-hub-card__more {
    background: var(--gd-ocean);
    color: #fff;
  }
}

/* ── Focus ── */
.gd-research-main .gd-hub-card--visual:focus-visible {
  outline: 3px solid var(--gd-terracotta);
  outline-offset: 3px;
}

/* ── Research hero section ── */
.gd-research-main .gd-subpage-hero {
  min-height: clamp(200px, 21vw, 280px);
  padding: clamp(2rem, 4vw, 3.5rem) 0;
  background:
    linear-gradient(110deg, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0.72) 65%, rgba(10, 40, 65, 0.5) 100%),
    url("assets/geodinamic-hero-topographic-site.png") center / cover no-repeat;
}

.gd-research-main .gd-subpage-hero h1 {
  max-width: 680px;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.06;
}

.gd-research-main .gd-subpage-hero p {
  max-width: 600px;
  margin-top: 0.8rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: clamp(0.95rem, 1.2vw, 1.06rem);
}

/* ── Content section breathing room ── */
.gd-research-main .gd-section--paper {
  padding-top: clamp(2.5rem, 5vw, 4rem) !important;
  padding-bottom: clamp(2.5rem, 5vw, 4rem) !important;
  background: #f8f5f0;
}

/* ── Responsive ── */
@media (max-width: 860px) {
  .gd-research-main .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card:nth-child(1),
  .gd-research-main .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card:nth-child(2),
  .gd-research-main .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card:nth-child(3),
  .gd-research-main .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card:nth-child(4),
  .gd-research-main .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card:nth-child(5) {
    /* 2-up layout — still equal widths */
    flex: 0 0 calc(50% - 0.65rem) !important;
    max-width: calc(50% - 0.65rem) !important;
  }
}

@media (max-width: 520px) {
  .gd-research-main .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card:nth-child(1),
  .gd-research-main .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card:nth-child(2),
  .gd-research-main .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card:nth-child(3),
  .gd-research-main .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card:nth-child(4),
  .gd-research-main .gd-hub-grid.gd-hub-grid--visual > .gd-hub-card:nth-child(5) {
    flex: 0 0 100% !important;
    max-width: 100% !important;
  }
}

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

/* ── SROF Directory (sub-pages of Research Hub) ── */
.gd-srof-directory .gd-hub-grid.gd-hub-grid--visual {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.2rem, 2.2vw, 1.7rem);
  width: min(100%, 1040px);
  margin-inline: auto;
}

.gd-srof-directory .gd-hub-card.gd-hub-card--visual {
  border-top: 4px solid var(--gd-ocean) !important;
  box-shadow: 0 5px 22px rgba(0, 0, 0, 0.11) !important;
  transition: transform 260ms ease, box-shadow 260ms ease, border-top-color 260ms ease;
}

.gd-srof-directory .gd-hub-card--visual .gd-hub-card__visual {
  aspect-ratio: 16 / 9 !important;
}

.gd-srof-directory .gd-hub-card--visual .gd-hub-card__copy {
  border-top: 0 !important;
  padding: 1.1rem 1.2rem 1.15rem !important;
  min-height: 0;
  gap: 0.85rem;
}

.gd-srof-directory .gd-hub-card--visual h2 {
  font-size: clamp(0.98rem, 1.2vw, 1.14rem) !important;
  line-height: 1.2;
}

.gd-srof-directory .gd-hub-card--visual h2::after {
  display: none !important;
}

.gd-srof-directory .gd-hub-card--visual .gd-hub-card__more {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.38rem 0.82rem;
  border: 1.5px solid var(--gd-ocean);
  background: transparent;
  color: var(--gd-ocean);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-decoration: none !important;
  text-transform: uppercase;
  transition: background 200ms ease, color 200ms ease;
}

.gd-srof-directory .gd-hub-card--visual .gd-hub-card__more::after {
  content: "→";
}

@media (hover: hover) {
  .gd-srof-directory .gd-hub-card.gd-hub-card--visual:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.17) !important;
    border-top-color: var(--gd-terracotta) !important;
  }

  .gd-srof-directory .gd-hub-card--visual:hover .gd-hub-card__more {
    background: var(--gd-ocean);
    color: #fff;
  }
}

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

@media (max-width: 480px) {
  .gd-srof-directory .gd-hub-grid.gd-hub-grid--visual {
    grid-template-columns: 1fr !important;
  }
}

/* ── Hub reading pages ── */
.gd-hub-reading-page .gd-section--paper {
  padding-top: clamp(2rem, 4vw, 3rem);
}
