/* Componentes propios que sustituyen a plugins de la original (Modula, formulario Divi).
   Los estilos visuales de noticias y eventos están en actualidad.css (los usará el NuGet de La Nucía). */

/* ---- Galería (sustituye a Modula "creative gallery") ---- */
.gallery {
  --gallery-gap: 10px;
  --row-h: 260px;
  display: flex; flex-wrap: wrap; gap: var(--gallery-gap);
  width: 100%;
}
.gallery::after { content: ""; flex-grow: 999999; }       /* sin JS: la última fila no se estira */
.gallery__item {
  position: relative; display: block; overflow: hidden;
  flex: var(--ratio) 1 calc(var(--ratio) * var(--row-h));
  aspect-ratio: var(--ratio);
  background: #000;
}
.gallery.is-justified::after { display: none; }
.gallery.is-justified .gallery__item { flex: none; aspect-ratio: auto; }
.gallery__img, .gallery__item .img-missing {
  display: block; width: 100%; height: 100%; object-fit: cover;
  transition: transform .3s linear, opacity .2s linear;
}
.gallery__item:hover .gallery__img,
.gallery__item:focus-visible .gallery__img { transform: scale(1.08); opacity: .85; }

/* ---- Agenda: filtros (estilos inline del plugin) ---- */
.selector-meses-desktop a { margin-right: 10px; }
@media screen and (max-width: 979px) {
  .selector-meses-desktop { display: none !important; }
  .selector-meses-mobile { margin-top: 10px; margin-bottom: 10px; }
}
@media screen and (min-width: 980px) {
  .selector-meses-mobile { display: none !important; }
}

/* ---- Formulario (/deportistas/) ---- */
.form-honeypot { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.et-contact-bottom-container .form-privacy { margin-right: auto; padding-right: 20px; align-self: center; font-size: 13px; line-height: 1.4; }
.form-message { padding: 12px 16px; margin-bottom: 20px; border-radius: 3px; }
.form-message--ok { background: #e7f5e9; color: #1e5e2b; }
.form-message--error { background: #fdecea; color: #8a1c1c; }
.form-message ul { list-style: disc; padding: 6px 0 0 20px; }
.dv-contact-form .input[aria-invalid="true"] { border: 1px solid #c00 !important; }

/* ---- Página de error ---- */
.error-page { padding: calc(var(--header-h) + 80px) 10% 100px; text-align: center; font-family: var(--font-heading); }
.error-page h1 { font-size: 48px; font-weight: 700; color: var(--color-brand); padding-bottom: 20px; }
.error-page p { font-size: 18px; color: var(--color-black); }
.error-page__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px 24px; margin-top: 30px; list-style: none; padding: 0; }
.error-page__links a { font-weight: 600; font-size: 18px; color: var(--color-black); border-bottom: 2px solid var(--color-brand); }
@media (max-width: 980px) { .error-page { padding-top: calc(var(--header-h-mobile) + 50px); } }
