/* ============================================
   GALLERY PAGE - CLEAN & SIMPLE
   All styles scoped to .gallery-page-container
   ============================================ */

/* Reset & Container */
.gallery-page-container {
  position: relative;
  min-height: 100vh;
  background: #f5f5f7;
}

/* PENTING: Hilangkan overflow hidden dari section */
.gallery-page-container .section-py {
  overflow: visible !important;
}

.gallery-page-container > .container-xxl {
  overflow: visible !important;
}

/* Hero */
.gallery-page-container .hero-wrapper {
  position: relative;
  margin-bottom: 80px;
}

.gallery-page-container .hero-image {
  position: relative;
  height: 500px;
  overflow: hidden;
  border-radius: 24px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.gallery-page-container .hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-page-container .hero-image:hover img {
  transform: scale(1.05);
}

.gallery-page-container .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.2) 100%
  );
}

.gallery-page-container .hero-content {
  position: absolute;
  top: 50%;
  left: 60px;
  transform: translateY(-50%);
  z-index: 2;
  color: #fff !important;
}

.gallery-page-container .hero-title {
  font-size: 72px;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 16px 0;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  letter-spacing: -1px;
  color: #fff !important;
}

.gallery-page-container .hero-subtitle {
  font-size: 16px;
  font-weight: 500;
  opacity: 0.9;
  margin: 0;
  color: #fff !important;
}

/* Filter Card Overlay */
.gallery-page-container .filter-card-overlay {
  position: absolute;
  bottom: -40px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 120px);
  max-width: 1200px;
  background: rgba(20, 16, 41, 0.95);
  backdrop-filter: blur(20px);
  border-radius: 16px;
  padding: 32px 40px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.gallery-page-container .filter-grid {
  display: grid;
  grid-template-columns: 2fr 1.5fr 1.5fr;
  gap: 24px;
  align-items: end;
}

.gallery-page-container .filter-item label {
  display: block;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.gallery-page-container .search-wrapper {
  position: relative;
}

.gallery-page-container .search-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: rgba(255, 255, 255, 0.5);
  font-size: 20px;
  pointer-events: none;
}

.gallery-page-container .filter-input,
.gallery-page-container .filter-select {
  width: 100%;
  padding: 14px 16px 14px 48px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  transition: all 0.3s ease;
}

.gallery-page-container .filter-select {
  padding-left: 16px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 20px;
  padding-right: 40px;
}

.gallery-page-container .filter-input:focus,
.gallery-page-container .filter-select:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.5);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.1);
}

.gallery-page-container .filter-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.gallery-page-container .filter-select option {
  background: #fff;
  color: #2d3748;
}

/* Gallery Section */
.gallery-page-container .gallery-section {
  margin-top: 80px;
}

/* Search Result Info */
.gallery-page-container .search-result-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  background: #f9fafb;
  border-radius: 12px;
  margin-bottom: 24px;
  border-left: 4px solid #111827;
}

.gallery-page-container .search-result-info i {
  font-size: 20px;
  color: #111827;
}

.gallery-page-container .search-result-info span {
  flex: 1;
  color: #4a5568;
  font-size: 14px;
}

.gallery-page-container .btn-reset {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  background: #fff;
  border: 2px solid #111827;
  border-radius: 8px;
  color: #111827;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.gallery-page-container .btn-reset:hover {
  background: #111827;
  color: #fff;
}

.gallery-page-container .btn-reset i {
  font-size: 16px;
}

/* Image Grid */
.gallery-page-container .image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.gallery-page-container .image-item {
  position: relative;
  display: block;
  aspect-ratio: 4/3;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: #fff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
}

.gallery-page-container .image-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
  border-color: #d1d5db;
}

.gallery-page-container .image-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-page-container .image-item:hover img {
  transform: scale(1.05);
}

/* Image Overlay */
.gallery-page-container .image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.gallery-page-container .image-item:hover .image-overlay {
  opacity: 1;
}

.gallery-page-container .overlay-content {
  width: 100%;
}

.gallery-page-container .overlay-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: white;
  margin: 0 0 8px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-page-container .overlay-content p {
  margin: 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  display: flex;
  align-items: center;
  gap: 6px;
}

.gallery-page-container .overlay-content i {
  font-size: 14px;
}

/* Empty State */
.gallery-page-container .empty-state {
  text-align: center;
  padding: 80px 20px;
  background: rgba(247, 250, 252, 0.8);
  backdrop-filter: blur(10px);
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.5);
}

.gallery-page-container .empty-state i {
  font-size: 80px;
  color: #cbd5e0;
  margin-bottom: 24px;
}

.gallery-page-container .empty-state h3 {
  font-size: 24px;
  font-weight: 700;
  color: #2d3748;
  margin-bottom: 12px;
}

.gallery-page-container .empty-state p {
  font-size: 16px;
  color: #718096;
  margin-bottom: 24px;
}

