@charset "UTF-8";
/* ==========================================================================
   Galeria de fotos de la Hermandad.
   Mismos colores y tipografias que la web (estaticos/css/estilo.css), en una
   hoja propia para que la galeria funcione sola en su carpeta.

   1. Variables   2. Base   3. Cabecera y pie   4. Entrada con contraseña
   5. Lista de actos   6. Cuadricula de fotos   7. Barra de marcadas
   8. Visor a pantalla completa
   ========================================================================== */

/* 1. VARIABLES ------------------------------------------------------------ */
:root {
  --pergamino:       #FAF7F1;
  --pergamino-hondo: #F3EDE2;
  --blanco:          #FFFFFF;
  --tinta:           #221E1B;
  --tinta-suave:     #5C544C;
  --tinta-tenue:     #857B70;
  --gules:           #8E2420;
  --gules-vivo:      #B02F27;
  --gules-hondo:     #611614;
  --oro:             #B08428;
  --linea:           #E4DBCB;
  --linea-fuerte:    #CDBFA6;

  --display: "Cormorant Garamond", "Iowan Old Style", Georgia, serif;
  --lectura: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --ancho-max: 1280px;
  --margen: clamp(1rem, 4vw, 2.5rem);
  --sombra-baja: 0 1px 2px rgba(34, 30, 27, .06), 0 4px 14px rgba(34, 30, 27, .06);
  --sombra-alta: 0 2px 6px rgba(34, 30, 27, .08), 0 18px 44px rgba(34, 30, 27, .13);
  --radio: 3px;
  --transicion: 180ms ease;
  color-scheme: light;
}

/* 2. BASE ----------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--pergamino);
  color: var(--tinta);
  font-family: var(--lectura);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; padding-bottom: 6rem; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--gules); }
a:hover { color: var(--gules-vivo); }
:focus-visible { outline: 2px solid var(--oro); outline-offset: 2px; }

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

.titulo {
  font-family: var(--display); font-weight: 600; color: var(--gules-hondo);
  font-size: clamp(2rem, 5vw, 2.9rem); line-height: 1.1; margin: 1.6rem 0 .4rem;
}
.entradilla { color: var(--tinta-suave); margin: 0 0 .6rem; }
.ayuda { color: var(--tinta-tenue); font-size: .95rem; margin: 0 0 1.6rem; max-width: 46rem; }
.migas { margin: 1.4rem 0 0; font-size: .95rem; }
.migas a { text-decoration: none; }
.aviso {
  background: #FBEDEA; border-left: 3px solid var(--gules); color: var(--gules-hondo);
  padding: .7rem 1rem; margin: 1rem 0; border-radius: var(--radio);
}

.boton {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: 600 1rem/1 var(--lectura); padding: .75rem 1.25rem; min-height: 44px;
  background: var(--gules); color: var(--blanco); border: 1px solid var(--gules);
  border-radius: var(--radio); cursor: pointer; text-decoration: none;
  transition: background var(--transicion);
}
.boton:hover { background: var(--gules-vivo); color: var(--blanco); }
.boton:disabled { opacity: .45; cursor: default; background: var(--gules); }
.boton--claro { background: transparent; color: var(--gules); border-color: var(--linea-fuerte); }
.boton--claro:hover { background: var(--pergamino-hondo); color: var(--gules-hondo); }
.boton--claro:disabled { background: transparent; }

/* 3. CABECERA Y PIE ------------------------------------------------------- */
.cabecera { background: var(--blanco); border-bottom: 1px solid var(--linea); }
.cabecera__interior { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: .7rem; padding-bottom: .7rem; }
.marca { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--tinta); min-width: 0; }
.marca__escudo { width: 44px; height: auto; flex: none; }
.marca__texto { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.marca__nombre { font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--gules-hondo); }
.marca__sub { font-size: .8rem; color: var(--tinta-tenue); }
.salir { font-size: .95rem; text-decoration: none; flex: none; }

.pie { background: var(--pergamino-hondo); border-top: 1px solid var(--linea); color: var(--tinta-suave); font-size: .92rem; padding: 1.4rem 0; }
.pie p { margin: .3rem 0; max-width: 46rem; }

@media (max-width: 560px) {
  .marca__sub { display: none; }
  .marca__nombre { font-size: 1rem; }
}

/* 4. ENTRADA CON CONTRASEÑA ----------------------------------------------- */
.entrada { max-width: 28rem; margin: 3rem auto; text-align: center; }
.entrada h1 { font-family: var(--display); color: var(--gules-hondo); font-size: 2.3rem; line-height: 1.1; margin: 0 0 .8rem; }
.entrada p { color: var(--tinta-suave); }
.entrada__formulario {
  display: flex; flex-direction: column; gap: .6rem; text-align: left;
  background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio);
  padding: 1.4rem; box-shadow: var(--sombra-baja); margin-top: 1.4rem;
}
.entrada__formulario label { font-weight: 600; font-size: .95rem; }
.entrada__formulario input {
  font: inherit; padding: .7rem .8rem; border: 1px solid var(--linea-fuerte);
  border-radius: var(--radio); background: var(--pergamino); min-height: 44px;
}
.entrada__formulario .aviso { margin: 0; }

