:root {
  --primary: #2563eb;
  --secondary: #06b6d4;
  --accent: #f59e0b;
  --success: #22c55e;
  --soft-blue: #e0f2fe;
  --soft-yellow: #fef3c7;
  --soft-pink: #ffe4e6;
  --dark: #1e293b;
}

body {
  background: linear-gradient(to bottom, #f8fbff, #eef6ff);
  font-family: "Segoe UI", sans-serif;
  color: #334155;
}

html {
  scroll-behavior: smooth;
}

.navbar {
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--secondary)
  ) !important;
}

.navbar-brand {
  font-size: 1.4rem;
  letter-spacing: 0.5px;
}

.nav-link {
  transition: 0.3s ease;
  border-radius: 10px;
  padding: 8px 14px !important;
}

.nav-link:hover,
.nav-link.active {
  background-color: rgba(255, 255, 255, 0.15);
}

.hero {
  position: relative;
  background: linear-gradient(135deg, #2563eb, #06b6d4, #38bdf8);
  color: white;
  min-height: calc(100vh - 60px);
  overflow: hidden;
  padding: 0;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
}

.hero::before {
  width: 260px;
  height: 260px;
  top: -60px;
  left: -60px;
}

.hero::after {
  width: 320px;
  height: 320px;
  bottom: -120px;
  right: -80px;
}

.hero h1 {
  font-weight: 800;
  font-size: 2.8rem;
}

.hero p {
  max-width: 700px;
  margin: auto;
}

.hero .btn {
  border-radius: 50px;
  padding: 12px 28px;
  font-weight: 600;
}

.section-title {
  font-weight: 800;
  color: var(--dark);
  margin-bottom: 12px;
}

.section-subtitle {
  color: #64748b;
  max-width: 700px;
  margin: 0 auto 30px;
}

.card {
  border: none;
  border-radius: 22px;
  overflow: hidden;
  transition: all 0.35s ease;
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 18px 35px rgba(37, 99, 235, 0.15);
}

/* Styling Baru untuk Card Postingan Bergambar */
.postingan-card-img {
  width: 100%;
  height: 200px; /* Tinggi gambar konstan */
  object-fit: cover; /* Memotong gambar secara proporsional agar memenuhi area */
  border-top-left-radius: calc(20px - 1px); /* Menyesuaikan kebulatan card */
  border-top-right-radius: calc(20px - 1px);
}

.info-card {
  border-radius: 20px;
  overflow: hidden; /* Mengunci konten/gambar agar mengikuti lekukan border card */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.1) !important;
}

.info-card .icon-box {
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 18px;
}

.bg-soft-blue {
  background: var(--soft-blue);
}
.bg-soft-yellow {
  background: var(--soft-yellow);
}
.bg-soft-pink {
  background: var(--soft-pink);
}

