.legacy-hero__actions a {
  transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.legacy-hero__actions a::before {
  transition: color .2s ease;
}

.legacy-hero__actions a:hover,
.legacy-hero__actions a:focus-visible {
  background: #fff;
  color: var(--legacy-orange);
  transform: translateY(-1px);
}

.legacy-hero__actions a:hover::before,
.legacy-hero__actions a:focus-visible::before {
  color: #111;
}

/* Refinamiento de jerarquía, legibilidad y navegación por teclado en portada. */
.legacy-home .legacy-hero__actions a:last-child {
  border-color: var(--legacy-orange);
  background: var(--legacy-orange);
  box-shadow: 0 10px 24px rgba(233, 121, 57, .28);
}

.legacy-home .legacy-hero__actions a:last-child:hover,
.legacy-home .legacy-hero__actions a:last-child:focus-visible {
  border-color: #fff;
  background: #fff;
  color: var(--legacy-orange);
}

.legacy-notice {
  border-left-width: 5px;
  border-radius: 0 12px 12px 0;
  background: #eef6f7;
  color: #29404a;
  box-shadow: 0 12px 28px rgba(19, 37, 50, .07);
}

.legacy-neuro__copy { line-height: 1.55; }
.legacy-neuro__copy p { line-height: 1.6; }
.legacy-neuro__copy li { line-height: 1.55; }

.legacy-specialty-grid a {
  min-height: 290px;
  border-radius: 3px;
  box-shadow: 0 10px 22px rgba(19, 37, 50, .08);
  transition: transform .24s ease, box-shadow .24s ease;
}

.legacy-specialty-grid a:hover,
.legacy-specialty-grid a:focus-visible {
  transform: translateY(-5px);
  box-shadow: 0 17px 30px rgba(19, 37, 50, .16);
}

.legacy-specialty-grid a:focus-visible {
  outline: 3px solid var(--legacy-orange);
  outline-offset: 4px;
}

@media (max-width: 760px) {
  .legacy-specialty-grid a { min-height: 240px; }
}

/* Pulido general de la portada: contraste, profundidad y estados interactivos. */
.legacy-home .legacy-hero {
  background:
    linear-gradient(90deg, rgba(11, 25, 34, .68), rgba(11, 25, 34, .35) 52%, rgba(11, 25, 34, .58)),
    linear-gradient(180deg, rgba(11, 25, 34, .12), rgba(11, 25, 34, .42)),
    url('assets/fer.png') center / cover;
}

.legacy-home .legacy-header {
  border-bottom: 1px solid rgba(255, 255, 255, .16);
  background: linear-gradient(180deg, rgba(19, 37, 50, .84), rgba(19, 37, 50, .2));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.legacy-home .legacy-header .nav-shell { min-height: 0; height: 68px; }
.legacy-home .legacy-header .brand { transition: transform .22s ease, opacity .22s ease; }
.legacy-home .legacy-header .brand:hover,
.legacy-home .legacy-header .brand:focus-visible { opacity: .9; transform: translateY(-1px); }

.legacy-home .legacy-hero__actions a,
.legacy-home .legacy-outline-button { border-radius: 3px; }

.legacy-home .legacy-hero__details {
  border-top: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.legacy-home .legacy-pediatrics-news {
  border: 1px solid rgba(233, 121, 57, .14);
  border-radius: 4px;
  box-shadow: 0 16px 38px rgba(19, 37, 50, .11);
}

.legacy-home .legacy-pediatrics-news figure img { transition: transform .55s cubic-bezier(.2, .7, .2, 1); }
.legacy-home .legacy-pediatrics-news:hover figure img,
.legacy-home .legacy-pediatrics-news:focus-within figure img { transform: scale(1.035); }

.legacy-home .legacy-specialty-grid span::after {
  content: '↗︎';
  display: inline-block;
  margin-left: 12px;
  font-size: .72em;
  font-family: Montserrat, sans-serif;
  font-variant-emoji: text;
  transition: transform .22s ease;
}

/* Recuadro translúcido para mantener las etiquetas legibles sobre cada imagen. */
.legacy-home .legacy-specialty-grid span {
  padding: 14px 22px 12px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-bottom: 2px solid rgba(255, 255, 255, .92);
  border-radius: 3px;
  background: rgba(19, 37, 50, .38);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  box-shadow: 0 8px 22px rgba(7, 20, 28, .14);
}

.legacy-home .legacy-specialty-grid a:hover span::after,
.legacy-home .legacy-specialty-grid a:focus-visible span::after { transform: translate(3px, -3px); }

.legacy-home .legacy-neuro__copy { background: linear-gradient(180deg, #fff, #fbfaf8); }

/* El título de Neurofisiología mantiene el mismo tratamiento visual que las tarjetas. */
.legacy-home .legacy-neuro__image h2 {
  padding: 14px 22px 12px;
  border: 1px solid rgba(255, 255, 255, .55);
  border-bottom: 2px solid rgba(255, 255, 255, .92);
  border-radius: 3px;
  background: rgba(19, 37, 50, .38);
  -webkit-backdrop-filter: blur(5px);
  backdrop-filter: blur(5px);
  box-shadow: 0 8px 22px rgba(7, 20, 28, .14);
}

@media (max-width: 760px) {
  .legacy-home .legacy-header .nav-shell { height: 58px; }
  .legacy-home .legacy-header nav { top: 58px; }
  .legacy-home .legacy-specialty-grid span::after { margin-left: 8px; }
  .legacy-home .legacy-specialty-grid span { padding: 11px 15px 10px; }
  .legacy-home .legacy-neuro__image h2 { padding: 11px 15px 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .legacy-home *, .legacy-home *::before, .legacy-home *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Iconos vectoriales: evitan que teléfono, ubicación y reloj se conviertan en emojis. */
.legacy-home .legacy-hero__details .legacy-icon {
  display: grid;
  width: 32px;
  height: 32px;
  margin-bottom: 5px;
  place-items: center;
  color: var(--legacy-orange);
  font-size: 0;
}
.legacy-home .legacy-hero__details .legacy-icon svg {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}
.legacy-home .legacy-hero__details a:hover .legacy-icon,
.legacy-home .legacy-hero__details a:focus-visible .legacy-icon { color: var(--legacy-orange); }
