/* La Casa Zipizape - estilos comunes. Sin CSS de WordPress ni frameworks. */

/* Tipografías locales: archivos aportados en /fuentes/ (sin Google Fonts). */
@font-face {
  font-family: "Salsa";
  src: url("../fuentes/salsa-v23-latin-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fuentes/Montserrat-Light.otf") format("opentype");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fuentes/Montserrat-Regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fuentes/Montserrat-Medium.otf") format("opentype");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fuentes/Montserrat-SemiBold.otf") format("opentype");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("../fuentes/Montserrat-Bold.otf") format("opentype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  --marron: #704825;
  --texto: #777;
  --verde: #93c524;
  --amarillo: #ffd823;
  --pie: #56371b;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  color: var(--texto);
  background: #fff;
  font: 300 16px/1.5 "Montserrat", Arial, sans-serif;
}

img { max-width: 100%; }

a { color: inherit; }

button { font: inherit; }

.contenedor {
  width: min(100%, 1050px);
  margin-inline: auto;
  padding-inline: 25px;
}

.saltar {
  position: absolute;
  z-index: 10;
  top: -60px;
  left: 15px;
  padding: 10px;
  background: #fff;
}
.saltar:focus { top: 10px; }

/* Cabecera y menú */
.cabecera {
  /*position: relative;*/
  position: sticky;
  top: 0px;
  z-index: 2;
  background: #fdfdfd;
  box-shadow: 0 1px 5px rgb(0 0 0 / 20%);
}

.cabecera-interior {
  display: flex;
  min-height: 90px;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: block;
  width: 200px;
  flex-shrink: 0;
}
.logo img {
  display: block;
  width: 100%;
  height: auto;
}

.navegacion {
  display: flex;
  align-self: stretch;
}

.navegacion a {
  display: flex;
  min-width: 79px;
  padding: 12px 14px 10px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: #707070;
  text-align: center;
  text-decoration: none;
  transition: background-color .2s, color .2s;
}

.navegacion img {
  display: block;
  width: 28px;
  height: 28px;
}

.navegacion a:hover,
.navegacion a:focus-visible,
.navegacion a.activo {
  color: #fff;
  background: var(--verde);
}

.navegacion a:hover img,
.navegacion a:focus-visible img { filter: brightness(0) invert(1); }

.menu-toggle { display: none; }

/* Contenido de portada */
main { flex: 1; }

.fachada {
  display: block;
  width: 100%;
  height: auto;
}

.introduccion {
  padding-top: 53px;
  text-align: center;
}

.introduccion h1,
.proyecto h2 {
  margin: 0;
  color: var(--marron);
  font: 500 42px/1.2 "Salsa", "Comic Sans MS", cursive;
}

.introduccion h1::after {
  display: block;
  width: 60px;
  height: 4px;
  margin: 20px auto 0;
  border-radius: 2px;
  background: var(--amarillo);
  content: "";
}

.introduccion p {
  margin: 39px 0 0;
}

.proyecto {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
  margin-top: 95px;
  margin-bottom: 62px;
}

