/* ============================================================
   Victor Goikoetxea — Estilos principales
   Paleta: #0d0d0d fondo · #f0f0f0 texto · #d4af37 dorado
   ============================================================ */

/* ---- Reset y base ---- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:       #0d0d0d;
  --bg2:      #161616;
  --bg3:      #1e1e1e;
  --text:     #f0f0f0;
  --muted:    #888;
  --gold:     #d4af37;
  --gold-dim: #d4af3740;
  --radius:   3px;
  --transition: 0.3s ease;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Jost', 'Helvetica Neue', Arial, sans-serif;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  font-weight: 300;
  line-height: 1.6;
  min-height: 100vh;
}

img { display: block; max-width: 100%; height: auto; }
a   { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; }

/* ---- Header ---- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(13,13,13,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid #ffffff0f;
  transition: background var(--transition);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
  height: 68px;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.header-logo {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ---- Navegación principal ---- */
.main-nav {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex: 1;
  justify-content: center;
}

.nav-item, .nav-item > a {
  font-size: 0.72rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #aaa;
  padding: 0.5rem 0.75rem;
  transition: color var(--transition);
  position: relative;
}
.nav-item:hover > a, .nav-item > a:hover { color: var(--text); }
.nav-item.has-dropdown { position: relative; }
.nav-item.has-dropdown > a { display: block; }

/* Dropdown */
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: #111;
  border: 1px solid #2a2a2a;
  border-top: 2px solid var(--gold);
  min-width: 200px;
  padding: 0.5rem 0;
  z-index: 200;
}
.dropdown a {
  display: block;
  padding: 0.6rem 1.2rem;
  font-size: 0.7rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #aaa;
  transition: color var(--transition), background var(--transition);
}
.dropdown a:hover { color: var(--gold); background: #1a1a1a; }
.has-dropdown:hover .dropdown { display: block; }

/* ---- Selector de idioma ---- */
.lang-selector {
  display: flex;
  gap: 0.3rem;
  flex-shrink: 0;
}
.lang-selector a {
  font-size: 0.65rem;
  letter-spacing: 1px;
  color: #666;
  padding: 0.3rem 0.4rem;
  transition: color var(--transition);
}
.lang-selector a:hover, .lang-selector a.active { color: var(--gold); }
.lang-selector a.active { border-bottom: 1px solid var(--gold); }

/* Ocultar selector móvil en desktop; se muestra solo en menú móvil */
.lang-selector-mobile { display: none; }

/* ---- Hamburger ---- */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 6px;
  margin-left: auto;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: all var(--transition);
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Overlay móvil */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 998;
}
.nav-overlay.active { display: block; }

/* ---- Main content ---- */
.main-content { padding-top: 68px; }

/* ---- Hero ---- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.55);
  transition: transform 8s ease;
}
.hero:hover .hero-img { transform: scale(1.03); }
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 60%);
}
.hero-content {
  position: relative;
  z-index: 10;
  padding: 4rem 5vw;
  max-width: 800px;
}
.hero-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.2rem, 5vw, 4rem);
  font-weight: normal;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: #fff;
  line-height: 1.1;
  margin-bottom: 1rem;
}
.hero-content .hero-sub {
  font-size: 0.85rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
}

/* ---- Hero Slider ---- */
.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s ease;
  pointer-events: none;
}
.hero-slide.active {
  opacity: 1;
  pointer-events: auto;
}
.hero-slide .hero-img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center;
  filter: brightness(0.5);
  transition: transform 8s ease;
}
.hero-slide.active .hero-img { transform: scale(1.04); }
.hero-slide .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.1) 60%);
}

/* Cita artística */
.hero-quote {
  position: absolute;
  top: 50%;
  right: 6vw;
  transform: translateY(-50%);
  max-width: 380px;
  text-align: right;
  z-index: 2;
  opacity: 0;
  transition: opacity 1s ease 0.6s;
}
.hero-slide.active .hero-quote { opacity: 1; }
.hero-quote-text {
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2vw, 1.4rem);
  font-style: italic;
  color: rgba(255,255,255,0.85);
  line-height: 1.6;
  letter-spacing: 0.5px;
  border-right: 2px solid var(--gold);
  padding-right: 1.2rem;
}

/* Navegación slider */
.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  width: 48px; height: 48px;
  border-radius: 50%;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
}
.hero-nav:hover { background: rgba(0,0,0,0.65); border-color: var(--gold); }
.hero-prev { left: 2vw; }
.hero-next { right: 2vw; }

