/* =====================================================================
   estilos.css – Grupo Oftalmológico Regnasco
   Tipografía del sistema (sin fuentes externas), pensada para leerse
   bien en celular y para pacientes mayores: letra grande, contraste alto
   y botones amplios.
   ===================================================================== */

:root {
  --tinta: #1b2a3b;        /* texto principal y títulos */
  --tinta-suave: #475669;  /* texto secundario */
  --papel: #f4f8fb;        /* fondo general */
  --blanco: #ffffff;
  --linea: #c9d9e6;
  --tinte: #e1eef8;        /* bandas de fondo */
  --azul: #0070b8;         /* azul del logo: acción principal (turno online) */
  --azul-oscuro: #005a96;
  --wa: #0f7b45;           /* WhatsApp */
  --wa-oscuro: #0b6437;
  --fuente: "Avenir Next", "Segoe UI", "Helvetica Neue", "Noto Sans", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --ancho: 71rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 5.5rem; }
body {
  margin: 0;
  font-family: var(--fuente);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--tinta);
  background: var(--papel);
  padding-bottom: 5.25rem; /* lugar para la barra inferior del celular */
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--azul); text-underline-offset: .18em; }
a:hover { color: var(--azul-oscuro); }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; font-weight: 800; letter-spacing: -.015em; }
p { margin: 0 0 1em; max-width: 42rem; }
ul { margin: 0; padding: 0; }

:focus-visible { outline: 3px solid var(--azul); outline-offset: 3px; border-radius: 4px; }

