/* Cuerpo de Bomberos Voluntarios de Bogotá D.C. — hoja de estilos única.
   Primero el celular; sin fuentes externas, sin scripts. */

:root {
  --rojo: #b3121b;
  --rojo-oscuro: #7f0d13;
  --rojo-suave: #fdecec;
  --tinta: #1b1b1f;
  --tinta-suave: #4a4a52;
  --fondo: #ffffff;
  --fondo-alterno: #f5f3f1;
  --borde: #ddd8d3;
  --radio: 10px;
  --ancho: 68rem;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--tinta);
  background: var(--fondo);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--rojo); text-underline-offset: 0.15em; }
a:hover { color: var(--rojo-oscuro); }

:focus-visible { outline: 3px solid #1a5fb4; outline-offset: 2px; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5em; }
h1 { font-size: clamp(1.75rem, 6vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 4.5vw, 2rem); margin-top: 0.2em; }
h3, .h3 { font-size: 1.2rem; }
p, ul, ol { margin: 0 0 1em; }

.contenedor { width: 100%; max-width: var(--ancho); margin: 0 auto; padding: 0 1rem; }

.saltar {
  position: absolute; left: -999px; top: 0;
  background: var(--tinta); color: #fff; padding: 0.6rem 1rem; z-index: 10;
}
.saltar:focus { left: 0.5rem; top: 0.5rem; color: #fff; }

/* ---- Franja del 123 ---- */
.franja-123 { background: var(--rojo-oscuro); color: #fff; font-size: 0.95rem; }
.franja-123 .contenedor { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding-top: 0.4rem; padding-bottom: 0.4rem; }
.franja-123 a { color: #fff; font-weight: 700; font-size: 1.15rem; text-decoration: none; white-space: nowrap; }
.franja-123 a:hover { text-decoration: underline; }

/* ---- Encabezado ---- */
.encabezado { border-bottom: 1px solid var(--borde); background: var(--fondo); }
.encabezado .contenedor { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding-top: 0.6rem; padding-bottom: 0.6rem; flex-wrap: wrap; }

.marca { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--tinta); min-width: 0; }
.marca img { width: 48px; height: 48px; flex: none; }
.marca span { font-weight: 700; line-height: 1.15; font-size: 0.98rem; }
.marca small { display: block; font-weight: 400; color: var(--tinta-suave); font-size: 0.8rem; }

/* Menú del celular: <details>, funciona sin JavaScript */
.menu-movil summary {
  list-style: none; cursor: pointer;
  border: 2px solid var(--tinta); border-radius: var(--radio);
  padding: 0.35rem 0.8rem; font-weight: 700; font-size: 0.95rem;
}
.menu-movil summary::-webkit-details-marker { display: none; }
.menu-movil summary::after { content: " ▾"; }
.menu-movil[open] summary::after { content: " ▴"; }
.menu-movil[open] { flex-basis: 100%; }
.menu-movil[open] summary { display: inline-block; }
.menu-movil ul { list-style: none; margin: 0.6rem 0 0.2rem; padding: 0; border-top: 1px solid var(--borde); }
.menu-movil li a { display: block; padding: 0.65rem 0.2rem; border-bottom: 1px solid var(--borde); text-decoration: none; color: var(--tinta); font-weight: 600; }
.menu-movil li a[aria-current="page"] { color: var(--rojo); }

.menu-escritorio { display: none; }
.menu-escritorio ul { list-style: none; display: flex; flex-wrap: wrap; gap: 0.2rem 1.1rem; margin: 0; padding: 0; }
.menu-escritorio a { text-decoration: none; color: var(--tinta); font-weight: 600; font-size: 0.95rem; padding: 0.3rem 0; border-bottom: 3px solid transparent; }
.menu-escritorio a:hover { color: var(--rojo); }
.menu-escritorio a[aria-current="page"] { color: var(--rojo); border-bottom-color: var(--rojo); }

@media (min-width: 62rem) {
  .menu-movil { display: none; }
  .menu-escritorio { display: block; }
}

/* ---- Portada ---- */
.portada { position: relative; background: #111; color: #fff; }
.portada picture, .portada img { width: 100%; height: 100%; }
.portada img { position: absolute; inset: 0; object-fit: cover; opacity: 0.55; }
.portada .contenedor { position: relative; padding-top: 3.5rem; padding-bottom: 3.5rem; }
.portada h1 { color: #fff; max-width: 22ch; }
.portada p { font-size: 1.15rem; max-width: 40ch; }
.portada .lema { font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.9rem; }

.botones { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.2rem; }
.boton {
  display: inline-block; padding: 0.75rem 1.15rem; border-radius: var(--radio);
  font-weight: 700; text-decoration: none; background: var(--rojo); color: #fff; border: 2px solid var(--rojo);
}
.boton:hover { background: var(--rojo-oscuro); border-color: var(--rojo-oscuro); color: #fff; }
.boton.claro { background: transparent; color: #fff; border-color: #fff; }
.boton.claro:hover { background: #fff; color: var(--tinta); }
.boton.borde { background: transparent; color: var(--rojo); }
.boton.borde:hover { background: var(--rojo); color: #fff; }

/* ---- Encabezado de página interna ---- */
.titulo-pagina { background: var(--rojo); color: #fff; padding: 2rem 0 1.6rem; }
.titulo-pagina h1 { color: #fff; margin-bottom: 0.3rem; }
.titulo-pagina p { margin: 0; font-size: 1.1rem; max-width: 50ch; }

/* ---- Secciones ---- */
.seccion { padding: 2.5rem 0; }
.seccion.alterna { background: var(--fondo-alterno); }
.seccion > .contenedor > p, .angosto { max-width: 46rem; }
/* Un contenedor angosto conserva la alineación de la página; lo angosto es su contenido. */
.contenedor.angosto { max-width: var(--ancho); }
.contenedor.angosto > * { max-width: 46rem; }

.rejilla { display: grid; gap: 1.1rem; grid-template-columns: 1fr; }
@media (min-width: 40rem) { .rejilla.dos, .rejilla.tres { grid-template-columns: 1fr 1fr; } }
@media (min-width: 62rem) { .rejilla.tres { grid-template-columns: 1fr 1fr 1fr; } }

.tarjeta { background: var(--fondo); border: 1px solid var(--borde); border-radius: var(--radio); overflow: hidden; display: flex; flex-direction: column; }
.tarjeta img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.tarjeta img.arriba { object-position: center 15%; }
.tarjeta .cuerpo { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; flex: 1; }
.tarjeta .cuerpo p:last-child { margin-bottom: 0; }
.tarjeta .boton { margin-top: auto; align-self: flex-start; }

.figura { margin: 0 0 1.2rem; }
.figura img { border-radius: var(--radio); }
.figura figcaption { font-size: 0.88rem; color: var(--tinta-suave); margin-top: 0.4rem; }

.dos-columnas { display: grid; gap: 1.5rem; }
@media (min-width: 52rem) { .dos-columnas { grid-template-columns: 3fr 2fr; align-items: start; } }

/* Línea de tiempo */
.linea { list-style: none; margin: 0; padding: 0 0 0 1.3rem; border-left: 3px solid var(--rojo); }
.linea li { position: relative; margin-bottom: 1.4rem; }
.linea li::before { content: ""; position: absolute; left: -1.3rem; top: 0.45rem; width: 13px; height: 13px; margin-left: -8px; border-radius: 50%; background: var(--rojo); border: 2px solid #fff; }
.linea .fecha { display: block; font-weight: 700; color: var(--rojo-oscuro); }
.linea h3 { margin: 0.1rem 0 0.3rem; }

.valores { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.valores li { background: var(--rojo-suave); color: var(--rojo-oscuro); border-radius: 999px; padding: 0.3rem 0.85rem; font-weight: 600; }

.himno { columns: 1; }
@media (min-width: 52rem) { .himno { columns: 2; column-gap: 2.5rem; } }
.himno p { break-inside: avoid; }
.himno strong { display: block; color: var(--rojo-oscuro); }

/* Pasos */
.pasos { counter-reset: paso; list-style: none; padding: 0; margin: 0; }
.pasos li { counter-increment: paso; position: relative; padding: 0 0 1.1rem 3rem; min-height: 2.4rem; }
.pasos li::before {
  content: counter(paso); position: absolute; left: 0; top: 0;
  width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--rojo); color: #fff;
  font-weight: 700; display: grid; place-items: center;
}
.pasos h3 { margin: 0.2rem 0 0.2rem; font-size: 1.08rem; }

/* Preguntas frecuentes */
.preguntas details { border: 1px solid var(--borde); border-radius: var(--radio); margin-bottom: 0.7rem; background: var(--fondo); }
.preguntas summary { cursor: pointer; padding: 0.9rem 1rem; font-weight: 700; }
.preguntas details > div { padding: 0 1rem 0.6rem; }

/* Datos de contacto */
.datos { list-style: none; padding: 0; margin: 0 0 1rem; }
.datos li { padding: 0.65rem 0; border-bottom: 1px solid var(--borde); }
.datos strong { display: block; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--tinta-suave); }
.datos a { font-weight: 700; font-size: 1.1rem; overflow-wrap: anywhere; }

.emergencia {
  background: var(--rojo); color: #fff; border-radius: var(--radio); padding: 1.2rem 1.2rem;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.8rem; margin-bottom: 1.5rem;
}
.emergencia p { margin: 0; }
.emergencia a { color: #fff; font-size: 2rem; font-weight: 800; text-decoration: none; }

.nota { font-size: 0.92rem; color: var(--tinta-suave); }

/* ---- Pie ---- */
.pie { background: #1b1b1f; color: #e8e6e3; padding: 2.2rem 0 1.5rem; font-size: 0.95rem; }
.pie a { color: #fff; }
.pie h2 { font-size: 1.05rem; color: #fff; margin-bottom: 0.6rem; }
.pie ul { list-style: none; padding: 0; margin: 0 0 1rem; }
.pie li { margin-bottom: 0.35rem; }
.pie .rejilla { gap: 1.5rem; }
.pie .legal { border-top: 1px solid #3a3a40; margin-top: 1.2rem; padding-top: 1rem; font-size: 0.85rem; color: #c9c6c2; }
@media (min-width: 40rem) { .pie .rejilla { grid-template-columns: 1fr 1fr; } }
@media (min-width: 62rem) { .pie .rejilla { grid-template-columns: 2fr 1fr 1fr; } }

@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

@media print {
  .franja-123, .menu-movil, .menu-escritorio, .portada img { display: none; }
  .portada, .titulo-pagina { background: none; color: var(--tinta); }
  .portada h1, .titulo-pagina h1 { color: var(--tinta); }
}
