/* Home institucional: adapta el inicio renovado al lenguaje visual del sitio original. */

:root {
  --rojo: #cc0033;
  --rojo-m: #a6002a;
  --rojo-c: #15ace1;
  --rojo-t: #f4f7fe;
  --rojo-mt: #ffffff;
  --oscuro: #14183e;
  --negro: #14183e;
  --crema: #f4f7fe;
  --blanco: #ffffff;
  --txt: #3f4254;
  --txt-s: #606479;
  --brd: rgba(20, 24, 62, 0.13);
  --r: 6px;
  --rl: 10px;
}

html { scroll-padding-top: 68px; }

body {
  background: #fff;
  color: var(--txt);
  font-family: "Poppins", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  overflow-x: hidden;
}

button, input, select, textarea { font: inherit; }

.icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.flat-icon {
  width: 1.15em;
  height: 1.15em;
  display: block;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

a {
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease,
    transform 0.2s ease, box-shadow 0.2s ease;
}

/* Encabezado institucional */
.site-header {
  background: var(--rojo);
}

.navbar-sticky {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--rojo);
  box-shadow: 0 3px 14px rgba(20, 24, 62, 0.18);
  transition: box-shadow 0.25s ease;
}

.site-topbar {
  display: none;
  color: var(--rojo);
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  background-color: #fff;
}

