/* ── VARIABLES ── */
:root {
  --bg: #0a0a0a;
  --surface: #111;
  --cyan: #00f2ea;
  --red: #ff004f;
  --text: #e0e0e0;
  --muted: #444;
  --border: #1c1c1c;
  --radius: 4px;
  --ease: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ── BASE ── */
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Roboto', sans-serif;
  font-weight: 300;
  min-height: 100vh;
  padding: 0´x;
}

/* ── SECTION ── */
.section {
  margin: 0 auto 72px;
}

.section-header {
  margin-bottom: 28px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}

.section-title {
  font-size: 1.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #fff;
  text-align: center;
  padding: 0px;
}

/* ── GRID — 3 cols > 2 > 1 ── */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  padding: 2rem;
}

@media (max-width: 768px) {
  .gallery-grid { grid-template-columns: repeat(1, 1fr); }
}

@media (max-width: 480px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

/* ── CARD ── */
.gallery-card {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  cursor: zoom-in;
  display: block;
  width: 100%;
}

.gallery-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--ease), opacity var(--ease);
}

/* ── OVERLAY ── */
.card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  opacity: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  transition: opacity var(--ease);
  pointer-events: none;
}

.card-title {
  font-size: 0.88rem;
  font-weight: 500;
  color: #fff;
  transform: translateY(6px);
  transition: transform var(--ease);
}

.card-sub {
  font-size: 0.72rem;
  font-weight: 300;
  margin-top: 4px;
  letter-spacing: 0.05em;
  transform: translateY(6px);
  transition: transform var(--ease) 0.03s;
}

/* ── ACCENT LINE ── */
.gallery-card::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--ease);
}

.gallery-card.card-cyan::after    { background: var(--cyan); }
.gallery-card.card-cyan .card-sub { color: var(--cyan); }
.gallery-card.card-red::after     { background: var(--red); }
.gallery-card.card-red .card-sub  { color: var(--red); }

/* ── HOVER ── */
.gallery-card:hover img           { transform: scale(1.06); opacity: 0.5; }
.gallery-card:hover .card-overlay { opacity: 1; }
.gallery-card:hover .card-title   { transform: translateY(0); }
.gallery-card:hover .card-sub     { transform: translateY(0); }
.gallery-card:hover::after        { transform: scaleX(1); }

/* ── LIGHTBOX ── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.93);
  backdrop-filter: blur(12px);
  align-items: center;
  justify-content: center;
  padding: 40px 20px 20px;
}

#lightbox.active { display: flex; }

.lb-inner {
  position: relative;
  max-width: 860px;
  width: 100%;
  animation: lbIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes lbIn {
  from { opacity: 0; transform: scale(0.95) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

/* Hint ESC arriba a la derecha */
.lb-esc-hint {
  position: absolute;
  top: -26px;
  right: 0;
  font-size: 0.62rem;
  font-weight: 300;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  pointer-events: none;
}

/* Wrap con scroll para imágenes altas */
.lb-img-wrap {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  max-height: 75vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: #2a2a2a transparent;
}

.lb-img-wrap::-webkit-scrollbar       { width: 4px; }
.lb-img-wrap::-webkit-scrollbar-track { background: transparent; }
.lb-img-wrap::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 2px; }

#lb-img {
  width: 100%;
  height: auto;
  display: block;
  background: #0d0d0d;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

/* Flechas con icono Bootstrap */
.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  border-radius: 3px;
  width: 46px;
  height: 46px;
  font-size: 1.3rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.22s, border-color 0.22s, color 0.22s;
  z-index: 2;
  backdrop-filter: blur(6px);
}

.lb-nav:hover {
  background: var(--cyan);
  border-color: var(--cyan);
  color: #000;
}

.lb-nav.prev { left: 14px; }
.lb-nav.next { right: 14px; }

#lb-close { display: none; }

/* Barra info */
.lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 2px 0;
}

.lb-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

#lb-title {
  font-size: 0.88rem;
  font-weight: 500;
  color: #fff;
}

#lb-sub {
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.05em;
}

#lb-counter {
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--muted);
}

/* Dots */
.lb-dots {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 16px;
}

.lb-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--muted);
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.lb-dot.active      { transform: scale(1.5); }
.lb-dot.cyan.active { background: var(--cyan); }
.lb-dot.red.active  { background: var(--red); }
