/* ==========================================================================
   Sekolah Teramia — Global Stylesheet
   Warna diambil dari logo Teramia. Ubah sekolah cukup dari :root di bawah ini.
   ========================================================================== */
:root {
  --primary-color:   #17357e;   /* biru royal (logo)  */
  --primary-dark:    #0f2456;
  --primary-light:   #2a5bb0;
  --secondary-color: #2f6fb0;   /* biru muda aksen    */
  --accent-color:    #f4b400;   /* kuning emas (logo) */
  --accent-dark:     #d69a00;
  --accent-red:      #d81f26;   /* merah (salib logo) */
  --dark-color:      #0e1a33;
  --light-color:     #f4f7fc;
  --muted-color:     #5b6b82;
  --line-color:      #e5eaf1;
  --white:           #ffffff;

  --ff-base: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(15, 27, 45, .06);
  --shadow-md: 0 12px 30px -14px rgba(15, 27, 45, .22);
  --shadow-lg: 0 26px 60px -24px rgba(15, 27, 45, .35);
  --container-w: 1180px;
  --nav-h: 74px;
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--ff-base);
  color: #26374d;
  background: var(--white);
  line-height: 1.65;
  overflow-x: hidden;
}
h1,h2,h3,h4,h5 { font-weight: 800; color: var(--primary-dark); line-height: 1.18; letter-spacing: -.01em; }
a { text-decoration: none; color: var(--primary-color); }
img { max-width: 100%; height: auto; }
.container { max-width: var(--container-w); }
.text-muted-2 { color: var(--muted-color) !important; }
.bg-light-2 { background: var(--light-color) !important; }
section { scroll-margin-top: 90px; }

