*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Lato', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  background: #fff;
  color: #111;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── NAV ─────────────────────────────────────────── */

.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 24px 22px;
  pointer-events: none;
}

.site-nav a {
  pointer-events: all;
  font-family: 'Raleway', sans-serif;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-decoration: none;
  color: #111;
}

.site-nav.over-hero a { color: #fff; }

/* ── EVENTS GRID ─────────────────────────────────── */

.events-grid {
  padding: 160px 48px 80px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 56px 32px;
  max-width: 1400px;
  margin: 0 auto;
}

@media (max-width: 900px) {
  .events-grid {
    padding: 80px 24px 80px;
    gap: 40px 16px;
  }
}

@media (max-width: 766px) {
  .events-grid {
    grid-template-columns: 1fr;
    gap: 48px 0;
    padding: 72px 0 60px;
  }
}

.event-card {
  display: block;
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.event-card-thumb {
  width: 100%;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  display: block;
  background: #f0f0f0;
}

.event-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .45s cubic-bezier(.25,.46,.45,.94), opacity .3s;
}

.event-card:hover .event-card-thumb img {
  transform: scale(1.03);
  opacity: .9;
}

.event-card-info {
  padding: 14px 0 0;
  text-align: center;
}

.event-card-title {
  font-family: 'Raleway', sans-serif;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  line-height: 1.3;
  margin-bottom: 5px;
  color: #111;
}

.event-card-date {
  font-family: 'Lato', sans-serif;
  font-size: .76rem;
  font-weight: 300;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #999;
}

/* ── FOOTER ──────────────────────────────────────── */

.site-footer {
  text-align: center;
  padding: 48px 0 40px;
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #111;
}

/* ── EVENT PAGE HERO ──────────────────────────────── */

.event-hero {
  width: 100%;
  height: 100svh;
  position: relative;
  overflow: hidden;
}

.event-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  box-shadow: inset 0 0 0 10px #fff;
  z-index: 5;
  pointer-events: none;
}

.event-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.event-hero-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgba(8,10,12,.18) 0%, rgba(8,10,12,.08) 40%, rgba(8,10,12,.72) 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 32px;
  color: #fff;
  z-index: 6;
}

.event-hero-logo {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .24em;
  text-transform: uppercase;
  opacity: .9;
  text-decoration: none;
  color: #fff;
  white-space: nowrap;
}

.event-hero-bottom {
  text-align: center;
  width: 100%;
}