.school-profile {
  background: linear-gradient(135deg, #ffffff, #eff6ff);
  border-radius: 28px;
  padding: 40px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.stats-box {
  background: white;
  border-radius: 20px;
  padding: 24px;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
  transition: 0.3s;
}

.stats-box:hover {
  transform: translateY(-6px);
}

.stats-box h3 {
  font-size: 2rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.agenda-card {
  background: white;
}

.agenda-badge {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent), #fbbf24);
  color: white;
  font-size: 0.8rem;
  padding: 6px 12px;
  border-radius: 50px;
  margin-bottom: 14px;
}

.contact-box {
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  color: white;
  border-radius: 28px;
  padding: 40px 20px;
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.2);
}

.contact-box p {
  margin-bottom: 10px;
  font-size: 1.05rem;
}

footer {
  background: linear-gradient(90deg, #1d4ed8, #0891b2);
  color: white;
  padding: 22px 0;
}

.wave {
  position: relative;
  margin-top: -1px;
}

.wave svg {
  display: block;
  width: 100%;
  height: 70px;
}

.btn-blue {
  background: linear-gradient(135deg, #2563eb, #06b6d4, #38bdf8);
  border: none;
  color: white;
}

.btn-blue:hover {
  background: linear-gradient(135deg, #1e54c9, #0aa9c4, #32a7db);
  color: white;
}

.btn-school {
  background: linear-gradient(90deg, var(--accent), #f97316);
  border: none;
  color: white;
}

.btn-school:hover {
  background: linear-gradient(90deg, #f59e0b, #ea580c);
  color: white;
}

@media (max-width: 768px) {
  .hero h1 {
    font-size: 2rem;
  }

  .school-profile {
    padding: 28px;
  }
}

.dropdown-menu .dropdown-item {
  border-radius: 10px;
  padding: 8px 14px;
  transition: 0.2s ease;
}

.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item.active {
  background-color: #eff6ff;
  color: #2563eb;
}

.postingan-slider-wrapper {
  position: relative;
}

.postingan-slider {
  overflow: hidden;
  width: 100%;
}

.postingan-track {
  display: flex;
  transition: transform 0.6s ease-in-out;
  will-change: transform;
}

.postingan-item {
  flex: 0 0 calc(100% / 3);
  padding: 0 12px;
  box-sizing: border-box;
}

.postingan-item .card {
  height: 100%;
}

.postingan-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.postingan-dot {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 50%;
  background: #cfd8dc;
  padding: 0;
  cursor: pointer;
}

.postingan-dot.active {
  background: #0d6efd;
}

/* Tablet */
@media (max-width: 991.98px) {
  .postingan-item {
    flex: 0 0 50%;
  }
}

/* Mobile */
@media (max-width: 575.98px) {
  .postingan-item {
    flex: 0 0 100%;
  }
}

.navbar-logo {
  width: 40px;
  height: 40px;
  object-fit: cover;
}

@media (max-width: 575.98px) {
  .brand-text {
    display: none !important;
  }
}

/* Styling Khusus Footer */
footer {
  padding: 30px 0;
  background-color: #f8f9fa; /* Warna latar belakang footer */
  border-top: 1px solid #dee2e6;
}

.social-media-links {
  margin-bottom: 15px;
  display: flex;
  justify-content: center;
  gap: 15px; /* Jarak antar ikon */
}

/* Gaya Dasar Ikon */
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #495057;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  text-decoration: none;
}

.social-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* Efek Hover untuk masing-masing Media Sosial */
.social-btn:hover {
  transform: translateY(-4px); /* Efek tombol terangkat naik */
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.18);
  color: #ffffff;
}

/* Warna Hover TikTok */
.tiktok-btn:hover {
  background-color: #010101;
}

/* Warna Hover Instagram (Gradien Khas Instagram) */
.instagram-btn:hover {
  background: radial-gradient(
    circle at 30% 107%,
    #fdf497 0%,
    #fdf497 5%,
    #fd5949 45%,
    #d6249f 60%,
    #285aeb 90%
  );
}

/* Warna Hover Youtube */
.youtube-btn:hover {
  background-color: #ff0000;
}

.copyright-text {
  color: #6c757d;
  font-size: 0.9rem;
}

/* --- Style Khusus Section Testimoni (Terbaru) --- */
.testimonial-card {
  background: #ffffff;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.04);
  border: 1px solid #f1f5f9;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform 0.3s ease;
  text-align: center; /* Membuat semua teks di dalam kartu rata tengah */
}

.testimonial-card:hover {
  transform: translateY(-5px);
}

/* Menggeser ikon tanda kutip ke tengah atas */
.testimonial-quote-icon {
  font-size: 2.5rem;
  color: #e2e8f0;
  line-height: 1;
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%); /* Memastikan posisi pas di tengah */
  font-family: Georgia, serif;
}

.testimonial-text {
  font-style: italic;
  color: #475569;
  font-size: 1.05rem;
  line-height: 1.7;
  position: relative;
  z-index: 1;
  padding-top: 25px; /* Ditambah sedikit jarak agar tidak menabrak ikon tanda kutip */
  margin-bottom: 20px;
}

/* Ukuran Nama Diperkecil */
.testimonial-author {
  font-weight: 700;
  color: #1e293b;
  font-size: 0.9rem; /* Diperkecil dari ukuran standar */
  margin-bottom: 2px;
}

/* Ukuran Keterangan Peran Diperkecil */
.testimonial-role {
  font-size: 0.8rem; /* Diperkecil agar lebih proporsional */
  color: #06b6d4;
  font-weight: 600;
}

/* Ukuran Tanggal Diperkecil dan Posisi di Tengah */
.testimonial-date {
  font-size: 0.7rem; /* Diperkecil */
  color: #94a3b8;
  text-align: center; /* Diubah ke tengah menyelaraskan dengan teks lainnya */
  margin-top: 8px;
}

/* ==========================================================================
   CSS SLIDER TESTIMONI (Mencegah Menumpuk & Memaksa Horizontal)
   ========================================================================== */
.testi-slider-container {
  overflow: hidden; /* Menyembunyikan card yang berada di luar layar */
  width: 100%;
}

.testi-slider-track {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important; /* KUNCI: Mencegah card turun ke bawah */
  gap: 20px; /* Jarak antar card */
  transition: transform 0.5s ease-in-out;
}

.testi-slider-card {
  flex: 0 0 calc(33.333% - 14px); /* Tampil 3 card di desktop */
  width: calc(33.333% - 14px);
  flex-shrink: 0 !important; /* KUNCI: Mencegah card mengecil/gepeng */
  box-sizing: border-box;
}

/* Responsive Tablet */
@media (max-width: 992px) {
  .testi-slider-card {
    flex: 0 0 calc(50% - 10px); /* Tampil 2 card */
    width: calc(50% - 10px);
  }
}

/* Responsive HP */
@media (max-width: 576px) {
  .testi-slider-card {
    flex: 0 0 100%; /* Tampil 1 card penuh */
    width: 100%;
  }
}

/* Style Indikator Titik Slider Testimoni */
.testi-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 25px;
}

.testi-indicators .testi-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #cbd5e1;
  border: none;
  transition: all 0.3s ease;
  cursor: pointer;
  padding: 0;
}

.testi-indicators .testi-dot.active {
  background-color: #2563eb; /* Warna Biru Aktif */
}

/* public/css/user-style.css - Bagian Tambahan Hero */

.hero {
  /* Gambar latar default jika database gambar utama sekolah belum diunggah */
  background: url("../uploads/foto_sekolah_2.jpg") no-repeat center center;
  background-size: cover;
  background-attachment: fixed; /* Memberikan efek parallax keren saat di-scroll */
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(37, 99, 235, 0.85),
    rgba(6, 182, 212, 0.75)
  );
  z-index: 1;
}

