.split-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 40px;
    align-items: start;
}

.text-content {
    min-width: 0;
}

.office-feature-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 28px;
    background-color: #e5e9ef;
    position: relative;
}

.office-feature-img:empty {
    display: none;
}

.text-content p,
.text-content li {
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
}

.text-content p {
    text-align: justify;
}

.text-content li {
    text-align: left;
}

.officials-sidebar {
    min-width: 0;
    position: sticky;
    top: calc(var(--header-h) + 24px);
}

.sidebar-card {
    background: #fff;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    overflow: hidden;
    width: 100%;
}

.sidebar-card .sidebar-header {
    background: #fcfcfc;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.sidebar-card .sidebar-header h3 {
    color: var(--tni-blue);
    text-align: center;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    line-height: 1.3;
    letter-spacing: 0.5px;
}

#current-kadis-area {
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.current-photo-frame {
    width: 180px;
    aspect-ratio: 3 / 4;
    background: #e5e9ef;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.current-photo-frame.small {
    width: 56px;
    border-radius: 6px;
    box-shadow: none;
}

.current-photo-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
}

#current-kadis-area .current-kadis-name {
    margin-top: 14px;
    font-size: 1.05rem;
    line-height: 1.4;
    color: var(--tni-blue);
    font-weight: 700;
}

#current-kadis-area .current-kadis-name:empty {
    display: none;
}

.history-toggle-btn {
    width: 100%;
    padding: 14px 20px;
    background: #f8f9fa;
    color: var(--tni-blue);
    border: none;
    border-top: 1px solid #eee;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.history-toggle-btn:hover {
    background: #e9edf2;
}

.sidebar-card:has(.history-list-container:empty) .history-toggle-btn {
    display: none;
}

.history-toggle-btn .fa-chevron-down {
    transition: transform 0.3s ease;
}

.history-toggle-btn.is-open .fa-chevron-down {
    transform: rotate(180deg);
}

.history-list-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    background: #fbfbfb;
}

.history-list-container.is-open {
    max-height: 1400px;
    overflow-y: auto;
    padding: 4px 0 12px;
}

.history-list-container .official-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #fff;
    padding: 10px 12px;
    border-radius: 8px;
    margin: 10px 12px 0;
    border: 1px solid #eee;
}

.history-list-container .official-info {
    min-width: 0;
}

.history-list-container .official-info h4 {
    font-size: 0.95rem;
    line-height: 1.35;
    margin-bottom: 2px;
    color: var(--tni-blue);
}

.history-list-container .official-info span {
    font-size: 0.82rem;
    color: var(--muted);
}

@media (max-width: 992px) {
    .split-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .officials-sidebar {
        position: static;
        max-width: 520px;
        width: 100%;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .office-feature-img {
        margin-bottom: 22px;
        border-radius: 10px;
    }

    .text-content p,
    .text-content li {
        font-size: 0.95rem;
    }

    .current-photo-frame {
        width: 160px;
    }

    .sidebar-card .sidebar-header h3 {
        font-size: 1.1rem;
    }
}
