.container-custom {
  background: #e4e4e4; /* atau gunakan background semi-transparan jika ingin ala iOS */
}
/* Margin container kiri-kanan */
.custom-margin {
  margin-left: 0.75rem;
  margin-right: 0.75rem;
}

@media (min-width: 768px) {
  .custom-margin {
    margin-left: 1.25rem;
    margin-right: 1.25rem;
  }
}

@media (min-width: 1200px) {
  .custom-margin {
    margin-left: 1rem;
    margin-right: 1rem;
  }
}

/* Card umum */
.card-sambutan {
 background: linear-gradient(135deg, #ffffff, #e6f3ff); /* sedikit biru muda */
  border-left: 8px solid #0d6efd;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 1rem;
  height: 100%;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
  word-break: break-word;
}

/* Card kiri dengan gambar mengambang */
.card-sambutan.with-floating-img {
  min-height: 460px;
  overflow: hidden;
  padding-bottom: 2rem;
}

/* Konten */
.konten-sambutan {
  flex: 1;
  padding-left: 1rem;
  font-size: 1rem;
  color: #333;
}

/* Foto */
.foto-container {
  width: 240px;
  flex-shrink: 0;
}

.foto-kepala-sekolah {
  width: 100%;
  height: auto;
  border-radius: 1rem;
  object-fit: contain;
}
/* Mobile: Stack vertikal dan jaga teks */
@media (max-width: 768px) {
  .card-sambutan {
    flex-direction: column;
    align-items: center;
    text-align: left;
    padding: 1.2rem 1rem;
  }

  .foto-container {
    width: 140px;
    margin-bottom: 1rem;
  }

  .konten-sambutan {
    padding-left: 0;
    font-size: 0.95rem;  /* 🔍 Ukuran teks tetap jelas */
    line-height: 1.6;
    text-align: justify; /* Agar teks rapi di semua lebar */
    width: 100%;
  }
}

/* ------------------------------
   Photo Slider (Global Styles)
------------------------------ */
.photo-slider {
  position: relative;
  height: 300px;
  border-radius: 1rem;
  overflow: hidden;
}

.photo-slider .slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.6s ease-in-out;
}

.photo-slider .slide.active {
  opacity: 1;
  z-index: 1;
}

.photo-slider img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 1rem;
}
/* Sembunyikan tombol slider secara default */
.photo-slider .slider-btn {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
}

/* Tampilkan tombol saat hover di area slider */
.photo-slider:hover .slider-btn {
  opacity: 1;
  visibility: visible;
}
/* Responsive Slider Height */
@media (max-width: 768px) {
  .photo-slider {
    height: 220px;
  }
}

/* ------------------------------
   Tombol Navigasi Slider
------------------------------ */
.slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.6);
  border: none;
  padding: 0.6rem 0.9rem;
  font-size: 1.5rem;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  color: #333;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 5;
}

.slider-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-50%) scale(1.05);
}

.slider-btn-left {
  left: 10px;
}

.slider-btn-right {
  right: 10px;
}

@media (max-width: 768px) {
  .slider-btn {
    padding: 0.5rem 0.8rem;
    font-size: 1.2rem;
  }
}

/* ------------------------------
   Card Dokumentasi
------------------------------ */
.card-dokumentasi {
  background: linear-gradient(135deg, #ffffff, #e6f3ff); /* sedikit biru muda */
  border-left: 8px solid #0d6efd;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 1rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
}

/* Caption dalam slide */
.card-dokumentasi .caption {
  font-size: 0.85rem;
  color: #555;
  text-align: center;
}
/* Hero Section */
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 6rem 0 4rem; /* lebih tinggi untuk memberi ruang navbar */
  color: #fff;
  background: url('../images/sekolah.jpg') center center / cover no-repeat;
  overflow: hidden;
}

