.split-layout {
    display: flex;
    gap: 40px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.text-content {
    flex: 1;
    min-width: 0;
    padding-right: 20px;
}

.office-feature-img {
    background-image: var(--office-bg);
    box-sizing: border-box;
    width: 100%;
    aspect-ratio: 16 / 9;
    min-height: 280px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.1);
    background-color: #eee;
    background-size: cover;
    background-position: center;
    position: relative;
}

.office-slide-item {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.office-slide-item.active {
    opacity: 1;
    z-index: 2;
}

.structure-frame {
    background: #fff;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.05);
    margin-bottom: 50px; 
}

.structure-img {
    width: 100%;
    height: auto;
    display: block;
}

.current-photo-frame {
    width: 180px;
    aspect-ratio: 3 / 4;
    max-height: 240px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

#current-kadis-area {
    max-height: 340px;
    overflow: hidden;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

#current-kadis-area h4 {
    margin-top: 10px;
    font-size: 1.05rem;
    color: var(--tni-blue);
    font-weight: 700;
}

.officials-sidebar {
    width: 100%;
    max-width: 420px;
    flex-shrink: 0;
    min-width: 0;
}

.sidebar-card {
    background: #fff;
    height: fit-content;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border-top: 5px solid var(--tni-gold);
    overflow: hidden;
    width: 100%;
}

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

.sidebar-header h3 {
    color: var(--tni-blue);
    margin-bottom: 5px;
    text-align: center;
}

.officials-list {
    padding: 20px;
    max-height: 800px;
    overflow-y: auto;
    background-color: #fbfbfb;
}

.officials-list::-webkit-scrollbar {
    width: 6px;
}

.officials-list::-webkit-scrollbar-thumb {
    background-color: #ccc;
    border-radius: 4px;
}

.official-thumb {
    width: 80px;
    height: 100px;
    object-fit: cover;
    object-position: top;
    border-radius: 6px;
    border: 1px solid #ddd;
    background-color: #eee;
    flex-shrink: 0;
    opacity: 1 !important; 
    visibility: visible !important;
}

.badge-active {
    display: inline-block;
    background: linear-gradient(45deg, #28a745, #20c997);
    color: white;
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 50px;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(40, 167, 69, 0.3);
}

.current-official-container {
    padding: 20px;
    background: #fff;
    border-bottom: 1px solid #eee;
}

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

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

.history-list-container {
    height: 0;
    overflow: hidden;
    transition: height 0.4s ease;
    text-align: left;
}

.history-list-container.open {
    height: auto;
}

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

.history-list-container .official-item img {
    width: 60px;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    border-radius: 4px;
    background: #ddd;
}

.history-list-container .official-item h4 {
    font-size: 0.95rem;
    margin: 0;
    color: var(--tni-blue);
}

.history-list-container .official-item span {
    font-size: 0.8rem;
    color: #666;
}

.text-content p, .text-content li {
    font-family: 'Roboto', sans-serif;
    font-size: 1rem;
    line-height: 1.8;
    color: #444;
    text-align: justify;
    margin-top: 0;
}

.history-list-container {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}

.history-list-container.is-open {
    max-height: 1000px;
}

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

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

@media (max-width: 768px) {
    .split-layout {
        flex-direction: column;
    }

    .officials-sidebar {
        width: 100%;
        max-width: 100%;
        justify-self: stretch;
    }

    .office-feature-img {
        min-height: 220px;
        margin-bottom: 20px;
        max-width: 100vw;
        margin-left: auto;
        margin-right: auto;
    }

    #current-kadi-area {
        padding: 15px;
    }

    .current-photo-frame {
        width: 150px;
        max-height: 200px;
    }

    .sidebar-header {
        padding: 20px;
    }

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

    .official-thumb {
        width: 65px;
        height: 85px;
    }

    .history-toggle-btn {
        font-size: 0.9rem;
        padding: 12px 15px;
    }

    .text-content {
        padding-right: 0;
        width: 100%;
        min-width: 0;
    }

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