/* Dots */
.hero-dots {
  position: absolute;
  bottom: 2rem;
  right: 5vw;
  z-index: 10;
  display: flex;
  gap: .5rem;
}
.hero-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.5);
  background: transparent;
  cursor: pointer;
  transition: background .2s, border-color .2s;
  padding: 0;
}
.hero-dot.active {
  background: var(--gold);
  border-color: var(--gold);
}

/* Admin heroes list */
.heroes-admin-list { display: flex; flex-direction: column; }
.hero-admin-row {
  display: grid;
  grid-template-columns: 32px 140px 1fr auto auto;
  align-items: center;
  gap: 1rem;
  padding: .75rem 1.5rem;
  border-bottom: 1px solid var(--border);
  cursor: default;
}
.hero-admin-row:last-child { border-bottom: none; }
.hero-admin-drag { color: var(--muted); font-size:1.2rem; cursor: grab; user-select:none; }
.hero-admin-thumb { width:140px; height:80px; overflow:hidden; border-radius:3px; background:var(--bg2); flex-shrink:0; }
.hero-admin-thumb img { width:100%;height:100%;object-fit:cover; }
.hero-admin-nophoto { width:100%;height:100%;display:flex;align-items:center;justify-content:center;font-size:.7rem;color:var(--muted); }
.hero-admin-info { min-width:0; }
.hero-admin-title { font-size:.95rem;font-weight:500;margin-bottom:.2rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.hero-admin-sub { font-size:.78rem;color:var(--muted);margin-bottom:.2rem; }
.hero-admin-cita { font-size:.78rem;color:var(--gold);font-style:italic;white-space:nowrap;overflow:hidden;text-overflow:ellipsis; }
.hero-admin-badge { }
.hero-admin-actions { display:flex; gap:.4rem; }

/* ---- Secciones ---- */
.section { padding: 2rem 5vw 5rem; }
.section-header {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  margin-bottom: 3rem;
}
.section-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: normal;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text);
}
.section-line {
  flex: 1;
  height: 1px;
  background: #2a2a2a;
}
.section-link {
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--gold-dim);
  padding-bottom: 2px;
  transition: border-color var(--transition);
}
.section-link:hover { border-color: var(--gold); }

/* ---- Grid de obras — Masonry con CSS columns ---- */
.obras-grid {
  columns: 4;
  column-gap: 6px;
}
.obra-card {
  position: relative;
  break-inside: avoid;
  overflow: hidden;
  cursor: pointer;
  background: var(--bg3);
  margin-bottom: 6px;
  display: block;
}
.obra-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease, filter 0.6s ease;
}
.obra-card:hover img { transform: scale(1.04); filter: brightness(0.65); }
.obra-card-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;   /* solo la parte inferior */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem 1rem 0.8rem;
  background: linear-gradient(to top, rgba(0,0,0,0.78) 0%, transparent 100%);
  transition: opacity var(--transition);
}
.obra-card-title {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 400;
  font-style: italic;
  color: #fff;
  margin-bottom: 0.15rem;
  line-height: 1.2;
}
.obra-card-meta {
  font-size: 0.62rem;
  letter-spacing: 1.5px;
  color: var(--gold);
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity var(--transition), transform var(--transition);
}
/* Al hover: la meta (técnica) aparece */
.obra-card:hover .obra-card-meta {
  opacity: 1;
  transform: translateY(0);
}
/* Placeholder cuando no hay imagen */
.obra-card-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--bg3), var(--bg2));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.obra-card-placeholder span {
  font-family: var(--font-serif);
  font-size: 0.8rem;
  letter-spacing: 2px;
  color: var(--muted);
  text-transform: uppercase;
  text-align: center;
}

/* ---- Filtros de categoría ---- */
.cat-filters {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #2a2a2a;
}
.cat-filter-btn {
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.5rem 1.2rem;
  border: 1px solid #2a2a2a;
  transition: all var(--transition);
  background: none;
}
.cat-filter-btn:hover, .cat-filter-btn.active {
  color: var(--gold);
  border-color: var(--gold);
  background: var(--gold-dim);
}

