/* NOTE: file ini sebelumnya isinya copy-paste dari senat.css (semua selector
   pakai ".senat-page", padahal HTML halaman ini pakai class ".struktur-page"),
   jadi hampir seluruh style di file ini sebelumnya tidak pernah kena / tidak
   berlaku sama sekali ke halaman Struktur Organisasi. Ditulis ulang dari nol
   dengan selector yang benar, termasuk bikin gaya baru untuk pohon org-chart
   (.org-chart) yang sebelumnya juga belum pernah punya CSS sendiri. */

.struktur-page,
.struktur-page * {
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box;
}

.struktur-page {
    padding: 46px 32px 100px;
    background: linear-gradient(180deg, #f7f8fc 0%, #ffffff 14%);
}

.struktur-page .content-block {
    max-width: 1150px;
    margin: 0 auto;
}

.struktur-page .content-block.m-t-40 {
    margin-top: 34px;
}

.struktur-page .content-block > p {
    font-size: 15px;
    color: #64748b;
    line-height: 1.8;
    max-width: 760px;
}

/* ==== Org Chart ==== */
.struktur-page .org-chart-wrapper {
    background: #ffffff;
    border: 1px solid #eef1f8;
    border-radius: 20px;
    padding: 40px 24px;
    box-shadow: 0 10px 30px rgba(25, 44, 77, .05);
    overflow-x: auto;
}

.struktur-page .org-chart {
    min-width: 760px;
    display: flex;
    justify-content: center;
}

.struktur-page .org-chart ul {
    list-style: none;
    margin: 0;
    padding-top: 34px;
    position: relative;
    display: flex;
    justify-content: center;
}

.struktur-page .org-chart > ul { padding-top: 0; }

.struktur-page .org-chart li {
    position: relative;
    text-align: center;
    padding: 34px 14px 0;
}

/* garis vertikal turun dari node induk ke baris anak */
.struktur-page .org-chart li::before {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 1px;
    height: 34px;
    background: color-mix(in srgb, var(--gold, #5B4CE0) 45%, #cbd5e1 55%);
}

.struktur-page .org-chart > ul > li::before { display: none; }

/* garis horizontal penghubung antar-saudara pada satu baris anak */
.struktur-page .org-chart ul ul {
    position: relative;
}

.struktur-page .org-chart ul ul::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: color-mix(in srgb, var(--gold, #5B4CE0) 45%, #cbd5e1 55%);
    margin: 0 calc(14px + 50%) 0 calc(14px + 50%);
}

.struktur-page .org-chart ul ul {
    padding-left: 0;
}

.struktur-page .org-chart ul > li:only-child::before,
.struktur-page .org-chart ul > li:first-child:last-child::before { height: 34px; }

/* Sembunyikan segmen horizontal yang menonjol di kiri anak pertama & kanan anak terakhir */
.struktur-page .org-chart ul ul li:first-child::after,
.struktur-page .org-chart ul ul li:last-child::after {
    content: "";
    position: absolute;
    top: -1px;
    width: 50%;
    height: 1px;
    background: #ffffff;
}
.struktur-page .org-chart ul ul li:first-child::after { left: -1px; }
.struktur-page .org-chart ul ul li:last-child::after { right: -1px; }
.struktur-page .org-chart ul ul li:only-child::after { display: none; }

.struktur-page .org-node {
    position: relative;
    z-index: 1;
    display: inline-block;
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.4;
    padding: 12px 18px;
    border-radius: 12px;
    transition: transform .2s ease, box-shadow .2s ease;
    white-space: nowrap;
}

.struktur-page .org-node span {
    display: block;
    font-size: 11px;
    font-weight: 500;
    opacity: .75;
    margin-top: 2px;
}

.struktur-page .org-node:hover {
    transform: translateY(-3px);
}

.struktur-page .org-node-top {
    background: linear-gradient(135deg, var(--navy, #171B2E) 0%, color-mix(in srgb, var(--navy, #171B2E) 75%, black) 100%);
    color: #ffffff;
    font-size: 15px;
    padding: 15px 30px;
    box-shadow: 0 14px 28px rgba(23, 27, 46, .25);
}

.struktur-page .org-node-mid {
    background: color-mix(in srgb, var(--gold, #5B4CE0) 14%, #ffffff);
    border: 1.5px solid color-mix(in srgb, var(--gold, #5B4CE0) 45%, transparent);
    color: var(--navy, #171B2E);
    box-shadow: 0 8px 18px rgba(15, 23, 42, .05);
    white-space: normal;
    max-width: 190px;
}

.struktur-page .org-node-low {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    color: #475467;
    font-size: 12.5px;
    font-weight: 500;
    box-shadow: 0 6px 14px rgba(15, 23, 42, .04);
    white-space: normal;
    max-width: 170px;
}

.struktur-page .org-node-low:hover {
    border-color: var(--gold, #5B4CE0);
    color: var(--navy, #171B2E);
}

@media (max-width: 768px) {
    .struktur-page { padding: 34px 0 70px; }
    .struktur-page .content-block { padding: 0 20px; }
    .struktur-page .org-chart-wrapper { border-radius: 0; border-left: none; border-right: none; padding: 32px 16px; }
}