.contenedor { width: min(100% - 2.5rem, var(--ancho)); margin-inline: auto; }
.solo-lectores { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.saltar { position: absolute; left: -999px; top: .5rem; background: var(--tinta); color: #fff; padding: .6rem 1rem; z-index: 100; border-radius: 6px; }
.saltar:focus { left: .5rem; }

/* ---------- Botones ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 3.25rem; padding: .7rem 1.4rem;
  border: 2px solid transparent; border-radius: 10px;
  font: inherit; font-weight: 700; font-size: 1.05rem; line-height: 1.2; text-align: center;
  text-decoration: none; cursor: pointer;
}
.btn svg { width: 1.25rem; height: 1.25rem; flex: none; }
.btn-turno { background: var(--azul); color: #fff; }
.btn-turno:hover { background: var(--azul-oscuro); color: #fff; }
.btn-wa { background: var(--blanco); color: var(--wa); border-color: var(--wa); }
.btn-wa:hover { background: var(--wa); color: #fff; }
.btn-grande { min-height: 4rem; font-size: 1.15rem; width: 100%; padding-inline: .8rem; }
.btn-llamar { background: transparent; color: var(--tinta); border-color: var(--linea); }
.btn-llamar:hover { border-color: var(--tinta); color: var(--tinta); }

/* ---------- Encabezado ---------- */
.encabezado { background: var(--blanco); border-bottom: 1px solid var(--linea); }
.encabezado .contenedor { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4.5rem; }
.marca { text-decoration: none; color: var(--tinta); display: block; line-height: 1.15; flex: 1 1 0; min-width: 0; }
.marca strong { display: block; font-size: 1.05rem; font-weight: 800; letter-spacing: -.01em; }
.marca span { display: block; font-size: .9rem; color: var(--tinta-suave); }

.menu-btn {
  flex: none; font: inherit; font-weight: 700; color: var(--tinta); background: transparent;
  border: 2px solid var(--linea); border-radius: 10px; min-height: 2.9rem; padding: .3rem 1rem; cursor: pointer;
}
.menu-btn[aria-expanded="true"] { border-color: var(--tinta); }
.nav { display: none; flex-basis: 100%; padding: .5rem 0 1rem; }
.nav.abierto { display: block; }
.encabezado .contenedor { flex-wrap: wrap; }
.nav ul { list-style: none; display: grid; }
.nav a { display: block; padding: .8rem 0; border-top: 1px solid var(--linea); color: var(--tinta); font-weight: 600; text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--azul); }
.encabezado .btn-turno { display: none; }

/* ---------- Portada: titular como tabla optotípica ---------- */
.portada { padding: 2.25rem 0 3rem; }
.portada .contenedor { display: grid; gap: 2.25rem; }
.tabla-optica { display: grid; gap: .55em; align-content: center; }
.tabla-optica .ln { display: block; font-weight: 800; line-height: .98; }
.ln1 { font-size: clamp(3.4rem, 15vw, 8.4rem); letter-spacing: -.035em; }
.ln2 { font-size: clamp(2.45rem, 10.8vw, 6rem); letter-spacing: -.03em; }
.ln3 { font-size: clamp(1.75rem, 7.6vw, 4.2rem); letter-spacing: -.02em; }
.ln4 { font-size: clamp(1.3rem, 5.4vw, 3rem); letter-spacing: .02em; color: var(--tinta-suave); font-weight: 700; }
.portada .aclaracion { margin-top: 1.5rem; color: var(--tinta-suave); }

.turno {
  background: var(--blanco); border: 1px solid var(--linea); border-top: 6px solid var(--azul);
  border-radius: 8px; padding: 1.5rem 1.4rem 1.6rem; box-shadow: 0 10px 30px -18px rgba(18, 40, 76, .35);
}
.turno h2 { font-size: 1.7rem; margin-bottom: 1.1rem; }
.turno .nota { font-size: 1rem; color: var(--tinta-suave); margin: .75rem 0 0; }
.turno .separador { display: flex; align-items: center; gap: .8rem; margin: 1.3rem 0; color: var(--tinta-suave); font-weight: 600; }
.turno .separador::before, .turno .separador::after { content: ""; flex: 1; height: 1px; background: var(--linea); }

/* ---------- Secciones ---------- */
.seccion { padding: 3.5rem 0; }
.seccion.blanca { background: var(--blanco); }
.seccion.tinte { background: var(--tinte); }
.seccion h2 { font-size: clamp(1.75rem, 4.6vw, 2.5rem); margin-bottom: 1rem; }
.intro { color: var(--tinta-suave); margin-bottom: 2rem; }

/* ---------- Sedes ---------- */
.sedes { display: grid; }
.sede { border-top: 3px solid var(--tinta); padding: 1.75rem 0 2rem; display: grid; gap: 1.5rem; }
.sede h3 { font-size: 1.85rem; }
.sede .rol { margin: .25rem 0 0; color: var(--tinta-suave); font-size: 1rem; }
.sede .direccion { margin: .6rem 0 0; font-size: 1.05rem; }
.puntos { display: grid; gap: 1.25rem; align-content: start; }
.punto + .punto { border-top: 1px solid var(--linea); padding-top: 1.25rem; }
.punto-titulo { font-weight: 700; margin: 0 0 .15rem; }
.punto-dir { margin: 0 0 .75rem; color: var(--tinta-suave); font-size: 1rem; }
.acciones { display: grid; grid-template-columns: minmax(0, 20rem); gap: .6rem; }
.acciones .btn { white-space: nowrap; }
.presencial { margin: 0; font-weight: 600; }
.horarios { margin: 0; display: grid; gap: .25rem; align-content: start; }
.horarios div { display: flex; justify-content: space-between; gap: 1rem; border-bottom: 1px dotted var(--linea); padding-bottom: .25rem; }
.horarios dt { color: var(--tinta-suave); white-space: nowrap; }
.horarios dd { margin: 0; font-weight: 700; white-space: nowrap; }
.como-llegar { display: inline-block; margin-top: .9rem; font-weight: 600; }

/* ---------- Buscador de estudios ---------- */
.buscador { max-width: 42rem; }
.campo-busqueda {
  width: 100%; min-height: 3.75rem; padding: .6rem 1.1rem; font: inherit; font-size: 1.15rem; color: var(--tinta);
  background: var(--blanco); border: 2px solid var(--tinta); border-radius: 10px;
}
.campo-busqueda::placeholder { color: #66758d; }
.sugerencias { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 0; align-items: center; }
.sugerencias > span { color: var(--tinta-suave); margin-right: .25rem; }
.chip {
  font: inherit; font-size: 1rem; font-weight: 600; color: var(--tinta); background: var(--blanco);
  border: 1.5px solid var(--linea); border-radius: 999px; padding: .4rem 1rem; min-height: 2.6rem; cursor: pointer;
}
.chip:hover { border-color: var(--tinta); }
.chip[aria-pressed="true"], .grupo-chips input:checked + .chip { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.resultados { list-style: none; margin: 1.5rem 0 0; display: grid; }
.resultados li { border-top: 1px solid var(--linea); }
.resultados li:last-child { border-bottom: 1px solid var(--linea); }
.resultados a { display: block; padding: .9rem .25rem; text-decoration: none; color: var(--tinta); }
.resultados a:hover { background: rgba(255, 255, 255, .6); }
.resultados .r-nombre { display: block; font-weight: 700; }
.resultados .r-donde { display: block; font-size: 1rem; color: var(--tinta-suave); }
.estado-busqueda { margin: 1.25rem 0 0; color: var(--tinta-suave); }
.ver-todos { display: inline-block; margin-top: 1rem; font-weight: 700; }

/* ---------- Listas de especialidades ---------- */
.lista-enlaces { list-style: none; display: grid; gap: 0; }
.lista-enlaces li { border-top: 1px solid var(--linea); }
.lista-enlaces a { display: block; padding: .85rem .25rem; font-weight: 600; text-decoration: none; color: var(--tinta); }
.lista-enlaces a:hover { color: var(--azul); background: var(--papel); }

/* ---------- Trayectoria ---------- */
.dos-col { display: grid; gap: 2.5rem; }
.hechos { list-style: none; display: grid; gap: .9rem; }
.hechos li { padding-left: 1.4rem; position: relative; }
.hechos li::before { content: ""; position: absolute; left: 0; top: .72em; width: .6rem; height: .6rem; border-radius: 50%; background: var(--azul); }
.equipos h3 { font-size: 1.35rem; margin-bottom: .9rem; }
.equipos ul { list-style: none; }
.equipos li { border-top: 1px solid var(--linea); padding: .7rem 0; }
.equipos li:last-child { border-bottom: 1px solid var(--linea); }
.equipos a { color: var(--tinta); text-decoration: none; font-weight: 600; }
.equipos a:hover { color: var(--azul); text-decoration: underline; }
.fotos { display: grid; gap: 1rem; margin-top: 2.5rem; }
.fotos img { border-radius: 8px; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }

/* ---------- Pie ---------- */
.pie { background: var(--tinta); color: #dfe8f5; padding: 2.5rem 0 2rem; font-size: 1rem; }
.pie a { color: #fff; }
.pie .contenedor { display: grid; gap: 1.25rem; }
.pie strong { color: #fff; font-size: 1.15rem; }
.pie p { margin: 0; }
.pie .btn-turno { background: #fff; color: var(--tinta); justify-self: start; }
.pie .btn-turno:hover { background: var(--tinte); color: var(--tinta); }

/* ---------- Barra inferior en celular ---------- */
.barra-movil {
  position: fixed; inset: auto 0 0 0; z-index: 50; display: grid; grid-template-columns: 1.25fr 1fr; gap: .6rem;
  padding: .65rem .75rem calc(.65rem + env(safe-area-inset-bottom, 0px)); background: var(--blanco); border-top: 1px solid var(--linea);
}
.barra-movil .btn { min-height: 3.4rem; padding: .5rem .8rem; }

/* ---------- Página de servicios ---------- */
.cabecera-pagina { padding: 2.25rem 0 1.5rem; }
.cabecera-pagina h1 { font-size: clamp(2rem, 5.4vw, 3.1rem); margin-bottom: .75rem; }
.controles { display: grid; gap: 1.25rem; margin-bottom: 1.5rem; }
.pestanas { display: flex; flex-wrap: wrap; gap: .5rem; }
.pestanas .chip { font-size: 1.05rem; padding: .5rem 1.15rem; }
.grupo-chips { border: 0; padding: 0; margin: 0; }
.grupo-chips legend { font-weight: 700; margin-bottom: .5rem; padding: 0; }
.grupo-chips .fila { display: flex; flex-wrap: wrap; gap: .5rem; }
.grupo-chips input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.grupo-chips input:focus-visible + .chip { outline: 3px solid var(--azul); outline-offset: 3px; }
.grupo-chips label { display: block; }
.aviso-pestana { color: var(--tinta-suave); margin: 0 0 1rem; }
.conteo { color: var(--tinta-suave); margin: 0 0 .75rem; }

.acordeon { border-bottom: 1px solid var(--linea); }
.acordeon:first-child { border-top: 1px solid var(--linea); }
.acordeon summary {
  list-style: none; cursor: pointer; display: grid; grid-template-columns: 1fr auto; gap: .25rem 1rem; align-items: center; padding: 1rem .25rem;
}
.acordeon summary::-webkit-details-marker { display: none; }
.acordeon summary:hover { background: var(--blanco); }
.acordeon .nombre { font-weight: 700; font-size: 1.15rem; line-height: 1.3; }
.acordeon .donde { grid-column: 1; font-size: 1rem; color: var(--tinta-suave); }
.acordeon summary::after {
  content: ""; grid-column: 2; grid-row: 1 / span 2; width: .7rem; height: .7rem;
  border-right: 3px solid var(--tinta); border-bottom: 3px solid var(--tinta); transform: rotate(45deg); transition: transform .2s ease; margin-right: .3rem;
}
.acordeon[open] summary::after { transform: rotate(-135deg); }
.acordeon .cuerpo { padding: .25rem .25rem 1.5rem; max-width: 46rem; }
.acordeon .cuerpo p { white-space: pre-line; }
.acordeon .cuerpo ul { list-style: disc; padding-left: 1.3rem; margin: 0 0 1em; }
.acordeon .cuerpo li { margin-bottom: .35rem; }
.vacio { padding: 1.5rem 0; }
.vacio p { margin-bottom: 1rem; }

/* ---------- Pantallas grandes ---------- */
@media (min-width: 56rem) {
  body { padding-bottom: 0; }
  .barra-movil { display: none; }
  .menu-btn { display: none; }
  .encabezado { position: sticky; top: 0; z-index: 40; }
  .nav { display: block; flex-basis: auto; padding: 0; margin-left: auto; }
  .nav ul { display: flex; gap: 1.6rem; }
  .nav a { border: 0; padding: .4rem 0; }
  .encabezado .btn-turno { display: inline-flex; min-height: 3rem; }
  .marca { flex: none; }
  .marca strong { font-size: 1.15rem; }
  .btn-grande { font-size: 1.25rem; }
  .portada { padding: 4rem 0 5rem; }
  .portada .contenedor { grid-template-columns: minmax(0, 1.35fr) minmax(0, .8fr); gap: 4rem; align-items: center; }
  .turno { padding: 2rem 1.9rem 2.1rem; }
  .sede { grid-template-columns: 11rem minmax(0, 1fr) 21rem; gap: 2.5rem; }
  .lista-enlaces { grid-template-columns: repeat(3, 1fr); column-gap: 2.5rem; }
  .lista-enlaces li:nth-last-child(-n+3) { border-bottom: 1px solid var(--linea); }
  .dos-col { grid-template-columns: 1fr 1fr; gap: 4rem; }
  .fotos { grid-template-columns: repeat(3, 1fr); }
  .controles { grid-template-columns: 1fr; }
}
@media (min-width: 40rem) and (max-width: 55.99rem) {
  .lista-enlaces { grid-template-columns: repeat(2, 1fr); column-gap: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .acordeon summary::after { transition: none; }
}


/* ======================================================================
   Agregados de la segunda versión
   ====================================================================== */
.marca img { display: block; height: 2.5rem; width: auto; max-width: 100%; }
@media (min-width: 56rem) { .marca img { height: 3rem; } }

.turno .nota-sin-turno { border-top: 1px solid var(--linea); padding-top: .9rem; margin-top: 1.1rem; }

/* Sedes: foto, aviso de turno online y atención sin turno */
.etiqueta-turno {
  display: inline-block; margin-top: .8rem; font-weight: 700; font-size: .95rem; line-height: 1.25; color: var(--azul);
  border: 1.5px solid var(--azul); border-radius: 10px; padding: .4rem .8rem; text-decoration: none;
}
.etiqueta-turno:hover { background: var(--azul); color: #fff; }
.sede-foto { margin: 1.5rem 0 0; }
.sede-foto img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: 50% 60%; border-radius: 6px; background: var(--tinte); }
.sin-turno { margin: 0; padding: .55rem 0 .55rem 1rem; border-left: 4px solid var(--azul); font-weight: 600; }
@media (min-width: 56rem) { .sede-foto img { aspect-ratio: 4 / 3; } }

/* Buscadores en la portada (dos columnas) */
.doble { display: grid; gap: 3.25rem; }
.doble h2 { font-size: clamp(1.5rem, 3.6vw, 2rem); margin-bottom: 1.1rem; }
.r-tipo {
  display: inline-block; font-size: .85rem; font-weight: 700; color: var(--tinta); background: var(--blanco);
  border: 1px solid var(--linea); border-radius: 999px; padding: 0 .6rem; margin-right: .55rem; line-height: 1.5;
}
.resultados .solo { font-weight: 600; padding: .8rem .25rem; }
.nota-chica { font-size: 1rem; color: var(--tinta-suave); margin: 1rem 0 0; max-width: 42rem; }
@media (min-width: 56rem) { .doble { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; } }

/* Servicios: pistas de otras pestañas */
.otros { margin: 0 0 1rem; color: var(--tinta-suave); display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.otros:empty { display: none; }

/* Obras sociales */
.obras-lista { columns: 1; column-gap: 3rem; margin-top: 1.5rem; }
.obras-grupo { break-inside: avoid; margin: 0 0 1.75rem; }
.obras-grupo h2 { font-size: 1.5rem; margin: 0 0 .4rem; padding-bottom: .25rem; border-bottom: 2px solid var(--tinta); }
.obras-grupo ul { list-style: none; }
.obras-grupo li { padding: .4rem 0; border-bottom: 1px dotted var(--linea); }
.creciendo { font-weight: 700; font-size: 1.2rem; margin: 1rem 0 .5rem; }
@media (min-width: 40rem) { .obras-lista { columns: 2; } }
@media (min-width: 64rem) { .obras-lista { columns: 3; } }

/* Formación y pie */
.areas { list-style: none; max-width: 32rem; }
.areas li { border-top: 1px solid var(--linea); }
.areas li:last-child { border-bottom: 1px solid var(--linea); }
.areas a { display: block; padding: .9rem .25rem; font-weight: 700; font-size: 1.2rem; text-decoration: none; color: var(--tinta); }
.areas a:hover { color: var(--azul); background: var(--blanco); }
.foto-ancha { margin: 2.5rem 0 0; }
.foto-ancha img { width: 100%; aspect-ratio: 16 / 7; object-fit: cover; border-radius: 8px; }
.pie-enlaces { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; }
.pie-enlaces a { text-decoration: none; }
.pie-enlaces a:hover { text-decoration: underline; }

.pasos { list-style: none; counter-reset: paso; display: grid; gap: .7rem; margin: 0 0 1em; }
.pasos li { counter-increment: paso; position: relative; padding-left: 2.2rem; }
.pasos li::before { content: counter(paso); position: absolute; left: 0; top: .1em; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: var(--azul); color: #fff; font-size: .95rem; font-weight: 700; display: grid; place-items: center; line-height: 1; }

.pie-ig a { font-weight: 700; }
