/* ===============================
   KEGIATAN.CSS - HUMAS UNLUWUK
   =============================== */

/* RESET DASAR */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

body {
  background-color: #ffffff;
  color: #333;
  line-height: 1.6;
}

/* ====== GALERI HUMAS UNLUWUK ====== */

.galeri {
  background: linear-gradient(to bottom, #0b3d2e, #115c43);
  padding: 100px 20px;
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

/* ==== HEADER GALERI ==== */
.galeri-header {
  margin-bottom: 60px;
}

.galeri-header h2 {
  font-size: 2.8rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 2px;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
}

.galeri-header h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 50%;
  width: 80px;
  height: 4px;
  background-color: #f4c430;
  transform: translateX(-50%);
  border-radius: 2px;
}

.galeri-header p {
  margin-top: 15px;
  font-size: 1.1rem;
  color: #d6e5db;
}


/* ==== GRID GALERI ==== */
.galeri-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 10px;
}

/* ==== ITEM GALERI ==== */
.galeri-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.galeri-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

/* Efek Hover */
.galeri-item:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(0, 0, 0, 0.4);
}

.galeri-item:hover img {
  transform: scale(1.1);
}

/* Overlay efek saat hover */
.galeri-item::after {
  content: "Lihat Kegiatan";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  top: 0;
  background: rgba(0, 0, 0, 0.5);
  color: #f4c430;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(1.2);
  transition: all 0.4s ease;
  font-weight: 600;
  letter-spacing: 1px;
}

.galeri-item:hover::after {
  opacity: 1;
  transform: scale(1);
}

/* ==== RESPONSIVE ==== */
@media (max-width: 768px) {
  .galeri-header h2 {
    font-size: 2rem;
  }

  .galeri-header p {
    font-size: 1rem;
  }

  .galeri-container {
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .galeri {
    padding: 80px 10px;
    margin-top: 40px;
  }

  .galeri-header h2 {
    font-size: 1.7rem;
  }
}

/* ========================= */
/* GALLERY SECTION */
.gallery-section {
  padding: 80px 20px;
  background-color: #f8faf8;
  text-align: center;
}

.gallery-header h2 {
  font-size: 36px;
  color: #0a4d1a;
  margin-bottom: 10px;
}

.gallery-header p {
  font-size: 16px;
  color: #555;
  margin-bottom: 50px;
}

/* Grid Galeri */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  justify-items: center;
}

/* Item Galeri */
.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: transform 0.5s ease;
}

/* Hover efek */
.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.gallery-item:hover img {
  transform: scale(1.1);
}

/* ========================= */
/* RESPONSIVE DESIGN */

/* TV Ultra Wide */
@media (min-width: 1600px) {
  .gallery-header h2 { font-size: 48px; }
  .gallery-header p { font-size: 20px; }
  .gallery-item img { height: 280px; }
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
    gap: 25px;
  }
}

/* Komputer & Laptop */
@media (min-width: 1200px) and (max-width: 1599px) {
  .gallery-header h2 { font-size: 42px; }
  .gallery-header p { font-size: 18px; }
  .gallery-item img { height: 250px; }
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1199px) {
  .gallery-header h2 { font-size: 36px; }
  .gallery-header p { font-size: 16px; }
  .gallery-item img { height: 200px; }
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }
}

/* ========================= */
/* MOBILE LARGE & SMALL OVERRIDE */
@media (max-width: 767px) {
  .gallery-section {
    padding: 60px 10px; /* lebih sempit agar pas layar kecil */
  }

  .gallery-header h2 {
    font-size: 32px; /* lebih besar dari sebelumnya */
  }

  .gallery-header p {
    font-size: 16px;
  }

  .gallery-grid {
    grid-template-columns: 1fr; /* satu kolom agar foto besar */
    gap: 15px;
  }

  .gallery-item {
    width: 100%; /* full lebar container */
    border-radius: 15px;
    overflow: hidden;
  }

  .gallery-item img {
    width: 100%;
    height: auto; /* menjaga proporsi */
    object-fit: cover;
    border-radius: 15px;
    transition: transform 0.5s ease;
  }

  .gallery-item:hover img {
    transform: scale(1.05); /* zoom ringan saat hover */
  }
}

