/* Estilos propios de la versión estática (complementan estilos.css) */

/* Imágenes que llenan su contenedor */
.img-fill { position: absolute; inset: 0; width: 100%; height: 100%; color: transparent; }

/* Galería tipo mosaico */
.galeria-grid { columns: 2; column-gap: .75rem; }
@media (min-width: 640px) { .galeria-grid { columns: 3; column-gap: 1rem; } }
@media (min-width: 1024px) { .galeria-grid { columns: 4; } }
.galeria-grid figure {
  margin: 0 0 .75rem; break-inside: avoid; overflow: hidden;
  border-radius: var(--radius-md); background: var(--color-cream-dark); cursor: zoom-in;
}
@media (min-width: 640px) { .galeria-grid figure { margin-bottom: 1rem; } }
.galeria-grid figure img {
  display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
  transition: transform .5s;
}
.galeria-grid figure:nth-child(5n + 1) img { aspect-ratio: 3 / 4; }
.galeria-grid figure:hover img { transform: scale(1.05); }

/* Visor de fotos */
.visor { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  padding: 0 1rem; background: color-mix(in srgb, var(--color-charcoal) 95%, transparent);
  opacity: 0; transition: opacity .25s; }
.visor.abierto { opacity: 1; }
.visor img { max-height: 75vh; max-width: min(56rem, 100%); width: auto; height: auto; object-fit: contain; }
.visor button { position: absolute; color: var(--color-cream); background: none; border: 0; cursor: pointer; }
.visor .cerrar { right: 1.25rem; top: 1.25rem; }
.visor .ant { left: .75rem; top: 50%; transform: translateY(-50%); }
.visor .sig { right: .75rem; top: 50%; transform: translateY(-50%); }
@media (min-width: 640px) { .visor .ant { left: 1.5rem; } .visor .sig { right: 1.5rem; } }

/* Menú móvil */
#menu-boton .icon-close { display: none; }
#menu-boton[aria-expanded="true"] .icon-open { display: none; }
#menu-boton[aria-expanded="true"] .icon-close { display: block; }
#menu-movil { opacity: 0; transition: opacity .25s; }
#menu-movil.abierto { opacity: 1; }

/* Encabezado al hacer scroll */
#encabezado.con-fondo { background-color: color-mix(in srgb, var(--color-cream) 95%, transparent);
  box-shadow: var(--shadow-softer); backdrop-filter: blur(4px); }
#encabezado.con-fondo a > img { width: 2.75rem; height: 2.75rem; }

/* Indicador "Descubre más" */
@keyframes rebote { 0%, 100% { transform: translate(-50%, 0); } 50% { transform: translate(-50%, 8px); } }
.bounce-hint { animation: rebote 1.8s ease-in-out infinite; }

/* Aparición al hacer scroll (solo en la web, nunca dentro del editor) */
html.animar [data-reveal] { opacity: 0; transform: translateY(24px);
  transition: opacity .7s cubic-bezier(.22, 1, .36, 1), transform .7s cubic-bezier(.22, 1, .36, 1); }
html.animar [data-reveal].visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html.animar [data-reveal] { opacity: 1; transform: none; transition: none; }
  .bounce-hint { animation: none; }
}

/* Dentro de Surreal CMS: todo visible y estático */
.is-cms [data-reveal] { opacity: 1 !important; transform: none !important; }
.is-cms .bounce-hint { animation: none; }
.is-cms .galeria-grid figure { cursor: default; }

/* Errores del formulario */
.campo-error { margin-top: .25rem; display: block; font-size: .75rem; color: var(--color-terracotta-dark); }
