/* ================================================================
   PPID DISDIKBUD PROVINSI KALIMANTAN TIMUR
   MODERN STRUKTUR ORGANISASI STYLESHEET
   ================================================================ */

/* ================================================================
   1. VIEW MODE SWITCHER (TABS)
   ================================================================ */
.org-mode-switcher {
    display: inline-flex;
    background: #f1f5f9;
    padding: 5px;
    border-radius: 9999px;
    border: 1px solid #e2e8f0;
    margin-bottom: 30px;
    gap: 4px;
}

.org-tab-btn {
    border: none;
    background: transparent;
    padding: 9px 20px;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 700;
    color: #64748b;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.org-tab-btn:hover {
    color: #0284c7;
}

.org-tab-btn.active {
    background: #ffffff;
    color: #0284c7;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
}

/* Tab Content Transitions */
.tab-pane-content {
    display: none;
}

.tab-pane-content.active {
    display: block;
    animation: fadeInTab 0.35s ease;
}

@keyframes fadeInTab {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================================================================
   2. EXECUTIVE ORG TREE (HIERARCHY TREE)
   ================================================================ */
.org-tree-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin-top: 10px;
}

/* Hierarchy Connector Lines */
.org-connector-line {
    width: 3px;
    height: 38px;
    background: linear-gradient(180deg, #0284c7 0%, #38bdf8 100%);
    position: relative;
    margin: 0 auto;
}

.org-connector-line::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    width: 9px;
    height: 9px;
    background: #0284c7;
    border-radius: 50%;
    box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.25);
}

/* Level 1: Penanggung Jawab Card (VIP Executive) */
.org-exec-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border: 2px solid #0284c7;
    border-radius: 20px;
    padding: 26px 32px;
    max-width: 580px;
    width: 100%;
    box-shadow: 0 12px 30px -8px rgba(2, 132, 199, 0.18);
    position: relative;
    transition: all 0.35s ease;
    text-align: center;
}

.org-exec-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 18px 38px -8px rgba(2, 132, 199, 0.28);
}

.org-badge-vip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 16px;
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    border-radius: 9999px;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.35);
    margin-bottom: 12px;
}

.org-exec-card .exec-avatar-icon {
    width: 58px;
    height: 58px;
    background: #e0f2fe;
    color: #0284c7;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin: 0 auto 14px auto;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.15);
}

.org-exec-card h3 {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 8px;
}

.org-exec-card .exec-scope {
    font-size: 0.88rem;
    color: #64748b;
    margin: 0;
    line-height: 1.5;
}

/* Level 2: Ketua Card */
.org-manager-card {
    background: #ffffff;
    border: 1.5px solid #38bdf8;
    border-radius: 18px;
    padding: 22px 28px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 8px 24px -6px rgba(15, 23, 42, 0.08);
    position: relative;
    transition: all 0.3s ease;
    text-align: center;
}

.org-manager-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px -6px rgba(15, 23, 42, 0.14);
    border-color: #0284c7;
}

.org-badge-ketua {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    background: #e0f2fe;
    color: #0284c7;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    border-radius: 9999px;
    margin-bottom: 10px;
}

.org-manager-card h4 {
    font-size: 1.18rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 6px;
}

/* Level 3: Sekretaris Card */
.org-coord-card {
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 18px;
    padding: 20px 26px;
    max-width: 480px;
    width: 100%;
    box-shadow: 0 6px 20px -6px rgba(15, 23, 42, 0.06);
    position: relative;
    transition: all 0.3s ease;
    text-align: center;
}

.org-coord-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px -6px rgba(15, 23, 42, 0.12);
    border-color: #0284c7;
}

.org-badge-sekretaris {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 14px;
    background: #f1f5f9;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    border-radius: 9999px;
    margin-bottom: 10px;
}

.org-coord-card h4 {
    font-size: 1.12rem;
    font-weight: 800;
    color: #1e293b;
    line-height: 1.35;
    margin-bottom: 6px;
}

/* ================================================================
   3. LEVEL 4: PRODUSEN DATA GRID
   ================================================================ */
.produsen-section-box {
    width: 100%;
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 24px;
    padding: 32px 28px;
    margin-top: 10px;
    position: relative;
}

.produsen-section-header {
    text-align: center;
    margin-bottom: 24px;
}

.produsen-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    background: #ecfdf5;
    color: #059669;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    border-radius: 9999px;
    border: 1px solid #a7f3d0;
    margin-bottom: 8px;
}

.produsen-section-header p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

/* Personnel Grid */
.produsen-cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.personnel-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 4px rgba(15, 23, 42, 0.03);
    transition: all 0.25s ease;
}

.personnel-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    border-color: #38bdf8;
}

/* Person Avatar Initials */
.person-avatar {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1rem;
    color: #ffffff;
    flex-shrink: 0;
}

.avatar-blue { background: linear-gradient(135deg, #0284c7, #0369a1); }
.avatar-indigo { background: linear-gradient(135deg, #6366f1, #4f46e5); }
.avatar-emerald { background: linear-gradient(135deg, #10b981, #059669); }
.avatar-amber { background: linear-gradient(135deg, #f59e0b, #d97706); }
.avatar-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); }
.avatar-rose { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.avatar-cyan { background: linear-gradient(135deg, #06b6d4, #0891b2); }
.avatar-orange { background: linear-gradient(135deg, #f97316, #ea580c); }

.person-info {
    flex-grow: 1;
    overflow: hidden;
}

.person-name {
    font-size: 0.94rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 4px;
}

.person-division {
    display: inline-block;
    font-size: 0.76rem;
    font-weight: 600;
    padding: 2px 8px;
    background: #f1f5f9;
    color: #475569;
    border-radius: 6px;
    line-height: 1.4;
}

/* ================================================================
   4. DIAGRAM GRAFIS RESMI (IMAGE VIEW MODE)
   ================================================================ */
.official-diagram-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.05);
    text-align: center;
}

.diagram-image-container {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
    overflow: hidden;
}

.diagram-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease;
}

.diagram-image-container:hover img {
    transform: scale(1.02);
}

.diagram-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-diagram-action {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 9999px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.25s ease;
}

.btn-diagram-action.primary {
    background: #0284c7;
    color: #ffffff !important;
}

.btn-diagram-action.primary:hover {
    background: #0369a1;
    transform: translateY(-2px);
}

.btn-diagram-action.secondary {
    background: #f1f5f9;
    color: #475569 !important;
    border: 1px solid #cbd5e1;
}

.btn-diagram-action.secondary:hover {
    background: #e2e8f0;
    color: #0f172a !important;
    transform: translateY(-2px);
}

/* ================================================================
   5. RESPONSIVE MEDIA QUERIES
   ================================================================ */
@media (max-width: 767px) {
    .produsen-cards-grid {
        grid-template-columns: 1fr;
    }
    .org-exec-card {
        padding: 20px 16px;
    }
    .org-manager-card, .org-coord-card {
        padding: 18px 14px;
    }
    .produsen-section-box {
        padding: 22px 14px;
    }
}