/* ========================================
   RESET Y CONFIGURACIÓN GLOBAL
======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  height: 100%;
  font-size: 16px;
}

body {
  font-family: 'Lexend Deca', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: #000;
  color: #39ff14;
  overflow-x: hidden;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

main {
  flex: 1 0 auto;
}

/* ========================================
   HEADER CON VIDEO
======================================== */
header {
  position: relative;
  height: 60vh;
  min-height: 450px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

header video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
  z-index: 1;
}

.header-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, 
    rgba(0, 0, 0, 0.4) 0%, 
    rgba(0, 26, 0, 0.6) 100%);
  z-index: 2;
}

.header-text {
  position: relative;
  z-index: 10;
  text-align: center;
  padding: 20px;
  max-width: 900px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 25px;
  animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-content .logo-img {
  width: 200px;
  height: auto;
  filter: drop-shadow(0 0 25px #39ff14) drop-shadow(0 0 50px rgba(57, 255, 20, 0.5));
  animation: float 4s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
}

h6 {
  font-family: 'Lexend Deca', sans-serif;
  font-size: 1.2rem;
  color: #ffffff;
  font-weight: 400;
  letter-spacing: 0.5px;
  line-height: 1.8;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8), 0 0 20px #39ff14;
  max-width: 700px;
  margin: 0 auto;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: 'Lexend Deca', sans-serif;
  background: linear-gradient(135deg, #39ff14 0%, #2ecc40 100%);
  color: #000;
  padding: 16px 40px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  box-shadow: 0 8px 30px rgba(57, 255, 20, 0.4);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.btn-hero:hover {
  background: linear-gradient(135deg, #33ff33 0%, #39ff14 100%);
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 12px 40px rgba(57, 255, 20, 0.6);
}

/* ========================================
   BANNER PRINCIPAL
======================================== */
.banner-container {
  width: 100%;
  max-width: 1400px;
  margin: 30px auto;
  padding: 0 20px;
}

.imagen-principal {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 15px;
  transition: all 0.4s ease;
}



/* ========================================
   TÍTULO DE GALERÍA
======================================== */
.gallery-header {
  text-align: center;
  padding: 50px 20px 30px;
  max-width: 1200px;
  margin: 0 auto;
}

.gallery-header h1 {
  font-size: 3rem;
  color: #39ff14;
  font-weight: 700;
  margin-bottom: 15px;
  text-shadow: 0 0 25px #39ff14, 0 0 50px rgba(57, 255, 20, 0.5);
  letter-spacing: 3px;
  text-transform: uppercase;
}

.gallery-subtitle {
  font-size: 1.2rem;
  color: #ccff99;
  font-weight: 300;
  max-width: 700px;
  margin: 0 auto;
}

/* ========================================
   GALERÍA
======================================== */
.gallery-container {
  flex: 1;
  max-width: 1600px;
  padding: 40px 20px;
  margin: 0 auto;
  width: 100%;
}

.gallery-grid {
  column-count: 4;
  column-gap: 20px;
}

.gallery-item {
  display: inline-block;
  width: 100%;
  margin: 0 0 20px;
  break-inside: avoid;
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  background: #000;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
  border: 2px solid rgba(57, 255, 20, 0.2);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.gallery-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 50px rgba(57, 255, 20, 0.4);
  border-color: #39ff14;
}

.gallery-grid img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease, filter 0.4s ease;
  cursor: pointer;
}

.gallery-item:hover img {
  transform: scale(1.05);
  filter: brightness(1.1);
}

/* Overlay con iconos */
.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.8) 100%);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 15px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.zoom-icon {
  background: rgba(57, 255, 20, 0.2);
  border: 2px solid #39ff14;
  color: #39ff14;
  padding: 10px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(57, 255, 20, 0.4);
}

.gallery-item:hover .zoom-icon {
  background: #39ff14;
  transform: scale(1.1);
}

.zoom-icon svg {
  width: 24px;
  height: 24px;
  stroke: #39ff14;
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: stroke 0.3s ease;
}

.gallery-item:hover .zoom-icon svg {
  stroke: #000;
}

.image-number {
  color: #39ff14;
  font-size: 0.9rem;
  font-weight: 600;
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.8);
}

/* ========================================
   LIGHTBOX
======================================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.96);
  display: none;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  z-index: 3000;
  backdrop-filter: blur(10px);
}

.lb-stage {
  position: relative;
  width: 90vw;
  height: 85vh;
  max-width: 1600px;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

#lightbox-img {
  max-width: 100%;
  max-height: 100%;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 0.05s linear;
  will-change: transform;
  box-shadow: 0 0 60px rgba(57, 255, 20, 0.3);
}

#lightbox-img.actual-size {
  max-width: none;
  max-height: none;
}

/* Toolbar */
.lb-toolbar {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 4000;
  background: rgba(0, 26, 0, 0.8);
  border-radius: 50px;
  padding: 10px 15px;
  backdrop-filter: blur(10px);
  border: 2px solid rgba(57, 255, 20, 0.3);
  box-shadow: 0 5px 30px rgba(57, 255, 20, 0.3);
}

.lb-btn {
  color: #39ff14;
  background: transparent;
  border: 2px solid rgba(57, 255, 20, 0.4);
  border-radius: 50px;
  padding: 8px 15px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
}

.lb-btn svg {
  stroke: #39ff14;
  transition: stroke 0.3s ease;
}

.lb-btn:hover {
  background: rgba(57, 255, 20, 0.2);
  border-color: #39ff14;
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(57, 255, 20, 0.4);
}

.lb-btn:hover svg {
  stroke: #39ff14;
}

.lb-btn:active {
  transform: translateY(0) scale(0.95);
}

