/* Hero CTA button: reuses the shared .qs-hero-btn (white pill, orange
   border/text, node 744:9710/744:9829) — just adds the hover feedback
   every other .btn variant on the site already has. */

.avances-hero .qs-hero-btn {
  align-self: flex-start;
}

.avances-hero .qs-hero-btn:hover {
  opacity: 0.85;
}

/* Tab bar (node 744:9711 desktop / 744:9372 mobile): a pill-shaped
   orange/white segmented control — not the lavender/gray "UX" treatment
   this used before. */

.avances-tabs {
  display: flex;
  max-width: 906px;
  margin: 12px auto 0;
  scroll-margin-top: 112px;
  border: 1px solid var(--color-orange);
  border-radius: 40px;
  overflow: hidden;
}

.avances-tab {
  flex: 1 1 0;
  height: 68px;
  border: none;
  border-left: 1px solid var(--color-orange);
  background: var(--color-white);
  color: var(--color-orange);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 18px;
  padding: 0 10px;
  cursor: pointer;
  transition: opacity 0.15s ease;
}

.avances-tab:first-child {
  border-left: none;
}

.avances-tab:hover {
  opacity: 0.85;
}

.avances-tab:focus-visible {
  outline-offset: -3px;
}

.avances-tab.is-active {
  background: var(--color-orange);
  color: var(--color-white);
  font-weight: 700;
}

/* Tab panels */

.avances-tab-panels {
  padding: 64px 0;
}

.avances-tab-panel {
  display: none;
}

.avances-tab-panel.is-active {
  display: block;
}

.avances-tab-empty {
  font-family: var(--font-ux);
  color: var(--color-ux-gray);
  font-size: 16px;
  text-align: center;
  padding: 48px 0;
}

/* News card */

.avances-news-card {
  display: flex;
  align-items: stretch;
}

.avances-news-photo {
  flex: 0 0 414px;
  width: 414px;
  height: 231px;
  object-fit: cover;
  border-radius: 12px 0 0 12px;
}

.avances-news-body {
  flex: 1 1 0;
  min-width: 0;
  background: var(--color-white);
  border-bottom: 5px solid #9b9b9b;
  border-radius: 0 12px 12px 0;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.avances-news-source {
  display: flex;
  align-items: center;
  gap: 8px;
}

.avances-news-source img {
  height: 22px;
  width: 22px;
}

.avances-news-source p {
  font-family: Inter, sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: var(--color-brown);
  margin: 0;
}

.avances-news-headline {
  font-family: Inter, sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.4;
  color: var(--color-black);
}

.avances-news-headline:hover {
  text-decoration: underline;
}

.avances-news-url {
  font-family: Inter, sans-serif;
  font-weight: 700;
  font-size: 12px;
  color: var(--color-orange);
  text-decoration: underline;
  word-break: break-all;
}

/* Social post grid (Redes Sociales tab) */

.avances-social-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 43px 24px;
}

.avances-social-card {
  display: flex;
  flex-direction: column;
}

.avances-social-photo {
  aspect-ratio: 353 / 197;
  width: 100%;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
}

.avances-social-body {
  flex: 1 1 auto;
  background: var(--color-white);
  border-bottom: 5px solid #9b9b9b;
  border-radius: 0 0 12px 12px;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.avances-social-card--no-photo .avances-social-body {
  border-radius: 12px;
}

.avances-social-headline {
  font-family: Inter, sans-serif;
  font-weight: 500;
  font-size: 16px;
  line-height: 1.4;
  color: var(--color-black);
  margin: 0;
}

a.avances-social-headline:hover {
  text-decoration: underline;
}

/* Responsive */

@media (max-width: 900px) {
  .avances-tabs:not(.accelerator-tabs) {
    max-width: none;
    width: calc(100% + var(--container-pad) * 2);
    margin-inline: calc(var(--container-pad) * -1);
  }

  .avances-tab {
    font-size: 14px;
    padding: 0 6px;
  }

  .avances-social-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .avances-hero .qs-hero-copy h1 {
    font-size: 32px;
  }

  /* No share icons over the mobile banner photo */
  .avances-hero .qs-social-float {
    display: none;
  }

  .avances-news-card {
    flex-direction: column;
  }

  .avances-news-photo {
    flex-basis: auto;
    width: 100%;
    height: 200px;
    border-radius: 12px 12px 0 0;
  }

  .avances-news-body {
    border-radius: 0 0 12px 12px;
  }
}

@media (max-width: 640px) {
  .avances-tab-panels {
    padding: 34px 0;
  }

  .avances-news-card {
    flex-direction: column;
  }

  .avances-social-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .avances-news-photo {
    flex-basis: auto;
    width: 100%;
    height: 200px;
    border-radius: 12px 12px 0 0;
  }

  .avances-news-body {
    border-radius: 0 0 12px 12px;
  }
}
