/* ==========================================================
   SMAIT As-Syam — style.css
   Palet (3 warna utama + netral):
   hijau  #1f4d3a  = identitas utama (navbar aktif, judul, footer)
   abu    #eef0ed  = latar seksi selang-seling
   emas   #c8963e  = aksen tombol & garis (dipakai hemat)
   ========================================================== */

/* ---------- 1. Variabel & dasar ---------- */
:root {
  --hijau: #1f4d3a;
  --hijau-tua: #143527;
  --abu: #eef0ed;
  --emas: #c8963e;
  --emas-tua: #b0832f;
  --tinta: #1c2420;
  --redup: #56625b;
  --garis: #d9ded9;
  /* variabel tema (berubah saat mode gelap) */
  --latar: #ffffff;
  --latar-alt: var(--abu);
  --kartu: #ffffff;
  --judul: var(--hijau);
  --aksi: var(--hijau);
  --font-judul: "Fraunces", Georgia, serif;
  --font-isi: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}
[data-bs-theme="dark"] {
  --latar: #0e1812;
  --latar-alt: #13211a;
  --kartu: #17271f;
  --tinta: #e4ebe6;
  --redup: #9db0a5;
  --garis: #27392f;
  --judul: #8fd0ae;
  --aksi: #2f7a5a;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}
body {
  background: var(--latar);
  font-family: var(--font-isi);
  color: var(--tinta);
  transition:
    background-color 0.3s,
    color 0.3s;
  font-size: 1rem;
  line-height: 1.7;
}
h1,
h2,
h3 {
  font-family: var(--font-judul);
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--judul);
}
a {
  color: var(--judul);
}
a:hover {
  color: var(--emas-tua);
}
:focus-visible {
  outline: 3px solid var(--emas);
  outline-offset: 3px;
}
::selection {
  background: var(--aksi);
  color: #fff;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 8px;
  background: var(--aksi);
  color: #fff;
  padding: 8px 14px;
  z-index: 2000;
  border-radius: 6px;
}
.skip-link:focus {
  left: 8px;
  color: #fff;
}

/* ---------- 2. Navbar ---------- */
header.sticky-top {
  background: var(--latar);
  border-bottom: 1px solid var(--garis);
}
.navbar {
  padding: 0.6rem 0;
}
.navbar-brand {
  color: var(--judul);
}
.navbar-brand:hover {
  color: var(--judul);
}
.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}
.brand-name {
  font-family: var(--font-judul);
  font-weight: 700;
  font-size: 1.2rem;
  color: var(--judul);
}
.brand-sub {
  font-size: 0.72rem;
  color: var(--redup);
  font-weight: 500;
}
.navbar .nav-link {
  color: var(--tinta);
  font-weight: 500;
  padding: 0.55rem 0.85rem;
  position: relative;
  transition: color 0.2s;
}
.navbar .nav-link:hover {
  color: var(--judul);
}
.navbar .nav-link.active {
  color: var(--judul);
  font-weight: 600;
}
.navbar .nav-link::after {
  /* garis emas di bawah menu aktif */
  content: "";
  position: absolute;
  left: 0.85rem;
  right: 0.85rem;
  bottom: 2px;
  height: 2px;
  background: var(--emas);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
  transform: scaleX(1);
}
.navbar-toggler {
  border-color: var(--garis);
}
.navbar-toggler:focus {
  box-shadow: 0 0 0 3px rgba(200, 150, 62, 0.45);
}
@media (max-width: 991.98px) {
  .navbar-collapse {
    padding: 0.5rem 0 0.75rem;
    border-top: 1px solid var(--garis);
    margin-top: 0.6rem;
  }
  .navbar .nav-link::after {
    display: none;
  }
  .navbar .nav-link.active {
    background: var(--latar-alt);
    border-radius: 6px;
  }
}

/* ---------- 3. Hero ---------- */
.hero {
  position: relative;
  background: var(--hijau-tua);
}
.hero .carousel-item img {
  height: clamp(460px, 78vh, 700px);
  object-fit: cover;
}
.hero::before {
  /* lapisan gelap agar teks terbaca */
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(14, 38, 28, 0.9) 0%,
    rgba(14, 38, 28, 0.65) 55%,
    rgba(14, 38, 28, 0.25) 100%
  );
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  pointer-events: none;
}
.hero-overlay .container {
  position: relative;
}
.hero-content {
  max-width: 600px;
  color: #fff;
}
.hero-content h1 {
  color: #fff;
  font-size: clamp(2.4rem, 6vw, 4rem);
  line-height: 1.05;
  margin-bottom: 0.4rem;
}
.hero-slogan {
  font-family: var(--font-judul);
  font-size: clamp(1.15rem, 2.6vw, 1.6rem);
  color: var(--emas);
  margin-bottom: 0.9rem;
}
.hero-desc {
  color: #e3ebe6;
  max-width: 480px;
  margin-bottom: 1.6rem;
}
.hero-content .btn {
  pointer-events: auto;
}

