/* =========================================================
   STRUKTUR ORGANISASI
   PENGADILAN AGAMA BUNTOK
   ========================================================= */

.struktur-organisasi {
    width: 100%;
    box-sizing: border-box;
}


/* =========================================================
   CHART WRAPPER
   ========================================================= */

.struktur-chart-wrapper {

    width: 100%;
    margin: 8px auto 0;
    padding: 0;

    background: #ffffff;

    border: 1px solid #e1ebe4;
    border-radius: 18px;

    overflow: hidden;

    box-shadow:
        0 10px 35px rgba(15, 23, 42, 0.055);

    box-sizing: border-box;
}


/* =========================================================
   CHART HEADER
   ========================================================= */

.struktur-chart-header {

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 17px 22px;

    background: #f5f9f6;

    border-bottom: 1px solid #e1ebe4;

    box-sizing: border-box;
}


/* LEFT TITLE */

.struktur-chart-title {

    display: flex;
    flex-direction: column;

    gap: 3px;
}


.struktur-chart-title span {

    display: block;

    color: #0b7a3b;

    font-size: 10px;
    font-weight: 800;

    line-height: 1.3;

    letter-spacing: 1.3px;

    text-transform: uppercase;
}


.struktur-chart-title strong {

    display: block;

    color: #183b2b;

    font-size: 15px;
    font-weight: 700;

    line-height: 1.4;
}


/* =========================================================
   ACTION BUTTON
   ========================================================= */

.struktur-chart-action {

    flex-shrink: 0;

    display: inline-flex;
    align-items: center;

    padding: 8px 12px;

    background: #eaf7ee;

    color: #0b7a3b;

    border: 0;
    border-radius: 8px;

    font-family: inherit;

    font-size: 11px;
    font-weight: 700;

    line-height: 1.2;

    cursor: pointer;

    transition:
        background-color .2s ease,
        color .2s ease,
        transform .2s ease;
}


.struktur-chart-action::before {

    content: "⌕";

    margin-right: 5px;

    font-size: 14px;

    line-height: 1;
}


.struktur-chart-action:hover {

    background: #dff2e6;

    color: #075f30;

    transform: translateY(-1px);
}


.struktur-chart-action:focus-visible {

    outline: 2px solid #0b7a3b;

    outline-offset: 2px;
}


/* =========================================================
   IMAGE AREA
   ========================================================= */

.struktur-chart {

    width: 100%;

    padding: 26px 28px;

    background: #ffffff;

    text-align: center;

    box-sizing: border-box;
}


/* IMAGE BUTTON */

.struktur-image-button {

    display: block;

    width: 100%;

    max-width: 872px;

    margin: 0 auto;

    padding: 0;

    border: 0;

    background: transparent;

    font: inherit;

    cursor: zoom-in;

}


/* IMAGE */

.struktur-image-button img {

    display: block;

    width: 100%;

    max-width: 872px;

    height: auto;

    margin: 0 auto;

    border: 0;

    border-radius: 8px;

    cursor: zoom-in;

    box-shadow:
        0 5px 18px rgba(15, 23, 42, 0.045);

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}


/* HOVER */

.struktur-image-button:hover img {

    transform: scale(1.008);

    box-shadow:
        0 9px 26px rgba(15, 23, 42, 0.09);
}


/* =========================================================
   INFORMATION NOTE
   ========================================================= */

/*
 * Sengaja menggunakan max-width yang sama
 * dengan area maksimum gambar.
 */

.struktur-note {

    display: flex;
    align-items: flex-start;

    gap: 12px;

    width: 100%;
    max-width: 872px;

    margin: 22px auto 0;

    padding: 16px 18px;

    background: #f5f9f6;

    border: 1px solid #e1ebe4;

    border-radius: 12px;

    box-sizing: border-box;
}


/* ICON */

.struktur-note-icon {

    display: flex;

    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    width: 26px;
    height: 26px;

    margin-top: 1px;

    background: #0b7a3b;

    color: #ffffff;

    border-radius: 50%;

    font-size: 13px;
    font-weight: 800;

    line-height: 1;
}


/* NOTE TEXT */

.struktur-note p {

    margin: 1px 0 0 !important;
    padding: 0 !important;

    color: #66736b;

    font-size: 12px;

    line-height: 1.7;
}


/* =========================================================
   LIGHTBOX
   ========================================================= */

.struktur-lightbox {

    position: fixed;

    inset: 0;

    z-index: 999999;

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 30px;

    background: rgba(15, 23, 42, 0.88);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    box-sizing: border-box;

    transition:
        opacity .25s ease,
        visibility .25s ease;
}


.struktur-lightbox.is-active {

    opacity: 1;

    visibility: visible;

    pointer-events: auto;
}


/* LIGHTBOX IMAGE */

.struktur-lightbox img {

    display: block;

    width: auto;
    height: auto;

    max-width: 95vw;
    max-height: 90vh;

    object-fit: contain;

    border-radius: 8px;

    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.30);
}


/* =========================================================
   LIGHTBOX CLOSE
   ========================================================= */

.struktur-lightbox-close {

    position: absolute;

    top: 18px;
    right: 22px;

    z-index: 2;

    display: flex;

    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    padding: 0;

    border: 0;

    border-radius: 50%;

    background: rgba(255, 255, 255, 0.12);

    color: #ffffff;

    font-family: Arial, sans-serif;

    font-size: 28px;
    font-weight: 300;

    line-height: 1;

    cursor: pointer;

    transition:
        background .2s ease,
        transform .2s ease;
}


.struktur-lightbox-close:hover {

    background: rgba(255, 255, 255, 0.22);

    transform: scale(1.05);
}


.struktur-lightbox-close:focus-visible {

    outline: 2px solid #ffffff;

    outline-offset: 3px;
}