/* ---- Blog cards ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.blog-card {
  background: var(--bg2);
  border: 1px solid #1e1e1e;
  overflow: hidden;
  transition: border-color var(--transition);
}
.blog-card:hover { border-color: #3a3a3a; }
.blog-card-img {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg3);
}
.blog-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}
.blog-card:hover .blog-card-img img { transform: scale(1.05); }
.blog-card-body { padding: 1.5rem; }
.blog-card-date {
  font-size: 0.7rem;
  letter-spacing: 1px;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.blog-card-title {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: normal;
  line-height: 1.4;
  margin-bottom: 0.8rem;
  color: var(--text);
}
.blog-card-excerpt { font-size: 0.88rem; color: var(--muted); line-height: 1.6; }
.blog-card-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
  border-bottom: 1px solid var(--gold-dim);
  transition: border-color var(--transition);
}
.blog-card-link:hover { border-color: var(--gold); }

/* ---- Post individual ---- */
.post-hero {
  width: 100%;
  max-height: 60vh;
  overflow: hidden;
}
.post-hero img { width: 100%; object-fit: cover; }
.post-body { max-width: 800px; margin: 0 auto; padding: 4rem 2rem; }
.post-body h1 {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: normal;
  margin-bottom: 1rem;
}
.post-meta { color: var(--gold); font-size: 0.75rem; letter-spacing: 2px; margin-bottom: 2.5rem; text-transform: uppercase; }
.post-content { font-size: 1rem; line-height: 1.9; color: #ccc; }
.post-content p { margin-bottom: 1.5rem; }
.post-content h2, .post-content h3 { font-family: var(--font-serif); font-weight: normal; color: var(--text); margin: 2rem 0 1rem; }
.post-nav { display: flex; justify-content: space-between; margin-top: 3rem; padding-top: 2rem; border-top: 1px solid #2a2a2a; font-size: 0.75rem; letter-spacing: 1px; text-transform: uppercase; }
.post-nav a { color: var(--gold); }

/* ---- Cursos ---- */
.cursos-list { display: flex; flex-direction: column; gap: 2rem; }
.curso-card {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 0;
  background: var(--bg2);
  border: 1px solid #1e1e1e;
  overflow: hidden;
  transition: border-color var(--transition);
}
.curso-card:hover { border-color: #3a3a3a; }
.curso-img { aspect-ratio: 4/3; overflow: hidden; background: var(--bg3); }
.curso-img img { width: 100%; height: 100%; object-fit: cover; }
.curso-body { padding: 2rem; display: flex; flex-direction: column; justify-content: space-between; }
.curso-title { font-family: var(--font-serif); font-size: 1.3rem; font-weight: normal; margin-bottom: 1rem; }
.curso-meta { font-size: 0.75rem; letter-spacing: 1px; text-transform: uppercase; color: var(--gold); margin-bottom: 0.5rem; }
.curso-desc { font-size: 0.9rem; color: var(--muted); line-height: 1.6; flex: 1; margin-bottom: 1.5rem; }

/* ---- Vídeos ---- */
/* Vídeo destacado (Presentación) */
.video-featured {
  cursor: pointer;
  max-width: 900px;
  margin: 0 auto;
  position: relative;
  overflow: hidden;
  background: var(--bg3);
}
.video-featured .video-thumb { aspect-ratio: 16/9; }
.video-featured:hover .video-thumb img { transform: scale(1.03); filter: brightness(0.6); }
.video-featured .video-play { opacity: 0; transition: opacity var(--transition); }
.video-featured:hover .video-play { opacity: 1; }
.video-featured .video-play-icon { width: 80px; height: 80px; }

.videos-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.video-card {
  position: relative;
  cursor: pointer;
  overflow: hidden;
  background: var(--bg3);
}
.video-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  position: relative;
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease, filter 0.5s ease; }
.video-card:hover .video-thumb img { transform: scale(1.05); filter: brightness(0.6); }
.video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.video-card:hover .video-play { opacity: 1; }
.video-play-icon {
  width: 60px; height: 60px;
  border-radius: 50%;
  background: rgba(212,175,55,0.9);
  display: flex; align-items: center; justify-content: center;
}
.video-play-icon::after {
  content: '';
  border-left: 20px solid #000;
  border-top: 12px solid transparent;
  border-bottom: 12px solid transparent;
  margin-left: 4px;
}
.video-info { padding: 1rem; }
.video-title { font-family: var(--font-serif); font-size: 0.95rem; font-weight: normal; }

/* ---- Contacto ---- */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  max-width: 1100px;
  margin: 0 auto;
}
.form-group { margin-bottom: 1.5rem; }
.form-group label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.form-group input, .form-group textarea, .form-group select {
  width: 100%;
  background: var(--bg2);
  border: 1px solid #2a2a2a;
  color: var(--text);
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color var(--transition);
  border-radius: var(--radius);
  outline: none;
}
.form-group input:focus, .form-group textarea:focus { border-color: var(--gold); }
.form-group textarea { resize: vertical; min-height: 140px; }

.btn {
  display: inline-block;
  padding: 0.9rem 2.5rem;
  font-size: 0.72rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  border-radius: var(--radius);
}
.btn-gold {
  background: var(--gold);
  color: #000;
  border: 1px solid var(--gold);
}
.btn-gold:hover { background: transparent; color: var(--gold); }
.btn-outline {
  background: transparent;
  color: var(--gold);
  border: 1px solid var(--gold);
}
.btn-outline:hover { background: var(--gold); color: #000; }

.contacto-info p { margin-bottom: 0.8rem; font-size: 0.92rem; color: #aaa; }
.contacto-info strong { color: var(--text); font-weight: normal; letter-spacing: 1px; }
.contacto-map { margin-top: 2rem; border: 1px solid #2a2a2a; overflow: hidden; }
.contacto-map iframe { display: block; }

/* ---- Bio ---- */
.bio-content { max-width: 850px; margin: 0 auto; }
.bio-content p { font-size: 1rem; line-height: 1.9; color: #ccc; margin-bottom: 1.5rem; }
.bio-content h2 { font-family: var(--font-serif); font-weight: normal; font-size: 1.4rem; margin: 2.5rem 0 1rem; color: var(--text); letter-spacing: 2px; }

/* ---- Venta de obras ---- */
/* ---- Sección Venta ---- */
.venta-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}
.venta-card {
  background: var(--bg2);
  border: 1px solid #1e1e1e;
  overflow: hidden;
  cursor: pointer;
  transition: border-color var(--transition), transform var(--transition);
}
.venta-card:hover { border-color: var(--gold-dim); transform: translateY(-3px); }

/* Imagen grande */
.venta-card-img {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--bg3);
}
.venta-card-img img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, filter 0.4s ease;
  display: block;
  filter: brightness(1);
}
.venta-card:hover .venta-card-img img { transform: scale(1.04); filter: brightness(1); }
.venta-card-nophoto {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--muted); font-size: .85rem; letter-spacing: 2px; text-transform: uppercase;
}
.venta-sold-ribbon {
  position: absolute; top: 20px; right: -30px;
  background: #333; color: #aaa;
  font-size: .65rem; letter-spacing: 2px; text-transform: uppercase;
  padding: 6px 40px;
  transform: rotate(45deg);
}

/* Cuerpo */
.venta-card-body { padding: 1.75rem 2rem 2rem; }
.venta-card-title {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  font-weight: normal;
  font-style: italic;
  letter-spacing: 1px;
  margin-bottom: .6rem;
  color: var(--text);
}
.venta-card-meta {
  display: flex; gap: .5rem 1.2rem; flex-wrap: wrap;
  font-size: .72rem; letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--muted); margin-bottom: 1.2rem;
}
.venta-card-price {
  font-family: var(--font-serif);
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 1.25rem;
  letter-spacing: 1px;
}
.venta-card-price.sold {
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 2px;
  text-transform: uppercase;
}
.venta-card-btn { font-size: .75rem; letter-spacing: 2px; }

