/* ==========================================================================
   FUNERARIA NUEVA LUZ - Sistema de diseño
   Una sola hoja de estilos para todo el sitio. Clases planas (un solo nivel,
   estilo BEM: bloque, bloque__parte, bloque--variante) para evitar guerras de
   especificidad. Los elementos HTML solo reciben estilos base de muy baja
   especificidad. Mobile-first: los @media usan min-width.

   Índice
    1. Tokens          7. Barra 24 h, cabecera y navegación
    2. Fuentes         8. Barras de acción fijas (móvil) / flotantes (escritorio)
    3. Reset           9. Botones y enlaces
    4. Tipografía     10. Ornamentos: baranda, halo, aureola
    5. Utilidades     11. Componentes: encabezado de página, teléfonos, tarjeta,
    6. Secciones          figura, calificación, mapa, tabla, formulario,
                          detalles, diálogo
                      12. Inicio (hero y bloques propios)
                      13. Pie de página
   ========================================================================== */

/* 1. TOKENS --------------------------------------------------------------- */
:root {
  --azul: #0033A0;          /* azul del logo: enlaces, botón primario, H1 */
  --azul-noche: #071A45;    /* franjas oscuras, pie, barra 24 h */
  --azul-bruma: #E8EEF9;    /* fondos azulados suaves (poco) */
  --marfil: #FBF8F2;        /* fondo general */
  --crema: #F2EADB;         /* secciones alternas y tarjetas */
  --oro: #B08D4C;           /* SOLO decoración (líneas, halos, bordes) */
  --oro-claro: #E2C98F;     /* texto/ornamento dorado sobre azul-noche */
  --tinta: #1A2238;         /* texto principal */
  --tinta-suave: #4A5368;   /* texto secundario (6.4:1 sobre crema) */
  --whatsapp: #0F7A41;      /* verde WhatsApp ajustado: blanco sobre él = 5.4:1 */
  --whatsapp-osc: #0B6636;
  --error: #A3201B;         /* texto de error (7.1:1 sobre marfil) */
  --linea: rgba(26, 34, 56, .16);      /* línea fina neutra */
  --linea-oro: rgba(176, 141, 76, .55);/* borde dorado fino */
  --borde-campo: #6B7488;   /* borde de campos de formulario (≥ 3:1) */

  /* Variables contextuales: las secciones oscuras las reasignan */
  --texto: var(--tinta);
  --texto-suave: var(--tinta-suave);
  --titulo: var(--azul);        /* H1 */
  --titulo-h: var(--tinta);     /* H2-H4 */
  --enlace: var(--azul);
  --foco: var(--azul);

  --f-titulo: "Newsreader", Georgia, "Times New Roman", serif;
  --f-texto: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --max: 1160px;            /* ancho máximo del contenedor */
  --medida: 62ch;           /* ancho máximo de texto corrido */
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --espacio-seccion: clamp(3.5rem, 8vw, 7rem);
  --alto-accion: 4.5rem;    /* altura de la barra fija móvil */
  --alto-accion-esc: 3.75rem; /* altura de la barra fija de escritorio (>= 900px) */
  --radio: 5px;
  --radio-foto: 3px;
}