.hero .container {
  position: relative; /* Wajib diberi posisi agar z-index bekerja */
  z-index: 2; /* Naikkan ke tingkat 2 agar berada di ATAS overlay */
}

/* Trik CSS Clamp untuk Memotong Text Berlebih Agar Tinggi Kartu Sejajar */
.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 48px; /* Jaga space judul tetap proporsional */
}

.text-truncate-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 72px;
}

.info-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08) !important;
}

/* public/css/user-style.css - Bagian Tambahan Profil */

.text-justify {
  text-align: justify;
}

.img-profile-section {
  transition: transform 0.4s ease;
}

.school-profile:hover .img-profile-section {
  transform: scale(1.02); /* Sedikit membesar anggun saat area box disorot */
}

.profile-meta p i {
  font-size: 1.1rem;
}

/* public/css/user-style.css - Desain Baru Modern Timeline */

.modern-timeline {
  position: relative;
  padding: 10px 0;
}

/* Menggambar Garis Tegak Lurus di Belakang Titik */
@media (min-width: 576px) {
  .modern-timeline::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 109px; /* Berada tepat di tengah antara kotak tanggal dan kartu */
    width: 3px;
    background: #e2e8f0;
    z-index: 1;
  }
}

.timeline-card-content {
  transition: all 0.3s ease;
}

