/* ===== SIMPLE GALLERY ===== */

/* Category Filter Container */
.gallery-filter-container {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.5rem, 1.5vw, 1rem);
  margin: clamp(1rem, 2vw, 2rem) 0 0;
  justify-content: center;
  align-items: center;
}

/* Filter Buttons */
.gallery-filter-btn {
  background: var(--card, #1a1a1a);
  color: var(--text, #ffffff);
  border: 2px solid var(--light, #2a2a2a);
  border-radius: var(--radius, 18px);
  padding: clamp(0.625rem, 1.5vw, 0.875rem) clamp(1rem, 2vw, 1.5rem);
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow, 0 16px 40px rgba(0,0,0,.3));
}

.gallery-filter-btn:hover {
  background: var(--light, #2a2a2a);
  border-color: var(--brand, #3b82f6);
  transform: translateY(-2px);
  box-shadow: var(--shadow-colored, 0 16px 40px rgba(59,130,246,.15));
}

.gallery-filter-btn.active {
  background: var(--brand, #3b82f6);
  border-color: var(--brand, #3b82f6);
  color: #ffffff;
  box-shadow: var(--shadow-colored, 0 16px 40px rgba(59,130,246,.15));
}

.gallery-filter-btn.active:hover {
  background: var(--brand2, #60a5fa);
  border-color: var(--brand2, #60a5fa);
}

/* Empty State */
.gallery-empty {
  text-align: center;
  color: var(--muted, #a0a0a0);
  padding: 2rem;
  font-size: 1.1rem;
}

.simple-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.simple-gallery .gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: var(--radius, 18px);
  overflow: hidden;
  cursor: pointer;
  background: var(--card, #1a1a1a);
  transition: all 0.3s ease;
  box-shadow: var(--shadow, 0 16px 40px rgba(0,0,0,.3));
}

.simple-gallery .gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-colored, 0 16px 40px rgba(59,130,246,.15));
}

.simple-gallery .gallery-item.hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  visibility: hidden;
  max-height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
  grid-row: span 0;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
}

.simple-gallery .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.2s ease;
  filter: contrast(0.9) brightness(1.1) saturate(0.8);
  opacity: 1 !important;
  visibility: visible !important;
}

.simple-gallery .gallery-item:hover img {
  transform: scale(1.05);
}

/* ===== FULLSCREEN LIGHTBOX ===== */

.simple-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.simple-lightbox.active {
  display: flex;
  opacity: 1;
}

.simple-lightbox img {
  max-width: 100vw;
  max-height: 100vh;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: contrast(0.9) brightness(1.1) saturate(0.8);
  transition: transform 0.3s ease;
}

.simple-lightbox-close {
  position: fixed;
  top: 20px;
  right: 20px;
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  cursor: pointer;
  padding: 15px;
  border-radius: 50%;
  font-size: 1.8rem;
  font-weight: bold;
  transition: all 0.3s ease;
  z-index: 10001;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.simple-lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.1);
}

.simple-lightbox-prev,
.simple-lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.7);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: white;
  cursor: pointer;
  padding: 20px 15px;
  font-size: 1.5rem;
  font-weight: bold;
  transition: all 0.3s ease;
  z-index: 10001;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.simple-lightbox-prev {
  left: 20px;
}

.simple-lightbox-next {
  right: 20px;
}

.simple-lightbox-prev:hover,
.simple-lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translateY(-50%) scale(1.1);
}

.simple-lightbox-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 0.9rem;
  z-index: 10001;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.simple-lightbox-loading {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: white;
  font-size: 1.2rem;
  z-index: 10000;
  background: rgba(0, 0, 0, 0.7);
  padding: 20px 30px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

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

@media (max-width: 1200px) {
  .gallery-filter-container {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  
  .gallery-filter-container::-webkit-scrollbar {
    height: 4px;
  }
  
  .gallery-filter-container::-webkit-scrollbar-thumb {
    background: var(--brand, #3b82f6);
    border-radius: 2px;
  }
}

@media (max-width: 768px) {
  .gallery-filter-container {
    justify-content: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
  }
  
  .gallery-filter-btn {
    flex-shrink: 0;
    white-space: nowrap;
  }
  
  .simple-gallery {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.5rem;
  }
  
  .simple-gallery .gallery-item {
    aspect-ratio: 1/1;
  }
  
  .simple-lightbox-close {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
  }
  
  .simple-lightbox-prev,
  .simple-lightbox-next {
    width: 50px;
    height: 50px;
    font-size: 1.2rem;
    padding: 15px 10px;
  }
  
  .simple-lightbox-prev {
    left: 10px;
  }
  
  .simple-lightbox-next {
    right: 10px;
  }
  
  .simple-lightbox-counter {
    bottom: 10px;
    font-size: 0.8rem;
    padding: 8px 15px;
  }
}

@media (max-width: 600px) {
  .gallery-filter-container {
    gap: 0.5rem;
  }
  
  .gallery-filter-btn {
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
  }
}

@media (max-width: 480px) {
  .simple-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
  
  .simple-gallery .gallery-item {
    aspect-ratio: 1/1;
    border-radius: var(--radius, 18px);
  }
  
  .simple-gallery .gallery-item:hover {
    transform: translateY(-3px);
  }
  
  .gallery-filter-btn {
    min-height: 44px;
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
  }
}
