body {
  background-color: #f8fafc;
  scroll-behavior: smooth;
}

/* --- 1. NAVBAR KACA --- */
.glass-nav {
  background: rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05) !important;
  position: sticky;
  top: 0;
  z-index: 9999;
  transition: all 0.3s ease;
}

/* --- 2. HEADER DENGAN ANIMASI BACKGROUND --- */
@keyframes gradientMove {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.page-header {
  padding: 80px 0 100px 0;
  background: linear-gradient(-45deg, #0f172a, #1e3a8a, #2563eb, #0f172a);
  background-size: 400% 400%;
  animation: gradientMove 12s ease infinite;
  text-align: center;
  color: white;
  position: relative;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.2);
}

.page-header-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 5%;
  position: relative;
}

.btn-back-header {
  position: absolute;
  left: 5%;
  top: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 8px 20px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50px;
  backdrop-filter: blur(5px);
  transition: all 0.3s ease;
  z-index: 10;
}

.btn-back-header:hover {
  background: #facc15;
  color: #0f172a;
  border-color: #facc15;
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(250, 204, 21, 0.4);
}

.page-title {
  font-size: 2.8rem;
  font-weight: 800;
  margin: 15px 0 10px 0;
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}
.page-subtitle {
  color: #fde047;
  font-size: 1.15rem;
  font-weight: 300;
  opacity: 0.95;
}

/* --- 3. GRID SYSTEM & ANIMASI KARTU --- */
.section-page-grid {
  max-width: 1100px;
  margin: -60px auto 80px auto;
  padding: 0 5%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 40px 30px;
  position: relative;
  z-index: 5;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-page-grid .jiu-news-card,
.section-page-grid .jiu-ann-card {
  background: white; /* Bikin latar belakang kotak jadi putih */
  border-radius: 16px; /* Ujung melengkung */
  overflow: hidden; /* Biar foto nggak keluar dari kotak */
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  margin-bottom: 0;
  height: 100%;
  opacity: 0;
  animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition:
    transform 0.4s ease,
    box-shadow 0.4s ease;
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.section-page-grid > a:nth-child(1) {
  animation-delay: 0.1s;
}
.section-page-grid > a:nth-child(2) {
  animation-delay: 0.2s;
}
.section-page-grid > a:nth-child(3) {
  animation-delay: 0.3s;
}
.section-page-grid > a:nth-child(4) {
  animation-delay: 0.4s;
}
.section-page-grid > a:nth-child(5) {
  animation-delay: 0.5s;
}
.section-page-grid > a:nth-child(6) {
  animation-delay: 0.6s;
}

.section-page-grid .jiu-news-card:hover,
.section-page-grid .jiu-ann-card:hover {
  transform: translateY(-12px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* --- 4. SOLUSI FOTO BERANTAKAN --- */

/* Wadah foto berita */
.section-page-grid .jiu-news-img-box {
  width: 100%;
  height: 200px; /* Tinggi foto dikunci 200px */
  overflow: hidden;
}

/* Aturan untuk foto Berita & Pengumuman */
.section-page-grid .jiu-news-img-box img,
.section-page-grid .jiu-ann-img {
  width: 100%;
  height: 200px; /* Tinggi dikunci */
  object-fit: cover; /* ANTI GEPENG & ANTI BERANTAKAN */
  object-position: center;
  transition: transform 0.5s ease;
}

/* Efek Zoom Foto pas Hover */
.section-page-grid .jiu-news-card:hover .jiu-news-img-box img,
.section-page-grid .jiu-ann-card:hover .jiu-ann-img {
  transform: scale(1.1);
}

/* --- 5. TEKS & KONTEN BAWAH KARTU --- */
.section-page-grid .jiu-news-content,
.section-page-grid .jiu-ann-content {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1; /* Biar tombol baca selalu di bawah */
}

.jiu-news-title,
.jiu-ann-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1e3a8a;
  margin-bottom: 10px;
  /* Mencegah judul terlalu panjang ngerusak layout */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.jiu-news-btn,
.jiu-ann-btn {
  margin-top: auto; /* Dorong ke paling bawah */
  color: #2563eb;
  font-weight: 600;
  font-size: 0.9rem;
}

/* Responsif HP */
@media (max-width: 768px) {
  .page-title {
    font-size: 2rem;
  }
  .page-header {
    padding: 40px 0 60px 0;
  }
  .section-page-grid {
    margin-top: -30px;
  }
}
