/* ── Layout ─────────────────────────────── */
.sp-layout-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 40px;
    align-items: start;
}
.sp-main {
    min-width: 0;
}

/* ── Hero ───────────────────────────────── */
.sp-hero {
    position: relative;
    width: 100%;
    height: 450px;
    overflow: hidden;
    border-radius: 14px;
    margin-bottom: 28px;
}
.sp-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: .88;
}
.sp-hero-grad {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(15,23,42,.6) 100%);
}

/* ── Sidebar ────────────────────────────── */
.sp-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: sticky;
    /* top:90px cocok utk navbar default (fixed, tinggi tetap). Navbar B tinggi
       aktualnya beda (topbar+menu digabung, lihat _navbar-b.blade.php) dan
       ekspos tingginya lewat --nvb-header-height — fallback ditulis 78px
       (bukan 90px) supaya total tetap 90px persis seperti sebelumnya saat
       navbar default (variabelnya tidak pernah diset -> fallback dipakai).
       Tanpa ini sidebar akan nyelip di BAWAH header fixed navbar B saat
       discroll karena tingginya beda dari asumsi 90px lama. */
    top: calc(var(--nvb-header-height, 78px) + 12px);
}
.sp-side-card {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 18px;
}
.sp-side-title {
    font-size: 13.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #111827;
    margin: 0 0 14px;
    display: flex;
    align-items: center;
}
.sp-side-title i { color: var(--main-color, #bc0000); font-size: 14px; }

.sp-recent-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sp-recent-link { display: flex; gap: 10px; text-decoration: none; align-items: flex-start; }
.sp-recent-thumb {
    width: 56px; height: 56px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f1f5f9;
    display: flex; align-items: center; justify-content: center;
    color: #94a3b8;
    font-size: 18px;
}
.sp-recent-thumb img { width: 100%; height: 100%; object-fit: cover; }
.sp-recent-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sp-recent-title {
    font-size: 14px; font-weight: 600; color: #1f2937; line-height: 1.4;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.sp-recent-date { font-size: 12px; color: #9ca3af; }
.sp-recent-link:hover .sp-recent-title { color: var(--main-color, #bc0000); }

.sp-kategori-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.sp-kategori-link {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 10px;
    border-radius: 8px;
    text-decoration: none;
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    transition: background .15s, color .15s;
}
.sp-kategori-link i { font-size: 14px; color: #9ca3af; width: 16px; text-align: center; }
.sp-kategori-link:hover { background: #f8fafc; color: #111827; }
.sp-kategori-link.is-active { background: color-mix(in srgb, var(--main-color, #bc0000) 10%, #fff); color: var(--main-color, #bc0000); }
.sp-kategori-link.is-active i { color: var(--main-color, #bc0000); }

/* ── Sidebar: Search ────────────────────── */
.sp-side-search { display: flex; gap: 8px; }
.sp-side-search .form-control { font-size: 14px; }
.sp-side-search .btn { flex-shrink: 0; }

/* ── Sidebar: Galeri ────────────────────── */
.sp-galeri-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}
.sp-galeri-item {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    background: #f1f5f9;
}
.sp-galeri-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .2s; }
.sp-galeri-item:hover img { transform: scale(1.08); }

@media (max-width: 900px) {
    .sp-layout-grid { grid-template-columns: 1fr; }
    .sp-sidebar { position: static; }
    .sp-hero { height: 260px; }
}

/* ── Meta ───────────────────────────────── */
.sp-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 16px;
}
.sp-meta-item { display: flex; align-items: center; gap: 6px; }
.sp-meta-item i { font-size: 13px; }
.sp-meta-sep { color: #d1d5db; }

/* ── Title ──────────────────────────────── */
.sp-title {
    font-size: clamp(1.5rem, 3.5vw, 2.2rem);
    font-weight: 800;
    line-height: 1.25;
    color: #111827;
    margin: 0 0 20px;
}

/* ── Divider ────────────────────────────── */
.sp-divider {
    height: 3px;
    width: 52px;
    background: var(--main-color, #bc0000);
    border-radius: 4px;
    margin-bottom: 32px;
}

/* ── Body ───────────────────────────────── */
.sp-body {
    font-size: 15px;
    line-height: 1.85;
    color: #1f2937;
}
.sp-body img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin: 20px 0;
}
.sp-body p { margin-bottom: 1.25em; }
.sp-body h2,.sp-body h3,.sp-body h4 {
    font-weight: 700;
    color: #111827;
    margin: 2em 0 .75em;
    line-height: 1.3;
}
/* Sama seperti di show_page.css: reset heading di atas ikut menimpa judul
   Card Model 4 (.bk-promo-title, elemennya <h3>) kalau block itu dipakai di
   dalam konten post. Dikembalikan ke putih (dua class = spesifisitas lebih
   tinggi dari ".sp-body h3"). */
.sp-body .bk-promo-title { color: #fff; margin: 0 0 16px; }
.sp-body a:not(.btn) { color: #2563eb; text-decoration: underline; }
/* Tombol blok page builder mengikuti varian yang dipilih di editor (lihat show_page.css). */
.sp-body .btn-solid.theme-primary,
.sp-body .btn-solid.theme-primary:hover { background-color: revert-layer; border-color: revert-layer; color: revert-layer; }
/* Warna normal Bootstrap untuk tombol di konten — public/style.css mengalihkan token
   primary situs ke navy (#0e1649); di sini dikembalikan ke biru Bootstrap seperti di editor. */
.sp-body .btn {
    --bs-primary-base: #0d6efd; --bs-primary-bg: #0d6efd; --bs-primary-fg: #0d6efd;
    --bs-primary-fg-emphasis: #0a58ca; --bs-primary-bg-subtle: #cfe2ff; --bs-primary-bg-muted: #9ec5fe;
    --bs-primary-border: #0d6efd; --bs-primary-focus-ring: color-mix(in oklch, #0d6efd 50%, white);
}
.sp-body ul,.sp-body ol { padding-left: 1.5em; margin-bottom: 1.25em; }
.sp-body li { margin-bottom: .4em; }
.sp-body blockquote {
    border-left: 4px solid var(--main-color, #0e1649);
    background: color-mix(in srgb, var(--main-color, #0e1649) 6%, #fff);
    margin: 24px 0;
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #374151;
}
.sp-body table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
    font-size: 14px;
}
.sp-body :where(table:not(.bk-tbl)) th,.sp-body :where(table:not(.bk-tbl)) td {
    padding: 10px 14px;
    text-align: start;
}
/* Tabel konten lama selalu bergaris; tabel blok page builder (.table)
   mengikuti opsi Border di bloknya (lihat show_page.css). */
.sp-body table:not(.table):where(:not(.bk-tbl)) th,.sp-body table:not(.table):where(:not(.bk-tbl)) td { border: 1px solid #e5e7eb; }
.sp-body .table th,.sp-body .table td { border-width: 0 0 1px; border-style: solid; border-color: #e5e7eb; }
.sp-body .table-bordered th,.sp-body .table-bordered td { border-width: 1px; }
.sp-body :where(table:not(.bk-tbl)) th { background: #f8fafc; font-weight: 700; color: #111827; }
.sp-body :where(table:not(.bk-tbl)) tr:hover td { background: #fafafa; }

/* ── Prev / Next nav ────────────────────── */
.sp-nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 12px;
    align-items: center;
    margin-top: 52px;
    padding-top: 28px;
    border-top: 1px solid #e5e7eb;
}
.sp-nav-item { min-width: 0; }
.sp-nav-next { text-align: end; }

.sp-nav-link {
    display: inline-flex;
    flex-direction: column;
    gap: 5px;
    text-decoration: none;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
    transition: .18s;
    width: 100%;
    max-width: 300px;
}
.sp-nav-link:hover {
    border-color: var(--main-color, #0e1649);
    background: color-mix(in srgb, var(--main-color, #0e1649) 6%, #fff);
    box-shadow: 0 4px 16px rgba(0,0,0,.07);
}
.sp-nav-link--right { margin-left: auto; }
.sp-nav-dir {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--main-color, #bc0000);
    display: flex;
    align-items: center;
    gap: 6px;
}
.sp-nav-next .sp-nav-dir { justify-content: flex-end; }
.sp-nav-title {
    font-size: 12px;
    font-weight: 600;
    color: #374151;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sp-nav-center { display: flex; justify-content: center; }
.sp-nav-back {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid #e5e7eb;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-size: 16px;
    text-decoration: none;
    transition: .18s;
}
.sp-nav-back:hover {
    background: var(--main-color, #0e1649);
    border-color: var(--main-color, #0e1649);
    color: #fff;
}

@media (max-width: 600px) {
    .sp-nav { grid-template-columns: 1fr auto 1fr; gap: 8px; }
    .sp-nav-link { padding: 10px 12px; max-width: 100%; }
}

/* ── Widget sidebar tambahan (Setting → Sidebar) ── */
.sp-agenda-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.sp-agenda-link { display: flex; gap: 12px; align-items: center; text-decoration: none; }
.sp-agenda-date { width: 46px; flex: none; display: flex; flex-direction: column; align-items: center; padding: 6px 0; border-radius: 10px; background: color-mix(in srgb, var(--main-color, #bc0000) 10%, #fff); color: var(--main-color, #bc0000); font-size: 11px; font-weight: 600; text-transform: uppercase; line-height: 1.1; }
.sp-agenda-date b { font-size: 18px; }
.sp-agenda-body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.sp-agenda-title { font-size: 14px; font-weight: 600; color: #111827; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sp-agenda-when { font-size: 12px; color: #9ca3af; }
.sp-agenda-live { color: #15803d; font-weight: 600; }
.sp-agenda-link:hover .sp-agenda-title { color: var(--main-color, #bc0000); }
.sp-contact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; font-size: 14px; color: #374151; }
.sp-contact-list li { display: flex; gap: 10px; align-items: flex-start; line-height: 1.45; }
.sp-contact-list i { color: var(--main-color, #bc0000); margin-top: 2px; }
.sp-contact-list a { color: inherit; text-decoration: none; word-break: break-word; }
.sp-contact-list a:hover { color: var(--main-color, #bc0000); }
.sp-hours { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #f8fafc; font-size: 13px; }
.sp-hours div { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; }
.sp-hours div + div { border-top: 1px dashed #e5e7eb; }
.sp-hours dt { font-weight: 500; color: #4b5563; }
.sp-hours dd { margin: 0; font-weight: 600; color: #111827; text-align: right; white-space: nowrap; }
.sp-cta { position: relative; overflow: hidden; padding: 22px 20px; border-radius: 14px; color: #fff; background: linear-gradient(135deg, var(--main-color, #bc0000), color-mix(in srgb, var(--main-color, #bc0000) 65%, #000)); box-shadow: 0 10px 24px -12px color-mix(in srgb, var(--main-color, #bc0000) 80%, transparent); }
.sp-cta-ic { position: absolute; right: -8px; bottom: -14px; font-size: 84px; opacity: .12; transform: rotate(-12deg); }
.sp-cta-title { position: relative; font-size: 17px; font-weight: 700; line-height: 1.3; }
.sp-cta-text { position: relative; margin: 6px 0 0; font-size: 13.5px; line-height: 1.55; opacity: .92; }
.sp-cta-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; padding: 8px 16px; border-radius: 8px; background: #fff; color: var(--main-color, #bc0000); font-size: 13.5px; font-weight: 700; text-decoration: none; transition: transform .15s, box-shadow .15s; }
.sp-cta-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0, 0, 0, .18); color: var(--main-color, #bc0000); }
.sp-map { position: relative; aspect-ratio: 4 / 3; border-radius: 10px; overflow: hidden; background: #f1f5f9; }
.sp-map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.sp-social { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.sp-social-link { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; background: #f8fafc; color: #374151; font-size: 13px; font-weight: 500; text-decoration: none; transition: background .15s, color .15s; }
.sp-social-link i { font-size: 15px; color: var(--main-color, #bc0000); }
.sp-social-link:hover { background: var(--main-color, #bc0000); color: #fff; }
.sp-social-link:hover i { color: #fff; }

/* Acara → tombol "Lihat Berita" (berita terkait, Events.news_post_id) */
.sp-related-news { margin: 32px 0 8px; }
.sp-related-news-btn {
    display: inline-flex; align-items: center; gap: 10px; padding: 12px 22px; border-radius: 999px;
    background: var(--main-color, #bc0000); color: #fff; font-size: 15px; font-weight: 700; text-decoration: none;
    box-shadow: 0 8px 20px -10px color-mix(in srgb, var(--main-color, #bc0000) 70%, transparent);
    transition: transform .15s, box-shadow .15s, filter .15s;
}
.sp-related-news-btn:hover { color: #fff; filter: brightness(1.08); transform: translateY(-2px); }
.sp-related-news-btn:focus-visible { outline: 2px solid var(--main-color, #bc0000); outline-offset: 3px; }
.sp-related-news-btn .bi-arrow-right { transition: transform .15s; }
.sp-related-news-btn:hover .bi-arrow-right { transform: translateX(3px); }
@media (max-width: 575.98px) { .sp-related-news-btn { width: 100%; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .sp-related-news-btn, .sp-related-news-btn .bi-arrow-right { transition: none; } }