.nav-shell {
  width: calc(100% - 3rem);
  max-width: 1140px;
  min-height: 48px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.topbar-address {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
}

.topbar-links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.topbar-links a {
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}

.topbar-links a:hover { color: var(--oscuro); }

.nav {
  position: relative;
  top: auto;
  width: calc(100% - 2rem);
  max-width: 1140px;
  height: 68px;
  margin: 0 auto;
  padding: 0;
  background: transparent;
  box-shadow: none;
  transition: height 0.25s ease;
}

.nav-logo img {
  width: auto;
  height: 43px;
  filter: none;
  transition: height 0.25s ease;
}

.navbar-sticky.is-compact {
  box-shadow: 0 5px 18px rgba(20, 24, 62, 0.24);
}

.navbar-sticky.is-compact .nav {
  height: 56px;
}

.navbar-sticky.is-compact .nav-logo img {
  height: 34px;
}

.navbar-sticky.is-compact + .mobile-menu {
  top: 56px;
}

.nav-logo-fb, .nav-icon-btn, .mobile-menu a, .bb-btn, .nav-desktop a {
  font-family: "Poppins", sans-serif;
}

.nav-icon-btn {
  width: 38px;
  height: 38px;
  justify-content: center;
  border-radius: 4px;
  padding: 0;
  font-size: 0;
}

.mobile-menu {
  top: 68px;
  background: var(--rojo);
}

.mobile-menu a {
  letter-spacing: 0;
  text-transform: none;
}

.mm-cta { border-radius: 4px; }

/* Hero con las proporciones y alineación del carrusel original */
.hero {
  min-height: 500px;
  padding: 4rem 1.25rem;
  display: flex;
  align-items: center;
  text-align: left;
  background:
    linear-gradient(rgba(0, 0, 0, 0.56), rgba(0, 0, 0, 0.56)),
    url("../img/consultorio.webp") center / cover no-repeat;
}

.hero::after { display: none; }

.hero-inner {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
}

.hero-geo {
  display: inline-block;
  margin-bottom: 0.8rem;
  padding: 4px 16px;
  background: var(--crema);
  color: var(--oscuro);
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.hero h1 {
  max-width: 760px;
  margin-bottom: 1.5rem !important;
  color: #fff;
  font-family: "Poppins", sans-serif;
  font-size: clamp(2.45rem, 6vw, 3.75rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.08;
  text-transform: none;
  overflow-wrap: anywhere;
}

.hero h1 em {
  display: block;
  margin-top: 0.08em;
  color: #fff;
  font-size: 1em;
  font-style: normal;
  font-weight: 700;
  text-transform: none;
}

.hero-ctas { max-width: 680px; }

.hero-btn-p, .hero-btn-s {
  border-radius: 4px;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

.hero-btn-p {
  background: var(--rojo);
  color: #fff;
}

.hero-btn-p:hover {
  background: var(--rojo-m);
  transform: translateY(-1px);
}

.hero-btn-s:hover {
  background: #fff;
  color: var(--oscuro);
}

.hero-director {
  margin-top: 0.45rem;
  font-family: "Poppins", sans-serif;
  font-size: 13px;
  text-align: left;
}

/* Sistema de secciones */
section { padding: 4rem 1.25rem; }
.inner { max-width: 1140px; }
.flow { background: #fff; }
.flow-step::after { color: var(--rojo); }

.flow-icon {
  display: flex;
  justify-content: center;
  color: var(--rojo);
}

.flow-icon .flat-icon {
  width: 29px;
  height: 29px;
}

.flow-step h3, .ey, .st-t, .e-txt h3, .cob-dest, .cc, .r-num,
.r-step h4, .inst-tab, .inst-panel h3, .inst-form-btn, .dr-info h3,
.dr-wsp, .dr-dir-title, .dr-dir-info h3, .est-img span, .est-body .est-prev,
.pat-head h4, .pat-firma, .fq h4, .ci-t strong, .share-btn {
  font-family: "Poppins", sans-serif;
}

.ey {
  color: var(--rojo);
  font-weight: 600;
}

.st-t {
  color: var(--oscuro);
  font-size: clamp(1.8rem, 3vw, 2.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
}

.st-sub {
  color: var(--txt-s);
  font-weight: 400;
}

.esp, .resuelve, .staff, .estudios, .blog, .compartir { background: #fff; }
.cob, .inst, .faq { background: var(--crema); }

.e-card, .dr-card, .est-card {
  border-radius: 6px;
  box-shadow: 0 5px 18px rgba(20, 24, 62, 0.05);
}

.e-card {
  background: #fff;
  border-left-width: 4px;
}

.e-card:hover {
  border-color: var(--rojo);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(20, 24, 62, 0.1);
}

.e-icon {
  border-color: var(--rojo);
  border-radius: 50%;
  color: var(--rojo);
}

.e-icon .flat-icon {
  width: 20px;
  height: 20px;
}

.e-txt h3, .r-step h4, .inst-panel h3, .dr-info h3, .pat-head h4, .fq h4 {
  color: var(--oscuro);
  text-transform: none;
}

.cob-dest, .inst-form-btn, .dr-wsp, .r-num { background: var(--rojo); }
.cob-dest, .cc, .inst-form-btn, .dr-wsp, .share-btn { border-radius: 4px; }

.cc:hover {
  background: #fff;
  border-color: var(--rojo);
  color: var(--rojo);
}

/* Coberturas */
.cob-layout {
  display: grid;
  gap: 2rem;
  align-items: center;
}

.cob-intro .st-sub {
  max-width: 500px;
}

.cob-assistance {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 1.6rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--brd);
}

.cob-assistance-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  border: 1px solid var(--rojo);
  border-radius: 50%;
  color: var(--rojo);
  font-weight: 700;
}

.cob-assistance strong,
.cob-assistance small,
.cob-panel-head strong,
.cob-panel-head small {
  display: block;
}

.cob-assistance strong {
  color: var(--oscuro);
  font-size: 14px;
}

.cob-assistance small {
  color: var(--txt-s);
  font-size: 12px;
}

.cob-panel {
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--brd);
  border-radius: 10px;
  box-shadow: 0 14px 36px rgba(20, 24, 62, 0.08);
}

.cob-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 1.15rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--brd);
}

.cob-panel-head > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  border-radius: 50%;
  background: var(--rojo);
  color: #fff;
  font-weight: 700;
}

.cob-panel-head strong {
  color: var(--oscuro);
  font-size: 15px;
}

.cob-panel-head small {
  color: var(--txt-s);
  font-size: 12px;
}

.cob-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.coverage-link {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--brd);
  border-radius: 5px;
  background: #fff;
  color: var(--oscuro);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.25;
  text-decoration: none;
}