/* Hero Overlay: gelap + blur */
.hero-overlay {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

/* Hero Content Container */
.hero .container {
  position: relative;
  z-index: 2;
}
.spinner-ios {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top-color: #00c49a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}
/* Hero Left Text */
.hero-content {
  text-align: left;
}

/* Hero Section Typography */
.hero-content h1 {
  font-family: 'Poppins', sans-serif;
  font-size: 2.75rem; /* sekitar 44px */
  font-weight: 700;
  color: #ffffff;
  line-height: 1.3;
  position: relative;
  z-index: 2;
}

.hero-content h2 {
  font-family: 'Poppins', sans-serif;
  font-size: 1.5rem; /* sekitar 24px */
  font-weight: 600;
  color: #f8f9fa;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.hero-content p.lead {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: #e0e0e0;
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

/* Hero Image Overlap */
.hero-content {
  position: relative;
  z-index: 1;
  padding-top: 300px; /* agar gambar muat naik tanpa terpotong */
}

/* Gambar mengambang, tetapi berada di belakang h1 */
.hero-image-wrapper {
  position: absolute;
  top: -43px; /* lebih tinggi agar h1 menutupi bagian bawah gambar */
  left: 45%;
  transform: translateX(-50%);
  width: 120%;
  max-width: none;
  text-align: center;
  z-index: 1;
  pointer-events: none;
}

.hero-image {
  width: 100%;
  height: auto;
  border-radius: 1rem;
}

/* RESPONSIVE UNTUK PERANGKAT MOBILE */
@media (max-width: 768px) {
  .hero-content {
    text-align: center;
    padding-top: 150px; /* kurangin padding biar tidak terlalu tinggi */
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .hero-content h1 {
    font-size: 2rem; /* sekitar 32px */
  }

  .hero-content h2 {
    font-size: 1.25rem; /* sekitar 20px */
  }

  .hero-content p.lead {
    font-size: 1rem;
  }

  .hero-image-wrapper {
    top: -40px;
    left:50%; /* naikkan gambar sedikit */
    width: 100%;
  }
}

.btn-ppdb {
  display: inline-block;
  background: linear-gradient(135deg, #00c49a, #007bff);
  color: #fff;
  font-size: 1.1rem;
  font-weight: 600;
  padding: 0.85rem 2rem;
  border: none;
  border-radius: 0.75rem;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px rgba(0, 196, 154, 0.3);
}

.btn-ppdb:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0, 196, 154, 0.4);
  background: linear-gradient(135deg, #007bff, #00c49a);
}

/* iOS-style Card */
/* iOS-style Card */
.ios-card {
  background: rgba(255, 255, 255, 0.07); /* transparan */
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border-radius: 1.75rem;
  color: #f8f9fa; /* Warna teks terang */
  font-size: 1rem;
  padding: 3rem 3rem;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.25);
  min-height: 460px; /* Tambahkan tinggi minimum */
  transition: all 0.3s ease;
}

.ios-card:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-3px);
  box-shadow: 0 14px 60px rgba(0, 0, 0, 0.3);
}
/* ====================================
   CARD IMAGE
==================================== */
.card img {
  height: 200px;
  width: 100%;
  object-fit: cover;
  border-radius: 0.75rem;
  display: block;
}

/* ====================================
   NAVBAR TRANSPARENT
==================================== */
.navbar-transparent {
  background-color: rgba(0, 0, 0, 0.5) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background-color 0.3s ease;
}

/* ====================================
   GRID SYSTEM FOR STATISTIC CARD
==================================== */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 kolom tetap */
  gap: 1.5rem 2rem;                      /* lebih renggang */
  margin-top: 2.5rem;
  height: 100%;                          /* penuh secara vertikal */
  align-content: space-between;         /* sebar isi jika kurang penuh */
}

/* Item khusus: Map membentang penuh kolom */
.map-wrapper {
  grid-column: 1 / -1;          /* Ambil seluruh kolom grid */
  margin-top: 1rem;
  display: flex;                /* Gunakan flexbox untuk pusatkan isi */
  justify-content: center;     /* Pusatkan horizontal */
}

/* Responsif: 1 kolom saat di layar kecil */
@media (max-width: 768px) {
  .stat-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
}
/* ====================================
   ICON BOX INSIDE CARD
==================================== */
.icon-box {
  width: 88px;
  height: 88px;
  background-color: rgba(0, 123, 255, 0.25); /* dibuat lebih tebal dari 0.12 → 0.25 */
  color: #007bff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  border-radius: 0.75rem;
  flex-shrink: 0;
  box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.15); /* sedikit ditambah ketebalan bayangan */
}

