html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: system-ui, sans-serif;
  background: #f9f9f9;
  position: relative;
}

/* Animated background overlay for glassmorphism effect */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 20% 80%, rgba(74, 189, 172, 0.1) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(74, 189, 172, 0.05) 0%, transparent 50%),
    radial-gradient(circle at 40% 40%, rgba(74, 189, 172, 0.08) 0%, transparent 50%);
  animation: float 15s ease-in-out infinite;
  z-index: -1;
  pointer-events: none;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  33% { transform: translateY(-20px) rotate(120deg); }
  66% { transform: translateY(20px) rotate(240deg); }
}

/* === HEADER GLASSMORPHISM - KEEP ORIGINAL COLORS === */
.header-galeri-kategori {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(74, 189, 172, 0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-top: none;
  padding: 30px 16px;
  text-align: center;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 4px 6px -1px rgba(0, 0, 0, 0.1);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.header-galeri-kategori::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05)),
    repeating-linear-gradient(
      45deg,
      rgba(255, 255, 255, 0.08) 0,
      rgba(255, 255, 255, 0.08) 1px,
      transparent 2px,
      transparent 8px
    );
  z-index: 1;
  pointer-events: none;
}

.header-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.judul-kategori {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0;
  line-height: 1.2;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.3));
}

.deskripsi-kategori {
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
  font-weight: 400;
  line-height: 1.4;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* === BREADCRUMB GLASSMORPHISM === */
.breadcrumb-wrapper {
  position: sticky;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 99;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-top: none;
  box-shadow: 
    0 4px 12px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  margin-top: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  font-size: 0.9rem;
  max-width: 960px;
  margin: 0 auto;
  background: transparent;
}

.breadcrumb a {
  color: #4abdac;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.3s ease;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(74, 189, 172, 0.1);
  backdrop-filter: blur(10px);
}

.breadcrumb a:hover {
  color: #fc4a1a;
  background: rgba(252, 74, 26, 0.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.breadcrumb .current {
  font-weight: 700;
  color: #4abdac;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(74, 189, 172, 0.15);
  backdrop-filter: blur(10px);
}

.breadcrumb .icon,
.breadcrumb .separator-icon {
  width: 16px;
  height: 16px;
  stroke: #4abdac;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.1));
}

/* === SECTION GALERI === */
.galeri-section {
  padding: 16px;
  background: linear-gradient(to bottom, #fdfdfd, #f3f3f3);
  margin-top: 0;
  padding-top: 16px;
  position: relative;
}

.kategori-deskripsi-wrapper {
  max-width: 700px;
  margin: 0 auto 1rem auto;
  text-align: center;
  padding: 0 16px;
}

.kategori-deskripsi {
  font-size: 1rem;
  color: #666;
  line-height: 1.6;
}

/* === CARD GALERI GLASSMORPHISM === */
.card {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 1.25rem;
  overflow: hidden;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
  position: relative;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(74, 189, 172, 0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before {
  opacity: 1;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    0 0 20px rgba(74, 189, 172, 0.2);
  border-color: rgba(74, 189, 172, 0.3);
}

.card .card-thumb-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  background-color: #eee;
  overflow: hidden;
}

.card .thumb-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .thumb-img {
  transform: scale(1.05);
}

.card .p-4 {
  padding: 16px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
}

.card .p-4 h3 {
  font-size: 1.125rem;
  color: #222;
  margin-bottom: 0.5rem;
  text-align: center;
}

/* === MODAL GLASSMORPHISM === */
#modal-container {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  justify-content: center;
  align-items: center;
  padding: 16px;
}

#modal-container.flex {
  display: flex;
}

#modal-container .modal-content,
#modal-container .bg-white {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 24px;
  border-radius: 20px;
  max-width: 768px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

#modal-content {
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
}

#close-modal {
  position: absolute;
  top: 12px;
  right: 16px;
  font-size: 24px;
  font-weight: bold;
  color: #e11d48;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#close-modal:hover {
  background: rgba(225, 29, 72, 0.1);
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(225, 29, 72, 0.2);
}

#modal-container img,
#modal-container video {
  max-width: 100%;
  max-height: 65vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 1rem;
  border-radius: 12px;
  background-color: #f9f9f9;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* === MEDIA GRID DALAM MODAL === */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  padding: 16px 0;
}

