/* ===========================
   GALLERY PAGE PROFESSIONAL STYLES
   =========================== */

.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===========================
   HERO SECTION
   =========================== */
.gallery-hero {
  position: relative;
  height: 60vh;
  min-height: 450px;
  background-image: url('https://images.unsplash.com/photo-1492684223066-81342ee5ff30?w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(85, 51, 30, 0.88) 0%, rgba(139, 111, 71, 0.82) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
}

.hero-badge {
  display: inline-block;
  padding: 10px 25px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 30px;
  font-size: 0.9rem;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 20px;
  animation: fadeInDown 1s ease-out 0.3s both;
}

.hero-title {
  font-size: 4rem;
  font-weight: 800;
  margin-bottom: 15px;
  animation: fadeInUp 1s ease-out 0.5s both;
}

.hero-subtitle {
  font-size: 1.4rem;
  font-weight: 300;
  opacity: 0.95;
  animation: fadeInUp 1s ease-out 0.7s both;
}

.scroll-indicator {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  animation: bounce 2s infinite;
}

/* ===========================
   GALLERY FILTER
   =========================== */
.gallery-filter {
  padding: 40px 20px;
  background: #f8f5f2;
  border-bottom: 2px solid rgba(85, 51, 30, 0.1);
  position: sticky;
  top: 80px;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.filter-tabs {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 30px;
  background: white;
  color: #222;
  border: 2px solid transparent;
  border-radius: 50px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(85, 51, 30, 0.1), transparent);
  transition: left 0.6s ease;
}

.filter-btn:hover::before {
  left: 100%;
}

.filter-btn:hover {
  border-color: #55331e;
  transform: translateY(-3px);
  box-shadow: 0 10px 25px rgba(85, 51, 30, 0.2);
}

.filter-btn.active {
  background: linear-gradient(135deg, #55331e, #8b6f47);
  color: white;
  border-color: #55331e;
  box-shadow: 0 5px 20px rgba(85, 51, 30, 0.3);
}

.filter-btn i {
  font-size: 1rem;
}

/* ===========================
   GALLERY GRID
   =========================== */
.gallery-section {
  padding: 80px 20px;
  background: linear-gradient(to bottom, #ffffff, #f8f5f2);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 60px;
}

.gallery-item {
  position: relative;
  border-radius: 15px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  height: 400px;
}

.gallery-item:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 60px rgba(85, 51, 30, 0.2);
  z-index: 10;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

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

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to top, rgba(85, 51, 30, 0.95) 0%, transparent 60%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 30px;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-info {
  color: white;
  transform: translateY(20px);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover .gallery-info {
  transform: translateY(0);
}

.gallery-category {
  display: inline-block;
  padding: 5px 15px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border-radius: 20px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  font-weight: 600;
}

.gallery-info h3 {
  font-size: 1.4rem;
  margin-bottom: 8px;
  font-weight: 700;
}

.gallery-info p {
  font-size: 0.95rem;
  opacity: 0.9;
}

.view-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 2px solid white;
  border-radius: 50%;
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0) rotate(-180deg);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-item:hover .view-btn {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

.view-btn:hover {
  background: white;
  color: #55331e;
  transform: scale(1.1) rotate(0deg);
}

/* ===========================
   LOAD MORE BUTTON
   =========================== */
.load-more-wrapper {
  text-align: center;
}

.load-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 40px;
  background: transparent;
  color: #55331e;
  border: 2px solid #55331e;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.load-more-btn:hover {
  background: #55331e;
  color: white;
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(85, 51, 30, 0.3);
}

.load-more-btn i {
  transition: transform 0.4s ease;
}

.load-more-btn:hover i {
  transform: translateY(5px);
}

/* ===========================
   LIGHTBOX
   =========================== */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

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

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  animation: zoomIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 30px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  color: white;
  border-radius: 0 0 10px 10px;
}

.lightbox-caption h3 {
  font-size: 1.8rem;
  margin-bottom: 10px;
  font-weight: 700;
}

.lightbox-caption p {
  font-size: 1.1rem;
  opacity: 0.9;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10001;
}

.lightbox-close {
  top: 30px;
  right: 30px;
}

.lightbox-prev {
  left: 30px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 30px;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: white;
  color: #55331e;
  transform: translateY(-50%) scale(1.1);
}

.lightbox-close:hover {
  transform: scale(1.1) rotate(90deg);
}

/* ===========================
   ANIMATIONS
   =========================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateX(-50%) translateY(0);
  }
  40% {
    transform: translateX(-50%) translateY(-15px);
  }
  60% {
    transform: translateX(-50%) translateY(-8px);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
  opacity: 0;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */
@media (max-width: 1200px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

@media (max-width: 968px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }

  .hero-title {
    font-size: 3rem;
  }

  .gallery-item {
    height: 350px;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .filter-tabs {
    gap: 10px;
  }

  .filter-btn {
    padding: 10px 20px;
    font-size: 0.85rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
  }

  .gallery-item {
    height: 300px;
  }

  .gallery-filter {
    top: 70px;
    padding: 20px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 50px;
    height: 50px;
  }

  .lightbox-prev {
    left: 15px;
  }

  .lightbox-next {
    right: 15px;
  }

  .lightbox-close {
    top: 15px;
    right: 15px;
  }

  .lightbox-caption {
    padding: 20px;
  }

  .lightbox-caption h3 {
    font-size: 1.3rem;
  }

  .lightbox-caption p {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .gallery-item {
    height: 280px;
  }

  .filter-tabs {
    flex-direction: column;
  }

  .filter-btn {
    width: 100%;
    justify-content: center;
  }
}

/* ===========================
   SMOOTH TRANSITIONS
   =========================== */
* {
  -webkit-tap-highlight-color: transparent;
}

.gallery-item,
.filter-btn,
.view-btn,
.load-more-btn {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
