/* ==========================================================================
   Schoenstatt México — hoja de estilos única

   Los colores y tipografías salen del sitio anterior, no son una
   reinterpretación:
     #161735  fondo de «Horarios de Misa» y del pie
     #010066  fondo del botón principal
     #020165  texto sobre los botones dorados
     #FFCC00  botones «Ubicación»
     #ffa200  enlaces del menú (color de acento de BeTheme)
     #ffcd00  menú en hover / activo
     #FEA700  botón «Conocer más» (con hover #FFB428)
     #202020  encabezados
   Tipografías: Montserrat para todo; Sora solo en el botón ámbar.
   ========================================================================== */

:root {
  --navy-oscuro: #161735;
  --navy: #010066;
  --navy-texto: #020165;
  --oro: #ffcc00;
  --oro-menu: #ffa200;
  --oro-activo: #ffcd00;
  --ambar: #fea700;
  --ambar-hover: #ffb428;
  --ambar-texto: #271e2f;
  --titulo-color: #202020;
  --texto: #000000;
  --tenue: #6f6f6f;
  --linea: #e3e3e3;
  --blanco: #ffffff;

  --fuente: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --fuente-boton: "Sora", var(--fuente);

  --ancho: 1120px;
  --alto-encabezado: 96px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--alto-encabezado) + 24px); }

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

body {
  margin: 0;
  background: var(--blanco);
  color: var(--texto);
  font-family: var(--fuente);
  font-size: 18px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--fuente);
  color: var(--titulo-color);
  line-height: 1.25;
  margin: 0 0 .55em;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.7rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.1rem); }
h3 { font-size: clamp(1.3rem, 1.1rem + .8vw, 1.65rem); }
h4 { font-size: 1.15rem; }
h5 { font-size: 1.05rem; font-weight: 500; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--oro-menu); text-underline-offset: .18em; }
a:hover { color: var(--oro-activo); }

img { max-width: 100%; height: auto; display: block; }
strong, b { font-weight: 700; }

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--oro-menu);
  outline-offset: 3px;
  border-radius: 3px;
}

/* --- utilidades ---------------------------------------------------------- */

.contenedor {
  width: 100%;
  max-width: var(--ancho);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.estrecho { max-width: 820px; }

.visualmente-oculto {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.saltar {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--navy); color: #fff; padding: .7rem 1.1rem;
}

.saltar:focus { left: 0; color: #fff; }

/* --- encabezado: fondo blanco, menú dorado ------------------------------- */

.encabezado {
  position: sticky; top: 0; z-index: 50;
  background: var(--blanco);
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}

.encabezado__fila {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: var(--alto-encabezado);
}

.encabezado__logo { display: block; flex: 0 0 auto; }
.encabezado__logo img { width: clamp(160px, 20vw, 215px); height: auto; }

.menu ul { display: flex; gap: clamp(1rem, 2.4vw, 2.4rem); list-style: none; margin: 0; padding: 0; }

.menu a {
  display: block; padding: .4rem 0;
  color: var(--oro-menu);
  font-family: var(--fuente); font-size: 15px; font-weight: 500;
  text-decoration: none;
  transition: color .18s;
}

.menu a:hover,
.menu a[aria-current="page"] { color: var(--oro-activo); }

.menu-boton {
  display: none; width: 44px; height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer; position: relative;
}

.menu-boton__barra,
.menu-boton__barra::before,
.menu-boton__barra::after {
  position: absolute; left: 11px; width: 22px; height: 2px;
  background: var(--oro-menu); border-radius: 2px; content: ""; transition: transform .2s, opacity .2s;
}

.menu-boton__barra { top: 21px; }
.menu-boton__barra::before { top: -7px; left: 0; }
.menu-boton__barra::after { top: 7px; left: 0; }
.menu-boton[aria-expanded="true"] .menu-boton__barra { background: transparent; }
.menu-boton[aria-expanded="true"] .menu-boton__barra::before { transform: translateY(7px) rotate(45deg); }
.menu-boton[aria-expanded="true"] .menu-boton__barra::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 900px) {
  .menu-boton { display: block; }

  .menu {
    position: absolute; inset: var(--alto-encabezado) 0 auto;
    background: var(--blanco); display: none;
    border-bottom: 1px solid var(--linea);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .08);
  }

  .menu--abierto { display: block; }
  .menu ul { flex-direction: column; gap: 0; padding: .5rem clamp(1rem, 4vw, 2rem) 1.2rem; }
  .menu a { padding: .85rem 0; border-bottom: 1px solid var(--linea); font-size: 1rem; }
}

/* --- botones ------------------------------------------------------------- */

.boton {
  display: inline-block;
  background: var(--navy); color: #fff;
  font-family: var(--fuente); font-size: 16px; font-weight: 500;
  padding: .8rem 1.6rem; border-radius: 4px;
  text-decoration: none; border: 0;
  transition: filter .18s;
}