.media-grid img,
.media-grid video {
  display: block;
  margin: 0 auto;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.media-grid img:hover,
.media-grid video:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* === FLOATING ELEMENTS === */
.section {
  position: relative;
}

.section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  background: 
    radial-gradient(circle at 10% 20%, rgba(74, 189, 172, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 90% 80%, rgba(74, 189, 172, 0.02) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.container {
  position: relative;
  z-index: 1;
}

/* === RESPONSIVE === */
@media (max-width: 640px) {
  .header-galeri-kategori {
    padding: 20px 16px;
    min-height: 80px;
  }
  
  .breadcrumb-wrapper {
    top: 0;
  }
  
  .breadcrumb {
    padding: 10px 16px;
    font-size: 0.85rem;
    gap: 6px;
  }
  
  .galeri-section {
    padding: 16px;
    margin-top: 0;
    padding-top: 16px;
  }
  
  .kategori-deskripsi-wrapper {
    padding: 0 16px;
  }
  
  .modal-content {
    padding: 20px;
    border-radius: 16px;
  }

  #close-modal {
    font-size: 20px;
    width: 32px;
    height: 32px;
  }

  .judul-kategori {
    font-size: 1.3rem;
  }

  .deskripsi-kategori {
    font-size: 0.9rem;
  }
}

/* === TABLET RESPONSIVE === */
@media (min-width: 641px) and (max-width: 1024px) {
  .header-galeri-kategori {
    min-height: 85px;
    padding: 25px 16px;
  }
  
  .breadcrumb-wrapper {
    top: 0;
  }
  
  .galeri-section {
    margin-top: 0;
    padding-top: 16px;
  }
}

/* === ZOOM OVERRIDES === */
.medium-zoom-overlay {
  z-index: 9999 !important;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.medium-zoom-overlay--opened {
  opacity: 1;
}

.medium-zoom-image {
  z-index: 10000 !important;
  transition: transform 0.3s ease;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* === SMOOTH TRANSITION === */
.header-galeri-kategori,
.breadcrumb-wrapper,
.galeri-section,
.card {
  transition: all 0.3s ease;
}

/* === GLASSMORPHISM BUTTON EFFECTS === */
button, .btn, a[class*="btn"] {
  position: relative;
  overflow: hidden;
}

button::before, .btn::before, a[class*="btn"]::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  transition: left 0.5s ease;
}

button:hover::before, .btn:hover::before, a[class*="btn"]:hover::before {
  left: 100%;
}

/* === FALLBACK UNTUK BROWSER LAMA === */
@supports not (backdrop-filter: blur(1px)) {
  .header-galeri-kategori {
    background: rgba(74, 189, 172, 0.95);
  }
  
  .breadcrumb-wrapper {
    background: rgba(255, 255, 255, 0.95);
  }
  
  .card {
    background: rgba(255, 255, 255, 0.98);
  }
  
  #modal-container .modal-content {
    background: rgba(255, 255, 255, 0.98);
  }
}

@supports not (display: -webkit-box) {
  .deskripsi-kategori {
    max-height: 2.8em;
    overflow: hidden;
  }
}

/* === ADDITIONAL GLASSMORPHISM EFFECTS === */
.card-thumb-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 30%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.1), transparent);
  pointer-events: none;
}

/* === ENHANCED HOVER EFFECTS === */
.breadcrumb a {
  position: relative;
}

.breadcrumb a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #4abdac, #fc4a1a);
  transition: all 0.3s ease;
  transform: translateX(-50%);
}

.breadcrumb a:hover::after {
  width: 100%;
}