.coverage-link::before {
  content: "✓";
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  flex: 0 0 20px;
  border-radius: 50%;
  background: var(--rojo-t);
  color: var(--rojo);
  font-size: 11px;
  font-weight: 800;
}

.coverage-link:hover {
  border-color: var(--rojo);
  color: var(--rojo);
  transform: translateY(-1px);
  box-shadow: 0 6px 14px rgba(20, 24, 62, 0.08);
}

.coverage-other {
  grid-column: 1 / -1;
  justify-content: center;
  background: var(--oscuro);
  border-color: var(--oscuro);
  color: #fff;
}

.coverage-other::before {
  content: "+";
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.coverage-other span {
  margin-left: auto;
  font-size: 17px;
}

.coverage-other:hover {
  background: var(--rojo);
  border-color: var(--rojo);
  color: #fff;
}

.cob-note {
  margin-top: 0.85rem;
  color: var(--txt-s);
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.r-num { border-radius: 50%; }
.inst-tabs { border-bottom-color: rgba(20, 24, 62, 0.14); }

.inst-tab {
  color: var(--txt-s);
  text-transform: none;
}

.inst-tab.active {
  color: var(--rojo);
  border-bottom-color: var(--rojo);
}

.inst-img, .dr-photo, .est-img { background-color: var(--crema); }

.inst-copy {
  min-width: 0;
}

.dr-director {
  background: var(--oscuro);
  border-radius: 6px;
}

.dr-card { background: #fff; }

.est-img::after {
  background: linear-gradient(0deg, rgba(20, 24, 62, 0.78) 0%, transparent 62%);
}

/* Estudios y tratamientos */
.est-intro {
  max-width: 760px;
}

.est-grid {
  gap: 16px;
  margin-top: 2rem;
}

.est-card {
  display: block;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--brd);
  border-radius: 8px;
  box-shadow: 0 7px 20px rgba(20, 24, 62, 0.07);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.est-card:nth-child(n + 7) {
  display: none;
}

.est-grid.show-all .est-card {
  display: block;
  animation: reveal-study 0.3s ease both;
}

.est-card:hover {
  border-color: rgba(204, 0, 51, 0.42);
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(20, 24, 62, 0.12);
}

.est-img {
  height: auto;
  aspect-ratio: 16 / 9;
}

.est-img > span:first-child {
  right: 54px;
  bottom: 15px;
  left: 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.25;
  text-transform: none;
}

.est-img .est-toggle {
  top: 12px;
  right: 12px;
  bottom: auto;
  left: auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.94);
  color: var(--oscuro);
  font-size: 0;
  box-shadow: 0 4px 14px rgba(20, 24, 62, 0.2);
  transform: none;
}

.est-img .est-toggle::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.est-img .est-toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 14px;
  border-radius: 2px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.est-card.open .est-toggle {
  background: var(--rojo);
  color: #fff;
  transform: rotate(45deg);
}

.est-desc {
  background: #fff;
  color: var(--txt-s);
  font-size: 13px;
  line-height: 1.65;
}

.est-card.open .est-desc {
  max-height: 320px;
  padding: 1.1rem 1.15rem 1.25rem;
}

.est-show-more {
  min-width: 250px;
  margin: 2rem auto 0;
  padding: 12px 14px 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--oscuro);
  border-radius: 5px;
  background: #fff;
  color: var(--oscuro);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
}

.est-show-more b {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--oscuro);
  color: #fff;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
}

.est-show-more:hover {
  background: var(--oscuro);
  color: #fff;
}

.est-show-more:hover b {
  background: var(--rojo);
}