/* Legado: clase antigua usada en home */
.venta-sold { font-size: 0.7rem; letter-spacing: 2px; text-transform: uppercase; color: var(--muted); border: 1px solid #2a2a2a; padding: 0.3rem 0.8rem; display: inline-block; margin-bottom: 1rem; }

/* ---- CTA strip ---- */
.cta-strip {
  background: var(--bg2);
  border-top: 1px solid #1e1e1e;
  border-bottom: 1px solid #1e1e1e;
  text-align: center;
  padding: 4rem 2rem;
}
.cta-strip h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: normal;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
}

/* ---- Lightbox ---- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.82);
  align-items: center;
  justify-content: center;
  padding: 2rem;
  overflow: hidden;
}

/* Fondo difuminado — imagen actual estirada y borrosa */
#lb-bg {
  position: absolute;
  inset: -40px;          /* desborda para que el blur no deje bordes blancos */
  background-size: cover;
  background-position: center;
  filter: blur(32px) brightness(0.28) saturate(0.6);
  transition: opacity 0.4s ease, background-image 0.4s ease;
  opacity: 0;
  z-index: 0;
  pointer-events: none;
}
.lightbox.open { display: flex; }
.lightbox-close {
  position: absolute;
  top: 1.5rem; right: 2rem;
  z-index: 2;
  font-size: 2rem;
  color: #aaa;
  z-index: 10;
  line-height: 1;
  transition: color var(--transition);
}
.lightbox-close:hover { color: var(--text); }
.lightbox-content {
  display: flex;
  flex-direction: column;
  max-width: 1000px;
  width: 100%;
  height: 90vh;
  position: relative;
  z-index: 1;
}

