/* --- CSS UNTUK SLIDER FOTO PROFIL ATAS --- */
.about-slider {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
}

.about-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 1;
}

.about-slide.active {
  opacity: 1;
  z-index: 2;
  position: relative;
}

/* 1. Container Luar (KUNCI AGAR BISA MELUAP KELUAR) */
.history-scroll-wrapper {
  overflow-x: auto !important;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  -ms-overflow-style: none; /* IE/Edge lama */
  scrollbar-width: none; /* Firefox */
  width: 100vw !important; /* Paksa selebar layar penuh */
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw; /* Trik agar keluar dari padding website */
  margin-right: -50vw;
  padding: 20px 0 40px 0;
  display: block;
  cursor: grab;
  user-select: none;
  /* Properti untuk swipe & snap di mobile */
  scroll-snap-type: x mandatory;
  touch-action: pan-x;
}

.history-scroll-wrapper::-webkit-scrollbar {
  display: none; /* Chrome/Safari/Opera */
}

.history-scroll-wrapper:active {
  cursor: grabbing;
}

/* 2. Container Dalam (Barisan Foto) */
.history-grid {
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important; /* Paksa tetap satu baris */
  gap: 25px;
  width: max-content !important; /* Biar baris memanjang terus ke kanan */
  /* Padding dinamis agar item pertama & terakhir bisa pas di tengah layar */
  padding: 0 calc(50vw - 125px);
}

/* 3. Item Foto */
.history-item {
  width: 250px; /* Samakan dengan ukuran yang kita buat sebelumnya */
  flex-shrink: 0;
  scroll-snap-align: center; /* Kunci agar item berhenti di tengah saat di-swipe */
  display: flex;
  flex-direction: column;
  align-items: center; /* KUNCI: Memaksa semua isi di dalamnya ke tengah */
  text-align: center;
}

.history-photo-wrapper {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #ddd;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px;
}

.history-photo-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.year-label {
  display: block;
  font-weight: bold;
  color: #1d2f8f;
  margin-top: 10px;
  text-align: center;
  width: 100%;
}

.history-item-desc {
  font-size: 0.8rem;
  color: #555;
  line-height: 1.4;
  margin-top: 8px;
  padding: 0 10px;
  white-space: normal;
  text-align: center;
  /* KUNCI AGAR CENTER: */
  width: 100%;
  max-width: 230px; /* Harus lebih kecil sedikit dari lebar history-item */
}

/* 4. Judul Section (Maron & Bold) */
.history-title {
  color: #800020 !important;
  text-align: center !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
  font-size: 1.5rem !important;
  margin-bottom: 25px !important;
  display: block !important;
  width: 100%;
}

/* 5. Deskripsi Umum (Bawah Slider) */
.history-description {
  display: block;
  text-align: center;
  margin: 30px auto;
  padding: 0 20px;
  color: #333;
  font-size: 1rem;
  line-height: 1.6;
  white-space: normal;
  max-width: 600px;
}

.line {
  width: 60px; /* Panjang garis */
  height: 5px; /* Ketebalan garis (Ubah angka ini untuk lebih tebal) */
  background-color: #a8a2a2; /* Warna Merah Maron */
  margin: 20px auto; /* Memberi jarak atas-bawah dan posisi di tengah */
  border-radius: 2px; /* Membuat ujung garis sedikit melengkung (rapi) */
  display: block;
}

/* Styling Kontainer Titik */
.history-dots-container {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
  margin-bottom: 20px;
}

/* Styling Titik Dasar */
.history-dot {
  width: 12px;
  height: 12px;
  background-color: #cccccc;
  border-radius: 50%;
  cursor: pointer;
  transition:
    background-color 0.3s ease,
    transform 0.2s ease;
}

/* Styling Titik Aktif (Maron) */
.history-dot.active {
  background-color: #1d4ed8;
  transform: scale(1.2);
}

/* Efek Hover (Hanya di Laptop) */
@media (hover: hover) {
  .history-dot:hover:not(.active) {
    background-color: #a5a5a5;
  }
}

/* 7. Perbaikan Jarak Section Alasan Memilih */
#keunggulan-kami {
  margin-top: -20px !important;
  position: relative;
  z-index: 5;
  background: #fff;
  padding-top: 40px;
}

.section-title.advantages-title h2 {
  color: #1d2f8f !important;
  font-weight: bold !important;
  text-align: center;
}

.page-breadcrumb {
  margin-bottom: 8px;
  color: #1d2f8f;
  font-weight: 600;
}

.page-breadcrumb a {
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
  cursor: pointer;
}

.page-breadcrumb a:hover,
.page-breadcrumb a:focus-visible {
  text-decoration: underline;
}

@media (max-width: 560px) {
  .history-title {
    white-space: nowrap !important;
    font-size: clamp(0.88rem, 5vw, 1.08rem) !important;
    letter-spacing: 0 !important;
    line-height: 1.2 !important;
  }
}