.event-hero-title {
  font-family: 'Raleway', sans-serif;
  font-size: clamp(2rem, 5.5vw, 5rem);
  font-weight: 700;
  letter-spacing: .02em;
  line-height: 1;
  text-transform: uppercase;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.event-hero-date {
  margin-top: 14px;
  font-size: .68rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  opacity: .74;
}

/* ── EVENT NAV (categories) ───────────────────────── */

.event-nav {
  position: sticky;
  top: 0;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid #e8e8e8;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 62px;
  overflow: auto;
  padding: 0 20px;
}

.event-nav-back {
  display: flex;
  align-items: center;
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  text-decoration: none;
  color: #8c8c8c;
  padding: 0;
  flex-shrink: 0;
  transition: color .15s;
  white-space: nowrap;
}

.event-nav-back:hover { color: #111; }

.event-nav-title {
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #111;
  white-space: nowrap;
  flex-shrink: 0;
}

.event-nav-cats {
  display: flex;
  overflow-x: auto;
  flex: 1;
  justify-content: flex-end;
  scrollbar-width: none;
}

.event-nav-cats::-webkit-scrollbar { display: none; }

.event-nav-cat {
  display: flex;
  align-items: center;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 10px 14px;
  border: 1px solid transparent;
  background: #f3f3f1;
  cursor: pointer;
  color: #7f7f7a;
  white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
  flex-shrink: 0;
  margin: 0 0 0 8px;
}

.event-nav-cat.active,
.event-nav-cat:hover {
  color: #111;
  border-color: #d8d5cd;
  background: #fff;
}


/* ── MASONRY GRID ─────────────────────────────────── */

.photo-masonry {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 3px;
}

.photo-masonry-batch {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 3px;
}

.photo-load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: #9e968a;
  opacity: 0;
  transition: opacity .2s ease;
}

.photo-load-more.is-active {
  opacity: 1;
}

.photo-load-more::before {
  content: "Cargando mas fotos";
}

@media (max-width: 1100px) { .photo-masonry-batch { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 766px)   { .photo-masonry-batch { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px)  { .photo-masonry-batch { grid-template-columns: 1fr; } }

.masonry-item {
  display: block;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  overflow: hidden;
  background: #f0f0f0;
  position: relative;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .32s ease, transform .32s ease;
}

.masonry-item.is-ready {
  opacity: 1;
  transform: translateY(0);
}

.masonry-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: opacity .2s;
}

@media (max-width: 766px) {
  .masonry-item {
    aspect-ratio: 1 / 1;
  }
}

.masonry-item:hover img { opacity: .82; }

/* ── LIGHTBOX ─────────────────────────────────────── */

img {
  user-select: none;
  -webkit-user-drag: none;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: #f0efed;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, background .3s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: all;
}

/* ── Header toolbar ── */
.lb-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  flex-shrink: 0;
  transition: opacity .25s;
}

.lb-counter {
  font-family: 'Lato', sans-serif;
  font-size: .58rem;
  font-weight: 400;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #888;
}

.lb-actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

.lb-btn {
  width: 34px; height: 34px;
  border: none;
  background: none;
  cursor: pointer;
  color: #666;
  display: flex; align-items: center; justify-content: center;
  border-radius: 4px;
  transition: background .12s, color .12s;
}
.lb-btn:hover { background: rgba(0,0,0,.07); color: #111; }
.lb-btn.active { color: #111; }

/* ── Photo area ── */
.lb-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 12px 16px;
  min-height: 0;
}

.lb-nav {
  width: 38px; height: 38px;
  border: none;
  background: none;
  cursor: pointer;
  color: #bbb;
  font-size: 2.4rem;
  flex-shrink: 0;
  transition: color .15s;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  user-select: none;
  padding: 0;
}
.lb-nav:hover { color: #333; }

.lb-mat {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-width: 0;
}

.lb-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
  box-shadow: 0 2px 28px rgba(0,0,0,.16);
  padding: 10px;
  background: #fff;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

.lb-shield {
  position: absolute;
  inset: 0;
  z-index: 1;
  cursor: default;
}

/* ── Slideshow mode ── */
.lightbox.slideshow-mode {
  background: #000;
  cursor: none;
}

.lightbox.slideshow-mode .lb-header,
.lightbox.slideshow-mode .lb-nav {
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s;
}

.lightbox.slideshow-mode.ui-visible .lb-header,
.lightbox.slideshow-mode.ui-visible .lb-nav {
  opacity: 1;
  pointer-events: all;
  cursor: pointer;
}

.lightbox.slideshow-mode.ui-visible {
  cursor: default;
}

.lightbox.slideshow-mode .lb-img {
  padding: 0;
  background: transparent;
  box-shadow: none;
  max-width: 100vw;
  max-height: 100vh;
}

.lightbox.slideshow-mode .lb-mat {
  padding: 0;
}

.lightbox.slideshow-mode .lb-body {
  padding: 0;
  gap: 0;
}

/* ── Share modal ─────────────────────────────────── */

.share-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.share-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.share-card {
  background: #fff;
  width: 100%;
  max-width: 440px;
  padding: 32px 32px 28px;
  position: relative;
  border-radius: 2px;
}

.share-x {
  position: absolute;
  top: 14px; right: 14px;
  border: none; background: none;
  cursor: pointer;
  color: #aaa;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  transition: color .12s;
}
.share-x:hover { color: #111; }

.share-heading {
  font-family: 'Raleway', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: #111;
  margin-bottom: 22px;
}

.share-url-row {
  margin-bottom: 10px;
}

.share-url-input {
  width: 100%;
  padding: 11px 14px;
  background: #f2f2f2;
  border: none;
  font-family: 'Lato', sans-serif;
  font-size: .72rem;
  color: #555;
  outline: none;
  cursor: text;
  border-radius: 2px;
}

.share-copy-btn {
  width: 100%;
  padding: 13px;
  background: #111;
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: 'Raleway', sans-serif;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  border-radius: 2px;
  transition: background .15s;
}
.share-copy-btn:hover { background: #333; }

.share-socials {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px 8px;
  margin-top: 24px;
}

.share-social {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  text-decoration: none;
  color: #444;
  cursor: pointer;
}

.share-social-icon {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.share-social span {
  font-family: 'Lato', sans-serif;
  font-size: .58rem;
  letter-spacing: .04em;
  color: #555;
  text-align: center;
}

.lb-btn-text {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 10px;
  font-family: 'Raleway', sans-serif;
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .12em;
  white-space: nowrap;
  width: auto;
}

/* ── Media queries ── */
@media (max-width: 766px) {
  .event-hero-title {
    font-size: clamp(2rem, 13vw, 3.3rem);
  }

  .event-nav {
    gap: 12px;
    min-height: 58px;
    padding: 0 14px;
  }

  .lb-nav { display: none; }
}
