:root {
  --primary-color: #1a5f7a;
  --accent-color: #57a6a1;
  --light-bg: #f8fafc;
  --dark-bg: #0f172a;
  --text-dark: #1e293b;
  --text-muted: #64748b;
  --white: #ffffff;
  --border-radius: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 10px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.15);
  --transition: all 0.3s ease-in-out;
}

body {
  font-family: 'Poppins', sans-serif;
  background-color: var(--light-bg);
  color: var(--text-dark);
  margin: 0;
  padding: 0;
  line-height: 1.6;
}

/* ======= GLOBAL RESET ======= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ===== Hero Section ===== */
.hero-galeri {
  position: relative;
  height: 100vh;
  background: url('/images/home/20250530_084207.webp') center center / cover no-repeat;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--white);
  padding: 2rem;
  overflow: hidden;
}

.hero-galeri::before {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(5px);
  background-color: rgba(0, 0, 0, 0.4);
  z-index: 1;
}

.hero-galeri::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(26, 95, 122, 0.6), rgba(0, 0, 0, 0.7));
  z-index: 0;
}

.hero-galeri .hero-overlay {
  position: relative;
  z-index: 2;
  max-width: 90%;
}

.hero-title {
  font-size: clamp(2.2rem, 6vw, 4rem);
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease;
  text-transform: uppercase;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.5rem);
  animation: fadeInUp 1s ease 0.2s forwards;
  color: #e2e8f0;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== Section ===== */
#page-gallery {
  padding: 4rem 1rem;
}

#page-gallery h2 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: 3rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

#page-gallery h2::after {
  content: '';
  display: block;
  margin: 0.5rem auto 0;
  width: 80px;
  height: 4px;
  border-radius: 2px;
  background-color: var(--accent-color);
}

/* ===== Gallery Grid ===== */
.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.8rem;
  padding: 1rem 0;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  background: #fff;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-card:hover .gallery-img {
  transform: scale(1.05);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.65), transparent);
  padding: 1.2rem;
  color: var(--white);
  font-weight: 500;
  font-size: 1rem;
  opacity: 0;
  transform: translateY(100%);
  transition: var(--transition);
}

.gallery-card:hover .gallery-caption {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Empty State ===== */
.empty-gallery {
  text-align: center;
  color: var(--text-muted);
  padding: 3rem 1rem;
}

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 3rem;
  gap: 0.5rem;
}

.pagination a {
  padding: 10px 16px;
  background-color: var(--primary-color);
  color: var(--white);
  text-decoration: none;
  border-radius: var(--border-radius);
  transition: var(--transition);
  font-weight: 600;
}

.pagination a:hover,
.pagination a.active {
  background-color: var(--accent-color);
}

/* ===== Modal ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal-content {
  max-width: 90%;
  max-height: 90vh;
  position: relative;
  background: transparent;
}

.modal-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}

.modal-caption {
  text-align: center;
  color: #f1f5f9;
  margin-top: 1rem;
  font-size: 1.1rem;
}

.modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  font-size: 2rem;
  color: var(--white);
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal-close:hover {
  color: var(--accent-color);
}

/* Modal Navigation */
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.5);
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.3s;
  z-index: 10;
}

.modal-nav:hover {
  background: var(--accent-color);
}

.modal-prev {
  left: -60px;
}

.modal-next {
  right: -60px;
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.2rem;
  }
}

@media (max-width: 768px) {
  .gallery-container {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }

  .modal-nav {
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }

  .modal-prev {
    left: -40px;
  }

  .modal-next {
    right: -40px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  #page-gallery h2 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .gallery-container {
    grid-template-columns: 1fr;
  }

  .modal-caption {
    font-size: 1rem;
    padding: 0 1rem;
  }

  .modal-close {
    top: -30px;
    font-size: 1.5rem;
  }

  .modal-nav {
    width: 35px;
    height: 35px;
    font-size: 1.3rem;
  }

  .modal-prev {
    left: -5px;
  }

  .modal-next {
    right: -5px;
  }

  .hero-title {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 0.9rem;
  }
}