.timeline-block:hover .timeline-card-content {
  transform: translateX(5px);
  border-color: #2563eb !important;
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.05) !important;
}

.timeline-date-box {
  border-top: 3px solid #2563eb !important;
}

/* public/css/user-style.css - Bagian Kosmetik Tambahan Testimoni */

.testimonial-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  min-height: 250px; /* Jaga agar tinggi box seragam */
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.08) !important;
}

.carousel-indicators button {
  width: 10px !important;
  height: 10px !important;
  border-radius: 50% !important;
  margin: 0 5px !important;
}

/* --- Modifikasi Utama untuk Carousel Bergeser Satu-Satu --- */
@media (min-width: 768px) {
  .custom-carousel .carousel-inner {
    display: flex;
  }

  .custom-carousel .carousel-item {
    margin-right: 0;
    flex: 0 0 33.3333%; /* Menampilkan 3 item sekaligus di layar desktop/tablet */
    display: block;
  }

  /* Menghilangkan efek fade bawaan jika aktif, memaksa transisi geser horizontal */
  .custom-carousel .carousel-item.active + .carousel-item,
  .custom-carousel .carousel-item.active + .carousel-item + .carousel-item {
    display: block;
  }

  .custom-carousel .carousel-item-next,
  .custom-carousel .carousel-item-prev,
  .custom-carousel .carousel-item.active {
    transition: transform 0.6s ease-in-out;
  }
}

/* Untuk layar HP/Mobile, tampilkan 1 card penuh saja */
@media (max-width: 767.98px) {
  .custom-carousel .carousel-item {
    flex: 0 0 100%;
  }
}

/* public/css/user-style.css - Layout Dua Kolom Blogspot */

.sticky-sidebar {
  position: -webkit-sticky;
  position: sticky;
  top: 90px; /* Jarak pas dari navbar atas saat di-scroll */
}

.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.text-hover-primary:hover {
  color: #2563eb !important; /* Berubah biru cerah saat judul sidebar disorot kursor */
  transition: color 0.2s ease;
}

.sidebar-post-item {
  border-bottom: 1px dashed #f1f5f9;
  padding-bottom: 12px;
}

.sidebar-post-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* public/css/user-style.css - Efek Khusus Halaman Profil */

.img-profile-page {
  transition: transform 0.5s ease;
}

.img-profile-page:hover {
  transform: scale(1.03);
}

.tracking-wider {
  letter-spacing: 0.05em;
}

/* public/css/user-style.css - Efek Direktori Profil GTK */

.transition-hover-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.transition-hover-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08) !important;
}

.text-truncate-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* public/css/user-style.css - Kustom Gradasi Kuning untuk Badge */