.gallery-page-container .btn-primary {
  display: inline-block;
  padding: 12px 32px;
  background: #111827;
  color: white;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gallery-page-container .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  background: #000;
  color: white;
}

/* Pagination */
.gallery-page-container .pagination-wrapper {
  margin-top: 40px;
  display: flex;
  justify-content: center;
}

/* ============================================
   LIGHTBOX MODAL
   ============================================ */
.gallery-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-lightbox.active {
  display: flex;
  opacity: 1;
}

.gallery-lightbox .lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
}

.gallery-lightbox .lightbox-content {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 20px 120px;
  z-index: 1;
}

/* Close Button */
.gallery-lightbox .lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.gallery-lightbox .lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: rotate(90deg);
}

/* Navigation Buttons */
.gallery-lightbox .lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 60px;
  height: 60px;
  background: rgba(255, 255, 255, 0.1);
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  color: #fff;
  font-size: 28px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.gallery-lightbox .lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-50%) scale(1.1);
}

.gallery-lightbox .lightbox-nav:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.gallery-lightbox .lightbox-prev {
  left: 20px;
}

.gallery-lightbox .lightbox-next {
  right: 20px;
}

/* Image Container */
.gallery-lightbox .lightbox-image-container {
  position: relative;
  max-width: 90%;
  max-height: calc(100vh - 250px);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.gallery-lightbox .lightbox-image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 8px;
  opacity: 0;
  transition: opacity 0.3s ease;
  display: block;
}

.gallery-lightbox .lightbox-image.loaded {
  opacity: 1;
}

.gallery-lightbox .lightbox-loader {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: none;
  z-index: 10;
}

.gallery-lightbox .spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255, 255, 255, 0.1);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Info */
.gallery-lightbox .lightbox-info {
  position: absolute;
  top: 20px;
  left: 20px;
  max-width: 500px;
  z-index: 10;
}

.gallery-lightbox .lightbox-album-title {
  font-size: 14px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 4px;
}

.gallery-lightbox .lightbox-counter {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 8px;
}

.gallery-lightbox .lightbox-caption {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.5;
}

/* Thumbnails */
.gallery-lightbox .lightbox-thumbnails {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  max-width: 90%;
  overflow-x: auto;
  padding: 10px;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.gallery-lightbox .lightbox-thumbnails::-webkit-scrollbar {
  height: 6px;
}

.gallery-lightbox .lightbox-thumbnails::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.3);
  border-radius: 3px;
}

.gallery-lightbox .lightbox-thumb {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.3s ease;
  opacity: 0.6;
}

.gallery-lightbox .lightbox-thumb:hover {
  opacity: 1;
  transform: scale(1.05);
}

.gallery-lightbox .lightbox-thumb.active {
  border-color: #fff;
  opacity: 1;
}

.gallery-lightbox .lightbox-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ============================================
   SMOOTH ANIMATIONS
   ============================================ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gallery-page-container .image-item {
  animation: fadeInUp 0.6s ease backwards;
}

.gallery-page-container .image-item:nth-child(1) {
  animation-delay: 0.1s;
}
.gallery-page-container .image-item:nth-child(2) {
  animation-delay: 0.2s;
}
.gallery-page-container .image-item:nth-child(3) {
  animation-delay: 0.3s;
}
.gallery-page-container .image-item:nth-child(4) {
  animation-delay: 0.1s;
}
.gallery-page-container .image-item:nth-child(5) {
  animation-delay: 0.2s;
}
.gallery-page-container .image-item:nth-child(6) {
  animation-delay: 0.3s;
}

/* ============================================
   DARK MODE
   ============================================ */
[data-bs-theme="dark"] .gallery-page-container {
  background-color: #24293c !important;
}

[data-bs-theme="dark"] .gallery-page-container .hero-wrapper {
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.7);
}

[data-bs-theme="dark"] .gallery-page-container .hero-image {
  background: #1e1e2d;
}

[data-bs-theme="dark"] .gallery-page-container .hero-title,
[data-bs-theme="dark"] .gallery-page-container .hero-subtitle {
  color: #fff !important;
}