.boton:hover { filter: brightness(1.25); color: #fff; }

/* Botón «Ubicación»: píldora dorada con texto azul marino. */
.boton--oro {
  background: var(--oro); color: var(--navy-texto);
  border-radius: 20px; padding: .6rem 1.3rem;
  font-size: 15px; font-weight: 500;
  display: inline-flex; align-items: center; gap: .5rem;
}

.boton--oro:hover { background: var(--oro-activo); color: var(--navy-texto); filter: none; }
.boton--oro svg { width: 15px; height: 15px; fill: currentColor; flex: 0 0 auto; }

/* Botón «Conocer más» del Colegio. */
.boton--ambar {
  background: var(--ambar); color: var(--ambar-texto);
  font-family: var(--fuente-boton); font-size: 16px; font-weight: 600;
  border-radius: 24px; padding: 15px 35px;
}

.boton--ambar:hover { background: var(--ambar-hover); color: var(--ambar-texto); filter: none; }

.boton--linea {
  background: transparent; color: var(--navy);
  border: 2px solid var(--navy); padding: .7rem 1.5rem;
}

.boton--linea:hover { background: var(--navy); color: #fff; filter: none; }

/* --- secciones ----------------------------------------------------------- */

.seccion { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.seccion--oscura { background: var(--navy-oscuro); color: var(--blanco); }
.seccion--oscura h1, .seccion--oscura h2, .seccion--oscura h3, .seccion--oscura h4, .seccion--oscura h5 { color: var(--blanco); }

/* --- banner de portada --------------------------------------------------- */

.banner img { width: 100%; height: auto; }

/* --- intro: texto a la izquierda, imagen a la derecha --------------------- */

.intro { display: grid; gap: clamp(1.5rem, 4vw, 3rem); align-items: center; grid-template-columns: 1fr; }

@media (min-width: 860px) {
  .intro { grid-template-columns: 1.35fr 1fr; }
}

.intro__texto p {
  font-size: 18px;
  text-align: justify;
  letter-spacing: .2px;
}

.intro__boton { margin-top: 1.6rem; }
.intro__imagen { width: 100%; }

@media (max-width: 859px) {
  .intro__imagen { max-width: 340px; margin-inline: auto; }
  .intro__texto p { font-size: 15px; line-height: 1.4em; letter-spacing: .7px; }
}

/* --- horarios de misa: filas horizontales sobre fondo oscuro -------------- */

.horarios__titulo { margin-bottom: clamp(1.5rem, 4vw, 2.5rem); }

.santuario {
  display: grid; gap: clamp(1.25rem, 3.5vw, 2.5rem);
  grid-template-columns: 1fr; align-items: start;
}

@media (min-width: 760px) {
  .santuario { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); }
}

.santuario__foto { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.santuario__ciudad { margin-bottom: .05em; }

.santuario__advocacion {
  font-style: italic; font-weight: 700; font-size: 1.05rem;
  margin-bottom: 1.1rem;
}

.santuario__horario { font-size: 16px; margin-bottom: 1.3rem; }
.santuario__horario p { margin-bottom: 1em; }
.santuario__horario strong { display: block; }
.santuario__mapas { display: flex; flex-direction: column; align-items: flex-start; gap: .5rem; }

/* Divisor ondulado, igual que el del sitio anterior. */
.onda {
  height: 20px; margin-block: clamp(1.75rem, 4vw, 2.75rem); border: 0;
  background-repeat: repeat-x; background-position: center;
  background-size: 20px 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20'%3E%3Cpath d='M0 10 Q 5 4 10 10 T 20 10' fill='none' stroke='%23ffffff' stroke-width='1'/%3E%3C/svg%3E");
}

/* --- mapa de santuarios -------------------------------------------------- */

.mapa-seccion { position: relative; }
.mapa { height: clamp(320px, 42vw, 520px); width: 100%; background: #dfe6e9; }
.mapa .leaflet-container { font-family: var(--fuente); }
.mapa__aviso { padding: 1.5rem; text-align: center; color: var(--tenue); }

/* El encabezado va en sticky: el mapa debe quedar por debajo. */
.leaflet-pane, .leaflet-top, .leaflet-bottom { z-index: 5 !important; }

/* --- colegio ------------------------------------------------------------- */

.colegio { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; grid-template-columns: 1fr; }

@media (min-width: 800px) {
  .colegio { grid-template-columns: 1fr 1fr; }
}

.colegio__foto { width: 100%; }
.colegio h4 { margin-top: 1.8rem; }

/* --- enlaces relacionados ------------------------------------------------ */

.relacionados {
  display: grid; gap: 2.5rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); text-align: center;
}

.relacionado__logo { height: 64px; width: auto; margin: 0 auto 1.2rem; object-fit: contain; }
.relacionado h3 { font-size: 1.1rem; margin-bottom: .2em; }
.relacionado p { margin: 0; font-size: 15px; }

/* --- citas --------------------------------------------------------------- */

.citas__lista {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  list-style: none; margin: 0; padding: 0;
}

.cita { margin: 0; padding: 1.5rem 1.6rem; background: #f7f7fa; border-left: 3px solid var(--oro); }
.cita p { font-size: 16px; font-style: italic; margin-bottom: .8em; }
.cita footer { font-size: .78rem; letter-spacing: .13em; color: var(--oro-menu); font-weight: 700; }

/* --- páginas interiores -------------------------------------------------- */

.portada-pagina { background: var(--navy-oscuro); color: #fff; padding-block: clamp(2.25rem, 5vw, 3.5rem); }
.portada-pagina h1 { color: #fff; margin-bottom: 0; }
.portada-pagina p { color: rgba(255, 255, 255, .82); margin-top: .5em; margin-bottom: 0; }

.sub-menu { background: #f7f7fa; border-bottom: 1px solid var(--linea); position: sticky; top: var(--alto-encabezado); z-index: 40; }
.sub-menu ul { display: flex; gap: .25rem; list-style: none; margin: 0; padding: 0; overflow-x: auto; scrollbar-width: thin; }

.sub-menu a {
  display: block; white-space: nowrap; padding: .85rem .9rem;
  font-size: 14px; font-weight: 500; color: var(--tenue); text-decoration: none;
  border-bottom: 2px solid transparent;
}

.sub-menu a:hover { color: var(--titulo-color); border-bottom-color: var(--oro); }

.articulo { padding-block: clamp(2.25rem, 5vw, 3.5rem); }
.articulo h2 { margin-top: 2.25rem; }
.articulo h2:first-child { margin-top: 0; }
.articulo h3 { font-size: 1.05rem; font-weight: 700; margin-top: 1.9rem; }
.articulo p { text-align: justify; }
.articulo img { margin-block: 1.6rem; }
.articulo ul, .articulo ol { padding-left: 1.3rem; }
.articulo li { margin-bottom: .35em; }
.articulo blockquote { margin: 1.6rem 0; padding-left: 1.3rem; border-left: 3px solid var(--oro); font-style: italic; }

.bloque { scroll-margin-top: calc(var(--alto-encabezado) + 60px); }
.bloque + .bloque { margin-top: clamp(2.25rem, 5vw, 3.5rem); padding-top: clamp(2.25rem, 5vw, 3.5rem); border-top: 1px solid var(--linea); }

/* --- noticias ------------------------------------------------------------ */

.noticias {
  display: grid; gap: 1.75rem;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  list-style: none; margin: 0; padding: 0;
}

.noticia { border: 1px solid var(--linea); display: flex; flex-direction: column; }
.noticia__foto { aspect-ratio: 16 / 9; object-fit: cover; width: 100%; }
.noticia__cuerpo { padding: 1.3rem 1.4rem 1.5rem; display: flex; flex-direction: column; flex: 1; }
.noticia__fecha { font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--tenue); margin-bottom: .5em; }
.noticia h3 { font-size: 1.1rem; }
.noticia h3 a { color: var(--titulo-color); text-decoration: none; }
.noticia h3 a:hover { color: var(--oro-menu); }
.noticia__resumen { font-size: 15px; color: var(--tenue); margin-bottom: 1.1rem; }
.noticia__mas { margin-top: auto; font-size: 14px; font-weight: 600; text-decoration: none; }

.articulo__meta { color: var(--tenue); font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 1.4rem; }

/* --- recursos ------------------------------------------------------------ */

.documentos { list-style: none; margin: 0 0 2.5rem; padding: 0; display: grid; gap: .7rem; }

.documento {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
  border: 1px solid var(--linea); padding: 1rem 1.25rem;
}

.documento__icono { flex: 0 0 auto; width: 32px; height: 32px; color: var(--oro-menu); }
.documento__nombre { font-weight: 600; color: var(--titulo-color); text-decoration: none; }
.documento__nombre:hover { color: var(--oro-menu); }
.documento__tipo { font-size: .74rem; letter-spacing: .09em; text-transform: uppercase; color: var(--tenue); }
.documento__accion { margin-left: auto; }

/* --- pie ----------------------------------------------------------------- */

.pie { background: var(--navy-oscuro); color: rgba(255, 255, 255, .78); padding-block: 2.75rem; text-align: center; }
.pie__fila { display: flex; flex-direction: column; align-items: center; gap: .9rem; }
.pie__lema { color: #fff; font-size: 1rem; margin: 0; max-width: 34ch; }
.pie__enlaces a { color: rgba(255, 255, 255, .78); font-size: 14px; }
.pie__enlaces a:hover { color: var(--oro); }
.pie__copy { font-size: 13px; margin: 0; color: rgba(255, 255, 255, .5); }
