/* =========================================================
   SMA Caturpola – gaya situs (santai, lembut, responsif)
   Warna utama dan ukuran bisa diubah di bagian :root
   ========================================================= */

:root {
  --teal-900: #12363c;
  --teal-700: #1f5f66;
  --teal-600: #2a747c;
  --teal-100: #dcecec;
  --teal-50:  #eef6f5;
  --peach:    #f2a977;
  --peach-100:#fde9db;
  --ink:      #1f2c33;
  --muted:    #5f7078;
  --bg:       #f4f7f6;
  --line:     #e1e9e8;
  --radius:   1.25rem;
  --shadow-sm: 0 1px 2px rgba(18, 54, 60, .06), 0 4px 14px rgba(18, 54, 60, .06);
  --shadow-md: 0 2px 4px rgba(18, 54, 60, .06), 0 12px 28px rgba(18, 54, 60, .10);

  /* Selaraskan warna bawaan Bootstrap */
  --bs-primary: #1f5f66;
  --bs-primary-rgb: 31, 95, 102;
  --bs-link-color: #1f5f66;
  --bs-link-hover-color: #12363c;
  --bs-body-color: #1f2c33;
  --bs-body-bg: #f4f7f6;
  --bs-body-font-family: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

body {
  font-family: var(--bs-body-font-family);
  font-size: 1.0625rem;
  line-height: 1.7;
  background: var(--bg);
  color: var(--ink);
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--teal-900);
}

img { max-width: 100%; }

:focus-visible {
  outline: 3px solid var(--peach);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: .75rem;
  top: -4rem;
  z-index: 2000;
  background: var(--teal-900);
  color: #fff;
  padding: .6rem 1rem;
  border-radius: .75rem;
}
.skip-link:focus { top: .75rem; color: #fff; }

/* ---------- Tombol ---------- */
.btn {
  border-radius: 999px;
  font-weight: 700;
  padding: .55rem 1.35rem;
}
.btn-sm { padding: .4rem 1rem; }

.btn-primary {
  --bs-btn-bg: var(--teal-700);
  --bs-btn-border-color: var(--teal-700);
  --bs-btn-hover-bg: var(--teal-900);
  --bs-btn-hover-border-color: var(--teal-900);
  --bs-btn-active-bg: var(--teal-900);
  --bs-btn-active-border-color: var(--teal-900);
  --bs-btn-focus-shadow-rgb: 242, 169, 119;
}
.btn-outline-primary {
  --bs-btn-color: var(--teal-700);
  --bs-btn-border-color: var(--teal-700);
  --bs-btn-hover-bg: var(--teal-700);
  --bs-btn-hover-border-color: var(--teal-700);
  --bs-btn-active-bg: var(--teal-900);
  --bs-btn-active-border-color: var(--teal-900);
  --bs-btn-focus-shadow-rgb: 242, 169, 119;
}

/* ---------- Navigasi ---------- */
.site-nav {
  /* Jangan pakai backdrop-filter/transform di sini: itu membuat panel menu (offcanvas)
     terkurung di dalam navbar sehingga terlihat terpotong di HP. */
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: .55rem 0;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-weight: 800;
  color: var(--teal-900);
  margin-right: 1rem;
}
.navbar-brand:hover { color: var(--teal-900); }
.brand-logo {
  position: relative;
  width: 2.4rem;
  height: 2.4rem;
  flex: none;
  border-radius: .8rem;
  background: var(--teal-700);
  color: #fff;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.brand-logo svg { width: 1.45rem; height: 1.45rem; }
.brand-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #fff;
}
.navbar-toggler { border: 0; padding: .4rem .6rem; border-radius: .75rem; }
.navbar-toggler:focus { box-shadow: 0 0 0 .2rem rgba(242, 169, 119, .5); }

.site-nav .nav-link {
  font-weight: 700;
  color: var(--ink);
  border-radius: 999px;
  padding: .45rem 1rem;
}
.site-nav .nav-link:hover { background: var(--teal-50); color: var(--teal-900); }
.site-nav .nav-link.active { background: var(--teal-100); color: var(--teal-900); }

.search-form .form-control {
  border: 1px solid transparent;
  background: var(--teal-50);
  border-radius: 999px;
  padding-left: 1.1rem;
}
.search-form .form-control:focus {
  background: #fff;
  border-color: var(--teal-600);
  box-shadow: 0 0 0 .2rem rgba(242, 169, 119, .4);
}


/* ---------- Kepala halaman ---------- */
.page-head {
  position: relative;
  overflow: hidden;
  background: var(--teal-100);
  padding: 2.75rem 0 2.5rem;
}
.page-head::after {
  content: "";
  position: absolute;
  right: -4rem;
  top: -5rem;
  width: 18rem;
  height: 18rem;
  border-radius: 50%;
  background: var(--peach-100);
  opacity: .8;
  pointer-events: none;
}
.page-head .container { position: relative; z-index: 1; }
.page-head h1 { font-size: clamp(1.8rem, 4.5vw, 2.6rem); margin-bottom: .4rem; }
.page-head p { max-width: 58ch; color: var(--muted); margin: 0; }

.section { padding: 2.25rem 0; }
.section-title { font-size: clamp(1.35rem, 3vw, 1.75rem); margin-bottom: 1.25rem; }

/* ---------- Kartu ---------- */
.kartu {
  height: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s ease;
}
.kartu:hover { box-shadow: var(--shadow-md); }
.kartu .card-img-top {
  aspect-ratio: 4 / 3;
  height: auto;
  object-fit: cover;
  background: var(--teal-100);
}
.kartu .card-body { padding: 1.25rem 1.35rem 1.4rem; }
.kartu .card-title { font-size: 1.15rem; margin-bottom: .4rem; }
.kartu .card-text { color: var(--muted); }
.kartu .bi-trophy-fill { color: var(--peach); margin-right: .35rem; }

.badge-soft {
  background: var(--teal-100);
  color: var(--teal-900);
  font-weight: 700;
}

/* ---------- Home ---------- */
.hero-carousel {
  margin-top: 1.25rem;
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--teal-100);
}
.hero-carousel img {
  width: 100%;
  height: clamp(220px, 44vw, 460px);
  object-fit: cover;
}