.boton {
  display: inline-block;
  padding: 7px 20px;
  border-radius: 5px;
  color: var(--marron);
  background: var(--amarillo);
  font-size: 18px;
  line-height: 26px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.boton:hover,
.boton:focus-visible {
  color: var(--amarillo);
  background: var(--marron);
}

/* Pie */
.pie {
  padding: 35px 0;
  color: var(--amarillo);
  background: var(--pie);
  font-size: 16px;
}
.pie a { color: inherit; }

/* ESCUELA · Quiénes somos */
.encabezado-pagina {
  padding-top: 60px;
  padding-bottom: 62px;
  text-align: center;
}

.encabezado-pagina h1 {
  margin: 0;
  color: var(--marron);
  font: 400 42px/1.2 "Salsa", "Comic Sans MS", cursive;
}

.encabezado-pagina h1::after {
  display: block;
  width: 60px;
  height: 4px;
  margin: 20px auto 0;
  border-radius: 2px;
  background: var(--amarillo);
  content: "";
}

.escuela-bloque {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  column-gap: 55px;
}

.escuela-bloque + .escuela-bloque { margin-top: 125px; }

.escuela-texto h2 {
  margin: 0 0 30px;
  color: var(--marron);
  text-align: center;
  font: 400 32px/1.2 "Salsa", "Comic Sans MS", cursive;
}

.escuela-texto h3 {
  margin: 0 0 14px;
  color: #99cc00;
  font: 700 20px/1.4 "Montserrat", Arial, sans-serif;
}

.escuela-texto p {
  margin: 0 0 15px;
}

.escuela-texto p:last-child { margin-bottom: 0; }

.escuela-foto {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.escuela-imagenes {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 30px;
}

.escuela-imagenes img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
}

.escuela-imagenes img:first-child { max-height: 400px; }
.escuela-imagenes img:last-child { max-height: 410px; }

.llamada-escuela {
  margin-top: 112px;
  margin-bottom: 45px;
}

@media (max-width: 850px) and (min-width: 768px) {
  .escuela-bloque { column-gap: 30px; }
  .escuela-texto h2 { font-size: 28px; }
  .escuela-texto h3 { font-size: 18px; }
}

/* Móvil */
@media (max-width: 767px) {
  .cabecera-interior {
    min-height: 62px;
    flex-wrap: wrap;
  }

  .logo { width: 140px; height: 62px; display: flex; align-items: center; }

  .menu-toggle {
    display: block;
    width: 30px;
    height: 30px;
    padding: 4px 1px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    margin: 6px 0;
    border-radius: 2px;
    background: var(--verde);
    transition: transform .2s, opacity .2s;
  }

  .menu-toggle.is-open span:first-child { transform: translateY(8px) rotate(45deg); }
  .menu-toggle.is-open span:nth-child(2) { opacity: 0; }
  .menu-toggle.is-open span:last-child { transform: translateY(-8px) rotate(-45deg); }

  .navegacion {
    display: none;
    width: 100%;
    flex: 0 0 100%;
    align-self: auto;
    padding-bottom: 0;
    flex-direction: column;
    order: 3;
  }
  .navegacion.is-open { display: flex; }

  .navegacion a {
    flex: none;
    height: 47px;
    padding: 12px 10px;
    border-bottom: 1px solid #f0f0f0;
    align-items: flex-start;
    gap: 0;
    text-align: left;
  }
  .navegacion a:last-child { border-bottom: 0; }
  .navegacion img { display: none; }

  .introduccion {
    padding-top: 56px;
  }

  .introduccion h1,
  .proyecto h2 { font-size: 42px; }

  .introduccion p { margin-top: 42px; }

  .proyecto {
    margin-top: 105px;
    margin-bottom: 58px;
    flex-direction: column;
    gap: 23px;
    text-align: center;
  }

  /* Escuela en pantallas pequeñas: columnas apiladas. */
  .encabezado-pagina {
    padding-top: 60px;
    padding-bottom: 45px;
  }

  .encabezado-pagina h1 { font-size: 42px; }

  .escuela-bloque {
    grid-template-columns: 1fr;
    gap: 25px;
  }

  .escuela-bloque + .escuela-bloque { margin-top: 50px; }

  .escuela-texto h2 {
    font-size: 32px;
    margin-bottom: 26px;
  }

  .escuela-texto h3 { font-size: 19px; }

  .escuela-intro .escuela-foto {
    width: min(100%, 440px);
    justify-self: center;
  }

  .escuela-imagenes { gap: 24px; }
  .escuela-imagenes img:first-child { max-height: 360px; }
  .escuela-imagenes img:last-child { max-height: 340px; }

  .llamada-escuela {
    margin-top: 70px;
    margin-bottom: 58px;
  }

  .pie {
    padding: 32px 0;
    text-align: center;
  }
}

/* Evita que títulos y botones se desborden en pantallas muy estrechas. */
@media (max-width: 360px) {
  .introduccion h1, .proyecto h2, .encabezado-pagina h1 { font-size: 36px; }
}


/* GALERÍA · Cuadrícula ligera + GLightbox local */
.galeria-seccion {
  padding-bottom: 80px;
}

.galeria-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
}

