/* ========================================
   Organization Chart - Prima Finance
   d3-org-chart powered
   Prefix: org-
   ======================================== */

/* ===== TOGGLE ===== */
.org-toggle-section {
    padding: 40px 0 10px;
    text-align: center;
}

.org-toggle-wrapper {
    display: inline-flex;
    gap: 4px;
    background: #f0f2f8;
    padding: 5px;
    border-radius: 12px;
}

.org-toggle-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    background: transparent;
    color: #6B7280;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.org-toggle-btn i { font-size: 16px; }
.org-toggle-btn:hover { color: var(--app-them, #072890); }

.org-toggle-btn.active {
    background: var(--app-them, #072890);
    color: #fff;
    box-shadow: 0 4px 15px rgba(7, 40, 144, 0.3);
}

/* ===== CHART SECTION ===== */
.org-chart-section {
    padding: 10px 0 30px;
}

/* ===== CHART CONTAINER ===== */
.org-chart-container {
    width: 100%;
    height: 700px;
    background: #fafbfe;
    border-radius: 16px;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    position: relative;
}

/* d3-org-chart SVG overrides */
.org-chart-container svg {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Node hover effect — applied via foreignObject children */
.org-chart-container [data-id] {
    transition: filter 0.3s ease;
}

.org-chart-container [data-id]:hover {
    filter: brightness(1.02);
}

/* ===== SCROLL REVEAL ===== */
.pf-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.65s ease, transform 0.65s ease;
}

.pf-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
    .org-chart-container {
        height: 500px;
        border-radius: 10px;
    }

    .org-toggle-btn {
        padding: 10px 18px;
        font-size: 13px;
    }

    .org-toggle-wrapper {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .org-chart-container {
        height: 420px;
    }
}
