/* =====================================================================
   THEME 6  —  "Kehangatan Fransiskan"
   Tema website SMAS YPPK Teruna Bakti (CMS Sekolahku v2.5.4)
   Identitas: Biru Maria (lembut) · Emas liturgi · Siena Fransiskan · Gading
   Catatan: hanya tampilan yang diubah; seluruh logika PHP CMS dipertahankan.
   ===================================================================== */

:root {
   /* — Palet inti — */
   --ivory:        #f6f1e9;   /* latar parkemen hangat            */
   --ivory-2:      #fbf8f2;   /* panel hangat                     */
   --surface:      #ffffff;   /* kartu                            */
   --marian:       #355069;   /* Biru Maria — warna utama         */
   --marian-d:     #233b4e;   /* biru pekat (footer / hover)      */
   --marian-l:     #eaf0f4;   /* basuhan biru muda                */
   --gold:         #bd9540;   /* emas liturgi — aksen sakral      */
   --gold-d:       #a07d31;   /* emas pekat                       */
   --gold-l:       #f5edda;   /* basuhan emas muda                */
   --sienna:       #8c5a3c;   /* cokelat jubah Fransiskan         */
   --sienna-l:     #f1e7df;   /* basuhan siena muda               */
   --ink:          #2c2722;   /* teks hampir-hitam yang hangat    */
   --muted:        #786d5f;   /* teks redup hangat                */
   --line:         #e7ddcd;   /* garis rambut hangat              */
   --line-soft:    #efe7d8;

   /* — Bentuk & bayangan — */
   --radius:       12px;
   --radius-lg:    16px;
   --radius-sm:    9px;
   --shadow-sm:    0 1px 2px rgba(53,38,20,.05), 0 1px 3px rgba(53,38,20,.06);
   --shadow:       0 8px 24px rgba(53,38,20,.08);
   --shadow-lg:    0 18px 48px rgba(53,38,20,.13);

   /* — Tipografi — */
   --serif: "Lora", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
   --sans:  "Nunito Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ====================== DASAR ====================== */
html { scroll-behavior: smooth; }
body {
   font-family: var(--sans);
   color: var(--ink);
   background-color: var(--ivory);
   font-size: 15.5px;
   line-height: 1.7;
   -webkit-font-smoothing: antialiased;
   text-rendering: optimizeLegibility;
}
body a { color: var(--marian); transition: color .18s ease; }
body a:hover { color: var(--gold-d); text-decoration: none; }

h1, h2, h3, h4, h5, h6 { font-family: var(--serif); color: var(--ink); letter-spacing: .1px; }

::selection { background: var(--gold-l); color: var(--ink); }

/* fokus keyboard yang terlihat (aksesibilitas) */
a:focus-visible, button:focus-visible,
.btn:focus-visible, input:focus-visible,
textarea:focus-visible, .form-control:focus-visible {
   outline: 3px solid rgba(189,149,64,.55);
   outline-offset: 2px;
}

/* ====================== TOP BAR / KOP ====================== */
.top-bar {
   background: var(--surface);
   color: var(--ink);
   font-size: 13.5px;
   padding: 14px 0 12px;
   border-bottom: 1px solid var(--line-soft);
}
.top-bar a { color: var(--marian); }
.top-bar a:hover { color: var(--gold-d); }
.top-bar i { margin-right: 5px; color: var(--gold-d); }
.top-header { display: flex; align-items: center; }
.top-header img {
   border-radius: 50%;
   background: var(--surface);
   padding: 3px;
   box-shadow: var(--shadow-sm);
   border: 1px solid var(--line);
}
.brand {
   font-family: var(--serif) !important;
   font-weight: 700;
   letter-spacing: .2px;
   color: var(--marian) !important;
   text-transform: none !important;
   line-height: 1.2;
}
.top-header small { color: var(--muted); font-style: italic; }
.top-right li { color: var(--muted); }

/* ====================== MENU / NAVIGASI ====================== */
.menu-bar {
   background: var(--marian);
   border-bottom: 3px solid var(--gold);
   text-transform: none;
   box-shadow: var(--shadow-sm);
}
.sticky.is-sticky {
   position: fixed; left: 0; right: 0; top: 0;
   z-index: 1000; width: 100%;
   box-shadow: var(--shadow);
}
.sm-clean { background: transparent; }
.sm-clean a,
.sm-clean a:hover,
.sm-clean a:focus,
.sm-clean a:active {
   font-family: var(--sans);
   font-weight: 700;
   font-size: 14px;
   letter-spacing: .3px;
   color: #f3ede1;
   padding: 15px 16px;
   border-radius: 0;
}
.sm-clean a .sub-arrow { color: #f3ede1; }
/* item aktif / hover di menu utama — garis emas */
.sm-clean > li > a { position: relative; }
.sm-clean > li > a:hover,
.sm-clean > li > a:focus,
.sm-clean > li > a.highlighted {
   background: var(--marian-d);
   color: #fff;
}
.sm-clean > li > a::after {
   content: ""; position: absolute; left: 16px; right: 16px; bottom: 8px;
   height: 2px; background: var(--gold); border-radius: 2px;
   transform: scaleX(0); transform-origin: left; transition: transform .22s ease;
}
.sm-clean > li > a:hover::after,
.sm-clean > li > a.highlighted::after { transform: scaleX(1); }
/* submenu */
.sm-clean ul {
   background: var(--surface);
   border: 1px solid var(--line);
   border-radius: var(--radius-sm);
   box-shadow: var(--shadow);
   overflow: hidden;
   padding: 6px;
}
.sm-clean ul a,
.sm-clean ul a:hover,
.sm-clean ul a:focus,
.sm-clean ul a:active,
.sm-clean ul a.highlighted {
   color: var(--ink);
   font-weight: 600;
   border-radius: var(--radius-sm);
   padding: 10px 14px;
}
.sm-clean ul a:hover,
.sm-clean ul a:focus,
.sm-clean ul a.highlighted {
   background: var(--gold-l);
   color: var(--sienna);
}
.navbar-toggler { border: 1px solid rgba(255,255,255,.4); border-radius: var(--radius-sm); }

/* ====================== CAROUSEL ====================== */
.carousel { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.carousel-inner { border-radius: var(--radius-lg); }
.carousel-caption {
   border-top: none;
   color: #fff;
   background: linear-gradient(to top, rgba(35,59,78,.92) 0%, rgba(35,59,78,.55) 55%, rgba(35,59,78,0) 100%);
   opacity: 1;
   left: 0; right: 0; bottom: 0;
   text-align: center;
   padding: 48px 30px 26px;
}
.carousel-caption p, .carousel-caption h2 { color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.35); }
.carousel-indicators li { background-color: rgba(255,255,255,.55); border-radius: 50%; width: 9px; height: 9px; }
.carousel-indicators .active { background-color: var(--gold); }

/* ====================== KUTIPAN (ticker) ====================== */
.quote {
   overflow: hidden;
   background: var(--surface);
   border: 1px solid var(--line);
   border-radius: var(--radius);
   box-shadow: var(--shadow-sm);
}
.quote-title {
   font-family: var(--sans);
   font-size: 13px; font-weight: 800; letter-spacing: .5px;
   text-transform: uppercase;
   display: inline-block;
   padding: 16px 18px;
   color: #fff;
   float: left;
   background: var(--gold);
   height: 52px;
}
ul.quote {
   display: block; padding: 0; margin: 0; list-style: none;
   line-height: 1; position: relative; overflow: hidden; height: 52px;
   background: transparent; border: none; box-shadow: none; border-radius: 0;
}
ul.quote li {
   color: var(--ink);
   position: absolute; top: -950em; left: 0; display: block; white-space: nowrap;
   font: 600 14.5px var(--sans);
   padding: 18px 16px;
}
ul.quote li span { color: var(--gold-d); font-weight: 800; }

/* ====================== JUDUL SEKSI (signature) ====================== */
/* Tanda liturgi: aturan emas pendek + belah-ketupat kecil di bawah judul */
.page-title {
   font-family: var(--serif);
   font-weight: 700;
   font-size: 1.45rem;
   color: var(--ink);
   border-bottom: none;
   margin: 0 0 18px;
   padding: 0 0 12px;
   position: relative;
}
.page-title::before {
   content: "";
   position: absolute; left: 0; bottom: 0;
   width: 46px; height: 3px;
   background: var(--gold); border-radius: 3px;
}
.page-title::after {
   content: "";
   position: absolute; left: 54px; bottom: -1px;
   width: 6px; height: 6px;
   background: var(--gold);
   transform: rotate(45deg);
}
footer .page-title { color: #fff; font-size: 1.05rem; }
footer .page-title::before { background: var(--gold); }
footer .page-title::after { background: var(--gold); }

/* ====================== KARTU ====================== */
/* Override sudut-siku & garis abu bawaan agar seragam & lembut */
.content .card,
.sidebar .card,
.card.rounded-0 {
   background: var(--surface);
   border: 1px solid var(--line) !important;
   border-radius: var(--radius-lg) !important;
   box-shadow: var(--shadow-sm);
   overflow: hidden;
   transition: transform .2s ease, box-shadow .2s ease;
}
.content .card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card .card-img, .card .card-img-top, .card .card-img-bottom { border-radius: 0 !important; }
.card-body { padding: 18px 20px; }
h5.card-title, .card-title {
   font-family: var(--serif);
   font-size: 1.12rem;
   font-weight: 700;
   line-height: 1.35;
   margin-bottom: 8px;
}
.card-title a { color: var(--ink); }
.card-title a:hover { color: var(--marian); }
.card-text { color: #4a443c; }
.card-footer {
   background: var(--ivory-2);
   border-top: 1px solid var(--line-soft);
   padding: 12px 20px;
}
.text-muted { color: var(--muted) !important; }
small.text-muted { font-size: 12.5px; }

/* ====================== TOMBOL ====================== */
.btn { font-family: var(--sans); font-weight: 700; border-radius: var(--radius-sm); letter-spacing: .2px; }
/* .btn-success dipakai CMS sebagai aksi utama (cari/submit) -> Biru Maria */
.btn-success {
   background: var(--marian) !important;
   border-color: var(--marian) !important;
   color: #fff;
}
.btn-success:hover, .btn-success:focus {
   background: var(--marian-d) !important;
   border-color: var(--marian-d) !important;
   box-shadow: 0 6px 16px rgba(35,59,78,.28);
}
/* .btn-warning dipakai sebagai CTA PPDB -> Emas */
.btn-warning {
   background: var(--gold) !important;
   border-color: var(--gold) !important;
   color: #fff !important;
   text-transform: none;
}
.btn-warning:hover, .btn-warning:focus {
   background: var(--gold-d) !important;
   border-color: var(--gold-d) !important;
   color: #fff !important;
   box-shadow: 0 6px 16px rgba(189,149,64,.32);
}
.btn-outline-dark {
   color: var(--marian); border-color: var(--marian);
}
.btn-outline-dark:hover { background: var(--marian); border-color: var(--marian); color: #fff; }
.btn-outline-light:hover { color: var(--marian); }
.btn-block { display: block; width: 100%; }

/* ====================== LIST GROUP (tautan, arsip, dll.) ====================== */
.sidebar .list-group-item,
.list-group-item {
   border: 1px solid var(--line) !important;
   border-radius: var(--radius-sm) !important;
   margin-bottom: 7px;
   background: var(--surface);
   transition: background .15s ease, transform .15s ease, border-color .15s ease;
   font-weight: 600;
   color: var(--ink);
}
.list-group-item-action:hover {
   background: var(--gold-l);
   border-color: var(--gold) !important;
   transform: translateX(3px);
   color: var(--sienna);
}
.list-group-item small.border {
   border: 1px solid var(--line) !important;
   border-radius: 999px !important;
   background: var(--marian-l);
   color: var(--marian);
   font-weight: 700;
}

/* ====================== FORM ====================== */
.form-control, .form-control-sm {
   border: 1px solid var(--line) !important;
   border-radius: var(--radius-sm) !important;
   background: var(--ivory-2);
   color: var(--ink);
   transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.form-control:focus {
   border-color: var(--gold) !important;
   background: #fff;
   box-shadow: 0 0 0 3px rgba(189,149,64,.18);
}
.control-label, label { font-weight: 700; color: var(--ink); }
.form-group:hover { background: transparent; }
.input-group .btn { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.input-group .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important; }

/* ====================== FOOTER ====================== */
footer { color: #e9e2d4; font-size: 14px; }
footer .widget-box { background: var(--marian-d); padding: 0; }
/* tiga panel atas — dibuat selaras, bukan warna-warni mencolok */
footer .widget-box .col { border-radius: 0; }
footer .widget-box-1, footer .widget-box-2,
footer .widget-box-3, footer .widget-box-4 {
   background: transparent;
   border-right: 1px solid rgba(255,255,255,.08);
}
footer .widget-box [class*="widget-box-"]:last-child { border-right: none; }
footer .widget-box .fa-4x { color: var(--gold); opacity: .95; }
footer .widget-box h4 { font-family: var(--serif); color: #fff; font-size: 1.15rem; }
footer .primary-footer { background: var(--marian-d); padding: 34px 0 26px; }
footer .secondary-footer {
   border-top: 1px solid rgba(255,255,255,.12);
   background: #1c303f;
   padding: 14px 0;
}
footer a { color: #f0e9db; }
footer a:hover { color: var(--gold); }
footer dt { color: #cdbfa6; font-weight: 700; }
footer dd { color: #e9e2d4; }
footer .copyright { color: #cdbfa6; font-size: 11px; letter-spacing: 1px; }

/* ====================== IKON SOSIAL ====================== */
.social-icon {
   width: 42px; height: 42px; font-size: 15px;
   color: #fff; text-align: center; margin-right: 9px; padding-top: 13px;
   border-radius: 50%;
   transition: transform .18s ease, box-shadow .18s ease;
   background: var(--marian);
}
.social-icon:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.facebook  { background: var(--marian); }
.twitter   { background: var(--marian); }
.instagram { background: var(--sienna); }
.youtube   { background: var(--gold-d); }
.linked-in { background: var(--marian); }

/* ====================== TAG ====================== */
.tag a {
   border: 1px solid rgba(255,255,255,.45);
   padding: 8px 12px;
   color: #f0e9db;
   display: inline-block;
   font-size: 12px;
   text-transform: none;
   line-height: 1;
   margin: 0 4px 6px 0;
   border-radius: 999px;
   transition: all .16s ease;
}
.tag a:hover { border-color: var(--gold); background: var(--gold); color: #fff; }

/* ====================== PENCARIAN LAYAR PENUH ====================== */
#search_form {
   z-index: 999999; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
   background: rgba(35,59,78,.96);
   transition: all .5s ease-in-out;
   transform: translate(0px, -100%) scale(0, 0);
   opacity: 0;
}
#search_form.open { transform: translate(0,0) scale(1,1); opacity: 1; }
#search_form input[type="search_form"] {
   position: absolute; top: 50%; width: 100%;
   color: #fff; background: transparent;
   font-family: var(--serif); font-size: 52px; font-weight: 500;
   text-align: center; border: 0; margin: 0 auto; margin-top: -51px;
   padding: 0 30px; outline: none;
}
#search_form input::placeholder { color: rgba(255,255,255,.55); }
#search_form .btn { position: absolute; top: 50%; left: 50%; margin-top: 64px; margin-left: -52px; }

/* ====================== KEMBALI KE ATAS ====================== */
#return-to-top {
   opacity: .85; z-index: 10000; position: fixed; bottom: 20px; right: 20px;
   background: var(--gold); width: 42px; height: 42px; display: none;
   text-decoration: none; border-radius: 50%;
   box-shadow: var(--shadow);
   transition: all .3s ease;
}
#return-to-top i { color: #fff; position: relative; left: 13px; top: 9px; font-size: 18px; }
#return-to-top:hover { background: var(--marian); opacity: 1; }

/* ====================== TOASTR ====================== */
.toast { background-color: var(--marian-d); border-radius: var(--radius); }
.toast-success { background-color: #3f7d5a; }
.toast-error   { background-color: #a8503f; }
.toast-info    { background-color: var(--marian); }
.toast-warning { background-color: var(--gold); }
.toast-title, .toast-message { text-align: left; }

/* foto kepala sekolah di sidebar — rapikan */
.sidebar .card .card-img-top { border-bottom: 1px solid var(--line-soft); }

/* peta kontak */
.mapouter, .mapouter iframe {
   border: 1px solid var(--line) !important;
   border-radius: var(--radius-lg);
   overflow: hidden;
}

/* ====================== RESPONSIF ====================== */
@media (max-width: 575.98px) {
   .top-left { text-align: center !important; }
   .top-right { display: none; }
   .brand { font-size: 1.05rem; }
   .carousel-caption { padding: 30px 18px 18px; }
}
@media (min-width: 576px) and (max-width: 991.98px) {
   .top-left { text-align: center !important; }
   .top-right { display: none; }
}

/* ====================== GERAK MINIMAL (aksesibilitas) ====================== */
@media (prefers-reduced-motion: reduce) {
   * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
   .content .card:hover, .list-group-item-action:hover, .social-icon:hover, #return-to-top:hover { transform: none; }
}
