/* === GALLERY SECTION STYLES - INSTAGRAM STYLE LAYOUT === */

.gallery-section {
  padding: 2.5rem 1.2rem;
  background: var(--glass-light);
  backdrop-filter: blur(30px) saturate(200%) brightness(125%);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius-lg);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    0 12px 40px rgba(0, 0, 0, 0.08);
  margin-bottom: 2rem;
  color: var(--text-primary);
}

/* === GALLERY CONTROLS === */
.gallery-controls {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  gap: 1rem;
}

.gallery-filters {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.gallery-filters .filter-btn {
  background: var(--glass-white);
  backdrop-filter: blur(20px);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  padding: 0.8rem 1.5rem;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: all var(--transition-smooth);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.filter-btn:hover {
  background: var(--accent-electric);
  color: var(--primary-dark);
  box-shadow: var(--glow-neon);
  transform: translateY(-2px) scale(1.05);
}

.filter-btn.active {
  background: var(--accent-gold);
  color: var(--primary-dark);
  box-shadow: var(--glow-gold);
  font-weight: 700;
}

/* === GALLERY CONTAINER === */
.gallery-container {
  position: relative;
  overflow: hidden;
}

.gallery-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  color: var(--text-primary);
  padding: 3rem 1.5rem;
}

/* === INSTAGRAM STYLE GRID - DESKTOP: 4-5 COLUMNS === */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr); /* 5 coloane pe desktop */
  gap: 1rem;
  margin-bottom: 1.5rem;
  padding: 0;
}

/* === GALLERY ITEM - SQUARE INSTAGRAM STYLE === */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: var(--glass-light);
  backdrop-filter: blur(25px) saturate(180%) brightness(120%);
  border: 1px solid var(--glass-border);
  transition: all var(--transition-smooth);
  cursor: pointer;
  aspect-ratio: 1/1; /* SQUARE RATIO - Instagram style */
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 4px 16px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover {
  transform: translateY(-8px) scale(1.05);
  box-shadow: 
    var(--glow-electric),
    0 20px 40px rgba(0, 0, 0, 0.2);
  border-color: var(--accent-electric);
  z-index: 10;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: all var(--transition-smooth);
  filter: brightness(0.9) contrast(1.1);
}

.gallery-item:hover img {
  transform: scale(1.1);
  filter: brightness(1) contrast(1.3);
}

/* === HOVER OVERLAY - MINIMAL === */
.gallery-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, 
    rgba(0, 212, 255, 0.3) 0%, 
    rgba(251, 191, 36, 0.2) 100%);
  opacity: 0;
  transition: opacity var(--transition-smooth);
  z-index: 1;
}

.gallery-item:hover::before {
  opacity: 1;
}

/* === REMOVE ALL TEXT AND METADATA === */
.gallery-overlay,
.gallery-title,
.gallery-artist,
.gallery-category,
.featured-badge,
.gallery-info,
.gallery-actions,
.gallery-btn,
.gallery-description,
.gallery-meta {
  display: none !important;
}

/* === ENHANCED LIGHTBOX SLIDESHOW === */
.gallery-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(30px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lightboxFadeIn 0.4s ease-out;
}

@keyframes lightboxFadeIn {
  from { 
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to { 
    opacity: 1;
    backdrop-filter: blur(30px);
  }
}

.lightbox-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  cursor: pointer;
}

.lightbox-container {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: lightboxSlideIn 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes lightboxSlideIn {
  from {
    transform: scale(0.8) translateY(50px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

/* === LIGHTBOX CONTROLS === */
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 50px;
  height: 50px;
  background: var(--glass-white);
  backdrop-filter: blur(20px);
  border: 2px solid var(--glass-border);
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 1.5rem;
  font-weight: 300;
  cursor: pointer;
  z-index: 10001;
  transition: all var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  background: var(--accent-red);
  color: var(--primary-light);
  box-shadow: var(--glow-red);
  transform: scale(1.1);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  background: var(--glass-white);
  backdrop-filter: blur(20px);
  border: 2px solid var(--glass-border);
  border-radius: 50%;
  color: var(--text-primary);
  font-size: 1.8rem;
  font-weight: 300;
  cursor: pointer;
  z-index: 10001;
  transition: all var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav:hover {
  background: var(--accent-electric);
  color: var(--primary-dark);
  box-shadow: var(--glow-neon);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 1.5rem;
}

.lightbox-next {
  right: 1.5rem;
}

/* === LIGHTBOX CONTENT === */
.lightbox-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.lightbox-image-container {
  position: relative;
  max-height: 85vh;
  max-width: 85vw;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.6);
  background: var(--glass-subtle);
}

.lightbox-image {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain; /* FIX: Imaginea se afișează complet */
  display: block;
}

/* === TABLET RESPONSIVE: 4 COLUMNS === */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr); /* 4 coloane pe tablet */
    gap: 0.8rem;
  }
  
  .gallery-item {
    aspect-ratio: 1/1; /* Păstrează ratio square */
  }
}

