/* ========================================
   GALLERY PREMIUM STYLES - The Lounge Gramado
   ======================================== */

.gallery {
  background: linear-gradient(
    135deg,
    var(--black) 0%,
    var(--dark-gray) 50%,
    var(--black) 100%
  );
  position: relative;
  padding: 120px 0;
  min-height: 100vh;
}

.gallery::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 20%,
      rgba(212, 175, 55, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(212, 175, 55, 0.05) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 60%,
      rgba(212, 175, 55, 0.03) 0%,
      transparent 50%
    );
  pointer-events: none;
  z-index: 1;
}

.gallery .scroll-reveal {
  position: relative;
  z-index: 2;
}

/* Section Title Premium */

.gallery .section-title::after {
  content: "";
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  animation: lineExpand 1s ease 0.8s forwards;
  transform-origin: center;
  scale: 0 1;
}

@keyframes titleReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes lineExpand {
  to {
    scale: 1 1;
  }
}

/* Filter Navigation */
.filter-nav {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin-bottom: 80px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(30px);
  animation: filterReveal 1s cubic-bezier(0.23, 1, 0.32, 1) 0.6s forwards;
}

@keyframes filterReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filter-btn {
  position: relative;
  padding: 15px 35px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.2);
  color: var(--white);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.filter-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--gold), var(--dark-gold));
  transition: left 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  z-index: -1;
}

.filter-btn:hover::before,
.filter-btn.active::before {
  left: 0;
}

.filter-btn:hover,
.filter-btn.active {
  color: var(--black);
  border-color: var(--gold);
  transform: translateY(-3px);
  box-shadow: 0 15px 40px rgba(212, 175, 55, 0.3);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
  max-width: 1400px;
  margin-left: auto;
  margin-right: auto;
  transition: all 0.3s ease;
}

/* Gallery Item */
.gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 25px;
  overflow: hidden;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.02);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transform: translateY(80px) scale(0.8);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, opacity;
}

.gallery-item.reveal {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.gallery-item.hide {
  display: none;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all 1s cubic-bezier(0.23, 1, 0.32, 1);
  filter: brightness(0.8) saturate(1.1);
}

.gallery-item:hover {
  transform: translateY(-15px) scale(1.02);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4), 0 0 40px rgba(212, 175, 55, 0.2),
    inset 0 0 0 1px rgba(212, 175, 55, 0.3);
}

.gallery-item:hover img {
  transform: scale(1.1);
  filter: brightness(1) saturate(1.3);
}

/* Gallery Overlay */
.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.2) 40%,
    rgba(0, 0, 0, 0.8) 100%
  );
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  opacity: 0;
  transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.1) 0%,
    rgba(0, 0, 0, 0.4) 40%,
    rgba(0, 0, 0, 0.9) 100%
  );
}

.gallery-content {
  transform: translateY(30px);
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1) 0.1s;
}

.gallery-item:hover .gallery-content {
  transform: translateY(0);
}

.gallery-content h3 {
  /*   font-family: "Playfair Display", serif; */
  font-size: 1.6rem;
  color: var(--gold);
  margin-bottom: 8px;
  font-weight: 600;
}

.gallery-content p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  line-height: 1.5;
  opacity: 0.8;
}

/* Category Icons */
.category-icon {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(212, 175, 55, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--black);
  font-size: 16px;
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: scale(0.8);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery-item:hover .category-icon {
  opacity: 1;
  transform: scale(1);
}

/* Load More Button */
.load-more {
  display: flex;
  justify-content: center;
  margin-top: 60px;
}

.load-more-btn {
  padding: 18px 40px;
  background: linear-gradient(45deg, var(--gold), var(--dark-gold));
  border: none;
  color: var(--black);
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  overflow: hidden;
}

.load-more-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(45deg, var(--dark-gold), var(--gold));
  transition: left 0.6s ease;
  z-index: -1;
}

.load-more-btn:hover::before {
  left: 0;
}

.load-more-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 20px 50px rgba(212, 175, 55, 0.4);
}

.load-more-btn span {
  position: relative;
  z-index: 1;
}

/* Gallery Modal */
.gallery-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(20px);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-modal.show {
  opacity: 1;
}

.modal-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

.modal-image-container {
  position: relative;
  max-width: 90%;
  max-height: 80%;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6);
  transform: scale(0.9);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.gallery-modal.show .modal-image-container {
  transform: scale(1);
}

.modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.modal-info {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
  padding: 40px 30px 30px;
  color: var(--white);
  backdrop-filter: blur(10px);
}

.modal-title {
  font-family: "Playfair Display", serif;
  font-size: 2rem;
  color: var(--gold);
  margin-bottom: 10px;
  font-weight: 600;
}

.modal-description {
  font-size: 1.1rem;
  line-height: 1.6;
  opacity: 0.9;
}

/* Modal Controls */
.modal-close {
  position: absolute;
  top: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: var(--white);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.modal-close:hover {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
  transform: scale(1.1);
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: var(--white);
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.modal-nav:hover {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
  transform: translateY(-50%) scale(1.1);
}

.modal-prev {
  left: 30px;
}

.modal-next {
  right: 30px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .gallery {
    padding: 80px 0;
  }

  .gallery .section-title {
    margin-bottom: 60px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .filter-nav {
    gap: 15px;
    margin-bottom: 60px;
  }

  .filter-btn {
    padding: 12px 25px;
    font-size: 12px;
  }

  .gallery-item {
    aspect-ratio: 1;
  }

  .gallery-item:hover {
    transform: translateY(-8px) scale(1.01);
  }

  .gallery-overlay {
    padding: 20px;
  }

  .gallery-content h3 {
    font-size: 1.3rem;
  }

  .gallery-content p {
    font-size: 0.85rem;
  }

  .modal-content {
    padding: 20px;
  }

  .modal-close {
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .modal-nav {
    width: 50px;
    height: 50px;
    font-size: 20px;
  }

  .modal-prev {
    left: 20px;
  }

  .modal-next {
    right: 20px;
  }

  .modal-title {
    font-size: 1.5rem;
  }

  .modal-description {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .gallery .section-title {
    margin-bottom: 50px;
  }

  .filter-nav {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 50px;
  }

  .filter-btn {
    width: 200px;
    text-align: center;
  }

  .gallery-grid {
    gap: 15px;
  }

  .gallery-item:hover {
    transform: translateY(-5px) scale(1.005);
  }

  .gallery-overlay {
    padding: 15px;
  }

  .gallery-content h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
  }

  .modal-info {
    padding: 30px 20px 20px;
  }

  .modal-title {
    font-size: 1.4rem;
  }

  .modal-description {
    font-size: 0.95rem;
  }
}

/* Animations */
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.gallery-item.loading {
  animation: pulse 2s infinite;
}

/* Performance optimizations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .gallery-item:hover {
    transform: none !important;
  }

  .gallery-item:hover img {
    transform: none !important;
  }
}