.hero .carousel-indicators {
  z-index: 3;
  margin-bottom: 1.2rem;
}
.hero .carousel-control-prev,
.hero .carousel-control-next {
  z-index: 3;
  width: 8%;
}
@media (max-width: 575.98px) {
  .hero::before {
    background: linear-gradient(
      180deg,
      rgba(14, 38, 28, 0.75),
      rgba(14, 38, 28, 0.85)
    );
  }
  .hero .carousel-item img {
    height: 480px;
  }
}

/* Tombol emas */
.btn-gold {
  background: var(--emas);
  border-color: var(--emas);
  color: #1c2420;
  font-weight: 600;
  padding: 0.7rem 1.8rem;
  border-radius: 8px;
  transition:
    background 0.2s,
    transform 0.2s;
}
.btn-gold:hover {
  background: var(--emas-tua);
  border-color: var(--emas-tua);
  color: #1c2420;
  transform: translateY(-2px);
}
.btn-gold:focus-visible {
  outline-color: #fff;
}

/* ---------- 4. Seksi umum ---------- */
.section {
  padding: 5.5rem 0;
}
.section-alt {
  background: var(--latar-alt);
}
@media (max-width: 767.98px) {
  .section {
    padding: 3.5rem 0;
  }
}
.section-title {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 0.5rem;
}
.section-title::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  background: var(--emas);
  margin-top: 0.7rem;
}
.section-intro {
  color: var(--redup);
  max-width: 60ch;
  margin: 1rem 0 2.2rem;
}
.sub-title {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

/* ---------- 5. Profil ---------- */
.profil-foto img {
  border-radius: 10px;
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
}
.lead-text {
  font-size: 1.1rem;
  margin: 1.2rem 0 0.4rem;
  max-width: 62ch;
}
.visi {
  margin: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--emas);
  font-family: var(--font-judul);
  font-size: 1.05rem;
  color: var(--judul);
  line-height: 1.55;
}
.misi-list {
  padding-left: 1.1rem;
  margin: 0;
}
.misi-list li {
  margin-bottom: 0.4rem;
}
.misi-list li::marker {
  color: var(--emas-tua);
}

/* ---------- 6. Kartu akademik ---------- */
.info-card {
  border: 1px solid var(--garis);
  border-top: 4px solid var(--aksi);
  border-radius: 6px;
  background: var(--kartu);
  transition:
    border-top-color 0.2s,
    transform 0.2s;
}
.info-card:hover {
  border-top-color: var(--emas);
  transform: translateY(-3px);
}
.info-card .card-body {
  padding: 1.8rem;
}
.info-icon {
  display: inline-block;
  font-size: 2rem;
  color: var(--judul);
  margin-bottom: 0.8rem;
  line-height: 1;
}
.info-card .card-title {
  font-size: 1.25rem;
}
.info-card .card-text {
  color: var(--redup);
  margin: 0;
}

/* ---------- 7. Berita ---------- */
.berita-card {
  border: 1px solid var(--garis);
  border-radius: 6px;
  overflow: hidden;
  background: var(--kartu);
}
.berita-card .card-img-top {
  aspect-ratio: 16 / 10;
  object-fit: cover;
}
.berita-card .card-body {
  padding: 1.4rem;
}
.berita-tanggal {
  font-size: 0.85rem;
  color: var(--redup);
  margin-bottom: 0.4rem;
}
.berita-card .card-title {
  font-size: 1.15rem;
  line-height: 1.35;
}
.berita-card .card-text {
  color: var(--redup);
  font-size: 0.95rem;
}
.berita-link {
  font-weight: 600;
  text-decoration: none;
  border-bottom: 2px solid var(--emas);
  align-self: flex-start;
  padding-bottom: 1px;
}
.berita-link:hover {
  color: var(--judul);
  border-bottom-color: var(--judul);
}