/* 2. FUENTES (locales, con unicode-range para cargar solo lo necesario) ---- */
@font-face {
  font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../fonts/newsreader-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader"; font-style: normal; font-weight: 200 800; font-display: swap;
  src: url("../fonts/newsreader-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap;
  src: url("../fonts/newsreader-latin-ext-wght-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader"; font-style: italic; font-weight: 200 800; font-display: swap;
  src: url("../fonts/newsreader-latin-wght-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/instrument-sans-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Instrument Sans"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("../fonts/instrument-sans-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* 3. RESET MÍNIMO --------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 1rem; scroll-padding-bottom: calc(var(--alto-accion) + env(safe-area-inset-bottom, 0px) + 1rem); }
@media (min-width: 900px) { html { scroll-padding-bottom: calc(var(--alto-accion-esc) + 1.25rem); } }
body, h1, h2, h3, h4, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }
h1, h2, h3, p, li, summary, address { overflow-wrap: break-word; }
/* Solo los titulares se silabean (con lang="es-DO"): evita cortes feos en palabras largas con el texto ampliado */
h1, h2, h3 { hyphens: auto; }
img, svg, iframe { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

/* 4. TIPOGRAFÍA BASE ------------------------------------------------------ */
body {
  background: var(--marfil);
  color: var(--texto);
  font-family: var(--f-texto);
  font-size: 1.0625rem;           /* 17px móvil */
  line-height: 1.6;
  /* La barra fija inferior no debe tapar contenido ni el pie */
  padding-bottom: calc(var(--alto-accion) + env(safe-area-inset-bottom, 0px));
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  font-family: var(--f-titulo);
  font-weight: 500;
  line-height: 1.15;
  color: var(--titulo-h);
  text-wrap: balance;
}
h1 { font-size: clamp(1.9rem, 1.2rem + 3.4vw, 3.4rem); color: var(--titulo); line-height: 1.1; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.8vw, 2.4rem); }
h3 { font-size: 1.35rem; line-height: 1.25; }
h4 { font-size: 1.1rem; font-family: var(--f-texto); font-weight: 600; }
p { max-width: var(--medida); text-wrap: pretty; }
a { color: var(--enlace); text-underline-offset: .2em; text-decoration-thickness: 1px; }
@media (hover: hover) and (pointer: fine) { a:hover { text-decoration-thickness: 2px; } }
strong { font-weight: 600; }
:focus-visible { outline: 2px solid var(--foco); outline-offset: 3px; }
::selection { background: var(--oro-claro); color: var(--azul-noche); }
.tabular { font-variant-numeric: tabular-nums; white-space: nowrap; }
.texto-suave { color: var(--texto-suave); }
.texto-grande { font-size: 1.15rem; }
.eslogan { font-family: var(--f-titulo); font-style: italic; font-weight: 400; font-size: 1.35rem; line-height: 1.3; }

@media (min-width: 720px) { body { font-size: 1.125rem; } }

/* 5. UTILIDADES ----------------------------------------------------------- */
/* Contenedor centrado con gutter lateral */
.contenedor { width: 100%; max-width: calc(var(--max) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.contenedor--estrecho > * { max-width: 46rem; }
/* Oculto a la vista pero legible por lectores de pantalla */
.solo-lector { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
.solo-escritorio { display: none; }
@media (min-width: 900px) { .solo-escritorio { display: inline; } .solo-movil { display: none; } }
/* Pila vertical: separa hijos directos con el espacio --sep (flow/stack) */
.flujo > * + * { margin-top: var(--sep, 1.25rem); }
.flujo--amplio { --sep: 2rem; }
.flujo--corto { --sep: .75rem; }
.ancho-texto { max-width: 40rem; }
.ancho-foto { max-width: 35rem; }          /* fotos de 1024 px: no estirar */
.titulo-formulario { margin-bottom: 1.5rem; }
.fila--sup { margin-top: 1.5rem; }
/* Fila de botones o enlaces que se ajusta al ancho */
.fila { display: flex; flex-wrap: wrap; gap: .75rem 1rem; align-items: center; }
/* Dos columnas desde tablet; --izq/--der ajustan la proporción */
.dividido { display: grid; gap: 2rem 3.5rem; }
.dividido--5-7 { --izq: 5fr; --der: 7fr; }
@media (min-width: 800px) { .dividido { grid-template-columns: var(--izq, 1fr) var(--der, 1fr); align-items: start; } }
/* Enlace "Saltar al contenido": visible solo al enfocarlo */
.saltar { position: absolute; left: 1rem; top: -20rem; z-index: 100; background: var(--azul-noche); color: var(--marfil); padding: .75rem 1.1rem; border-radius: var(--radio); font-weight: 600; text-decoration: none; }
.saltar:focus { top: 1rem; outline: 2px solid var(--oro-claro); }

/* 6. SECCIONES (alternar fondos: marfil, crema, noche) -------------------- */
.seccion { padding-block: var(--espacio-seccion); background: var(--marfil); }
.seccion--crema { background: var(--crema); }
.seccion--bruma { background: var(--azul-bruma); }
/* Franja oscura azul-noche: reasigna las variables contextuales */
.seccion--noche, .noche {
  background: var(--azul-noche);
  --texto: var(--marfil);
  --texto-suave: #C9D3EA;     /* 11.3:1 sobre azul-noche */
  --titulo: var(--marfil);
  --titulo-h: var(--marfil);
  --enlace: var(--oro-claro);
  --foco: var(--oro-claro);
  color: var(--texto);
}

/* 7. BARRA 24 HORAS, CABECERA Y NAVEGACIÓN -------------------------------- */
.barra-24 { background: var(--azul-noche); color: var(--marfil); font-size: .9375rem; line-height: 1.3; }
.barra-24__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .25rem 1.5rem; min-height: 2.5rem; padding-block: .45rem; }
.barra-24__texto { font-weight: 500; }
.barra-24__tels { display: none; gap: 1.5rem; }
.barra-24__tel { color: var(--marfil); font-variant-numeric: tabular-nums; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; min-height: 1.75rem; }
@media (hover: hover) and (pointer: fine) { .barra-24__tel:hover { text-decoration: underline; } }
.barra-24 :focus-visible { outline-color: var(--oro-claro); }
@media (min-width: 900px) {
  .barra-24__tels { display: flex; }
  .barra-24__in { padding-block: 0; min-height: 2.75rem; }
  .barra-24__tel { min-height: 2.75rem; }
}

.cabecera { background: var(--marfil); border-bottom: 1px solid var(--linea); }
.cabecera__in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1.5rem; padding-block: .5rem; }
.cabecera__logo { display: block; line-height: 0; border-radius: 2px; }
.cabecera__logo img { width: auto; height: 3.25rem; }
.menu-boton { display: none; align-items: center; gap: .6rem; min-height: 2.75rem; padding: .3rem .8rem; background: transparent; color: var(--azul); border: 1.5px solid var(--azul); border-radius: var(--radio); font-weight: 600; transition: background-color .15s, color .15s; }
@media (hover: hover) and (pointer: fine) { .menu-boton:hover { background: var(--azul-bruma); } }
.menu-boton__icono, .menu-boton__icono::before { display: block; width: 1.1rem; height: 2px; background: currentColor; border-radius: 1px; }
.menu-boton__icono { position: relative; height: 2px; }
.menu-boton__icono::before { content: ""; position: absolute; left: 0; top: -.38rem; box-shadow: 0 .76rem 0 currentColor; }
.menu-boton[aria-expanded="true"] { background: var(--azul); color: #fff; }
.menu-boton[aria-expanded="true"] .menu-boton__icono { background: transparent; }
.menu-boton[aria-expanded="true"] .menu-boton__icono::before { top: 0; box-shadow: none; transform: rotate(45deg); }
.menu-boton[aria-expanded="true"] .menu-boton__icono::after { content: ""; position: absolute; left: 0; top: 0; width: 1.1rem; height: 2px; background: currentColor; transform: rotate(-45deg); }
/* Con JS el menú móvil se pliega; sin JS la navegación queda visible */
.js .menu-boton { display: inline-flex; }
.nav { flex-basis: 100%; }
.js .nav { display: none; }
.js .nav.is-abierto { display: block; }
.nav__lista { border-top: 1px solid var(--linea); margin-top: .35rem; }
.nav__enlace { display: flex; align-items: center; min-height: 3rem; padding: .5rem .25rem; color: var(--tinta); font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--linea); transition: color .15s; }
@media (hover: hover) and (pointer: fine) { .nav__enlace:hover { color: var(--azul); } }
.nav__enlace[aria-current="page"] { color: var(--azul); font-weight: 600; box-shadow: inset 3px 0 0 var(--oro); padding-left: .85rem; }
@media (min-width: 900px) {
  .cabecera__in { flex-wrap: nowrap; }
  .cabecera__logo img { height: 3.9rem; }
  .js .menu-boton { display: none; }
  .js .nav, .nav { display: block; flex-basis: auto; }
  .nav__lista { display: flex; gap: .15rem; border: 0; margin: 0; }
  .nav__enlace { min-height: 2.75rem; padding: .5rem .8rem; border: 0; border-radius: var(--radio); font-size: 1rem; white-space: nowrap; }
  .nav__enlace[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--oro); border-radius: var(--radio) var(--radio) 0 0; padding-left: .8rem; }
}
/* 900-1023 px: el logo y la navegación se estrechan un poco para que quepan en una línea */
@media (min-width: 900px) and (max-width: 1023px) {
  .cabecera__logo img { height: 3.4rem; }
  .nav__lista { gap: 0; }
  .nav__enlace { padding-inline: .55rem; font-size: .95rem; }
  .nav__enlace[aria-current="page"] { padding-left: .55rem; }
}

/* 8. BARRA DE ACCIÓN FIJA ---------------------------------------------------
   Móvil: barra inferior a todo el ancho, mitad Llamar / mitad WhatsApp.
   Escritorio (>= 900px): barra fina a todo el ancho con el texto a la izquierda
   y los dos botones compactos a la derecha, dentro del contenedor. El body
   reserva su altura (padding-bottom) y html tiene scroll-padding-bottom, de modo
   que nada (ni el final del pie ni el foco por teclado) queda tapado. */
.accion-fija { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; padding: .5rem .75rem calc(.5rem + env(safe-area-inset-bottom, 0px)); background: var(--marfil); border-top: 1px solid var(--linea-oro); }
.accion-fija__in { max-width: none; padding: 0; }
.accion-fija__texto { display: none; }
.accion-fija__botones { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: .5rem; }
/* Con el texto del sistema ampliado, la barra no crece más que la pantalla: los dos botones caben siempre */
.accion-fija .btn { min-height: min(3.25rem, 16vw); padding-inline: .5rem; font-size: min(1.0625rem, 5.6vw); }
@media (min-width: 900px) {
  body { padding-bottom: var(--alto-accion-esc); }
  .accion-fija { padding: 0; height: var(--alto-accion-esc); display: flex; align-items: center; }
  .accion-fija__in { max-width: calc(var(--max) + 2 * var(--gutter)); padding-inline: var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
  .accion-fija__texto { display: block; font-weight: 500; font-size: 1rem; color: var(--tinta); }
  .accion-fija__botones { display: flex; gap: .75rem; }
  .accion-fija .btn { min-height: 2.75rem; padding: .4rem 1.25rem; font-size: 1rem; }
}
/* Poco alto (zoom 400 %, móvil horizontal, ventanas bajas): una sola fila baja, sin texto auxiliar */
@media (max-height: 480px) {
  :root { --alto-accion: 3.5rem; --alto-accion-esc: 3.25rem; }
  .accion-fija { padding-top: .25rem; padding-bottom: calc(.25rem + env(safe-area-inset-bottom, 0px)); }
  .accion-fija__texto { display: none; }
  .accion-fija__in { justify-content: flex-end; }
  .accion-fija .btn { min-height: 2.75rem; }
}
@media (max-height: 320px) {
  :root { --alto-accion: 2.9rem; --alto-accion-esc: 2.9rem; }
  .accion-fija { padding-top: .15rem; padding-bottom: calc(.15rem + env(safe-area-inset-bottom, 0px)); }
  .accion-fija .btn { min-height: 2.25rem; padding-block: .15rem; }
}
@media (max-height: 220px) {
  :root { --alto-accion: 2.4rem; --alto-accion-esc: 2.4rem; }
  .accion-fija { padding-top: .1rem; padding-bottom: calc(.1rem + env(safe-area-inset-bottom, 0px)); }
  .accion-fija .btn { min-height: 2rem; padding-block: .1rem; }
}

/* 9. BOTONES Y ENLACES ---------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 3rem; max-width: 100%; padding: .7rem 1.4rem; overflow-wrap: anywhere; border: 1.5px solid transparent; border-radius: var(--radio); font-family: var(--f-texto); font-size: 1rem; font-weight: 600; line-height: 1.25; text-align: center; text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s, border-color .15s; }
.btn--primario { background: var(--azul); color: #fff; }
@media (hover: hover) and (pointer: fine) { .btn--primario:hover { background: var(--azul-noche); } }
.btn--wa { background: var(--whatsapp); color: #fff; }
@media (hover: hover) and (pointer: fine) { .btn--wa:hover { background: var(--whatsapp-osc); } }
.btn--contorno { background: transparent; color: var(--azul); border-color: var(--azul); }
@media (hover: hover) and (pointer: fine) { .btn--contorno:hover { background: var(--azul-bruma); } }
.btn--claro { background: var(--marfil); color: var(--azul-noche); }   /* sobre franja noche */
@media (hover: hover) and (pointer: fine) { .btn--claro:hover { background: var(--crema); } }
.btn--bloque { display: flex; width: 100%; }
.btn[aria-disabled="true"] { opacity: .7; cursor: default; }
:is(.noche, .seccion--noche) .btn--contorno { color: var(--marfil); border-color: var(--oro-claro); }
@media (hover: hover) and (pointer: fine) { :is(.noche, .seccion--noche) .btn--contorno:hover { background: rgba(255,255,255,.08); } }
:is(.noche, .seccion--noche) .btn--wa { border-color: rgba(255,255,255,.35); }
/* Enlace con subrayado dorado (acciones secundarias dentro de texto o listas) */
.enlace { color: var(--enlace); font-weight: 600; text-decoration: underline; text-decoration-color: var(--oro); text-decoration-thickness: 2px; text-underline-offset: .28em; display: inline-flex; align-items: center; min-height: 2.75rem; transition: color .15s, text-decoration-color .15s; }
@media (hover: hover) and (pointer: fine) { .enlace:hover { text-decoration-color: currentColor; } }

/* 10. ORNAMENTOS ----------------------------------------------------------- */
/* Baranda dorada: línea de 1 px con un pequeño herraje central (rombo y dos
   perlas, dibujado con máscara SVG inline). Color = currentColor. */
.baranda { --corte: calc(50% - 1.1rem); position: relative; width: min(100%, 14rem); height: .7rem; color: var(--oro);
  background: linear-gradient(currentColor, currentColor) left center / var(--corte) 1px no-repeat, linear-gradient(currentColor, currentColor) right center / var(--corte) 1px no-repeat; }
.baranda::after { content: ""; position: absolute; left: 50%; top: 0; width: 1.5rem; height: .7rem; transform: translateX(-50%); background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 10'%3E%3Cpath d='M12 0l6 5-6 5-6-5z'/%3E%3Ccircle cx='2.5' cy='5' r='1.3'/%3E%3Ccircle cx='21.5' cy='5' r='1.3'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 10'%3E%3Cpath d='M12 0l6 5-6 5-6-5z'/%3E%3Ccircle cx='2.5' cy='5' r='1.3'/%3E%3Ccircle cx='21.5' cy='5' r='1.3'/%3E%3C/svg%3E") center / contain no-repeat; }
.baranda--ancha { width: 100%; }
:is(.noche, .seccion--noche) .baranda, .baranda--clara { color: var(--oro-claro); }
/* Lista con viñeta de halo: elipse dorada (el halo del ángel del logo).
   Marcado: <ul class="lista-halo"><li>…</li></ul> */
.lista-halo > li { position: relative; padding-left: 1.7rem; }
.lista-halo > li + li { margin-top: .85rem; }
.lista-halo > li::before { content: ""; position: absolute; left: 0; top: .62em; width: 1.05rem; height: .5rem; border: 1.5px solid var(--oro); border-radius: 50%; }
:is(.noche, .seccion--noche) .lista-halo > li::before { border-color: var(--oro-claro); }
/* Aureola decorativa grande (anillo dorado, aria-hidden) */
.aureola { display: none; width: 15rem; height: 6.5rem; border: 1px solid var(--oro); border-radius: 50%; opacity: .7; }
.angel-deco { display: none; width: 9rem; height: 9rem; }
@media (min-width: 900px) { .aureola, .angel-deco { display: block; } }

/* 11. COMPONENTES -------------------------------------------------------- */
/* Encabezado de página interior: H1 + introducción + baranda */
.encabezado-pagina { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2rem, 4vw, 3.5rem); background: var(--marfil); }
.encabezado-pagina__intro { font-size: 1.15rem; color: var(--texto-suave); max-width: 56ch; }

/* Bloque de teléfonos de emergencia: dos celulares grandes como enlaces tel: */
.telefonos__titulo { font-family: var(--f-texto); font-size: .9375rem; font-weight: 600; color: var(--texto-suave); margin-bottom: .6rem; }
.telefonos__lista { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(10rem, 100%), 1fr)); gap: .6rem; }
.telefono { white-space: nowrap; display: flex; align-items: center; min-height: 3.25rem; padding: .5rem .5rem; justify-content: center; border: 1.5px solid var(--azul); border-radius: var(--radio); color: var(--azul); font-family: var(--f-texto); font-size: min(clamp(1.25rem, .6rem + 2.4vw, 2rem), 9vw); font-weight: 600; letter-spacing: .01em; font-variant-numeric: tabular-nums; line-height: 1.2; text-decoration: none; transition: background-color .15s, color .15s; }
@media (hover: hover) and (pointer: fine) { .telefono:hover { background: var(--azul); color: #fff; } }

/* Tarjeta sobria: se separa por color y línea fina, sin sombra */
.tarjeta { background: var(--crema); border: 1px solid var(--linea-oro); border-radius: var(--radio); padding: clamp(1.25rem, 3vw, 2rem); }
.tarjeta--marfil { background: var(--marfil); }
.tarjeta--noche { background: var(--azul-noche); color: var(--marfil); border-color: var(--oro); }

/* Figura con pie de foto. Las fotos de 1024 px de origen: ≤ 560 px de ancho */
.figura__img { width: 100%; height: auto; border-radius: var(--radio-foto); background: var(--crema); }
.figura__pie { margin-top: .6rem; font-size: .9375rem; color: var(--texto-suave); }
.figura__enlace { display: block; border-radius: var(--radio-foto); line-height: 0; cursor: zoom-in; }

/* Calificación de Google: estrellas SVG (aria-hidden) + texto real */
.calificacion { display: flex; flex-wrap: wrap; align-items: center; gap: .35rem .75rem; }
.calificacion__estrellas { display: flex; gap: .15rem; color: var(--oro); }
.estrella { width: 1.3rem; height: 1.3rem; fill: currentColor; }
.calificacion__texto { font-weight: 600; }

/* Mapa incrustado: proporción fija y borde sobrio */
.mapa { width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--linea-oro); border-radius: var(--radio); background: var(--crema); overflow: hidden; }
.mapa iframe { width: 100%; height: 100%; border: 0; }
/* El foco de teclado dentro del iframe no llega a la página: sitio.js marca el contenedor */
.mapa--foco { outline: 2px solid var(--azul); outline-offset: 3px; }
@media (min-width: 800px) { .mapa { aspect-ratio: 21 / 8; } }
.mapa__enlace { margin-top: .5rem; }   /* respaldo siempre visible bajo el mapa */

/* Tabla con contenedor desplazable (role="region", tabindex="0", aria-label) */
.tabla-contenedor { overflow-x: auto; border: 1px solid var(--linea-oro); border-radius: var(--radio); background: var(--marfil); -webkit-overflow-scrolling: touch; }
.tabla { width: 100%; min-width: 46rem; border-collapse: collapse; font-size: .9375rem; text-align: left; }
.tabla caption { padding: .9rem 1rem; text-align: left; font-family: var(--f-titulo); font-size: 1.15rem; font-weight: 500; }
.tabla th, .tabla td { padding: .7rem 1rem; vertical-align: top; border-top: 1px solid var(--linea); }
.tabla thead th { background: var(--crema); font-weight: 600; border-top: 0; }
.tabla tbody th { font-weight: 600; background: var(--marfil); }
.tabla__nota { margin-top: .75rem; font-size: .9375rem; color: var(--texto-suave); }

/* Formularios. Marcado: <div class="campo" data-campo> con etiqueta, ayuda,
   control y error (ver cabecera de js/sitio.js) */
.campo { display: flex; flex-direction: column; gap: .35rem; }
.campo + .campo { margin-top: 1.25rem; }
.campo__etiqueta { font-weight: 600; }
.campo__ayuda { font-size: .9375rem; color: var(--texto-suave); }
.campo__control { width: 100%; min-height: 3rem; padding: .65rem .85rem; background: #fff; color: var(--tinta); border: 1.5px solid var(--borde-campo); border-radius: 4px; font-size: 1rem; line-height: 1.4; }
textarea.campo__control { min-height: 8rem; resize: vertical; }
@media (hover: hover) and (pointer: fine) { .campo__control:hover { border-color: var(--tinta); } }
.campo__control:focus-visible { outline: 2px solid var(--azul); outline-offset: 2px; border-color: var(--azul); }
.campo__error { display: flex; gap: .4rem; color: var(--error); font-size: .9375rem; font-weight: 600; }
.campo--error .campo__control { border-color: var(--error); border-width: 2px; }
.resumen-errores { padding: 1rem 1.25rem; margin-bottom: 1.5rem; border: 2px solid var(--error); border-radius: var(--radio); background: #fff; color: var(--error); }
.resumen-errores__titulo { font-weight: 600; margin-bottom: .4rem; }
.resumen-errores a { color: var(--error); }

/* Preguntas frecuentes: details/summary. Marcado: <details class="detalles"><summary class="detalles__resumen">… */
.detalles { border-bottom: 1px solid var(--linea-oro); }
.detalles:first-child { border-top: 1px solid var(--linea-oro); }
.detalles__resumen { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.5rem; padding: .75rem .25rem; font-family: var(--f-titulo); font-size: 1.2rem; font-weight: 500; line-height: 1.3; cursor: pointer; list-style: none; }
.detalles__resumen::-webkit-details-marker { display: none; }
.detalles__resumen::after { content: ""; flex: none; width: .9rem; height: .9rem; background: linear-gradient(var(--azul), var(--azul)) center / 100% 2px no-repeat, linear-gradient(var(--azul), var(--azul)) center / 2px 100% no-repeat; }
.detalles[open] > .detalles__resumen::after { background: linear-gradient(var(--azul), var(--azul)) center / 100% 2px no-repeat; }
@media (hover: hover) and (pointer: fine) { .detalles__resumen:hover { color: var(--azul); } }
@media (forced-colors: active) {
  .detalles__resumen::after { forced-color-adjust: none; background: linear-gradient(CanvasText, CanvasText) center / 100% 2px no-repeat, linear-gradient(CanvasText, CanvasText) center / 2px 100% no-repeat; }
  .detalles[open] > .detalles__resumen::after { background: linear-gradient(CanvasText, CanvasText) center / 100% 2px no-repeat; }
}
.detalles__cuerpo { padding: 0 .25rem 1.25rem; color: var(--texto-suave); }

/* Diálogo genérico y visor de fotos (lightbox) */
.dialogo { width: min(92vw, 34rem); padding: 1.75rem; background: var(--marfil); color: var(--tinta); border: 1px solid var(--linea-oro); border-radius: var(--radio); }
.dialogo::backdrop, .visor::backdrop { background: rgba(7, 26, 69, .88); }
.visor { max-width: 96vw; max-height: 96vh; padding: .6rem; background: var(--marfil); color: var(--tinta); border: 0; border-radius: var(--radio); overflow: auto; }
.visor__barra { display: flex; justify-content: flex-end; margin-bottom: .5rem; }
.visor__img { width: auto; max-width: 100%; max-height: 70vh; margin-inline: auto; border-radius: var(--radio-foto); }
.visor__pie { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 1rem; margin-top: .6rem; }
.visor__texto { flex: 1 1 14rem; font-size: .9375rem; color: var(--texto-suave); }
.visor__cerrar { min-height: 2.75rem; }
.visor__nav { display: flex; gap: .5rem; margin-left: auto; }
.visor__nav .btn { min-height: 2.75rem; padding-inline: 1rem; }
/* Bloquea el desplazamiento de la página mientras el visor está abierto */
html:has(dialog.visor[open]) { overflow: hidden; background: #253559; }
/* Móvil: el visor ocupa toda la pantalla, la foto a todo el ancho y los botones repartidos */
@media (max-width: 599px) {
  .visor[open] { display: flex; flex-direction: column; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; padding: 4rem 0 calc(1rem + env(safe-area-inset-bottom, 0px)); border-radius: 0; overflow: hidden; justify-content: center; }
  .visor__barra { position: absolute; top: .5rem; right: .5rem; margin: 0; }
  .visor__img { flex: 0 1 auto; width: 100%; max-width: 100%; min-height: 0; max-height: 80vh; object-fit: contain; border-radius: 0; margin-block: 0; }
  .visor__pie { flex: none; padding-inline: .75rem; margin-top: .85rem; }
  .visor__texto { flex-basis: 100%; }
  .visor__nav { width: 100%; margin-left: 0; }
  .visor__nav .btn { flex: 1; }
}

/* Alto contraste: el icono de hamburguesa está hecho con fondos y el modo forzado los quita */
@media (forced-colors: active) {
  .menu-boton__icono, .menu-boton__icono::before, .menu-boton[aria-expanded="true"] .menu-boton__icono::after { forced-color-adjust: none; background: ButtonText; }
  .menu-boton[aria-expanded="true"] .menu-boton__icono { background: transparent; }
}

/* 12. INICIO --------------------------------------------------------------- */
/* Hero: móvil, foto 4:3 arriba y el texto debajo. Escritorio: foto grande y panel
   marfil que monta sobre su borde inferior izquierdo (el texto nunca va sobre la foto). */
.hero { background: var(--marfil); }
.hero__foto { background: var(--crema); overflow: hidden; }
.hero__foto img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; object-position: center 40%; }
.hero__panel { padding-block: 1.25rem 2.5rem; }
.hero__panel > * + * { margin-top: .85rem; }
.hero__panel .telefonos { margin-top: 1.1rem; }
.hero__panel .baranda { margin-top: 2rem; }
.hero__panel > .hero__eslogan { margin-top: 1rem; }
/* El único momento animado del sitio: la capilla "se enciende" y el titular aparece */
@keyframes encender { from { filter: brightness(.6) saturate(.9); } to { filter: brightness(1) saturate(1); } }
@keyframes aparecer { from { opacity: .35; } to { opacity: 1; } }
.hero__foto img { animation: encender 1.8s cubic-bezier(.3, .1, .2, 1) .1s both; }
.hero__titulo { animation: aparecer .6s ease both; font-size: clamp(1.7rem, 1rem + 3.2vw, 2.6rem); }
@media (prefers-reduced-motion: reduce) { .hero__foto img, .hero__titulo { animation: none; } }
@media (min-width: 720px) {
  .hero__foto img { aspect-ratio: 2000 / 928; max-height: 33rem; object-position: center 30%; }
}
/* Móvil de poca altura (iPhone SE, Android pequeño, horizontal): la foto se acorta y los celulares
   suben justo bajo el titular para que el primero se vea entero sobre la barra fija */
@media (max-width: 899px) and (max-height: 700px) {
  .hero__foto img { aspect-ratio: 2 / 1; max-height: 30vh; }
  .hero__panel { display: flex; flex-direction: column; padding-top: 1rem; }
  .hero__panel > * { order: 0; }
  .hero__panel > .hero__titulo { order: -2; }
  .hero__panel > .telefonos { order: -1; margin-top: .85rem; }
}
/* Móvil en horizontal (poca altura): foto a la izquierda, titular y celulares a la derecha, sobre la barra fija */
@media (max-width: 899px) and (max-height: 480px) {
  .hero { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); align-items: start; }
  .hero__foto img { aspect-ratio: 16 / 10; max-height: none; }
  .hero__panel { padding-top: .75rem; }
  .hero__titulo { font-size: clamp(1.4rem, 3.2vw, 2rem); }
  .hero .telefono { font-size: clamp(1rem, 3vw, 1.5rem); }
}
@media (min-width: 900px) {
  .hero { padding-bottom: 1rem; }
  /* La foto no crece más que el alto libre de la ventana: los dos celulares quedan enteros sobre la barra fija */
  .hero__foto img { max-height: clamp(16rem, calc(100vh - 21rem), 33rem); }
  .hero__caja { margin-top: -7.5rem; position: relative; }
  .hero__panel { display: flex; flex-direction: column; max-width: 50rem; margin-left: 0; padding: 3rem 3.5rem 3.25rem var(--gutter); background: var(--marfil); border-radius: var(--radio) var(--radio) 0 0; }
  /* Los celulares suben justo bajo el titular; el DOM conserva su orden */
  .hero__panel > .hero__titulo { order: -2; }
  .hero__panel > .telefonos { order: -1; margin-top: 1rem; }
  .hero__panel > .baranda { align-self: flex-start; width: min(100%, 14rem); }
}
/* Con el contenedor más estrecho que la ventana, el panel sale a su borde izquierdo */
@media (min-width: 1360px) { .hero__panel { margin-left: calc(-1 * var(--gutter)); } }

/* "Si acaba de fallecer un familiar": franja noche, texto y tres botones */
.urgente { --izq: 7fr; --der: 5fr; align-items: center; }
.urgente__acciones { display: grid; gap: .75rem; }

/* Planes: franja crema con titular grande y el ángel del logo como marca */
.planes-franja { display: grid; gap: 1.5rem 4rem; align-items: center; }
@media (min-width: 900px) { .planes-franja { grid-template-columns: minmax(0, 1fr) auto; } }

/* Instalaciones: dos fotos, la segunda algo más baja en escritorio */
.fotos-dos__accion { margin-top: 2rem; }
.fotos-dos { display: grid; gap: 1.75rem; margin-top: clamp(2rem, 4vw, 3rem); }
@media (min-width: 720px) { .fotos-dos { grid-template-columns: 1fr 1fr; gap: 2.5rem; } }
.fotos-dos .figura__img { aspect-ratio: 16 / 9; object-fit: cover; }

/* Visítenos: foto de fachada junto al texto y mapa debajo */
.visita { --izq: 1fr; --der: 1fr; align-items: center; }
.visita__foto { max-width: 35rem; }
.visita__datos > * + * { margin-top: 1.25rem; }
.visita__mapa { margin-top: clamp(2rem, 4vw, 3rem); }
.dato__titulo { font-family: var(--f-texto); font-size: .9375rem; font-weight: 600; color: var(--texto-suave); margin-bottom: .15rem; }

/* La última franja noche de la página se funde con el pie: menos aire inferior */
main > .seccion--noche:last-child { padding-bottom: 3rem; }

/* 13. PIE DE PÁGINA ------------------------------------------------------- */
.pie { padding-block: clamp(2.5rem, 5vw, 4rem) 2rem; }
.pie__rejilla { display: grid; gap: 2rem 2.5rem; margin-top: 2rem; }
@media (min-width: 640px) { .pie__rejilla { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .pie__rejilla { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.pie__logo { width: auto; height: 3.6rem; }
.pie__titulo { font-family: var(--f-texto); font-size: .9375rem; font-weight: 600; color: var(--oro-claro); margin-bottom: .4rem; }
.pie__lista > li + li { margin-top: .1rem; }
.pie__rejilla > *, .dividido > * { min-width: 0; }
.pie__enlace { overflow-wrap: anywhere; display: inline-flex; align-items: center; min-height: 2.75rem; min-width: 2.75rem; color: var(--marfil); text-decoration-color: rgba(251, 248, 242, .45); }
@media (hover: hover) and (pointer: fine) { .pie__enlace:hover { text-decoration-color: currentColor; } }
.pie__nota { display: block; margin-top: -.45rem; font-size: .9375rem; color: var(--texto-suave); }
.pie__tel { white-space: nowrap; font-variant-numeric: tabular-nums; font-weight: 600; }
@media (min-width: 960px) { .pie__rejilla > * { min-width: auto; } .pie__enlace { overflow-wrap: normal; } }
.pie__legal { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(226, 201, 143, .3); font-size: .9375rem; color: var(--texto-suave); max-width: none; }

/* Sin JavaScript: el formulario de contacto no funciona, se oculta (queda el <noscript>) */
html:not(.js) [data-form-whatsapp], html:not(.js) .formulario__aviso { display: none; }
.sin-js { padding: 1.25rem; background: var(--crema); border-left: 3px solid var(--oro); border-radius: 0 var(--radio) var(--radio) 0; }
.ir { display: flex; flex-wrap: wrap; gap: .75rem; }
.ir__btn { display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 3rem; flex: 1 1 13rem; }
.ir__ico { width: 1.35rem; height: 1.35rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