/* ====================================
   TEXT INSIDE INFO ITEMS
==================================== */
.label {
  font-size: 1rem;
  color: #e0e0e0;
  font-weight: 800;
  margin-bottom: 0.4rem;
}

.value {
  font-size: 1.1rem;
  color: #ffffff; /* default terang */
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3); /* tambahkan agar lebih kontras di atas background terang/transparan */
}

/* ====================================
   RESPONSIVE STYLING
==================================== */
@media (max-width: 768px) {
  .hero-content {
    text-align: center;
  }

  .hero-content h1 {
    font-size: 2rem;
    line-height: 1.4;
  }

  .ios-card {
    margin-top: 2rem;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }
}
.hero-content h2 {
  color: #f8f9fa;
  letter-spacing: 0.5px;
}

.hero-content p {
  font-size: 1.1rem;
  line-height: 1.7;
  color: #e9ecef;
}
.card h5 {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  font-family: 'Segoe UI', sans-serif;
  text-align: center;
  position: relative;
  padding-bottom: 0.5rem;
  margin-bottom: 2.5rem;
}

.card h5::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  height: 3px;
  width: 60px;
  background-color: #00c49a; /* warna aksen */
  border-radius: 2px;
}
.map-responsive {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.map-responsive iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Responsive tweak untuk mobile */
@media (max-width: 768px) {
  .photo-front {
    bottom: -5%;
    right: -5%;
  }

  .photo-stack-wrapper {
    padding-bottom: 15%; /* Tambah ruang di bawah di mobile */
  }
}
.floating-info-card-wrapper {
  position: relative;
  margin-top: -60px;
  margin-bottom: -40px;
  z-index: 10;
  display: flex;
  justify-content: center;
}

.info-card {
  background: linear-gradient(135deg, #ffffff, #e6f3ff); /* sedikit biru muda */
  border-left: 8px solid #0d6efd;
  max-width: 800px;
  width: 100%;
  border-radius: 1.5rem;
  padding: 1.5rem 2rem;
  overflow: hidden;
  position: relative;
  font-size: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  z-index: 1;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

/* Background doodle ilustrasi anak */
.info-card .bg-doodle {
  position: absolute;
  bottom: 5px;
  right: 10px;
  width: 180px;
  height: auto;
  z-index: 0;
  pointer-events: none;
}

/* Header teks */
.info-card h5 {
  color: #0d6efd;
  font-weight: 700;
}

/* Isi list */
.info-list li {
  font-size: 0.95rem;
  line-height: 1.6;
  position: relative;
  z-index: 2;
  padding: 0.4rem 0.2rem;
  border-radius: 0.5rem;
  transition: background-color 0.3s;
}

.info-list li:hover {
  background-color: rgba(13, 110, 253, 0.05); /* biru muda saat hover */
}

.info-list span.badge {
  font-size: 1rem;
  padding: 0.4em 0.6em;
  border-radius: 0.75rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

/* Responsive */
@media (max-width: 768px) {
  .info-card {
    padding: 1.2rem 1.4rem;
    font-size: 0.95rem;
  }

  .info-card .bg-doodle {
    width: 120px;
    right: 5px;
    bottom: 5px;
  }
}
.card-visi-misi {
  border: none;
  background: linear-gradient(145deg, #ffffff, #f0faff);
  transition: transform 0.35s ease, box-shadow 0.35s ease, background 0.4s;
  position: relative;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 280px; /* jaga minimal tinggi */
  padding: 1.5rem 1.5rem 2rem; /* agar ada ruang cukup bawah */
  z-index: 1;
}

.card-visi-misi:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.08);
  background: linear-gradient(145deg, #e8faff, #ffffff);
}

.card-visi-misi:hover .icon-circle {
  transform: scale(1.1) rotate(5deg);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.card-visi-misi .icon-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  flex-shrink: 0;
  margin: 0 auto 1rem; /* center dan beri jarak bawah */
  z-index: 2;
}

/* Konten teks fleksibel agar isi yang panjang tidak pecah layout */
.card-visi-misi p,
.card-visi-misi ul {
  flex-grow: 1;
  overflow-wrap: break-word;
  color: #6c757d; /* text-secondary warna */
  margin-bottom: 0;
  max-height: 150px; /* batasi tinggi isi agar card tidak terlalu tinggi */
  overflow-y: auto; /* muncul scroll jika teks panjang */
  padding-right: 0.25rem;
  font-size: 0.9rem;
  line-height: 1.4;
  -webkit-overflow-scrolling: touch;
}

/* Glow animasi sebelum tetap */
.card-visi-misi::before {
  content: "";
  position: absolute;
  top: -30%;
  left: -30%;
  width: 160%;
  height: 160%;
  background: radial-gradient(circle at center, rgba(255, 255, 255, 0.2), transparent 70%);
  opacity: 0;
  transition: opacity 0.5s ease;
  z-index: 0;
}

.card-visi-misi:hover::before {
  opacity: 1;
}

/* Agar kolom pembungkus card stretch agar tinggi seragam */
#visi-misi > div[class*="col-"] {
  display: flex;
  align-items: stretch;
}

/* Untuk responsif di layar kecil, biar card tidak terlalu panjang */
@media (max-width: 576px) {
  .card-visi-misi {
    min-height: auto;
    max-height: none;
  }

  .card-visi-misi p,
  .card-visi-misi ul {
    max-height: none;
    overflow: visible;
  }
}

/* Divider Garis Kiri-Kanan */
.extrakulikuler-divider .line {
  flex: 1;
  height: 2px;
  background-color: #0d6efd; /* Bootstrap Primary atau sesuaikan */
  border-radius: 2px;
  max-width: 120px;
}

.section-title {
  font-size: 2rem;
  font-family: 'Poppins', sans-serif;
  color: #2d3e50;
  letter-spacing: 1px;
}

.emoji {
  font-size: 1.5rem;
}

.soft-line {
  height: 2px;
  width: 60px;
  background: linear-gradient(90deg, #4facfe, #00f2fe);
  border-radius: 2px;
  opacity: 0.7;
}

@media (max-width: 576px) {
  .section-title {
    font-size: 1.5rem;
  }

  .soft-line {
    width: 40px;
  }
}

/* Responsiveness */
@media (max-width: 768px) {
  .section-title {
    font-size: 1.5rem;
    letter-spacing: 1px;
  }

  .extrakulikuler-divider .line {
    max-width: 50px;
  }

  .section-subtitle {
    font-size: 0.875rem;
  }
}
/* Pastikan container row menggunakan flexbox (Bootstrap .row sudah flex) */
.row.gy-4 {
  display: flex;
  flex-wrap: wrap;
}

/* Pastikan setiap kolom jadi flex container */
.row.gy-4 > .col-md-6 {
  display: flex;
  /* supaya kolom ini stretch */
}
.eskul-card {
  background: #fff;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
  position: relative;
}

.eskul-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.eskul-card:hover .eskul-image img {
  transform: scale(1.05);
}

.eskul-card:hover .eskul-content {
  transform: translateX(5px);
}

.eskul-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 50%;
  height: 100%;
  background: linear-gradient(120deg, rgba(255, 255, 255, 0.2) 0%, rgba(255, 255, 255, 0.1) 100%);
  transform: skewX(-25deg);
  transition: left 0.75s ease;
  pointer-events: none;
}

.eskul-card:hover::before {
  left: 130%;
}

.eskul-image {
  padding: 0 !important;
  margin: 0 !important;
}

.eskul-image img {
  object-fit: cover;
  height: 100%;
  width: 100%;
  display: block;
  transition: transform 0.4s ease;
}

.eskul-content {
  transition: all 0.4s ease;
}

.eskul-content h5 {
  color: #0d6efd;
  font-size: 1.2rem;
}

.eskul-content .badge {
  font-size: 0.75rem;
  border-radius: 0.5rem;
}

@media (max-width: 768px) {
  .eskul-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }

  .eskul-image img {
    width: 120px;
    height: 120px;
  }

  .eskul-content {
    padding: 0;
  }

  .eskul-content h5 {
    margin-top: 0.5rem;
  }
}
.mini-card {
  background: #f9f9ff;
  transition: all 0.4s ease;
  cursor: pointer;
  border: 2px solid transparent;
}

.mini-card:hover {
  transform: translateY(-6px);
  background: #fff;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
  border-color: #0d6efd20;
}

.icon-boxs {
  width: 60px;
  height: 60px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.4s ease, transform 0.4s ease;
}

/* Animasi goyang pada hover */
.mini-card:hover .animated-icon {
  animation: swingIcon 1s ease infinite;
}

/* Ganti warna background ikon box saat hover */
.mini-card:hover .icon-box.bg-primary-subtle {
  background-color: #0d6efd;
  color: #fff;
}
.mini-card:hover .icon-box.bg-success-subtle {
  background-color: #198754;
  color: #fff;
}
.mini-card:hover .icon-box.bg-warning-subtle {
  background-color: #ffc107;
  color: #fff;
}
.mini-card:hover .icon-box.bg-danger-subtle {
  background-color: #dc3545;
  color: #fff;
}

/* Keyframe goyang */
@keyframes swingIcon {
  0% { transform: rotate(0deg); }
  25% { transform: rotate(10deg); }
  50% { transform: rotate(-10deg); }
  75% { transform: rotate(6deg); }
  100% { transform: rotate(0deg); }
}
.hover-img {
  transition: transform 0.5s ease, box-shadow 0.5s ease;
  will-change: transform;
}

.hover-img:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.15);
}
/* Khusus untuk overlay teks di gambar pengembangan siswa */
.overlay-caption {
  font-family: 'Poppins', sans-serif;
}