/* ===== GALERI STYLE ===== */
.gallery {
  background: #f8f9fb;
  padding: 60px 25px;
  font-family: "Poppins", sans-serif;
  text-align: center;
}

/* ===== HEADER ===== */
.gallery-header h2 {
  font-size: 2.2em;
  color: #002b5b;
  margin-bottom: 10px;
  letter-spacing: 0.5px;
}

.gallery-header p {
  color: #555;
  font-size: 1em;
  margin-bottom: 8px;
}

.gallery-datetime {
  color: #777;
  font-size: 0.9em;
  margin-bottom: 35px;
}

/* ===== LAYOUT UTAMA ===== */
.gallery-wrapper {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 20px;
  flex-wrap: wrap;
}

/* Kolom kiri (gambar besar) */
.gallery-left {
  flex: 2;
  min-width: 400px;
}

/* Kolom kanan (gambar kecil) */
.gallery-right {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: repeat(4, 1fr);
  gap: 15px;
  min-width: 250px;
}

/* ===== FOTO STYLE ===== */
.photo {
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  background: #eee;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 0.4s ease, filter 0.4s ease;
}

.photo:hover img {
  transform: scale(1.05);
  filter: brightness(90%);
}

/* Gambar besar tidak terpotong */
.photo.large img {
  object-fit: contain;
  background: #fff;
}

.photo.small img {
  height: 180px;
  object-fit: cover;
}

/* ===== ANIMASI ===== */
.photo {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeIn 1s ease forwards;
}

.photo:nth-child(1) { animation-delay: 0.2s; }
.photo:nth-child(2) { animation-delay: 0.4s; }
.photo:nth-child(3) { animation-delay: 0.6s; }
.photo:nth-child(4) { animation-delay: 0.8s; }

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE ===== */

/* ✅ TV / layar besar */
@media (min-width: 1600px) {
  .gallery-header h2 { font-size: 3em; }
  .photo.small img { height: 260px; }
}

/* ✅ Desktop */
@media (min-width: 1024px) and (max-width: 1599px) {
  .photo.small img { height: 220px; }
}

/* ✅ Laptop */
@media (min-width: 768px) and (max-width: 1023px) {
  .gallery-wrapper {
    flex-direction: column;
    align-items: center;
  }
  .gallery-left, .gallery-right {
    width: 90%;
  }
  .photo.small img { height: 200px; }
}

/* ✅ Tablet */
@media (min-width: 480px) and (max-width: 767px) {
  .gallery-wrapper {
    flex-direction: column;
  }
  .gallery-right {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
  }
  .gallery-left, .gallery-right {
    width: 100%;
  }
  .photo.small img {
    height: 160px;
  }
}

/* ✅ Mobile (versi diperbaiki) */
@media (max-width: 479px) {
  .gallery {
    padding: 40px 15px;
  }

  .gallery-header h2 {
    font-size: 1.6em;
  }

  .gallery-header p {
    font-size: 0.9em;
    margin-bottom: 5px;
  }

  .gallery-datetime {
    font-size: 0.8em;
    margin-bottom: 25px;
  }

  .gallery-wrapper {
    flex-direction: column;
    gap: 15px;
  }

  .gallery-left,
  .gallery-right {
    width: 100%;
    min-width: unset;
  }

  /* Gambar besar di atas penuh */
  .photo.large img {
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  /* Gambar kecil 2 kolom rapi */
  .gallery-right {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .photo.small img {
    width: 100%;
    height: 130px;
    border-radius: 10px;
    object-fit: cover;
  }
}
