/* =========================================================
   RIMALIP — Galería de resultados (galeria.html)
   ========================================================= */
.gal-hero { background: var(--jet); color: var(--pearl); padding: 150px 0 70px; text-align: center; }
.gal-hero .pill { border-color: rgba(224,244,247,.4); color: var(--sky); }
.gal-hero .title { color: var(--pearl); font-size: clamp(2.6rem, 6vw, 4.2rem); }
.gal-hero .title strong { color: var(--sky); }
.gal-hero .lead { color: rgba(248,249,245,.75); max-width: 640px; margin: 16px auto 0; }

.gal-nav { position: sticky; top: 76px; z-index: 40; background: rgba(248,249,245,.95); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.gal-nav__track { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0; scrollbar-width: none; }
.gal-nav__track::-webkit-scrollbar { display: none; }
.gal-nav__link { flex-shrink: 0; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: .84rem; font-weight: 700; color: var(--olive-deep); transition: background .3s, color .3s, border-color .3s; }
.gal-nav__link:hover { border-color: var(--olive); }
.gal-nav__link.is-active { background: var(--olive); border-color: var(--olive); color: var(--pearl); }

.gal { padding: 64px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 140px; }
.gal:nth-of-type(even) { background: #fff; }
.gal__layout { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: start; }
.gal__head { position: sticky; top: 150px; }
.gal__num { display: block; font: 600 1.2rem/1 var(--font-title); color: var(--platinum); margin-bottom: 8px; }
.gal__title { font-size: 2.2rem; color: var(--olive-deep); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.gal__head p { color: var(--muted); font-size: .92rem; margin-bottom: 14px; }
.gal__cta { font-size: .85rem; font-weight: 700; color: var(--olive); }
.gal__cta:hover { text-decoration: underline; }
.gal .gallery { grid-template-columns: repeat(3, 1fr); }
.gal__empty { border: 1px dashed var(--line); border-radius: var(--radius); padding: 40px 24px; text-align: center; color: var(--muted); display: grid; gap: 16px; justify-items: center; background: var(--pearl); }
.page-galeria .note { padding: 28px 0 8px; }
.page-galeria .note a { text-decoration: underline; }

/* Aviso +18 a pantalla completa */
.gate { position: fixed; inset: 0; z-index: 9000; display: grid; place-items: center; padding: 16px; background: rgba(21,22,22,.55); backdrop-filter: blur(4px); }
.gate[hidden] { display: none; }
.gate__card { max-width: 480px; text-align: center; background: var(--pearl); padding: 36px 28px; border-radius: var(--radius); box-shadow: 0 30px 60px -20px rgba(0,0,0,.6); }
.gate__card h2 { font-size: 2rem; color: var(--olive-deep); margin-bottom: 10px; }
.gate__card p { color: var(--muted); margin-bottom: 22px; }
.gate__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 16px; }
.gate__card small { color: var(--muted); font-size: .78rem; }
.gate__card small a { text-decoration: underline; }

/* Mientras no se confirma la edad, todas las fotos van tapadas */
body.is-gated { overflow: hidden; }
body.is-gated .gallery__item img { filter: blur(26px) saturate(.6) brightness(.85); transform: scale(1.15); }
body.is-gated .gallery { pointer-events: none; user-select: none; }

@media (max-width: 900px) {
  .gal__layout { grid-template-columns: 1fr; gap: 22px; }
  .gal__head { position: static; }
  .gal .gallery { grid-template-columns: repeat(2, 1fr); }
  .gal-nav { top: 66px; }
}
@media (max-width: 600px) {
  .gal-hero { padding: 120px 0 50px; }
  .gal { padding: 44px 0; scroll-margin-top: 120px; }
  .gal__title { font-size: 1.9rem; }
}

/* Páginas legales */
.legal { max-width: 760px; padding: 56px 0 80px; }
.legal h2 { font-size: 1.7rem; color: var(--olive-deep); margin: 34px 0 10px; }
.legal p, .legal li { color: var(--text); margin-bottom: 10px; }
.legal ul { padding-left: 20px; }
.legal__date { color: var(--muted); font-size: .85rem; margin-top: 30px; }

/* Cubierta +18 por categoría (segunda capa de seguridad) */
.gal .gallery { position: relative; }
.gallery:not(.is-visto) .gallery__item img { filter: blur(22px) saturate(.6) brightness(.8); transform: scale(1.12); }
.gallery:not(.is-visto) .gallery__open { pointer-events: none; }
.gallery__cover { all: unset; position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 10px; padding: clamp(60px, 14vw, 150px) 16px 16px; text-align: center; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.45); border-radius: var(--radius-sm); cursor: pointer; transition: opacity .4s var(--ease); }
.gallery__cover:focus-visible { outline: 3px solid var(--olive); outline-offset: 3px; }
.gallery__cover-tag { display: grid; place-items: center; width: 58px; height: 58px; border: 1.5px solid rgba(255,255,255,.85); border-radius: 50%; font-weight: 700; font-size: 1.1rem; }
.gallery__cover-txt { font-size: .95rem; opacity: .92; }
.gallery__cover-btn { margin-top: 4px; padding: 9px 20px; border-radius: 999px; background: rgba(21,22,22,.35); backdrop-filter: blur(6px); border: 1px solid rgba(255,255,255,.55); font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; transition: background .25s var(--ease); }
.gallery__cover:hover .gallery__cover-btn { background: rgba(255,255,255,.3); }
.gallery.is-visto .gallery__cover { opacity: 0; pointer-events: none; visibility: hidden; transition: opacity .4s var(--ease), visibility 0s .4s; }
