/* =========================================================
 * Tema Perpustakaan SMP Negeri 1 Turen (navy & emas)
 * Diselaraskan dengan tampilan E-Library SMPN 1 Turen.
 * ========================================================= */
:root {
    --navy-900: #0a152d;
    --navy-800: #0f2042;
    --navy-700: #1a2e56;
    --gold-400: #fbbf24;
    --gold-500: #f59e0b;
    --gold-600: #d97706;
    --slate-50: #f8fafc;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-700: #334155;
    --slate-900: #0f172a;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--slate-50);
    color: var(--slate-700);
}

a { color: var(--navy-700); }
a:hover { color: var(--gold-600); }

/* ---------- header (dipakai semua halaman) ---------- */
.c-header {
    min-height: 0 !important;
    background: var(--navy-900) !important;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 4px 14px rgba(10, 21, 45, .35);
}
.c-header .mask { display: none; }

.sp-topbar { border-bottom: 1px solid var(--navy-700); }
.sp-topbar .container { display: flex; align-items: center; justify-content: space-between; min-height: 76px; gap: 16px; }

.sp-brand { display: flex; align-items: center; gap: 12px; color: #fff !important; text-decoration: none !important; min-width: 0; }
.sp-brand-logo {
    width: 48px; height: 48px; flex-shrink: 0; border-radius: 12px;
    background: linear-gradient(135deg, var(--gold-500), var(--gold-400));
    border: 2px solid #fcd34d; display: grid; place-items: center; overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .25);
}
.sp-brand-logo img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.sp-brand-logo i { color: var(--navy-900); font-size: 22px; }
.sp-brand-title { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; line-height: 1.1; }
.sp-badge { background: var(--gold-500); color: var(--navy-900); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; }
.sp-brand-sub { color: var(--slate-300); font-size: 12px; font-weight: 500; margin: 2px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sp-user { display: flex; align-items: center; gap: 10px; }
.sp-btn-ghost {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 12px;
    background: var(--navy-800); border: 1px solid var(--navy-700); color: #e2e8f0 !important;
    font-size: 13px; font-weight: 600; text-decoration: none !important; position: relative; white-space: nowrap;
}
.sp-btn-ghost:hover { background: var(--navy-700); color: #fff !important; }
.sp-btn-ghost .badge { position: absolute; top: -6px; right: -6px; }
.sp-btn-gold {
    display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 12px;
    background: var(--gold-500); color: var(--navy-900) !important; font-size: 13px; font-weight: 700;
    text-decoration: none !important; box-shadow: 0 6px 16px rgba(245, 158, 11, .25); white-space: nowrap;
}
.sp-btn-gold:hover { background: var(--gold-600); }
.sp-avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold-400); }
.sp-user .dropdown-menu { border-radius: 12px; border: 1px solid var(--slate-200); box-shadow: 0 10px 30px rgba(15, 23, 42, .15); }

/* menu kedua */
.sp-nav { background: var(--navy-800); }
.sp-nav .container { display: flex; gap: 6px; overflow-x: auto; padding-top: 8px; padding-bottom: 8px; scrollbar-width: none; }
.sp-nav .container::-webkit-scrollbar { display: none; }
.sp-nav a {
    display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 9px;
    color: var(--slate-300) !important; font-size: 13px; font-weight: 600; white-space: nowrap; text-decoration: none !important;
}
.sp-nav a:hover { color: #fff !important; background: var(--navy-700); }
.sp-nav a.active { color: var(--gold-400) !important; background: rgba(245, 158, 11, .18); }
.sp-nav a .fa-external-link-alt { font-size: 9px; opacity: .6; }

/* ---------- hero + slider (beranda), gaya smpn1turen.sch.id ---------- */
.sp-hero { background: #fff; padding: 24px 0 0; }

/* tinggi tetap seperti situs sekolah; foto mengisi kotak (cover) */
.sp-slider {
    position: relative; width: 100%; height: 380px; border-radius: 16px; overflow: hidden;
    background: var(--slate-900); box-shadow: 0 10px 25px rgba(15, 23, 42, .18);
}
.sp-slide { position: absolute; inset: 0; opacity: 0; transition: opacity 1s ease-in-out; z-index: 0; }
.sp-slide.active { opacity: 1; z-index: 1; }
.sp-slide img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }
.sp-slide-shade { position: absolute; left: 0; right: 0; bottom: 0; height: 66%; background: linear-gradient(to top, rgba(2, 6, 23, .85), rgba(2, 6, 23, .2), transparent); pointer-events: none; }
.sp-slide-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 0 40px 56px; color: #fff; max-width: 760px; }
.sp-slide-caption h2 { font-size: 46px; font-weight: 800; line-height: 1.15; margin: 14px 0 18px; color: #fff; text-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.sp-slide-actions { display: flex; flex-wrap: wrap; gap: 14px; }
.sp-slide-actions .sp-btn-gold, .sp-btn-glass { padding: 12px 22px; font-size: 14px; }
.sp-btn-glass {
    display: inline-flex; align-items: center; gap: 8px; border-radius: 12px; font-weight: 600; white-space: nowrap;
    background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .25); color: #fff !important;
    text-decoration: none !important; backdrop-filter: blur(8px);
}
.sp-btn-glass:hover { background: rgba(255, 255, 255, .22); }
.sp-pill {
    display: inline-flex; align-items: center; gap: 8px; background: rgba(245, 158, 11, .2); color: #fcd34d;
    border: 1px solid rgba(251, 191, 36, .4); padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 600;
    backdrop-filter: blur(8px);
}
.sp-slider-dots { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; z-index: 3; }
.sp-slider-dots button { width: 10px; height: 10px; border-radius: 999px; border: 0; background: rgba(255, 255, 255, .5); padding: 0; transition: all .3s; }
.sp-slider-dots button.active { width: 32px; background: #fff; }
.sp-slider-nav {
    position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 48px; height: 48px; border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .2); background: rgba(15, 23, 42, .4); color: #fff; display: grid; place-items: center;
    cursor: pointer; backdrop-filter: blur(8px); transition: background .2s;
}
.sp-slider-nav:hover { background: rgba(15, 23, 42, .8); }
.sp-slider-nav.prev { left: 16px; }
.sp-slider-nav.next { right: 16px; }

/* statistik: kartu putih di bawah pencarian */
.sp-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.sp-stat {
    background: #fff; border: 1px solid var(--slate-200); border-radius: 16px; padding: 16px;
    display: flex; align-items: center; gap: 14px; box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}
.sp-stat i { width: 46px; height: 46px; flex-shrink: 0; border-radius: 12px; display: grid; place-items: center; font-size: 18px; }
.sp-stat .n { font-size: 22px; font-weight: 900; color: var(--slate-900); line-height: 1.1; }
.sp-stat .l { font-size: 12px; color: var(--slate-500); font-weight: 500; }
.sp-i-blue { background: #dbeafe; color: #2563eb; }
.sp-i-amber { background: #fef3c7; color: var(--gold-600); }
.sp-i-green { background: #d1fae5; color: #059669; }
.sp-i-pink { background: #fce7f3; color: #db2777; }

@media (min-width: 768px) { .sp-slider { height: 460px; } }
@media (min-width: 992px) { .sp-slider { height: 520px; } }

/* kotak pencarian menumpang di bawah hero */
.search { margin-top: -30px; position: relative; z-index: 5; }
.search .card { border-radius: 16px !important; border: 1px solid var(--slate-200) !important; }
.result-search .search, .member-area .search { margin-top: 24px; }

/* ---------- judul bagian ---------- */
#slims-home h4, .sp-section-title {
    font-weight: 800; color: var(--slate-900); font-size: 20px; position: relative; padding-left: 18px;
}
#slims-home h4::before, .sp-section-title::before {
    content: ''; position: absolute; left: 0; top: 2px; width: 8px; height: 24px; border-radius: 999px; background: var(--gold-500);
}
#slims-home h4.text-center { padding-left: 0; }
#slims-home h4.text-center::before { display: none; }
#slims-home .subtitle-section { font-weight: 400; font-size: 13px; color: var(--slate-500); display: block; margin-top: 4px; }

/* topik */
.topic li a {
    background: #fff; border: 1px solid var(--slate-200); border-radius: 18px; color: var(--slate-700) !important;
    transition: all .25s; box-shadow: 0 1px 2px rgba(15, 23, 42, .05);
}
.topic li a:hover { transform: translateY(-4px); box-shadow: 0 14px 30px rgba(15, 23, 42, .12); border-color: var(--gold-400); text-decoration: none; }

/* kartu koleksi */
.collection .card, .card.collection { border-radius: 16px; overflow: hidden; border: 1px solid var(--slate-200); transition: all .3s; }
.collection .card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(15, 23, 42, .14); }

.btn-primary { background: var(--navy-800); border-color: var(--navy-800); }
.btn-primary:hover, .btn-primary:focus { background: var(--navy-700); border-color: var(--navy-700); }
.badge-primary { background: var(--navy-800); }

/* ---------- footer ---------- */
.sp-footer { background: var(--navy-900); color: #fff; border-top: 1px solid var(--navy-800); margin-top: 48px; }
.sp-footer .container { padding-top: 40px; padding-bottom: 24px; }
.sp-footer h5 { color: var(--gold-400); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; margin-bottom: 12px; }
.sp-footer p, .sp-footer li { color: var(--slate-400); font-size: 13px; line-height: 1.7; }
.sp-footer ul { list-style: none; padding: 0; margin: 0; }
.sp-footer a { color: var(--slate-300); }
.sp-footer a:hover { color: var(--gold-400); text-decoration: none; }
.sp-footer .sp-jam li { display: flex; justify-content: space-between; gap: 12px; }
.sp-footer .sp-jam strong { color: #fff; font-weight: 600; }
.sp-footer-bottom { border-top: 1px solid var(--navy-800); margin-top: 28px; padding-top: 18px; font-size: 12px; color: var(--slate-400); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; }

/* ---------- responsif ---------- */
@media (max-width: 991px) {
    .sp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .sp-slide-caption h2 { font-size: 34px; }
}
@media (max-width: 575px) {
    .sp-topbar .container { min-height: 64px; }
    .sp-brand-logo { width: 40px; height: 40px; }
    .sp-brand-title { font-size: 15px; }
    .sp-brand-sub { display: none; }
    .sp-user .sp-btn-ghost span.lbl, .sp-user .sp-btn-gold span.lbl { display: none; }
    .sp-hero { padding-top: 14px; }
    .sp-slide-caption { padding: 0 20px 48px; }
    .sp-slide-caption h2 { font-size: 26px; margin: 10px 0 14px; }
    .sp-slide-actions .sp-btn-gold, .sp-btn-glass { padding: 10px 16px; font-size: 13px; }
    .sp-slider-nav { width: 38px; height: 38px; }
    .sp-stat { padding: 12px; gap: 10px; }
    .sp-stat .n { font-size: 18px; }
}

/* ---------- jarak antar bagian beranda (dirapatkan) ---------- */
#slims-home > section { margin-top: 28px !important; margin-bottom: 0 !important; }
#slims-home > section:first-child { margin-top: 24px !important; }
#slims-home > section > .container.py-5 { padding-top: 24px !important; padding-bottom: 24px !important; }
#slims-home h4 { margin-top: 0 !important; margin-bottom: 14px !important; }
#slims-home h4.text-center { margin-bottom: 10px !important; font-size: 18px; }
#slims-home .topic { margin-bottom: 0; }
#slims-home .topic li { margin: 6px !important; }
#slims-home .subtitle-section { margin-top: 2px; }
#slims-home > section:last-child { margin-bottom: 0 !important; }
.sp-footer { margin-top: 32px; }

/* ---------- halaman konten (Bantuan, Informasi, dll.) ---------- */
.ck-content { background: #fff; border: 1px solid var(--slate-200); border-radius: 16px; line-height: 1.7; }
.ck-content h3 { font-size: 19px; font-weight: 800; color: var(--navy-800); margin: 26px 0 10px; }
.ck-content h3:first-of-type { margin-top: 8px; }
.ck-content ul { padding-left: 22px; }
.ck-content li { margin-bottom: 4px; }
.ck-content table { width: 100%; border-collapse: collapse; margin: 12px 0 8px; font-size: 14px; }
.ck-content th { background: var(--navy-800); color: #fff; text-align: left; padding: 9px 12px; }
.ck-content td { border-bottom: 1px solid var(--slate-200); padding: 9px 12px; }
.ck-content tr:nth-child(even) td { background: var(--slate-50); }