/* === MOBILE RESPONSIVE: 3 COLUMNS INSTAGRAM STYLE === */
@media (max-width: 768px) {
  .gallery-section {
    padding: 2rem 1rem;
    background: var(--glass-white);
    backdrop-filter: blur(20px);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr); /* 3 coloane pe mobile - INSTAGRAM STYLE */
    gap: 0.5rem;
    margin-bottom: 1rem;
  }

  .gallery-item {
    border-radius: 8px;
    border-width: 1px;
    aspect-ratio: 1/1; /* Păstrează ratio square pe mobile */
  }

  .gallery-item:hover {
    transform: scale(1.02); /* Subtle hover pe mobile */
  }

  /* Lightbox mobile */
  .lightbox-container {
    max-width: 95vw;
    max-height: 95vh;
  }

  .lightbox-image-container {
    max-height: 80vh;
    max-width: 90vw;
  }

  .lightbox-nav {
    width: 45px;
    height: 45px;
    font-size: 1.4rem;
  }

  .lightbox-close {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .lightbox-prev {
    left: 0.8rem;
  }

  .lightbox-next {
    right: 0.8rem;
  }

  /* Gallery controls mobile */
  .gallery-controls {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }

  .gallery-filters {
    justify-content: center;
  }

  .filter-btn {
    padding: 0.6rem 1.2rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 480px) {
  .gallery-section {
    padding: 1.5rem 0.8rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(15px);
  }
  
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr); /* Menține 3 coloane pe mobile mic */
    gap: 0.3rem;
  }

  .gallery-item {
    border-radius: 6px;
    aspect-ratio: 1/1; /* Păstrează ratio square pe mobile mic */
  }

  .lightbox-nav,
  .lightbox-close {
    width: 35px;
    height: 35px;
    font-size: 1rem;
  }

  .lightbox-prev {
    left: 0.5rem;
  }

  .lightbox-next {
    right: 0.5rem;
  }
}

/* === GALLERY EMPTY STATE === */
.gallery-empty {
  text-align: center;
  color: var(--text-primary);
  padding: 3rem 2rem;
  background: var(--glass-light);
  backdrop-filter: blur(25px) saturate(180%) brightness(120%);
  border-radius: var(--border-radius-lg);
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 8px 32px rgba(0, 0, 0, 0.08);
  border: 2px dashed var(--glass-border);
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.7;
}

.gallery-empty h3 {
  font-family: var(--font-accent);
  color: var(--accent-gold);
  margin-bottom: 1rem;
  font-size: 1.5rem;
}

.gallery-empty p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* === LOADING STATES === */
.gallery-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 2rem;
}

.loading-text {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.loading-dots {
  display: flex;
  gap: 0.5rem;
}

.loading-dot {
  width: 12px;
  height: 12px;
  background: var(--accent-electric);
  border-radius: 50%;
  animation: loadingDotBounce 1.4s ease-in-out infinite both;
}

.loading-dot:nth-child(1) { animation-delay: -0.32s; }
.loading-dot:nth-child(2) { animation-delay: -0.16s; }
.loading-dot:nth-child(3) { animation-delay: 0s; }

@keyframes loadingDotBounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* === ACCESSIBILITY === */
@media (prefers-reduced-motion: reduce) {
  .gallery-item,
  .lightbox-container,
  .lightbox-nav,
  .lightbox-close {
    transition: none !important;
    animation: none !important;
  }
}

/* === PERFORMANCE OPTIMIZATIONS === */
.gallery-item img {
  will-change: transform, filter;
  backface-visibility: hidden;
}

.gallery-item {
  will-change: transform;
  backface-visibility: hidden;
}

.lightbox-image {
  will-change: auto;
}