.lb-close {
  background: rgba(255, 0, 0, 0.1);
  border-color: rgba(255, 0, 0, 0.4);
}

.lb-close:hover {
  background: rgba(255, 0, 0, 0.2);
  border-color: #ff0000;
}

/* Arrows */
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 26, 0, 0.8);
  border: 2px solid rgba(57, 255, 20, 0.4);
  border-radius: 50%;
  padding: 15px;
  cursor: pointer;
  user-select: none;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 5px 30px rgba(57, 255, 20, 0.3);
  backdrop-filter: blur(10px);
}

.arrow svg {
  stroke: #39ff14;
  filter: drop-shadow(0 0 5px #39ff14);
}

.arrow.left {
  left: 30px;
}

.arrow.right {
  right: 30px;
}

.arrow:hover {
  background: rgba(0, 51, 0, 0.9);
  border-color: #39ff14;
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 40px rgba(57, 255, 20, 0.5);
}

.arrow:active {
  transform: translateY(-50%) scale(0.95);
}

/* Counter */
.lb-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 26, 0, 0.9);
  color: #39ff14;
  padding: 10px 25px;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 600;
  border: 2px solid rgba(57, 255, 20, 0.4);
  box-shadow: 0 5px 30px rgba(57, 255, 20, 0.3);
  backdrop-filter: blur(10px);
  text-shadow: 0 0 10px rgba(57, 255, 20, 0.8);
}

/* ========================================
   SCROLLBAR PERSONALIZADA
======================================== */
::-webkit-scrollbar {
  width: 12px;
}

::-webkit-scrollbar-track {
  background: #001a00;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #39ff14, #2ecc40);
  border-radius: 6px;
  border: 2px solid #001a00;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, #2ecc40, #39ff14);
}

/* ========================================
   RESPONSIVE DESIGN
======================================== */

/* Tablets grandes */
@media (max-width: 1400px) {
  .gallery-grid {
    column-count: 3;
    column-gap: 18px;
  }
}

/* Tablets */
@media (max-width: 1024px) {
  .gallery-grid {
    column-count: 2;
    column-gap: 18px;
  }

  .gallery-header h1 {
    font-size: 2.5rem;
  }

  .gallery-subtitle {
    font-size: 1.1rem;
  }
}

/* Móviles */
@media (max-width: 768px) {
  header {
    min-height: 400px;
  }

  .hero-content .logo-img {
    width: 160px;
  }

  h6 {
    font-size: 1.05rem;
    padding: 0 15px;
  }

  .btn-hero {
    font-size: 1rem;
    padding: 14px 32px;
  }

  .banner-container {
    margin: 20px auto;
    padding: 0 15px;
  }

  .gallery-header {
    padding: 40px 15px 25px;
  }

  .gallery-header h1 {
    font-size: 2rem;
  }

  .gallery-subtitle {
    font-size: 1rem;
  }

  .gallery-container {
    padding: 30px 15px;
  }

  .gallery-grid {
    column-count: 2;
    column-gap: 15px;
  }

  .lb-stage {
    width: 95vw;
    height: 75vh;
  }

  .arrow {
    padding: 12px;
  }

  .arrow.left {
    left: 15px;
  }

  .arrow.right {
    right: 15px;
  }

  .arrow svg {
    width: 25px;
    height: 25px;
  }

  .lb-toolbar {
    top: 15px;
    gap: 8px;
    padding: 8px 12px;
  }

  .lb-btn {
    padding: 6px 12px;
    font-size: 13px;
    min-width: 36px;
  }

  .lb-btn svg {
    width: 16px;
    height: 16px;
  }

  .lb-counter {
    bottom: 15px;
    padding: 8px 20px;
    font-size: 0.9rem;
  }
}

/* Móviles pequeños */
@media (max-width: 480px) {
  header {
    min-height: 350px;
  }

  .hero-content {
    gap: 20px;
  }

  .hero-content .logo-img {
    width: 130px;
  }

  h6 {
    font-size: 0.95rem;
    padding: 0 10px;
  }

  .btn-hero {
    font-size: 0.9rem;
    padding: 12px 28px;
  }

  .banner-container {
    margin: 15px auto;
    padding: 0 10px;
  }

  .gallery-header {
    padding: 30px 10px 20px;
  }

  .gallery-header h1 {
    font-size: 1.8rem;
  }

  .gallery-subtitle {
    font-size: 0.95rem;
  }

  .gallery-container {
    padding: 20px 10px;
  }

  .gallery-grid {
    column-count: 1;
    column-gap: 12px;
  }

  .gallery-item {
    margin-bottom: 15px;
  }

  .lb-toolbar {
    top: 10px;
    gap: 6px;
    padding: 6px 10px;
  }

  .lb-btn {
    padding: 5px 10px;
    font-size: 12px;
    min-width: 32px;
  }

  .arrow {
    padding: 10px;
  }

  .arrow svg {
    width: 20px;
    height: 20px;
  }

  .lb-counter {
    bottom: 10px;
    padding: 6px 15px;
    font-size: 0.85rem;
  }
}

/* Mostrar lupa en móviles sin hover */
@media (hover: none) and (pointer: coarse) {
  .gallery-overlay {
    opacity: 0.8;
  }
}

/* Animaciones reducidas para accesibilidad */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Modo landscape móvil */
@media (max-height: 500px) and (orientation: landscape) {
  header {
    height: 100vh;
    min-height: 100vh;
  }

  .hero-content {
    gap: 15px;
  }

  .hero-content .logo-img {
    width: 120px;
  }

  h6 {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .btn-hero {
    padding: 10px 24px;
    font-size: 0.9rem;
  }

  .lb-stage {
    height: 80vh;
  }
}