/* ---------- buttons ---------- */
.btn { font-weight: 700; border-radius: 999px; padding: .62rem 1.4rem; transition: .18s ease; }
.btn-brand { background: var(--primary-color); color: #fff; }
.btn-brand:hover { background: var(--primary-dark); color: #fff; transform: translateY(-1px); }
.btn-accent { background: var(--accent-color); color: #3a2907; }
.btn-accent:hover { background: var(--accent-dark); color: #3a2907; transform: translateY(-1px); }
.btn-outline-brand { border: 2px solid var(--primary-color); color: var(--primary-color); background: transparent; }
.btn-outline-brand:hover { background: var(--primary-color); color: #fff; }
.btn-light-2 { background: #fff; color: var(--primary-dark); border: 1px solid var(--line-color); }
.btn-light-2:hover { border-color: var(--primary-color); color: var(--primary-color); }

/* ---------- navbar ---------- */
.navbar {
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(1.4) blur(8px);
  min-height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition: box-shadow .25s ease, border-color .25s ease, background .25s ease;
}
.navbar.scrolled { box-shadow: 0 6px 24px -14px rgba(15,27,45,.4); border-bottom-color: var(--line-color); background: rgba(255,255,255,.98); }
.navbar-brand { display: flex; align-items: center; gap: 12px; font-weight: 800; color: var(--primary-dark); flex-shrink: 0; margin-right: 1.2rem; }
.btn-accent, .navbar .btn { white-space: nowrap; }
.navbar-brand img { width: 60px; height: 60px; }
.navbar-brand small { display: block; font-size: .66rem; font-weight: 600; color: var(--secondary-color); letter-spacing: .06em; }
.navbar .nav-link {
  font-weight: 600; color: #33455c; font-size: .99rem; padding: .5rem .62rem !important;
  position: relative; border-radius: 8px; white-space: nowrap;
}
/* Navbar dibuat lebih lebar dari konten halaman: logo lebih ke kiri, menu lebih ke kanan */
.navbar > .container {
  max-width: 1680px;
  padding-left: clamp(1rem, 2.6vw, 3rem);
  padding-right: clamp(1rem, 2.6vw, 3rem);
}
.navbar-brand { margin-right: 2rem; }
@media (min-width: 1200px) and (max-width: 1439.98px) {   /* layar laptop: 9 menu harus tetap muat satu baris */
  .navbar .nav-link { font-size: .92rem; padding: .5rem .42rem !important; }
  .navbar-brand { margin-right: 1rem; }
}
/* collapsed (hamburger) menu — below xl (7 menu item, muat sejajar sejak 1200px) */
@media (max-width: 1199.98px){
  .navbar-collapse { max-height: 80vh; overflow-y: auto; margin-top: .4rem;
    border-top: 1px solid var(--line-color); padding-top: .6rem; }
  .navbar .nav-link { padding: .6rem .4rem !important; }
  .navbar .nav-link.active::after { display: none; }
  .navbar .nav-item .btn-accent { display: inline-block; margin-top: .4rem; }
}
.navbar .nav-link:hover { color: var(--primary-color); }
.navbar .nav-link.active { color: var(--primary-color); }
.navbar .nav-link.active::after {
  content: ""; position: absolute; left: .52rem; right: .52rem; bottom: 2px; height: 3px;
  border-radius: 3px; background: var(--accent-color);
}
.navbar .dropdown-menu {
  border: 1px solid var(--line-color); border-radius: 14px; box-shadow: var(--shadow-md);
  padding: .5rem; margin-top: .4rem;
}
.navbar .dropdown-item { border-radius: 9px; font-weight: 600; font-size: .9rem; padding: .5rem .8rem; }
.navbar .dropdown-item:active, .navbar .dropdown-item.active { background: var(--primary-color); color: #fff; }
.navbar .dropdown-item:hover { background: var(--light-color); color: var(--primary-color); }
.navbar-toggler { border: 0; }
.navbar-toggler:focus { box-shadow: none; }

/* ---------- section heading ---------- */
.section { padding: clamp(52px, 7vw, 88px) 0; }
.kicker {
  display: inline-block; font-weight: 800; font-size: .78rem; letter-spacing: .08em;
  color: var(--secondary-color); background: rgba(47,111,176,.10);
  padding: .3rem .8rem; border-radius: 999px; margin-bottom: .8rem;
}
.section-title { font-size: clamp(1.6rem, 3.4vw, 2.35rem); margin-bottom: .6rem; }
.section-subtitle { color: var(--muted-color); max-width: 620px; }
.section-head-center { text-align: center; }
.section-head-center .section-subtitle { margin-inline: auto; }

/* ---------- home hero ---------- */
.hero {
  position: relative; color: #fff; overflow: hidden;
  padding: clamp(90px, 13vw, 150px) 0 clamp(70px, 10vw, 110px);
  background: var(--primary-dark);
}
.hero::before {                 /* lapisan foto (bergerak parallax) */
  content: ""; position: absolute; left: 0; right: 0; top: -8%; height: 116%;
  background: url("../images/hero.jpg") center/cover no-repeat;
  transform: translateY(var(--par, 0px)); will-change: transform; z-index: 0;
}
.hero::after {                  /* lapisan warna di atas foto */
  content: ""; position: absolute; inset: 0; z-index: 0;
  background: linear-gradient(115deg, rgba(13,40,70,.94) 0%, rgba(18,52,92,.86) 45%, rgba(47,111,176,.72) 100%);
}
.hero > .container { position: relative; z-index: 2; }
/* ---------- marquee (teks berjalan) ---------- */
.marquee {
  overflow: hidden; background: var(--primary-color); color: #fff;
  border-bottom: 3px solid var(--accent-color);
}
.marquee-track { display: inline-flex; white-space: nowrap; will-change: transform;
  animation: marquee 30s linear infinite; }
.marquee-item { display: inline-block; padding: .5rem 0; font-size: .9rem; font-weight: 600; }
.marquee-item i { color: var(--accent-color); margin: 0 .8rem 0 2.5rem; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; white-space: normal; }
  .marquee-item:nth-child(2) { display: none; }
  .marquee-item i { margin-left: .8rem; }
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px; background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.28); color: #fff; font-weight: 700; font-size: .78rem;
  letter-spacing: .05em; padding: .4rem .9rem; border-radius: 999px; margin-bottom: 1.2rem;
}
.hero h1 { color: #fff; font-size: clamp(2.1rem, 5vw, 3.5rem); }
.hero .lead { color: #dbe6f2; font-size: 1.12rem; max-width: 620px; margin: 1.1rem 0 1.8rem; }
.hero .hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- page hero (inner) ---------- */
.page-hero {
  position: relative; color: #fff; padding: clamp(70px, 9vw, 104px) 0 clamp(30px, 5vw, 46px);
  background: linear-gradient(120deg, var(--primary-dark), var(--primary-light));
  overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; right: -6%; top: -40%; width: 420px; height: 420px;
  background: radial-gradient(circle, rgba(244,180,0,.32), transparent 62%); border-radius: 50%;
}
.page-hero h1 { color: #fff; font-size: clamp(1.9rem, 4.4vw, 2.8rem); position: relative; }
.page-hero p { color: #d6e2f0; max-width: 620px; position: relative; margin-bottom: 0; }

/* ---------- breadcrumb ---------- */
.breadcrumb-bar { background: var(--light-color); border-bottom: 1px solid var(--line-color); }
.breadcrumb { margin: 0; padding: .8rem 0; font-size: .87rem; }
.breadcrumb a { color: var(--muted-color); font-weight: 600; }
.breadcrumb a:hover { color: var(--primary-color); }
.breadcrumb .active { color: var(--primary-color); font-weight: 700; }
.breadcrumb-item + .breadcrumb-item::before { content: "›"; color: var(--muted-color); }

/* ---------- stats ---------- */
.stat-strip { background: var(--primary-color); color: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); }
.stat { text-align: center; padding: 26px 10px; }
.stat b { display: block; font-size: clamp(1.8rem, 3.6vw, 2.6rem); font-weight: 800; color: #fff; line-height: 1; }
.stat span { color: #cdddf0; font-size: .9rem; font-weight: 600; }
.stat + .stat { border-left: 1px solid rgba(255,255,255,.16); }
@media (max-width: 767px){ .stat + .stat { border-left: 0; border-top: 1px solid rgba(255,255,255,.16); } }

/* ---------- cards ---------- */
.card-soft {
  background: #fff; border: 1px solid var(--line-color); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); height: 100%; transition: transform .2s ease, box-shadow .2s ease;
}
.card-soft:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card-soft .card-body { padding: 1.4rem; }

.feature-card { padding: 1.6rem; }
.feature-icon {
  width: 54px; height: 54px; border-radius: 14px; display: grid; place-items: center;
  font-size: 1.5rem; color: #fff; background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  margin-bottom: 1rem;
}
.feature-card h3 { font-size: 1.12rem; margin-bottom: .4rem; }
.feature-card p { color: var(--muted-color); font-size: .93rem; margin: 0; }

/* image cards (program / news / facility / gallery / achievement) */
.img-card { overflow: hidden; }
.img-card .img-wrap { position: relative; aspect-ratio: 16/10; overflow: hidden; }
.img-card .img-wrap img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.img-card:hover .img-wrap img { transform: scale(1.06); }
.tag {
  display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .03em;
  padding: .25rem .7rem; border-radius: 999px; background: rgba(47,111,176,.12); color: var(--secondary-color);
}
.tag-accent { background: rgba(232,161,58,.18); color: var(--accent-dark); }
.tag-primary { background: rgba(18,52,92,.10); color: var(--primary-color); }
.meta-line { font-size: .82rem; color: var(--muted-color); font-weight: 600; }
.card-title-link { color: var(--primary-dark); }
.card-title-link:hover { color: var(--primary-color); }

/* teacher card */
.teacher-card { text-align: center; overflow: hidden; }
.teacher-card .ph { aspect-ratio: 4/5; overflow: hidden; }
.teacher-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.teacher-card .card-body { padding: 1rem; }
.teacher-card h3 { font-size: 1rem; margin-bottom: 2px; }
.teacher-card .role { color: var(--accent-dark); font-weight: 700; font-size: .82rem; }
.teacher-card .subj { color: var(--muted-color); font-size: .84rem; }

/* list group / info rows */
.info-row { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line-color); }
.info-row:last-child { border-bottom: 0; }
.info-ic { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: rgba(18,52,92,.08); color: var(--primary-color); font-size: 1.15rem; }

/* timeline */
.timeline { position: relative; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--line-color); }
.timeline-item { position: relative; padding-bottom: 1.4rem; }
.timeline-item::before {
  content: ""; position: absolute; left: -28px; top: 4px; width: 16px; height: 16px; border-radius: 50%;
  background: var(--accent-color); box-shadow: 0 0 0 4px rgba(232,161,58,.2);
}
.timeline-item h4 { font-size: 1.02rem; margin-bottom: 2px; }
.timeline-item p { color: var(--muted-color); margin: 0; font-size: .92rem; }

/* agenda / date box */
.datebox { flex: 0 0 auto; width: 62px; text-align: center; background: var(--primary-color); color: #fff; border-radius: 12px; padding: 8px 0; }
.datebox b { display: block; font-size: 1.4rem; line-height: 1; }
.datebox span { font-size: .7rem; letter-spacing: .04em; color: #cdddf0; }

/* badges for pengumuman */
.badge-new { background: var(--secondary-color); }
.badge-important { background: #d9534f; }
.badge-general { background: var(--muted-color); }

/* gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
@media (max-width: 767px){ .gallery-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 460px){ .gallery-grid { grid-template-columns: 1fr; } }
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; cursor: pointer; aspect-ratio: 1/1; box-shadow: var(--shadow-sm); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.gallery-item:hover img { transform: scale(1.08); }
.gallery-item .cap {
  position: absolute; inset: auto 0 0 0; padding: 26px 14px 12px; color: #fff; font-weight: 700; font-size: .9rem;
  background: linear-gradient(transparent, rgba(13,27,45,.82));
  opacity: 0; transition: opacity .25s ease;
}
.gallery-item:hover .cap { opacity: 1; }

/* filter chips */
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line-color); background: #fff; color: #33455c; font-weight: 600; font-size: .86rem;
  padding: .42rem 1rem; border-radius: 999px; cursor: pointer; transition: .16s ease;
}
.chip:hover { border-color: var(--primary-color); color: var(--primary-color); }
.chip.active { background: var(--primary-color); color: #fff; border-color: var(--primary-color); }

/* forms */
.form-control, .form-select { border-radius: 11px; border: 1.5px solid var(--line-color); padding: .68rem .85rem; font-size: .95rem; }
.form-control:focus, .form-select:focus { border-color: var(--primary-color); box-shadow: 0 0 0 3px rgba(18,52,92,.12); }
.form-label { font-weight: 600; font-size: .88rem; color: #33455c; }
.form-panel { background: #eeeded; border: 1px solid var(--line-color); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); padding: 1.8rem; }

/* accordion (FAQ) */
.accordion-item { border: 1px solid var(--line-color); border-radius: var(--radius) !important; margin-bottom: 12px; overflow: hidden; }
.accordion-button { font-weight: 700; color: var(--primary-dark); }
.accordion-button:not(.collapsed) { background: var(--light-color); color: var(--primary-color); box-shadow: none; }
.accordion-button:focus { box-shadow: none; border: 0; }

/* map placeholder */
.map-embed { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line-color); aspect-ratio: 16/9;
  background:
    linear-gradient(0deg, transparent 49.4%, var(--line-color) 49.4%, var(--line-color) 50.6%, transparent 50.6%),
    linear-gradient(90deg, transparent 49.4%, var(--line-color) 49.4%, var(--line-color) 50.6%, transparent 50.6%),
    var(--light-color);
  background-size: 42px 42px, 42px 42px, auto; position: relative; display: grid; place-items: center; }
.map-embed .pin { color: #d9534f; font-size: 2.2rem; }

/* cta band */
.cta-band { background: linear-gradient(120deg, var(--primary-dark), var(--secondary-color)); color: #fff; border-radius: var(--radius-lg); padding: clamp(28px, 5vw, 48px); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #d6e2f0; }

/* ---------- footer ---------- */
.footer { background: var(--dark-color); color: #b9c6d6; padding: 56px 0 26px; }
.footer h5 { color: #fff; font-size: .98rem; margin-bottom: 1rem; }
.footer a { color: #b9c6d6; display: block; padding: 4px 0; font-size: .9rem; }
.footer a:hover { color: var(--accent-color); }
.footer .brand-row { display: flex; align-items: center; gap: 12px; margin-bottom: 1rem; }
.footer .brand-row img { width: 50px; }
.footer .brand-row b { color: #fff; font-size: 1.05rem; }
.footer .social { display: flex; gap: 10px; margin-top: 1rem; }
.footer .social a { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(255,255,255,.08); color: #fff; padding: 0; font-size: 1.05rem; }
.footer .social a:hover { background: var(--accent-color); color: #3a2907; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.12); margin-top: 34px; padding-top: 18px; font-size: .84rem; color: #8496ab; }

/* ---------- back to top ---------- */
.back-to-top {
  position: fixed; right: 20px; bottom: 20px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--primary-color); color: #fff; border: 0; display: grid; place-items: center;
  box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: .25s ease; z-index: 60; font-size: 1.1rem;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--primary-dark); }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* utilities */
.divider-dot { color: var(--line-color); }
.list-check { list-style: none; padding: 0; margin: 0; }
.list-check li { position: relative; padding: 6px 0 6px 30px; color: #40536e; }
.list-check li::before { content: "\F26E"; font-family: "bootstrap-icons"; position: absolute; left: 0; top: 6px; color: var(--secondary-color); font-weight: 700; }
.empty-state { text-align: center; padding: 40px 10px; color: var(--muted-color); }

/* ---------- kartu jenjang (beranda) ---------- */
.jenjang-card {
  position: relative; display: block; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--line-color); background: #fff; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease; height: 100%;
}
.jenjang-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.jenjang-card .jc-img { aspect-ratio: 16/10; overflow: hidden; }
.jenjang-card .jc-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.jenjang-card:hover .jc-img img { transform: scale(1.06); }
.jenjang-card .jc-body { padding: 1.3rem 1.4rem 1.5rem; }
.jenjang-card .jc-badge {
  display: inline-block; font-weight: 800; font-size: .78rem; letter-spacing: .06em;
  color: #fff; background: var(--primary-color); padding: .28rem .8rem; border-radius: 999px; margin-bottom: .7rem;
}
.jenjang-card h3 { font-size: 1.15rem; margin-bottom: .35rem; }
.jenjang-card p { color: var(--muted-color); font-size: .92rem; margin: 0 0 .9rem; }
.jenjang-card .jc-link { font-weight: 700; color: var(--primary-color); font-size: .9rem; }
.jenjang-card .jc-link i { transition: transform .2s ease; }
.jenjang-card:hover .jc-link i { transform: translateX(4px); }

/* strip identitas jenjang di halaman profil jenjang */
.jenjang-meta { display: grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 14px; }
.jenjang-meta .jm { background: var(--light-color); border: 1px solid var(--line-color); border-radius: 12px; padding: 14px 16px; }
.jenjang-meta .jm b { display: block; color: var(--primary-color); font-size: .78rem; letter-spacing: .02em; }
.jenjang-meta .jm span { font-weight: 600; }

/* accent merah kecil (khas logo Teramia) */
.text-accent-red { color: var(--accent-red) !important; }
.badge-red { background: var(--accent-red); }

/* ---------- paragraf rata kanan-kiri (tablet & desktop) ---------- */
@media (min-width: 768px) {
  .section p,
  .card-soft p,
  .accordion-body,
  .list-check li {
    text-align: justify;
    text-justify: inter-word;
    hyphens: auto;
  }

  /* kecuali bagian yang memang di tengah atau berupa judul */
  .text-center p,
  .section-head-center p,
  .page-hero p,
  .hero p,
  .cta-band p,
  .footer p {
    text-align: inherit;
    hyphens: manual;
  }
}

/* ---------- paragraf isi berita lebih lega & mudah dibaca ---------- */
.section .col-lg-8 p,
.section article p {
  line-height: 1.85;
  margin-bottom: 1.25rem;
}

/* ---------- foto banyak: lencana & tombol panah ---------- */
[data-imgs] { cursor: pointer; }
.more-badge { position: absolute; right: .6rem; top: .6rem; z-index: 2; background: rgba(0,0,0,.62); color: #fff; font-size: .75rem; font-weight: 700; padding: .2rem .6rem; border-radius: 999px; }
.lb-stage { position: relative; text-align: center; }
.lb-img { max-width: 100%; max-height: 80vh; border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; font-size: 1.3rem; display: flex; align-items: center; justify-content: center; }
.lb-nav:hover { background: rgba(0,0,0,.85); }
.lb-prev { left: 8px; } .lb-next { right: 8px; }