.welcome-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--teal-100);
}

.tile {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  height: 100%;
  padding: 1.25rem;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  transition: border-color .2s ease, box-shadow .2s ease;
}
.tile:hover { border-color: var(--teal-600); box-shadow: var(--shadow-md); color: var(--muted); }
.tile .ikon {
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background: var(--teal-50);
  color: var(--teal-700);
  font-size: 1.4rem;
  margin-bottom: .35rem;
}
.tile strong { color: var(--teal-900); font-size: 1.1rem; }
.tile span { font-size: .95rem; line-height: 1.5; }

.quote-card {
  background: var(--peach-100);
  border-radius: var(--radius);
  padding: 1.75rem 1.5rem;
  border-left: .4rem solid var(--peach);
}
.quote-card blockquote { font-size: clamp(1.2rem, 3vw, 1.6rem); font-weight: 700; color: var(--teal-900); margin-bottom: .5rem; }
.quote-card figcaption { color: var(--muted); margin: 0; }

/* ---------- Profil (akordeon) ---------- */
.accordion {
  --bs-accordion-border-width: 0;
  --bs-accordion-active-bg: var(--teal-50);
  --bs-accordion-active-color: var(--teal-900);
  --bs-accordion-btn-focus-box-shadow: 0 0 0 .2rem rgba(242, 169, 119, .5);
}
.accordion-item {
  border: 1px solid var(--line);
  border-radius: 1rem !important;
  overflow: hidden;
  margin-bottom: .85rem;
  box-shadow: var(--shadow-sm);
}
.accordion-button { font-weight: 800; font-size: 1.1rem; padding: 1.1rem 1.35rem; color: var(--teal-900); }
.accordion-body { padding: 1.1rem 1.35rem 1.4rem; }
.accordion-body li { margin-bottom: .5rem; }

/* ---------- Galeri ---------- */
.galeri-item {
  position: relative;
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: var(--teal-100);
  overflow: hidden;
  border-radius: var(--radius);
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
}
.galeri-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s ease;
}
.galeri-item:hover img,
.galeri-item:focus-visible img { transform: scale(1.05); }

.viewer .modal-content { border: 0; border-radius: var(--radius); overflow: hidden; }
.viewer-img {
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: var(--teal-900);
  border-radius: .75rem;
}
.viewer-nav { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: .85rem; }