/* 5. LISTA DE ACTOS ------------------------------------------------------- */
.eventos { list-style: none; padding: 0; margin: 1.6rem 0 0; display: grid; gap: 1.4rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.evento__enlace {
  display: flex; flex-direction: column; height: 100%; text-decoration: none; color: var(--tinta);
  background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio);
  overflow: hidden; box-shadow: var(--sombra-baja); transition: box-shadow var(--transicion), transform var(--transicion);
}
.evento__enlace:hover { box-shadow: var(--sombra-alta); transform: translateY(-2px); color: var(--tinta); }
.evento__portada { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; background: var(--pergamino-hondo); }
.evento__texto { display: flex; flex-direction: column; gap: .2rem; padding: 1rem 1.2rem 1.2rem; }
.evento__titulo { font-family: var(--display); font-weight: 600; font-size: 1.5rem; line-height: 1.15; color: var(--gules-hondo); }
.evento__datos { color: var(--tinta-suave); font-size: .95rem; }
.evento__cuenta { color: var(--oro); font-weight: 600; font-size: .9rem; margin-top: .3rem; }

/* 6. CUADRICULA DE FOTOS -------------------------------------------------- */
.rejilla { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (min-width: 700px) { .rejilla { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .8rem; } }

.foto { position: relative; background: var(--blanco); border: 1px solid var(--linea); border-radius: var(--radio); overflow: hidden; scroll-margin-top: 1rem; }
.foto__ver { display: block; background: var(--pergamino-hondo); }
.foto__ver img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: opacity var(--transicion); }
.foto__ver:hover img { opacity: .88; }

.foto__marca { display: flex; align-items: center; gap: .5rem; padding: .35rem .6rem; min-height: 40px; cursor: pointer; font-size: .85rem; color: var(--tinta-suave); font-variant-numeric: tabular-nums; }
.foto__marca input { width: 1.15rem; height: 1.15rem; accent-color: var(--gules); margin: 0; cursor: pointer; }
.foto:has(input:checked) { border-color: var(--gules); box-shadow: 0 0 0 2px var(--gules); }
.foto:has(input:checked) .foto__marca { background: #FBEDEA; color: var(--gules-hondo); font-weight: 600; }

/* 7. BARRA DE MARCADAS ---------------------------------------------------- */
.barra {
  position: fixed; left: 50%; bottom: max(1rem, env(safe-area-inset-bottom)); transform: translateX(-50%);
  display: flex; align-items: center; gap: .6rem; z-index: 10;
  background: var(--blanco); border: 1px solid var(--linea-fuerte); border-radius: 999px;
  padding: .45rem .5rem .45rem 1.2rem; box-shadow: var(--sombra-alta);
  width: max-content; max-width: calc(100% - 2rem);
}
.barra .boton { border-radius: 999px; padding: .6rem 1.1rem; white-space: nowrap; }
.barra__cuenta { white-space: nowrap; font-size: .95rem; }
.barra__cuenta strong { color: var(--gules); font-variant-numeric: tabular-nums; }
.barra[hidden] { display: none; }
@media (max-width: 480px) {
  .barra { padding-left: .9rem; gap: .4rem; }
  .barra .boton { padding: .55rem .8rem; font-size: .92rem; }
}

/* 8. VISOR A PANTALLA COMPLETA -------------------------------------------- */
.visor { position: fixed; inset: 0; z-index: 50; background: rgba(20, 17, 15, .96); color: #F3EDE2; display: none; flex-direction: column; }
.visor.abierto { display: flex; }
body.visor-abierto { overflow: hidden; }

.visor__barra { display: flex; align-items: center; gap: .6rem; padding: .6rem .8rem; padding-top: max(.6rem, env(safe-area-inset-top)); }
.visor__codigo { font-variant-numeric: tabular-nums; font-weight: 600; margin-right: auto; }
.visor__codigo small { font-weight: 400; opacity: .65; margin-left: .4rem; }
.visor button, .visor a.visor__bajar {
  font: 600 .95rem/1 var(--lectura); color: #F3EDE2; background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; min-height: 42px; min-width: 42px;
  padding: .55rem 1rem; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: .35rem;
}
.visor button:hover, .visor a.visor__bajar:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.visor .visor__marcar[aria-pressed="true"] { background: var(--gules); border-color: var(--gules-vivo); }

.visor__escena { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 0 3.6rem; }
.visor__escena img { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.visor__escena .visor__anterior, .visor__escena .visor__siguiente { position: absolute; top: 50%; transform: translateY(-50%); font-size: 1.6rem; padding: 0; width: 46px; height: 46px; }
.visor__anterior { left: .6rem; }
.visor__siguiente { right: .6rem; }
@media (max-width: 640px) {
  .visor__escena { padding: 0; }
  .visor__escena .visor__anterior, .visor__escena .visor__siguiente { display: none; } /* en movil se desliza con el dedo */
  .visor__bajar span, .visor__marcar span { display: none; }
}
.visor__pie { text-align: center; font-size: .82rem; opacity: .6; padding: .5rem; padding-bottom: max(.5rem, env(safe-area-inset-bottom)); }