/* Columna izquierda: título | imagen (crece) | counter | thumbs */
.lightbox-img-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  position: relative;
}
.lb-title-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 56px 0.7rem 56px;
  text-align: center;
}
.lb-title-text {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: normal;
  letter-spacing: 1px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.lb-title-cat {
  font-size: 0.7rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--gold);
}
.lb-img-stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  overflow: hidden;
  flex: 1;               /* ocupa todo el espacio libre entre título y thumbs */
}
.lb-img-stage img {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: opacity 0.2s ease;
  display: block;
  /* Permitir zoom con transform sin que se corte */
  transform-origin: center center;
  will-change: transform;
  touch-action: none; /* gestionamos el touch manualmente */
}

/* Botones prev/next: overlay sobre .lb-img-stage */
.lb-prev, .lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 2.2rem;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  line-height: 1;
  flex-shrink: 0;
}
.lb-prev { left: 8px; }
.lb-next { right: 8px; }
.lb-prev:hover, .lb-next:hover { background: var(--gold); border-color: var(--gold); color: #000; }

/* Contador + thumbs: fijos debajo, no scrollean */
.lb-counter {
  font-size: 0.75rem;
  letter-spacing: 2px;
  color: var(--muted);
  text-align: center;
  padding: 0.5rem 0 0.3rem;
}
.lb-thumbs {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding: 4px 2px;
  scroll-behavior: smooth;
  flex-shrink: 0;
}
.lb-thumbs::-webkit-scrollbar { height: 3px; }
.lb-thumbs::-webkit-scrollbar-thumb { background: #444; border-radius: 2px; }
.lb-thumb {
  width: 52px; height: 52px;
  object-fit: cover;
  border-radius: 2px;
  cursor: pointer;
  opacity: 0.45;
  border: 2px solid transparent;
  transition: opacity 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.lb-thumb:hover { opacity: 0.75; }
.lb-thumb.active { opacity: 1; border-color: var(--gold); }

/* Panel info derecho — ya no se usa, oculto */
.lightbox-info { display: none; }

/* ---- Overlay de datos técnicos al hacer hover ---- */
.lb-info-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  opacity: 0;
  transition: opacity 0.25s ease;
  padding: 2rem;
  pointer-events: none;   /* no bloquea clicks en botones */
  border-radius: 2px;
}
.lb-img-stage:hover .lb-info-overlay { opacity: 1; }
.lb-info-overlay span {
  font-size: 0.82rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #ccc;
  text-align: center;
}
.lb-info-overlay span strong { color: #fff; font-weight: normal; }
.lb-info-overlay .lb-info-price { pointer-events: all; }
.lb-info-overlay .lb-info-price a.btn {
  margin-top: 0.5rem;
  display: inline-block;
}
.lb-info-overlay .lb-info-desc {
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
  color: #aaa;
  max-width: 480px;
  text-align: center;
  line-height: 1.6;
}
.lightbox-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: normal;
  margin-bottom: 1rem;
  letter-spacing: 1px;
}
.lightbox-meta {
  font-size: 0.8rem;
  color: var(--muted);
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 0.4rem;
}
.lightbox-meta span { color: var(--text); }
.lightbox-desc { font-size: 0.95rem; color: #aaa; line-height: 1.7; margin: 1.5rem 0; }
.lightbox-price {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
}

/* ---- Carrusel lightbox ---- */
#lb-main-img { transition: opacity 0.2s ease; max-height: 72vh; max-width: 100%; object-fit: contain; display: block; }

/* Botones prev/next: overlay fijo a los laterales del contenedor imagen */
.lightbox-img-wrap {
  position: relative;
}
.lb-prev, .lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(0,0,0,0.55);
  border: 1px solid rgba(255,255,255,0.15);
  color: #fff;
  font-size: 2.2rem;
  width: 48px; height: 48px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  line-height: 1;
  flex-shrink: 0;
  /* No se mueven aunque la imagen sea estrecha */
}
.lb-prev { left: 8px; }
.lb-next { right: 8px; }
.lb-prev:hover, .lb-next:hover { background: var(--gold); border-color: var(--gold); color: #000; }

/* Barra inferior: contador + miniaturas */
.lb-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 0.6rem;
  width: 100%;
}
.lb-counter { font-size: 0.78rem; letter-spacing: 2px; color: var(--muted); }
.lb-thumbs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  max-width: 100%;
  scroll-behavior: smooth;
  width: 100%;
  justify-content: center;
}
.lb-thumbs::-webkit-scrollbar { height: 3px; }
.lb-thumbs::-webkit-scrollbar-thumb { background: #444; border-radius: 2px; }
.lb-thumb {
  width: 56px; height: 56px;
  object-fit: cover;
  border-radius: 2px;
  cursor: pointer;
  opacity: 0.45;
  border: 2px solid transparent;
  transition: opacity 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.lb-thumb:hover { opacity: 0.75; }
.lb-thumb.active { opacity: 1; border-color: var(--gold); }

/* ---- Video modal ---- */
.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0,0,0,0.97);
  align-items: center;
  justify-content: center;
}
.video-modal.open { display: flex; }
.video-modal-inner { position: relative; width: 90vw; max-width: 1000px; }
.video-modal-inner iframe { width: 100%; aspect-ratio: 16/9; border: none; }
.video-modal-close {
  position: absolute;
  top: -2.5rem; right: 0;
  font-size: 2rem;
  color: #aaa;
  transition: color var(--transition);
}
.video-modal-close:hover { color: #fff; }

/* ---- Footer ---- */
.site-footer {
  background: #080808;
  border-top: 1px solid #1a1a1a;
  padding: 3rem 5vw;
}
.footer-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.footer-logo {
  font-family: var(--font-serif);
  font-size: 1rem;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--gold);
}
.footer-contact { display: flex; flex-direction: column; gap: 0.3rem; text-align: center; }
.footer-contact a, .footer-contact span { font-size: 0.8rem; color: var(--muted); }
.footer-contact a:hover { color: var(--gold); }
.footer-copy { font-size: 0.72rem; color: #444; letter-spacing: 1px; }

/* ---- Alertas ---- */
.alert {
  padding: 1rem 1.5rem;
  margin-bottom: 1.5rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
}
.alert-success { background: #0d2b0d; border: 1px solid #2a5a2a; color: #7ec87e; }
.alert-error   { background: #2b0d0d; border: 1px solid #5a2a2a; color: #c87e7e; }

/* ---- Página interior ---- */
.page-hero {
  background: linear-gradient(to bottom, var(--bg2), var(--bg));
  padding: 2rem 5vw 1.5rem;
  border-bottom: 1px solid #1a1a1a;
}
.page-title {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: normal;
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--text);
}
.page-title span { color: var(--gold); }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .obras-grid         { columns: 3; }
  .venta-grid         { grid-template-columns: 1fr; }
  .lightbox-content   { grid-template-columns: 1fr; }
  .lightbox-img-wrap img { max-height: 50vh; }
}

@media (max-width: 768px) {
  /* Header móvil — reducir gaps para que el hamburger quepa */
  .header-inner {
    gap: 0;
    padding: 0 0.75rem;
  }
  .header-logo {
    font-size: 0.85rem;
    letter-spacing: 2px;
    /* No flex:1 — el hamburger con margin-left:auto se encarga de ir al extremo */
  }
  /* Selector de idioma: ocultar del header, solo visible dentro del nav */
  .lang-selector-desktop { display: none; }
  .lang-selector-mobile  {
    display: flex;
    gap: 0.25rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #2a2a2a;
    width: 100%;
  }
  .lang-selector-mobile a {
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    color: #666;
    padding: 0.4rem 0.6rem;
    border: 1px solid #2a2a2a;
    border-radius: 2px;
    transition: color 0.2s, border-color 0.2s;
  }
  .lang-selector-mobile a.active,
  .lang-selector-mobile a:hover {
    color: var(--gold);
    border-color: var(--gold);
  }
  /* Hamburger siempre visible y bien dimensionado */
  .hamburger {
    display: flex;
    flex-shrink: 0;
    padding: 8px;
    margin-left: auto;  /* empuja a la derecha */
  }

  /* Menú deslizante móvil */
  .main-nav {
    position: fixed;
    top: 0; right: -100%;
    width: 80vw; max-width: 320px;
    height: 100%;
    background: #111;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    padding: 5rem 2rem 2rem;
    gap: 0;
    z-index: 999;
    transition: right 0.35s cubic-bezier(.4,0,.2,1);
    overflow-y: auto;
  }
  .main-nav.open { right: 0; }
  .nav-item, .nav-item > a {
    display: block;
    width: 100%;
    padding: 0.9rem 0;
    font-size: 0.8rem;
    border-bottom: 1px solid #1e1e1e;
  }
  .dropdown {
    position: static;
    transform: none;
    border: none;
    border-top: none;
    background: transparent;
    padding: 0 0 0 1rem;
  }
  .has-dropdown:hover .dropdown { display: none; }
  .has-dropdown.open .dropdown  { display: block; }
  .dropdown a { padding: 0.5rem 0; border-bottom: 1px solid #1a1a1a; }

  /* Grids */
  .obras-grid         { columns: 2; column-gap: 3px; }
  .obras-grid .obra-card { margin-bottom: 3px; }
  .blog-grid          { grid-template-columns: 1fr; }
  .videos-grid        { grid-template-columns: repeat(2, 1fr); }
  .venta-grid         { grid-template-columns: 1fr; }
  .contacto-grid      { grid-template-columns: 1fr; gap: 3rem; }
  .curso-card         { grid-template-columns: 1fr; }
  .footer-inner       { flex-direction: column; text-align: center; }
  .lightbox-content   { grid-template-columns: 1fr; padding: 1rem; }
}

@media (max-width: 480px) {
  .obras-grid            { columns: 1; }
  .videos-grid           { grid-template-columns: 1fr; }
  .hero-content h1       { font-size: 1.8rem; }
  /* Hero compacto en móvil pequeño */
  .hero                  { min-height: 480px; }
  /* Lightbox en móvil: imagen grande, miniaturas pequeñas */
  .lb-img-stage          { min-height: 55vw; }
  .lb-thumbs             { gap: 4px; }
  .lb-thumb              { width: 44px; height: 44px; }
  .hero-quote            { display: none; } /* cita oculta en móvil muy pequeño */
}

/* Hero: altura real en móvil (evita el gap de la barra del navegador) */
@supports (height: 100svh) {
  .hero { height: 100svh; }
}

/* ---- Lightbox móvil ---- */
@media (max-width: 768px) {
  /* El lightbox ocupa toda la pantalla */
  #lightbox { align-items: flex-start; }
  .lightbox-content {
    padding: 0.5rem 0.5rem 1rem;
    height: 100%;
    overflow-y: auto;
  }
  /* Imagen principal: ocupa el ancho completo */
  .lb-img-stage {
    max-height: 56vw;
  }
  .lb-img-stage img {
    max-height: 56vw;
    width: 100%;
    object-fit: contain;
  }
  /* Previo/siguiente: más grandes y fáciles de tocar */
  .lb-prev, .lb-next {
    width: 44px; height: 44px;
    font-size: 1.4rem;
  }
  /* Cita del hero: posición diferente en móvil */
  .hero-quote {
    top: auto;
    bottom: 5rem;
    right: 1rem;
    left: 1rem;
    text-align: left;
    max-width: 100%;
    transform: none;
  }
  .hero-quote-text {
    font-size: 0.95rem;
    border-right: none;
    border-left: 2px solid var(--gold);
    padding-right: 0;
    padding-left: 0.75rem;
  }
  /* Dots del slider: centrados abajo */
  .hero-dots {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    bottom: 1.5rem;
  }
  /* Flechas slider: más cerca de los bordes */
  .hero-prev { left: 0.5rem; }
  .hero-next { right: 0.5rem; }
  /* Previo/siguiente obras: más grandes para tocar */
  .hero-nav  { width: 40px; height: 40px; font-size: 1.2rem; }
}
