/*
 * Organization Chart Image Display
 * Clean Professional Design
 */

.org-chart-section {
    padding: 80px 0 120px;
    background: #ffffff;
}

.org-chart-header {
    margin-bottom: 60px;
}

.org-chart-header h2 {
    font-size: 42px;
    font-weight: 700;
    color: #0071ac;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.org-chart-header p {
    font-size: 18px;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.org-chart-container {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e9ecef;
}

.chart-image-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
}

.org-chart-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Responsive Design */
@media (max-width: 992px) {
    .org-chart-section {
        padding: 60px 0 100px;
    }

    .org-chart-header h2 {
        font-size: 36px;
    }

    .org-chart-header p {
        font-size: 16px;
    }

    .org-chart-container {
        padding: 25px;
    }
}

@media (max-width: 768px) {
    .org-chart-header {
        margin-bottom: 40px;
    }

    .org-chart-header h2 {
        font-size: 28px;
    }

    .org-chart-header p {
        font-size: 15px;
    }

    .org-chart-container {
        padding: 20px;
    }

    .chart-image-wrapper {
        border-radius: 6px;
    }
}

@media (max-width: 576px) {
    .org-chart-section {
        padding: 40px 0 80px;
    }

    .org-chart-header h2 {
        font-size: 24px;
    }

    .org-chart-container {
        padding: 15px;
    }
}

/* Print Styles */
@media print {
    .breadcrumb-section {
        display: none;
    }

    .org-chart-section {
        background: white;
        padding: 20px 0;
    }

    .org-chart-container {
        box-shadow: none;
        border: 1px solid #000;
        page-break-inside: avoid;
    }

    .org-chart-image {
        max-height: 100%;
        page-break-inside: avoid;
    }
}




/* Chart Container */
.chart-wrapper {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 2rem;
}

#orgchart {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: auto;
    box-shadow: var(--shadow);
    min-height: 800px;
}

#chart-svg {
    display: block;
    margin: 0 auto;
}

/* Node Styles - Clean Cards */
.node {
    cursor: pointer;
}

.node rect {
    transition: all 0.2s ease;
}

.node:hover rect {
    box-shadow: var(--shadow-hover);
}

.node text {
    font-family: 'Inter', sans-serif;
    pointer-events: none;
}

.node-title {
    font-weight: 600;
    font-size: 13px;
}

.node-subtitle {
    font-weight: 400;
    font-size: 11px;
}

.node-icon {
    font-size: 16px;
}

.node-badge {
    font-weight: 600;
    font-size: 9px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Links - Clean curved design */
.link {
    fill: none;
    stroke: #cbd5e1;
    stroke-width: 2;
    opacity: 0.6;
}

.link-highlight {
    stroke: var(--navy);
    stroke-width: 3;
    opacity: 0.8;
}

/* Stats Bar */
.stats-bar {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow);
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 2rem;
    font-weight: 600;
    color: var(--navy);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-light);
    font-weight: 400;
}

/* Legend */
.legend {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
    box-shadow: var(--shadow);
}

.legend h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.legend-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

.legend-label {
    font-size: 0.875rem;
    color: var(--text-dark);
    font-weight: 500;
}

/* Tooltip */
.tooltip {
    position: absolute;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    z-index: 1000;
    max-width: 300px;
}

.tooltip.show {
    opacity: 1;
}

.tooltip-title {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.tooltip-item {
    font-size: 0.85rem;
    color: var(--text-light);
    margin: 0.25rem 0;
}

.tooltip-item strong {
    color: var(--text-dark);
}

.tooltip-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--light-gray);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--navy);
    margin-top: 0.25rem;
    border: 1px solid var(--border);
}

/* Zoom Controls */
.zoom-controls {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    z-index: 50;
}

.zoom-btn {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--text-dark);
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.2s ease;
}

.zoom-btn:hover {
    background: var(--light-gray);
    box-shadow: var(--shadow-hover);
}

/* Loading */
.loading {
    position: fixed;
    inset: 0;
    background: var(--light-gray);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.3s ease;
}

.loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--border);
    border-top-color: var(--navy);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .header {
        padding: 1rem;
    }

    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-text h1 {
        font-size: 1.25rem;
    }

    .controls {
        width: 100%;
        justify-content: stretch;
    }

    .btn {
        flex: 1;
    }

    .chart-wrapper {
        padding: 0 1rem;
        margin: 1rem auto;
    }

    .zoom-controls {
        bottom: 1rem;
        right: 1rem;
    }

    .stats-bar {
        padding: 1rem;
    }

    .legend {
        padding: 1rem;
    }
}

/* Print Styles */
@media print {
    .header,
    .controls,
    .zoom-controls,
    .stats-bar {
        display: none;
    }

    #orgchart {
        border: none;
        box-shadow: none;
    }
}