/* ---------- Guru & staf ---------- */
.toolbar {
  margin-top: -1.75rem;
  position: relative;
  z-index: 2;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-md);
}
.btn-filter {
  border: 1px solid var(--teal-700);
  color: var(--teal-700);
  font-weight: 700;
}
.btn-check:checked + .btn-filter,
.btn-filter:hover { background: var(--teal-700); color: #fff; }
.btn-check:focus-visible + .btn { outline: 3px solid var(--peach); outline-offset: 2px; }

.orang { text-align: center; }
.orang .pita { height: .4rem; }
.pita-guru { background: var(--teal-700); }
.pita-staff { background: var(--peach); }
.orang .card-body { display: flex; flex-direction: column; padding: 1.6rem 1.25rem 1.4rem; }
.avatar {
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 1.8rem;
  font-weight: 800;
  color: #fff;
  margin: 0 auto 1rem;
  object-fit: cover;
}
.orang .nama { font-size: 1.05rem; margin-bottom: .15rem; }
.orang .jabatan { color: var(--muted); font-size: .95rem; margin-bottom: .6rem; }
.badge-guru  { background: var(--teal-100); color: var(--teal-900); }
.badge-staff { background: var(--peach-100); color: #8a4a1c; }
.kontak-orang { margin-top: auto; padding-top: .9rem; }
.kontak-orang a {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--teal-50);
  color: var(--teal-700);
  margin: 0 .25rem;
  font-size: 1.1rem;
  text-decoration: none;
}
.kontak-orang a:hover { background: var(--teal-700); color: #fff; }

/* ---------- Kontak ---------- */
.info-item { display: flex; gap: 1rem; align-items: flex-start; padding: .9rem 0; }
.info-item + .info-item { border-top: 1px solid var(--line); }
.info-item .ikon {
  flex: none;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: .9rem;
  display: grid;
  place-items: center;
  background: var(--teal-50);
  color: var(--teal-700);
  font-size: 1.15rem;
}
.info-item h3 { font-size: 1rem; margin: 0 0 .1rem; }
.info-item p { margin: 0; color: var(--muted); }

.form-control, .form-select {
  border-radius: .9rem;
  border-color: #cfdcdb;
  padding: .7rem 1rem;
  font-size: 1rem;
}
.form-control:focus, .form-select:focus {
  border-color: var(--teal-600);
  box-shadow: 0 0 0 .2rem rgba(242, 169, 119, .4);
}
.form-label { font-weight: 700; }

/* ---------- Hasil pencarian ---------- */
.hasil-cari .list-group-item {
  border-radius: .9rem !important;
  border: 1px solid var(--line);
  margin-bottom: .5rem;
  padding: .85rem 1rem;
}
.hasil-cari .list-group-item:hover { background: var(--teal-50); }
.hasil-cari strong { color: var(--teal-900); }
.hasil-cari small { color: var(--muted); }
.modal-content { border-radius: var(--radius); border: 0; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--teal-900);
  color: #cfe0e0;
  padding: 3rem 0 1.25rem;
  margin-top: 3rem;
  min-height: 12rem;
}
.site-footer h2 { color: #fff; font-size: 1.1rem; }
.site-footer a { color: #cfe0e0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer address p { margin-bottom: .6rem; }
.site-footer .bi { color: var(--peach); margin-right: .5rem; }
.footer-menu { list-style: none; padding: 0; margin: 0; }
.footer-menu li { margin-bottom: .35rem; }
.footer-sosmed { display: flex; gap: .6rem; flex-wrap: wrap; }
.footer-sosmed a {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  font-size: 1.15rem;
}
.footer-sosmed a:hover { background: var(--peach); color: var(--teal-900); text-decoration: none; }
.footer-sosmed .bi { color: inherit; margin: 0; }
.site-footer hr { border-color: rgba(255, 255, 255, .18); margin: 1.75rem 0 1rem; }

#site-header { min-height: 3.75rem; }

/* ---------- Layar kecil ---------- */
@media (max-width: 575.98px) {
  body { font-size: 1rem; }
  .page-head { padding: 2rem 0 2rem; }
  .section { padding: 1.5rem 0; }
  .tile { padding: 1rem; }
  .tile span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}


/* ---------- Menu HP (Bootstrap offcanvas) ---------- */
.offcanvas.menu-hp {
  width: 86%;
  max-width: 20rem;
  background-color: #fff;
}
.menu-hp .list-group-item {
  border: 0;
  border-radius: 999px;
  font-weight: 700;
  color: var(--ink);
  padding: .8rem 1rem;
  margin-bottom: .2rem;
  background: transparent;
}
.menu-hp .list-group-item:hover { background: var(--teal-50); color: var(--teal-900); }
.menu-hp .list-group-item.active { background: var(--teal-100); color: var(--teal-900); }

@media (min-width: 992px) {
  .menu-hp { display: none; }
}

/* ---------- Menyesuaikan layar pengguna ---------- */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overflow-x: clip; min-width: 320px; overflow-wrap: break-word; }
img, svg, video, iframe { max-width: 100%; }
.container {
  padding-left: max(calc(var(--bs-gutter-x) * .5), env(safe-area-inset-left));
  padding-right: max(calc(var(--bs-gutter-x) * .5), env(safe-area-inset-right));
}
.viewer-img { max-height: 72vh; max-height: 72dvh; }
.modal-dialog { max-width: calc(100vw - 1rem); }
@media (min-width: 576px) { .modal-dialog { max-width: var(--bs-modal-width); } }
.site-footer address, .info-item p { word-break: break-word; }
@media (max-width: 575.98px) {
  .toolbar { margin-top: -1.25rem; padding: .85rem; }
  .btn-group .btn { padding-left: .6rem; padding-right: .6rem; }
  .viewer-nav .btn { padding-left: .75rem; padding-right: .75rem; }
}