* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

@font-face {
  font-family: 'packy';
  src: url('font/PackyGreat.ttf') format('truetype');
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: #0a2540;
  /* background: linear-gradient(135deg, #667eea 0%, #1931ea 100%); */
  min-height: 100vh;
  padding: 20px 0;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.header {
  text-align: center;
  margin-bottom: 50px;
  color: white;
}

.header h1 {
  font-family: 'packy', serif;
  font-size: 3rem;
  font-weight: 300;
  margin-bottom: 10px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.header p {
  font-size: 1.2rem;
  opacity: 0.9;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
  transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
  position: relative;
  cursor: pointer;
}

.card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #ff6b6b, #4ecdc4, #45b7d1, #96ceb4);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.card:hover::before {
  opacity: 1;
}

.card-image {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.card:hover .card-image {
  transform: scale(1.1);
}

.card-content {
  padding: 25px;
}

.card-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 15px;
  line-height: 1.3;
}

.card-description {
  color: #666;
  line-height: 1.6;
  font-size: 1rem;
  margin-bottom: 15px;
}

.card-tag {
  display: inline-block;
  background: linear-gradient(45deg, #667eea, #764ba2);
  color: white;
  padding: 6px 15px;
  border-radius: 25px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.image-count {
  position: absolute;
  top: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* Modal Styles */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.9);
  animation: fadeIn 0.3s ease;
}

.modal.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-content {
  position: relative;
  max-width: 100%;
  max-height: 100%;
  background: white;
  border-radius: 10px;
  overflow: hidden;
  animation: modalSlideIn 0.4s ease;
}

.modal-header {
  padding: 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  position: relative;
}

.modal-title {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 5px;
}

.modal-subtitle {
  opacity: 0.9;
  font-size: 1rem;
}

.close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.image-container {
  display: flex;
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
  background: #f8f9fa;
}

.modal-image {
  object-fit: contain;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  height: auto;
  width: 450px;
  transition: opacity 0.3s ease;
}

.image-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.6);
  border: none;
  color: white;
  font-size: 24px;
  cursor: pointer;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

.image-nav:hover {
  background: rgba(0, 0, 0, 0.8);
  transform: translateY(-50%) scale(1.1);
}

.prev-btn {
  left: 20px;
}

.next-btn {
  right: 20px;
}

.image-counter {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.9rem;
}

.thumbnail-container {
  display: flex;
  justify-content: center;
  margin: 0 auto;
  gap: 10px;
  padding: 20px;
  overflow-x: auto;
  background: #f8f9fa;
}

.thumbnail {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  object-fit: cover;
  border-radius: 8px;
  cursor: pointer;
  border: 3px solid transparent;
  transition: all 0.3s ease;
}

.thumbnail.active {
  border-color: #667eea;
  transform: scale(1.1);
}

.thumbnail:hover {
  opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 768px) {
  .header h1 {
    font-size: 2.2rem;
  }

  .header p {
    font-size: 1rem;
  }

  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
  }

  .card-content {
    padding: 20px;
  }

  .card-title {
    font-size: 1.3rem;
  }

  .modal-content {
    max-width: 95%;
    max-height: 95%;
  }

  .image-container {
    height: 300px;
  }

  .modal-title {
    font-size: 1.4rem;
  }

  .thumbnail-container {
    padding: 15px;
  }

  .thumbnail {
    width: 60px;
    height: 45px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .header h1 {
    font-size: 1.8rem;
  }

  .gallery {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .card-image {
    height: 200px;
  }

  .card-content {
    padding: 15px;
  }

  .image-container {
    height: 250px;
  }

  .image-nav {
    width: 40px;
    height: 40px;
    font-size: 18px;
  }

  .prev-btn {
    left: 10px;
  }

  .next-btn {
    right: 10px;
  }
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card {
  animation: fadeInUp 0.6s ease forwards;
}

.card:nth-child(1) {
  animation-delay: 0.1s;
}
.card:nth-child(2) {
  animation-delay: 0.2s;
}
.card:nth-child(3) {
  animation-delay: 0.3s;
}
.card:nth-child(4) {
  animation-delay: 0.4s;
}
.card:nth-child(5) {
  animation-delay: 0.5s;
}
.card:nth-child(6) {
  animation-delay: 0.6s;
}

/* Back Button Styles */
.back-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  text-decoration: none;
  color: black;
  background: #667eea;
  border-radius: 10px;
  padding: 5px 10px;
  border: none;
  /* ... styling lainnya */
}

.back-button:hover {
  transform: scale(1.1);
  background: #1f3fce;
  color: white;
}

/* Responsive untuk mobile */
@media (max-width: 768px) {
  .back-button {
    position: static;
    right: 50%;
    transform: translateX(50%);
  }
}