@keyframes reveal-study {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.pat-arrow { color: var(--rojo); }

.pat-disclaimer {
  color: var(--oscuro) !important;
  background: var(--crema);
  border-left: 3px solid var(--rojo);
  border-radius: 2px;
}

/* Bloque fotográfico secundario en azul institucional */
.pos {
  background:
    linear-gradient(rgba(20, 24, 62, 0.88), rgba(20, 24, 62, 0.88)),
    url("../img/fonfo_fundacion.webp") center / cover no-repeat var(--oscuro);
}

.pos::before { display: none; }

.pos h2, .pos h2 span {
  font-family: "Poppins", sans-serif;
  color: #fff;
  text-transform: none;
}

.pos-line { background: var(--rojo); }

.pos-btn {
  border-radius: 4px;
  font-family: "Poppins", sans-serif;
  text-transform: none;
}

.pos-btn .flat-icon,
.share-native .flat-icon {
  width: 17px;
  height: 17px;
}

.contacto { background: var(--rojo); }
.contacto .ey { color: rgba(255, 255, 255, 0.72); }

.ci-i {
  color: var(--oscuro);
  border-radius: 50%;
}

.ci-i .flat-icon {
  width: 18px;
  height: 18px;
}

.mapa { border-radius: 6px; }

footer {
  background:
    linear-gradient(rgba(20, 24, 62, 0.96), rgba(20, 24, 62, 0.96)),
    url("../img/footer.webp") center / cover no-repeat;
}

footer p, .f-links a { color: rgba(255, 255, 255, 0.58); }
.f-links a:hover { color: #fff; }
.bottom-bar { background: var(--oscuro); }

@media (min-width: 680px) {
  .hero-ctas {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }

  .hero-btn-p, .hero-btn-s { padding: 13px 22px; }
  .hero-director { flex: 0 0 100%; }
}

@media (min-width: 860px) {
  html { scroll-padding-top: 75px; }
  .site-topbar { display: block; }
  .nav { height: 75px; }
  .nav-logo img { height: 47px; }

  .navbar-sticky.is-compact .nav { height: 58px; }
  .navbar-sticky.is-compact .nav-logo img { height: 37px; }

  .nav-desktop { gap: clamp(0.8rem, 1.5vw, 1.6rem); }

  .nav-desktop a {
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
  }

  .nav-desktop a:hover { color: var(--oscuro); }

  .nav-cta {
    padding: 10px 20px;
    border-radius: 4px;
  }

  .nav-pro { color: rgba(255, 255, 255, 0.68) !important; }

  .nav-inst .nav-drop {
    top: calc(100% + 27px);
    background: #fff;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 10px 25px rgba(20, 24, 62, 0.16);
  }

  .navbar-sticky.is-compact .nav-inst .nav-drop {
    top: calc(100% + 19px);
  }

  .nav-drop a { color: var(--oscuro); }

  .nav-drop a:hover {
    color: var(--rojo);
    background: var(--crema);
  }

  .hero {
    min-height: 520px;
    padding: 5rem 2rem;
  }

  section { padding: 5rem 2rem; }

  .inst-panel.active {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 3rem;
    align-items: start;
  }

  .inst-img {
    margin-bottom: 0;
    aspect-ratio: 4 / 3;
  }

  .inst-copy {
    align-self: center;
  }

  .cob-layout {
    grid-template-columns: minmax(0, 0.8fr) minmax(520px, 1.2fr);
    gap: clamp(3rem, 6vw, 5rem);
  }

  .cob-panel {
    padding: 1.5rem;
  }

  .cob-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .est-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .esp-grid { grid-template-columns: repeat(3, 1fr); }
  .resuelve-steps { flex-wrap: nowrap; }

  .r-step, .r-step:nth-child(2n) {
    align-items: center;
    min-width: 0;
    border-right: 1px solid var(--brd);
  }

  .r-step:last-child { border-right: 0; }

  .staff-scroll {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 16px;
  }

  .dr-card { width: auto; }
}

@media (max-width: 859px) {
  .hero { background-position: 62% center; }
  .hero-inner { padding-right: 8%; }
  .flow-step { width: 54%; }
}

@media (max-width: 420px) {
  .nav-logo img { height: 38px; }
  .nav-icon-btn { font-size: 12px; }
  .hero h1 { font-size: 2.25rem; }

}

@media (max-width: 540px) {
  .est-grid { grid-template-columns: 1fr; }
  .est-show-more { width: 100%; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