.bg-gradient-school-yellow {
  /* Perpaduan gradasi warna kuning cerah ke oranye lembut */
  background: linear-gradient(135deg, #ffbc00, #f59e0b) !important;
  color: #ffffff !important; /* Warna teks abu-abu gelap kehitaman agar kontras tinggi */
  font-weight: 400;
}

/* public/css/user-style.css - Kosmetik Pagination Direktori Siswa */

.custom-pagination-wrapper ul.pagination {
  display: flex;
  padding-left: 0;
  list-style: none;
  gap: 5px;
}

.custom-pagination-wrapper ul.pagination li a {
  color: #2563eb;
  text-decoration: none;
  padding: 6px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background-color: #ffffff;
  font-size: 0.88rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.custom-pagination-wrapper ul.pagination li.active a,
.custom-pagination-wrapper ul.pagination li a:hover {
  background: linear-gradient(
    135deg,
    #ffbc00,
    #f59e0b
  ) !important; /* Senada gradasi kuning beranda */
  color: #1e293b !important;
  border-color: #f59e0b;
}

/* public/css/user-style.css - Efek Bioskop Layar Galeri */

.gallery-card {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-img {
  transition: transform 0.5s ease;
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(
    37,
    99,
    235,
    0.75
  ); /* Warna Biru Transparan Khas Sekolah */
  opacity: 0;
  z-index: 2;
  transition: opacity 0.3s ease;
}

.overlay-content i {
  transform: scale(0.5);
  transition: transform 0.3s ease;
  display: inline-block;
}

/* AKSI HOVER: Saat Kartu Dilewati Kursor */
.gallery-card:hover {
  transform: translateY(-4px);
}

.gallery-card:hover .gallery-img {
  transform: scale(1.08); /* Foto otomatis membesar lembut di dalam bingkai */
}

.gallery-card:hover .gallery-overlay {
  opacity: 1; /* Overlay biru menyala tipis */
}

.gallery-card:hover .overlay-content i {
  transform: scale(1);
}

/* public/css/user-style.css - Efek Transisi List Agenda */

.transition-agenda-item {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.transition-agenda-item:hover {
  transform: translateX(4px); /* Efek sedikit menggeser ke kanan saat disorot */
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.06) !important;
}

.bg-gray {
  background-color: #f8fafc !important; /* Efek meredupkan boks agenda yang telah usai */
}

/* public/css/user-style.css - Efek Transisi Box Kontak */

.transition-contact-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.transition-contact-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.06) !important;
}

.text-hover-underline:hover {
  text-decoration: underline !important;
}

/* Container utama slider */
.yt-slider-container {
  overflow: hidden;
  width: 100%;
  padding: 10px 0;
}

/* Track horizontal untuk pergerakan card */
.yt-slider-track {
  display: flex;
  transition: transform 0.4s ease-in-out;
  gap: 24px; /* Jarak antar card (sama dengan g-4 bootstrap) */
}

/* Ukuran card otomatis menyesuaikan layar (3 card di PC) */
.yt-slider-card {
  flex: 0 0 calc(33.333% - 16px); /* 3 card per layar di PC */
  box-sizing: border-box;
}

/* Responsive: 2 card di tablet */
@media (max-width: 992px) {
  .yt-slider-card {
    flex: 0 0 calc(50% - 12px);
  }
}

/* Responsive: 1 card di HP */
@media (max-width: 576px) {
  .yt-slider-track {
    gap: 16px;
  }
  .yt-slider-card {
    flex: 0 0 100%;
  }
}

/* Pembungkus Indikator Lingkaran */
.yt-indicators {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 25px;
}

/* Style Lingkaran Indikator */
.yt-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: #ced4da; /* Warna lingkaran saat tidak aktif */
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  border: none;
}

/* Warna lingkaran saat AKTIF */
.yt-dot.active {
  background-color: #0d6efd; /* Warna biru utama Bootstrap (bisa diganti sesuai tema) */
  transform: scale(1.15);
}

/* --- Tombol Mengambang Back to Top --- */
.btn-back-to-top {
  position: fixed;
  bottom: 25px;
  right: 25px;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background-color: #1e293b; /* Warna gelap elegan (slate) agar netral */
  color: #ffffff;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem; /* Ukuran icon panah */
  cursor: pointer;
  z-index: 9999; /* Memastikan berada di paling atas elemen lain */

  /* Efek Halus Luapan & Transparansi */
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s ease;
}

/* Keadaan Aktif saat Muncul */
.btn-back-to-top.show {
  opacity: 0.45; /* Sedikit transparan/tidak mencolok sesuai request */
  visibility: visible;
}

/* Efek Hover */
.btn-back-to-top:hover {
  opacity: 0.95; /* Menjadi jelas saat didekati kursor */
  transform: translateY(-3px); /* Sedikit efek mengangkat ke atas */
  background: linear-gradient(
    90deg,
    var(--primary),
    var(--secondary)
  ); /* Berubah menjadi biru (senada dengan indikator slider Anda) */
  color: #ffffff;
}

/* Responsif Mobile (Sedikit digeser agar tidak menutupi konten penting HP) */
@media (max-width: 576px) {
  .btn-back-to-top {
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
  }
}