.overlay-caption h5 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.overlay-caption a {
  font-size: 0.9rem;
  font-weight: 500;
  color: #ffc107; /* Bootstrap warning color */
  text-decoration: none;
}

.overlay-caption a:hover {
  text-decoration: underline;
}
.emoji-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  border-radius: 50%;
  background-color: #f0f8ff;
  transition: transform 0.4s ease, background-color 0.4s ease;
}

.animated-icon {
  display: inline-block;
  font-size: 1.5rem;
  transition: transform 0.4s ease;
}

.emoji-wrapper:hover {
  background-color: #e0f0ff;
  transform: rotate(10deg) scale(1.15);
}

.animated-icon:hover {
  transform: rotate(-10deg) scale(1.15);
}
/* === Teacher Image Styling === */
.teacher-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background: linear-gradient(135deg, #ffffff, #e6f3ff);
  border-radius: 1rem;
}

.teacher-card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-img-top {
  object-fit: cover;
  width: 100%;
  height: 100%;
}

.card-body h6,
.card-body p {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.contact-info {
  font-size: 0.85rem;
  color: #6c757d;
  word-break: break-word;
}

.contact-info a {
  color: inherit;
}
.teacher-name {
  text-align: center;
  font-weight: 700;
  line-height: 1.3;
  max-height: 2.6em; /* kira-kira 2 baris */
  overflow: hidden;
  word-break: break-word;
}
.card-berita {
  border: 1px solid #dee2e6;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border-radius: 12px;
  overflow: hidden;
}

.card-berita:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.card-berita img {
  height: 200px;
  object-fit: cover;
}

.card-berita .card-body {
  padding: 1rem;
}

.card-berita .card-title {
  font-weight: bold;
  font-size: 1.1rem;
}

.card-berita .btn {
  margin-top: 10px;
}
.btn-ppdb.disabled {
  pointer-events: none;
  opacity: 0.6;
  cursor: default;
}
.pengumuman-img-wrapper {
    margin: 0;
    padding: 0;
    background: #fff; /* atau warna sesuai desain */
}

.pengumuman-img {
    display: block;
    width: 100%;
    height: auto; /* biar proporsinya asli */
    object-fit: contain; /* tidak terpotong */
    margin: 0;
    padding: 0;
}
/* Animasi pulse untuk efek berdenyut */
@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
  }
}