/* =========================================================
   BODY LOCK
   ========================================================= */

body.struktur-lightbox-open {

    overflow: hidden;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 768px) {

    .struktur-chart-header {

        padding: 16px 18px;

    }


    .struktur-chart {

        padding: 18px;

    }


    .struktur-chart-title strong {

        font-size: 14px;

    }


    .struktur-note {

        margin-top: 18px;

        padding: 15px 16px;

    }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 576px) {

    .struktur-chart-wrapper {

        margin-top: 4px;

        border-radius: 14px;

    }


    /* HEADER */

    .struktur-chart-header {

        display: block;

        padding: 15px 16px;

    }


    .struktur-chart-title {

        gap: 3px;

    }


    .struktur-chart-title span {

        font-size: 9px;

        letter-spacing: 1.2px;

    }


    .struktur-chart-title strong {

        font-size: 13px;

    }


    /* ACTION */

    .struktur-chart-action {

        margin-top: 9px;

        padding: 7px 10px;

        font-size: 10px;

    }


    /* IMAGE */

    .struktur-chart {

        padding: 10px;

        overflow-x: auto;

    }


    .struktur-image-button {

        min-width: 650px;

        max-width: none;

    }


    .struktur-image-button img {

        width: 100%;

        max-width: none;

        border-radius: 6px;

    }


    /* NOTE */

    .struktur-note {

        width: 100%;

        max-width: 650px;

        margin-top: 16px;

        padding: 13px 14px;

        border-radius: 10px;

        gap: 9px;

    }


    .struktur-note-icon {

        width: 23px;
        height: 23px;

        font-size: 12px;

    }


    .struktur-note p {

        font-size: 11px;

        line-height: 1.65;

    }


    /* LIGHTBOX */

    .struktur-lightbox {

        padding: 15px;

    }


    .struktur-lightbox img {

        max-width: 96vw;

        max-height: 88vh;

    }


    .struktur-lightbox-close {

        top: 12px;
        right: 12px;

        width: 38px;
        height: 38px;

        font-size: 25px;

    }

}

/* =========================================================
   FINAL POLISH
   STRUKTUR ORGANISASI
   ========================================================= */

/* ---------------------------------------------------------
   HEADER CHART
   Judul chart dihilangkan karena sudah ada di page-shell.
   Tombol zoom tetap dipertahankan.
   --------------------------------------------------------- */

.struktur-chart-header {

    display: flex;

    align-items: center;
    justify-content: flex-start;

    padding: 14px 20px 12px;

    background: #ffffff;

    border-bottom: 0;

}


/* Sembunyikan judul internal */

.struktur-chart-title {
    display: none;
}


/* ---------------------------------------------------------
   ZOOM ACTION
   --------------------------------------------------------- */

.struktur-chart-action {

    position: relative;

    display: inline-flex;

    align-items: center;

    gap: 6px;

    padding: 7px 12px;

    background: #eaf7ee;

    color: #08783f;

    border: 1px solid rgba(11, 122, 59, .06);

    border-radius: 8px;

    font-size: 11px;

    font-weight: 700;

    line-height: 1.2;

    cursor: pointer;

    transition:
        background-color .2s ease,
        color .2s ease,
        transform .2s ease,
        box-shadow .2s ease;

}


/* Magnifying glass CSS */

.struktur-chart-action::before {

    content: "";

    width: 8px;
    height: 8px;

    border: 1.6px solid currentColor;

    border-radius: 50%;

    box-sizing: border-box;

}


/* Gagang kaca pembesar */

.struktur-chart-action::after {

    content: "";

    position: absolute;

    left: 20px;
    top: 19px;

    width: 5px;
    height: 1.5px;

    background: currentColor;

    border-radius: 2px;

    transform: rotate(45deg);

    transform-origin: left center;

}


.struktur-chart-action:hover {

    background: #dff3e6;

    color: #075f31;

    transform: translateY(-1px);

    box-shadow:
        0 4px 12px rgba(11, 122, 59, .08);

}


.struktur-chart-action:focus-visible {

    outline: 2px solid rgba(11, 122, 59, .35);

    outline-offset: 2px;

}


/* ---------------------------------------------------------
   IMAGE AREA
   --------------------------------------------------------- */

.struktur-chart {

    padding: 10px 28px 28px;

}


/* Sedikit lebih elegan */

.struktur-image-button img {

    border-radius: 8px;

    box-shadow:
        0 6px 20px rgba(15, 23, 42, .055);

}


.struktur-image-button:hover img {

    transform: scale(1.006);

    box-shadow:
        0 10px 28px rgba(15, 23, 42, .09);

}


/* ---------------------------------------------------------
   NOTE
   Lebar mengikuti gambar
   --------------------------------------------------------- */

.struktur-note {

    width: 100%;

    max-width: 872px;

    margin: 20px auto 0;

    padding: 15px 17px;

    background: #f5f9f6;

    border: 1px solid #e1ebe4;

    border-radius: 11px;

    box-shadow:
        0 4px 14px rgba(15, 23, 42, .025);

}


/* ---------------------------------------------------------
   MOBILE
   --------------------------------------------------------- */

@media (max-width: 576px) {

    .struktur-chart-header {

        padding: 12px 14px 9px;

    }


    .struktur-chart-action {

        padding: 7px 10px;

        font-size: 10px;

    }


    .struktur-chart-action::after {

        left: 18px;
        top: 18px;

    }


    .struktur-chart {

        padding: 7px 10px 10px;

    }


    .struktur-image-button {

        min-width: 650px;

    }


    .struktur-note {

        max-width: 650px;

        margin-top: 15px;

        padding: 13px 14px;

        border-radius: 10px;

    }

}