[data-bs-theme="dark"] .gallery-page-container .filter-card-overlay {
  background: rgba(43, 44, 64, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .gallery-page-container .filter-item label {
  color: rgba(255, 255, 255, 0.7);
}

[data-bs-theme="dark"] .gallery-page-container .filter-input,
[data-bs-theme="dark"] .gallery-page-container .filter-select {
  background: #2b2c40 !important;
  border-color: #3a3c52 !important;
  color: #d9dbe6 !important;
}

[data-bs-theme="dark"] .gallery-page-container .filter-input:focus,
[data-bs-theme="dark"] .gallery-page-container .filter-select:focus {
  background: #2b2c40 !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.05) !important;
}

[data-bs-theme="dark"] .gallery-page-container .filter-input::placeholder {
  color: #7a7e96 !important;
}

[data-bs-theme="dark"] .gallery-page-container .search-icon {
  color: #7a7e96 !important;
}

[data-bs-theme="dark"] .gallery-page-container .filter-select option {
  background: #2b2c40;
  color: #d9dbe6;
}

[data-bs-theme="dark"] .gallery-page-container .search-result-info {
  background: rgba(51, 53, 74, 0.5);
  border-left-color: #d9dbe6;
}

[data-bs-theme="dark"] .gallery-page-container .search-result-info i {
  color: #d9dbe6;
}

[data-bs-theme="dark"] .gallery-page-container .search-result-info span {
  color: #b4b7c5;
}

[data-bs-theme="dark"] .gallery-page-container .btn-reset {
  background: rgba(43, 44, 64, 0.8);
  border-color: #d9dbe6;
  color: #d9dbe6;
}

[data-bs-theme="dark"] .gallery-page-container .btn-reset:hover {
  background: #d9dbe6;
  color: #111827;
}

[data-bs-theme="dark"] .gallery-page-container .image-item {
  background: #2b2c40;
  border-color: #3a3c52;
}

[data-bs-theme="dark"] .gallery-page-container .image-item:hover {
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  border-color: #d9dbe6;
}

[data-bs-theme="dark"] .gallery-page-container .empty-state {
  background: rgba(43, 44, 64, 0.6);
  border-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .gallery-page-container .empty-state i {
  color: #3a3c52;
}

[data-bs-theme="dark"] .gallery-page-container .empty-state h3 {
  color: #d9dbe6;
}

[data-bs-theme="dark"] .gallery-page-container .empty-state p {
  color: #b4b7c5;
}

[data-bs-theme="dark"] .gallery-page-container .btn-primary {
  background: #d9dbe6;
  color: #111827;
}

[data-bs-theme="dark"] .gallery-page-container .btn-primary:hover {
  box-shadow: 0 8px 24px rgba(217, 219, 230, 0.3);
  background: #fff;
  color: #111827;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
  .gallery-page-container .hero-title {
    font-size: 56px;
  }

  .gallery-page-container .filter-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media (max-width: 992px) {
  .gallery-page-container .hero-image {
    height: 400px;
  }

  .gallery-page-container .hero-title {
    font-size: 48px;
  }

  .gallery-page-container .hero-content {
    left: 40px;
  }

  .gallery-page-container .filter-card-overlay {
    width: calc(100% - 80px);
    padding: 24px 32px;
  }

  .gallery-page-container .image-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .gallery-page-container .hero-wrapper {
    margin-bottom: 120px;
  }

  .gallery-page-container .hero-image {
    height: 350px;
    border-radius: 16px;
  }

  .gallery-page-container .hero-title {
    font-size: 36px;
  }

  .gallery-page-container .hero-content {
    left: 24px;
  }

  .gallery-page-container .filter-card-overlay {
    width: calc(100% - 40px);
    padding: 20px;
    bottom: -80px;
  }

  .gallery-page-container .filter-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .gallery-page-container .gallery-section {
    margin-top: 100px;
  }

  .gallery-page-container .image-grid {
    grid-template-columns: 1fr;
  }

  .gallery-lightbox .lightbox-content {
    padding: 60px 10px 100px;
  }

  .gallery-lightbox .lightbox-close {
    width: 40px;
    height: 40px;
    font-size: 20px;
    top: 10px;
    right: 10px;
  }

  .gallery-lightbox .lightbox-nav {
    width: 50px;
    height: 50px;
    font-size: 24px;
  }

  .gallery-lightbox .lightbox-prev {
    left: 10px;
  }

  .gallery-lightbox .lightbox-next {
    right: 10px;
  }

  .gallery-lightbox .lightbox-info {
    left: 10px;
    max-width: calc(100% - 20px);
  }

  .gallery-lightbox .lightbox-thumbnails {
    bottom: 10px;
    max-width: 95%;
  }

  .gallery-lightbox .lightbox-thumb {
    width: 60px;
    height: 45px;
  }
}

@media (max-width: 480px) {
  .gallery-page-container .hero-wrapper {
    margin-bottom: 140px;
  }

  .gallery-page-container .hero-image {
    height: 280px;
  }

  .gallery-page-container .hero-title {
    font-size: 28px;
  }

  .gallery-page-container .hero-content {
    left: 16px;
  }

  .gallery-page-container .filter-card-overlay {
    width: calc(100% - 32px);
    padding: 16px;
    bottom: -100px;
  }

  .gallery-page-container .filter-input,
  .gallery-page-container .filter-select {
    padding: 12px 12px 12px 40px;
    font-size: 14px;
  }

  .gallery-page-container .gallery-section {
    margin-top: 120px;
  }

  .gallery-page-container .image-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}