.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: #25D366; /* hijau khas WhatsApp */
  color: white;
  border-radius: 50%;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  box-shadow: 0 4px 12px rgba(37, 211, 102, 0.6);
  z-index: 1050;
  transition: background-color 0.3s ease, transform 0.3s ease;
  text-decoration: none;
  animation: pulse 2.5s infinite;
}

.whatsapp-float:hover {
  background-color: #128C7E;
  box-shadow: 0 6px 18px rgba(18, 140, 126, 0.8);
  transform: scale(1.1);
  animation: none; /* hentikan pulse saat hover supaya stabil */
}
#randomGalleryImg {
  transition: opacity 0.5s ease-in-out;
  opacity: 1;
}
.fade-out {
  opacity: 0;
}
/* === Flip Card Wrapper === */
.card-flip {
  perspective: 1200px;
  position: relative;
  width: 100%;
  height: auto; /* fleksibel, bukan fix 100% */
  z-index: 5; /* pastikan di atas footer */
}

.card-inner {
  position: relative;
  width: 100%;
  min-height: 400px; /* tinggi dasar */
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.4, 0.2, 0.2, 1);
  border-radius: 20px;
}

.card-flip.flipped .card-inner {
  transform: rotateY(180deg);
}
.badge-ios {
  position: absolute;
  top: 10px;    /* bisa gunakan .top-2 */
  right: 10px;  /* bisa gunakan .end-2 */
  padding: 4px 12px;
  font-size: 0.75rem;
  font-weight: 600;
  color: #fff;
  border-radius: 12px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 10;
  
  /* Gradient animasi */
  background: linear-gradient(135deg, #6366F1, #A855F7);
  background-size: 200% 200%;
  animation: gradientMove 3s ease infinite;

  /* Animasi masuk */
  transform: scale(0.8);
  opacity: 0;
  animation: fadeInScale 0.6s ease forwards;
}

/* Gradient bergerak */
@keyframes gradientMove {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Fade-in + scale */
@keyframes fadeInScale {
  0% { opacity: 0; transform: scale(0.8); }
  60% { opacity: 1; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}

/* === Front & Back === */
.card-front,
.card-back {
  position: absolute;
  width: 100%;
  min-height: 400px; /* jangan height:100% */
  top: 0;
  left: 0;
  backface-visibility: hidden;
  border-radius: 20px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
  display: flex;
  flex-direction: column;
}

/* ✨ Front tetap clean putih */
.card-front {
  background: rgba(255, 255, 255, 0.95);
  z-index: 2;
}

/* 🎨 Back dengan nuansa iOS 17 soft gradient */
.card-back {
  background: linear-gradient(
    135deg,
    rgba(255, 200, 255, 0.65),
    rgba(180, 220, 255, 0.65),
    rgba(200, 255, 220, 0.65)
  );
  color: #111;
  transform: rotateY(180deg);
}

/* === Card Image & Body === */
.card-front img {
  object-fit: cover;
  width: 100%;
  height: 200px;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
}

.card-front .p-3 {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

/* === Text Styling === */
.card-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  display: -webkit-box;
  -webkit-line-clamp: 2; /* maksimal 2 baris */
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-text {
  font-size: 0.9rem;
  color: #555;
  margin-bottom: 1rem;
  text-align: justify;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-back p {
  font-size: 0.95rem;
  line-height: 1.5;
  text-align: justify;
  color: #333;
  margin-bottom: 1rem;
}

/* === Buttons === */
.btn {
  border-radius: 999px;
  padding: 0.5rem 1rem;
  font-weight: 500;
  transition: all 0.25s ease;
}

.btn-primary {
  background: linear-gradient(135deg, #007aff, #0051a8);
  border: none;
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #3395ff, #0062cc);
  transform: scale(1.03);
}
.filter-bar {
  gap: 10px;
  flex-wrap: wrap;
}

.btn-filter {
  padding: 6px 16px;
  border-radius: 14px;
  font-size: 0.85rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-filter.active,
.btn-filter:hover {
  background: linear-gradient(135deg, #6366F1, #A855F7);
  color: #fff;
  transform: scale(1.05);
  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}
/* === Container agar tidak nabrak footer === */
#berita-container {
  padding-bottom: 120px; /* aman dari footer */
}
#berita-container .row {
  display: flex;
  flex-wrap: wrap;
}

#berita-container .col-md-4 {
  display: flex;
}

#berita-container .card-flip {
  flex: 1; /* isi penuh */
}