/*!
 * Galería fotográfica — Sepa Joven 2026
 * evomeet.es · Estilo alineado con sepajoven.com
 */

:root {
  --main:        #f5f2ec;   /* fondo crema de la web */
  --lilac:       #bc94ff;   /* color secundario */
  --lime:        #daff53;   /* acento */
  --sand:        #b4a283;   /* terciario */
  --black:       #000;
  --text:        #000;
  --muted:       #666;
  --placeholder: #e7e2d8;
  --nav-h:       64px;
}

@media (prefers-reduced-motion: no-preference) {
  :root { scroll-behavior: smooth; }
}

html { font-size: 14px; }

body {
  margin: 0;
  padding-top: var(--nav-h);
  font-family: 'neue-haas-grotesk-display', sans-serif;
  font-weight: 400;
  background: var(--main);
  color: var(--text);
}

/* ── NAV ─────────────────────────────────────────────────── */
#menu {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  z-index: 999;
  background: rgba(245,242,236,.92);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  transition: box-shadow .25s ease;
}
#menu > .container-fluid { width: 100%; }
#menu.scrolled { box-shadow: 0 1px 0 rgba(0,0,0,.12); }

.menu-logo img { display: block; height: 28px; width: auto; }

.dn-item {
  display: inline-block;
  padding: .45rem .95rem;
  color: var(--black);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.dn-item:hover  { background: var(--lilac); color: var(--black); }
.dn-item.active { background: var(--black); color: #fff; }

/* Botón negro recto, como "Inscríbete" en la web */
.btn-sj {
  display: inline-block;
  padding: .6rem 1.1rem;
  background: var(--black);
  color: #fff;
  border-radius: 0;
  font-weight: 500;
  font-size: .9rem;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.btn-sj:hover { background: var(--lime); color: var(--black); }

.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  border: none;
  padding: 12px 10px;
  background: var(--black);
  cursor: pointer;
}
.hamburger-btn span { display: block; width: 24px; height: 2px; background: #fff; }
.hamburger-btn:hover { background: var(--lilac); }
.hamburger-btn:hover span { background: var(--black); }

/* ── HEADER ──────────────────────────────────────────────── */
#header { padding: 2rem 0 2.5rem; }
#header-logo { display: block; width: 100%; max-width: 260px; height: auto; margin-left: auto; }

.gallery-main-title {
  margin: 0;
  font-weight: 400;
  font-size: clamp(2.6rem, 5vw, 5.25rem);   /* ≈ 84px en escritorio, como los titulares de la web */
  line-height: 1;
  letter-spacing: -.01em;
  color: var(--black);
}
.gallery-subtitle {
  display: inline-block;
  margin: 1rem 0 0;
  padding: .25rem .6rem;
  background: var(--lime);
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 500;
  color: var(--black);
}
@media (min-width: 768px) { #header { padding: 3rem 0 3.5rem; } }

/* Cabecera en una línea: título | álbumes (centro) | logo */
.header-line { display: flex; align-items: center; gap: 1.5rem; }
.header-title { flex: 0 0 auto; }
.header-menu { flex: 1 1 auto; justify-content: center; align-items: center; flex-wrap: nowrap; gap: .25rem; }
.header-menu .dn-item { padding: .45rem .8rem; font-size: 1.4rem; }
.header-logo-wrap { flex: 0 1 260px; min-width: 120px; margin-left: auto; }
@media (max-width: 1199px) { .header-title { flex: 1 1 auto; } .header-logo-wrap { flex-basis: 40%; max-width: 260px; } }

/* ── OFFCANVAS ───────────────────────────────────────────── */
#galleryMenu {
  background: var(--main);
  width: 300px;
  z-index: 1100;
}
.offcanvas-backdrop { z-index: 1099; }
#galleryMenu .offcanvas-header { padding: 1rem 1.25rem; }
#galleryMenu .offcanvas-body { position: relative; padding-bottom: 9rem; }

.oc-item {
  display: block;
  padding: .7rem 1.25rem .7rem 1.5rem;
  color: var(--black);
  text-decoration: none;
  font-size: 1.7rem;
  font-weight: 400;
  border-left: 4px solid transparent;
  transition: background .15s, border-color .15s;
}
.oc-item:hover  { background: rgba(188,148,255,.25); border-left-color: var(--lilac); }
.oc-item.active { background: var(--black); color: #fff; border-left-color: var(--lime); }

.oc-brand { position: absolute; left: 1.5rem; right: 1.25rem; bottom: 2rem; }
.oc-date  { margin-top: .9rem; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase; }

/* ── LOADER ──────────────────────────────────────────────── */
#infinite-loader {
  position: fixed;
  left: 50%; bottom: 24px;
  transform: translateX(-50%);
  z-index: 1200;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 18px;
  background: var(--black);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 10px 30px rgba(0,0,0,.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease;
}
#infinite-loader.visible { opacity: 1; }
#infinite-loader .spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: var(--lime);
  border-radius: 50%;
  animation: spin .9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── GALERÍA ─────────────────────────────────────────────── */
.masonry {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 6px;
  padding: 0 6px;
}
.masonry .thumb {
  display: block;
  overflow: hidden;
  position: relative;
  background: var(--placeholder);
}
.masonry .thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform .35s ease, filter .35s ease, opacity .35s ease;
}
.masonry .thumb:hover img { transform: scale(1.04); }
.masonry .masonry-index {
  position: absolute;
  left: 8px; top: 8px;
  z-index: 1;
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1;
  font-weight: 500;
  background: var(--black);
  color: var(--lime);
}

img.blur-up.is-loading { filter: blur(8px); opacity: .9; transform: scale(1.01); }

/* ── FOOTER ──────────────────────────────────────────────── */
#footer {
  padding: 3rem 1rem 2.5rem;
  text-align: center;
  font-size: .9rem;
  color: var(--muted);
}

/* LightGallery: acento de marca */
.lg-outer .lg-thumb-item.active,
.lg-outer .lg-thumb-item:hover { border-color: var(--lime) !important; }
.lg-progress-bar .lg-progress { background-color: var(--lime) !important; }