.foto-galeria {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f2f2f2;
}

.foto-galeria img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter .25s ease, transform .25s ease;
}

.foto-galeria:hover img,
.foto-galeria:focus-visible img {
  filter: brightness(.65);
  transform: scale(1.025);
}

.foto-galeria::after {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font: 300 50px/1 Arial, sans-serif;
  content: "+";
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}

.foto-galeria:hover::after,
.foto-galeria:focus-visible::after { opacity: 1; }

.foto-galeria:focus-visible {
  outline: 3px solid var(--verde);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .galeria-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .galeria-seccion { padding-bottom: 60px; }
}

@media (max-width: 420px) {
  .galeria-grid { gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .foto-galeria img, .foto-galeria::after { transition: none; }
}

/* CONTACTO · Datos, formulario y mapa (sin estilos de Contact Form 7). */
.contacto-columnas {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  align-items: start;
  gap: 55px;
}

.contacto-columnas h2,
.contacto-mapa h2 {
  margin: 0 0 23px;
  color: var(--marron);
  font: bold 30px/1.25 Georgia, "Times New Roman", serif;
}

.contacto-direccion address {
  font: inherit;
}

.contacto-direccion p {
  margin: 0 0 23px;
}

.contacto-direccion strong {
  font-weight: 500;
}

.contacto-direccion a {
  color: #df2f2f;
  text-decoration: none;
}

.contacto-direccion a:hover,
.contacto-direccion a:focus-visible {
  text-decoration: underline;
}

.contacto-direccion h3 {
  margin: 22px 0 6px;
  color: #94c823;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.4;
}

.contacto-formulario .campo {
  margin-bottom: 15px;
}

.contacto-formulario label:not(.contacto-aceptacion) {
  display: block;
  margin-bottom: 3px;
}

.contacto-formulario input:not([type="checkbox"]),
.contacto-formulario textarea {
  display: block;
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #e5e5e5;
  border-radius: 4px;
  background: #fff;
  color: #555;
  font: inherit;
}

.contacto-formulario input:not([type="checkbox"]) {
  min-height: 42px;
}

.contacto-formulario textarea {
  min-height: 225px;
  resize: vertical;
}

.contacto-formulario :is(input, textarea, button, summary):focus-visible {
  outline: 2px solid var(--verde);
  outline-offset: 2px;
}

/* Campo trampa antispam: oculto sin display:none para que algunos bots lo rellenen. */
.campo-trampa {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contacto-enviar,
.contacto-terminos summary {
  display: inline-block;
  padding: 7px 17px;
  border: 1px solid #aaa;
  border-radius: 3px;
  background: #eee;
  color: #777;
  font: inherit;
  cursor: pointer;
}

.contacto-enviar:hover,
.contacto-terminos summary:hover {
  background: #e4e4e4;
}

.contacto-enviar:disabled {
  opacity: .6;
  cursor: wait;
}

.contacto-aceptacion {
  display: inline-flex;
  align-items: start;
  gap: 7px;
  margin-top: 15px;
  margin-right: 15px;
  line-height: 1.5;
  vertical-align: middle;
  cursor: pointer;
}

.contacto-aceptacion input {
  margin: 5px 0 0;
  accent-color: var(--verde);
  flex: none;
}

.contacto-aceptacion a {
  color: var(--marron);
  text-decoration: underline;
}

.contacto-respuesta {
  margin: 13px 0 0;
}

.contacto-respuesta:empty { display: none; }

.contacto-respuesta[data-estado="ok"] { color: #37670f; }
.contacto-respuesta[data-estado="error"] { color: #ae3131; }

.contacto-terminos {
  display: inline-block;
  margin-top: 12px;
  vertical-align: middle;
}
.contacto-terminos[open] { display: block; }

.contacto-terminos summary {
  list-style: none;
  user-select: none;
}

.contacto-terminos summary::-webkit-details-marker { display: none; }
.contacto-terminos .texto-ocultar { display: none; }
.contacto-terminos[open] .texto-mostrar { display: none; }
.contacto-terminos[open] .texto-ocultar { display: inline; }

.contacto-terminos[open] summary { margin-bottom: 20px; }

.contacto-terminos .texto-legal {
  padding: 22px 15px;
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  line-height: 1.65;
}

.contacto-terminos .texto-legal p {
  margin: 0 0 16px;
}
.contacto-terminos .texto-legal p:last-child { margin-bottom: 0; }
.contacto-terminos .texto-legal strong { font-weight: 600; }
.contacto-terminos .texto-legal a { color: var(--marron); text-decoration: underline; }

.contacto-mapa {
  margin-top: 100px;
  margin-bottom: 100px;
}

.contacto-mapa iframe {
  display: block;
  width: 100%;
  height: 600px;
  border: 0;
}

@media (max-width: 767px) {
  .contacto-columnas {
    grid-template-columns: minmax(0, 1fr);
    gap: 55px;
  }
  .contacto-columnas h2,
  .contacto-mapa h2 { font-size: 29px; }
  .contacto-mapa {
    margin-top: 75px;
    margin-bottom: 75px;
  }
  .contacto-mapa iframe { height: 420px; }
}


/* PROYECTO EDUCATIVO Y PÁGINAS LEGALES */
.pagina-texto {
  max-width: 950px;
  padding-top: 35px;
  padding-bottom: 90px;
  line-height: 1.75;
}
.pagina-texto h2,
.pagina-texto h3,
.pagina-texto h4 {
  color: var(--marron);
  line-height: 1.3;
  margin: 32px 0 15px;
}
.pagina-texto h2 {
  font: 400 30px/1.3 "Salsa", cursive;
}
.pagina-texto h3 {
  font: 400 24px/1.3 "Salsa", cursive;
}
.pagina-texto h4 {
  font-size: 19px;
  font-weight: 600;
}
.pagina-texto p { margin: 0 0 16px; }
.pagina-texto ul {
  margin: 0 0 25px;
  padding-left: 30px;
}
.pagina-texto li {
  padding-left: 2px;
  margin-bottom: 7px;
}
.pagina-texto a {
  color: var(--marron);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.pagina-texto strong { font-weight: 600; }
/*
.legal-advertencia {
  border-left: 4px solid var(--amarillo);
  background: #fffaf0;
  padding: 14px 18px;
  margin-bottom: 25px !important;
}
*/
.contacto-ayuda {
  font-size: 13px;
  line-height: 1.5;
  margin: 6px 0 0;
}
.contacto-mapa-opcional {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 280px;
  text-align: center;
  padding: 35px 25px;
  border: 1px solid #e8e8e8;
  background: #fafafa;
}
.contacto-mapa-opcional p { max-width: 620px; margin: 0; }
.contacto-mapa-opcional a { color: var(--marron); text-decoration: underline; }
.contacto-ver-mapa {
  border: 0;
  cursor: pointer;
}
.contacto-ver-mapa:hover,
.contacto-ver-mapa:focus-visible {
  background: var(--marron);
  color: var(--amarillo);
}
@media (max-width: 767px) {
  .pagina-texto { padding-top: 20px; padding-bottom: 60px; }
  .pagina-texto h2 { font-size: 26px; }
  .pagina-texto h3 { font-size: 22px; }
  .pagina-texto ul { padding-left: 22px; }
}

/* Contacto · información y control voluntario del contenido de Google Maps */
.contacto-mapa-opcional[hidden],
.contacto-mapa-activo[hidden] {
  display: none !important;
}
.contacto-mapa-activo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
#mapa-iframe-contenedor {
  width: 100%;
}
.contacto-mapa-activo p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
}
.contacto-mapa-activo a {
  color: var(--marron);
  text-decoration: underline;
}
.contacto-ocultar-mapa {
  padding: 8px 16px;
  border: 1px solid var(--marron);
  border-radius: 4px;
  background: #fff;
  color: var(--marron);
  cursor: pointer;
}
.contacto-ocultar-mapa:hover,
.contacto-ocultar-mapa:focus-visible {
  background: var(--marron);
  color: #fff;
}
.contacto-mapa button:focus-visible {
  outline: 2px solid var(--verde);
  outline-offset: 3px;
}