/* ---------- 8. Galeri ---------- */
.galeri-item {
  margin: 0;
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  background: var(--hijau-tua);
}
.galeri-btn {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
  cursor: zoom-in;
}
.galeri-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  transition:
    transform 0.4s,
    opacity 0.3s;
}
.galeri-item:hover img {
  transform: scale(1.05);
  opacity: 0.85;
}
.galeri-item figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.4rem 0.9rem 0.6rem;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 500;
  background: linear-gradient(0deg, rgba(14, 38, 28, 0.85), transparent);
  pointer-events: none;
}
@media (max-width: 575.98px) {
  .galeri-item figcaption {
    font-size: 0.78rem;
    padding: 1rem 0.6rem 0.45rem;
  }
}
.modal-content {
  border: 0;
  border-radius: 8px;
}

/* ---------- 9. Footer ---------- */
.footer {
  background: var(--hijau-tua);
  color: #cfdcd5;
  padding: 4rem 0 1.5rem;
}
.footer a {
  color: #cfdcd5;
  text-decoration: none;
}
.footer a:hover {
  color: var(--emas);
}
.footer-brand {
  font-family: var(--font-judul);
  font-weight: 700;
  font-size: 1.35rem;
  color: #fff;
}
.footer-desc {
  max-width: 40ch;
}
.footer-title {
  font-family: var(--font-judul);
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 1rem;
}
.footer-list {
  margin: 0;
}
.footer-list p {
  margin-bottom: 0.6rem;
}
.footer-list i {
  color: var(--emas);
  margin-right: 0.5rem;
}
.sosmed a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  font-size: 1.1rem;
  color: #fff;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}
.sosmed a:hover {
  background: var(--emas);
  border-color: var(--emas);
  color: #1c2420;
}
.copyright {
  margin: 3rem 0 0;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 0.88rem;
  color: #aebfb5;
}

/* ---------- 10. Topbar tanggal ---------- */
.topbar {
  background: var(--hijau-tua);
  color: #cfdcd5;
  font-size: 0.82rem;
  padding: 0.4rem 0;
}
.topbar i {
  color: var(--emas);
  margin-right: 0.35rem;
}
@media (max-width: 400px) {
  .topbar {
    font-size: 0.74rem;
  }
}

/* ---------- 11. Tombol mode gelap ---------- */
.btn-tema {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--garis);
  background: transparent;
  color: var(--tinta);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 0.2s,
    border-color 0.2s;
}
.btn-tema:hover {
  background: var(--latar-alt);
  border-color: var(--emas);
}
.ikon-matahari {
  display: none;
  color: var(--emas);
}
[data-bs-theme="dark"] .ikon-bulan {
  display: none;
}
[data-bs-theme="dark"] .ikon-matahari {
  display: inline;
}
[data-bs-theme="dark"] .navbar-brand img,
[data-bs-theme="dark"] .footer img {
  border-radius: 50%;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.2);
}

/* Panah & indikator carousel tetap putih di mode gelap (Bootstrap membaliknya) */
.hero .carousel-control-prev-icon,
.hero .carousel-control-next-icon {
  filter: none !important;
}
.hero .carousel-indicators [data-bs-target] {
  background-color: #fff;
}

/* ---------- 12. Filter galeri ---------- */
.filter-galeri {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.filter-btn {
  border: 1px solid var(--garis);
  background: var(--kartu);
  color: var(--tinta);
  font-weight: 500;
  padding: 0.4rem 1.1rem;
  border-radius: 999px;
  transition:
    background 0.2s,
    color 0.2s,
    border-color 0.2s;
}
.filter-btn:hover {
  border-color: var(--aksi);
}
.filter-btn.active {
  background: var(--aksi);
  border-color: var(--aksi);
  color: #fff;
}

/* ---------- 13. Tombol WhatsApp PPDB ---------- */
.wa-float {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 1030;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--hijau);
  color: #fff;
  text-decoration: none;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  font-weight: 600;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
  border: 2px solid var(--emas);
  transition:
    transform 0.2s,
    background 0.2s;
}
.wa-float i {
  font-size: 1.35rem;
  line-height: 1;
}
.wa-float:hover {
  background: var(--hijau-tua);
  color: #fff;
  transform: translateY(-3px);
}
@media (max-width: 575.98px) {
  .wa-float {
    padding: 0.8rem;
  }
  .wa-label {
    display: none;
  }
}

/* ---------- 14. Halaman detail berita ---------- */
.artikel {
  max-width: 760px;
  margin: 0 auto;
}
.artikel h1 {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  line-height: 1.25;
  margin: 1rem 0 0.4rem;
}
.artikel .kembali {
  text-decoration: none;
  font-weight: 500;
}
.artikel-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 6px;
  margin: 1.2rem 0 1.5rem;
}
.artikel p {
  line-height: 1.85;
  margin-bottom: 1.1rem;
}

/* ---------- 15. Aksesibilitas gerak ---------- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
