/* =============================================================
   SEJARAH PUBLIK CSS v2.5
   Gaya halaman publik Sejarah Desa — formal, bersih, nyaman dibaca.
   Pola: gambar float kiri, teks mengalir di kanan lalu ke bawah
   (gaya artikel koran / majalah).
   ============================================================= */

/* ── Container & Page ─────────────────────────────────────── */
.section-header .section-title {
    font-size: 24px;
    line-height: 1.3;
}

.section-header .section-subtitle {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-light, #64748b);
    margin-top: 6px;
}

.sdp-page {
    padding: 0 0 56px;
}

.sdp-container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 24px;
}

.sdp-card {
    background: white;
    border-radius: var(--radius-lg, 24px);
    border: 1px solid var(--border-color, #e2e8f0);
    padding: 40px;
    box-shadow: var(--shadow-md, 0 4px 20px rgba(11, 47, 97, 0.08));
    margin-bottom: 48px;
}

/* ── Bab List & Timeline Layout ────────────────────────────── */
.sdp-bab-list {
    position: relative;
    border-left: 3px solid #cbd5e1;
    padding-left: 36px;
    margin-left: 16px;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.sdp-bab {
    position: relative;
}

/* Timeline Node Badge */
.sdp-bab-node {
    position: absolute;
    left: -53.5px;
    top: 2px;
    width: 32px;
    height: 32px;
    background: var(--primary-dark, #0f172a);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13.5px;
    font-weight: 700;
    box-shadow: 0 0 0 4px #ffffff, 0 2px 6px rgba(0, 0, 0, 0.1);
    z-index: 2;
}

.sdp-bab-title {
    font-family: var(--font-heading, sans-serif);
    color: var(--primary-dark, #0f172a);
    font-size: 20px;
    font-weight: 800;
    margin: 0 0 20px 0;
    line-height: 1.35;
}

/* ── Konten Bab (Float Image Layout & Natural Text Flow) ──── */
.sdp-bab-body {
    position: relative;
    display: block;
}

.sdp-bab-body::after {
    content: "";
    display: table;
    clear: both;
}

/* Gambar — float kiri */
.sdp-bab-figure {
    float: left;
    width: 420px;
    max-width: 45%;
    margin: 4px 28px 16px 0;
    padding: 0;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sdp-bab-figure:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.sdp-bab-img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.3s ease;
}

.sdp-bab-figure:hover .sdp-bab-img {
    transform: scale(1.04);
}

.sdp-bab-caption {
    display: block;
    font-size: 12.5px;
    color: #64748b;
    text-align: center;
    padding: 10px 12px;
    font-style: italic;
    line-height: 1.4;
    background: #ffffff;
    border-top: 1px solid #f1f5f9;
}

/* Isi teks mengalir rapi di kolom kanan */
.sdp-bab-isi {
    font-size: 15.5px;
    line-height: 1.85;
    color: #334155;
    text-align: justify;
}

.sdp-bab-isi p {
    margin: 0 0 16px 0;
}

.sdp-bab-isi p:last-child {
    margin-bottom: 0;
}

.sdp-bab-isi h3 {
    font-family: var(--font-heading, sans-serif);
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 24px 0 12px;
    text-align: left;
}

.sdp-bab-isi h4 {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    margin: 20px 0 10px;
    text-align: left;
}

.sdp-bab-isi ul,
.sdp-bab-isi ol {
    margin: 0 0 18px 0;
    padding-left: 24px;
    display: flow-root;
}

.sdp-bab-isi ul {
    list-style-type: disc;
    list-style-position: outside;
}

.sdp-bab-isi ol {
    list-style-type: decimal;
    list-style-position: outside;
}

/* Dukungan Quill Editor (data-list="bullet" & data-list="ordered") */
.sdp-bab-isi li[data-list="bullet"],
.sdp-bab-isi ul li[data-list="bullet"],
.sdp-bab-isi ol li[data-list="bullet"] {
    list-style-type: disc !important;
}

.sdp-bab-isi li[data-list="ordered"],
.sdp-bab-isi ul li[data-list="ordered"],
.sdp-bab-isi ol li[data-list="ordered"] {
    list-style-type: decimal !important;
}

.sdp-bab-isi li {
    margin-bottom: 6px;
    line-height: 1.75;
    display: list-item !important;
}

.sdp-bab-isi .ql-ui {
    display: none !important;
}

.sdp-bab-isi blockquote {
    border-left: 3px solid #94a3b8;
    margin: 20px 0;
    padding: 14px 20px;
    background: #f8fafc;
    color: #475569;
    font-style: italic;
    border-radius: 0 4px 4px 0;
    text-align: left;
}

.sdp-bab-isi strong,
.sdp-bab-isi b {
    font-weight: 700;
    color: #1e293b;
}

.sdp-bab-isi em,
.sdp-bab-isi i {
    font-style: italic;
}

.sdp-bab-isi u {
    text-decoration: underline;
}

.sdp-bab-isi s,
.sdp-bab-isi strike,
.sdp-bab-isi del {
    text-decoration: line-through;
}

.sdp-bab-isi sub { vertical-align: sub; font-size: smaller; }
.sdp-bab-isi sup { vertical-align: super; font-size: smaller; }

.sdp-bab-isi a {
    color: #1e40af;
    text-decoration: underline;
}

.sdp-bab-isi img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
}

.sdp-bab-isi table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
    clear: both;
}

.sdp-bab-isi table th {
    background: #1e293b;
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-size: 13px;
}

.sdp-bab-isi table td {
    padding: 10px 14px;
    border-bottom: 1px solid #e2e8f0;
}

.sdp-bab-isi table tr:nth-child(even) td {
    background: #f8fafc;
}

/* Clear float */
.sdp-clear {
    clear: both;
}

/* ── Divider antar bab ────────────────────────────────────── */
.sdp-divider {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 24px 0;
}

/* ── Empty State ──────────────────────────────────────────── */
.sdp-empty {
    text-align: center;
    padding: 60px 24px;
    color: #64748b;
    font-size: 15px;
}

/* ── Modern Minimalist Lightbox Modal (Unsplash / Google Photos Style) ── */
.sdp-lightbox {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999999 !important;
    background: rgba(0, 0, 0, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    box-sizing: border-box;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.28s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.28s;
}

.sdp-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.sdp-lightbox[hidden] {
    display: none !important;
}

.sdp-lightbox-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 90vw;
    max-height: 85vh;
    margin: auto;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    overflow: visible;
    transform: scale(0.93);
    opacity: 0;
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.28s ease;
    cursor: pointer;
}

.sdp-lightbox.is-open .sdp-lightbox-inner {
    transform: scale(1);
    opacity: 1;
}

.sdp-lightbox-img {
    display: block;
    max-width: 90vw;
    max-height: 78vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.75), 0 10px 25px -10px rgba(0, 0, 0, 0.5);
    margin: 0 auto;
    cursor: default;
    user-select: none;
    -webkit-user-select: none;
}

.sdp-lightbox-caption {
    width: auto;
    max-width: 85vw;
    background: transparent !important;
    color: #ffffff;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.5;
    padding: 0;
    margin: 16px 0 0 0;
    text-align: center;
    box-sizing: border-box;
    font-style: normal;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.8);
    letter-spacing: 0.2px;
    cursor: pointer;
}

.sdp-lightbox-close {
    display: none !important;
}

/* =============================================================
   RESPONSIVE
   ============================================================= */

/* ── Responsive Mobile & Tablet ──────────────────────────── */
@media (max-width: 920px) {
    .sdp-card {
        padding: 20px 16px !important;
        border-radius: 16px !important;
        margin-bottom: 32px !important;
    }

    .sdp-bab-list {
        padding-left: 28px;
        margin-left: 10px;
    }

    .sdp-bab-node {
        left: -43.5px;
        width: 28px;
        height: 28px;
        font-size: 12px;
        top: 2px;
    }

    .sdp-bab-figure {
        float: none;
        width: 100%;
        max-width: 100%;
        margin: 0 0 20px 0;
    }

    .sdp-bab-isi {
        text-align: left;
        font-size: 15px;
        line-height: 1.75;
    }
}

/* ── Small Mobile ─────────────────────────────────────────── */
@media (max-width: 480px) {
    .sdp-bab-isi {
        font-size: 14.5px;
    }
}
