/* Organizational Structure - Premium Corporate Redesign */
/* ========================================================= */

.organizational-structure-section {
    width: 100%;
    padding: 3rem 2rem;
    position: relative;
    background: linear-gradient(
        135deg,
        #0a1a35 0%,
        #1a2d55 20%,
        #1f3f7a 40%,
        #2554a8 60%,
        #2568c8 80%,
        #3070d8 100%
    );
    overflow: hidden;
}

/* Premium overlay and texture with improved lighting effects */
.organizational-structure-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        /* Subtle lighting gradient from top */
        linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.02) 30%, rgba(0,0,0,0.05) 100%),
        /* Enhanced diagonal lines pattern */
        repeating-linear-gradient(
            45deg,
            transparent,
            transparent 100px,
            rgba(255,255,255,0.018) 100px,
            rgba(255,255,255,0.018) 102px
        ),
        /* Micro diagonal pattern from opposite direction */
        repeating-linear-gradient(
            -45deg,
            transparent,
            transparent 90px,
            rgba(255,255,255,0.012) 90px,
            rgba(255,255,255,0.012) 91px
        ),
        /* Enhanced radial highlights for premium lighting */
        radial-gradient(circle at 20% 15%, rgba(255,255,255,0.035) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255,255,255,0.025) 0%, transparent 45%),
        radial-gradient(circle at 50% 50%, rgba(255,255,255,0.008) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

.organizational-structure-container {
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Title - Enhanced Presence */
.org-section-title {
    font-size: clamp(2.2rem, 6vw, 3.2rem);
    font-weight: 800;
    color: #FFFFFF;
    margin-bottom: 1rem;
    text-align: center;
    letter-spacing: -0.8px;
    text-shadow: 0 3px 12px rgba(0,0,0,0.2);
    animation: orgTitleFadeSlideUp 0.8s ease-out 0.1s both;
}

/* Subtitle - Enhanced Visibility */
.org-section-subtitle {
    font-size: 1.15rem;
    color: rgba(255,255,255,0.9);
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto 2rem;
    text-align: center;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    animation: orgSubtitleFadeSlideUp 0.8s ease-out 0.2s both;
}

/* ========== HIERARCHY DIAGRAM ========== */

.hierarchy-diagram-new {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow-x: auto;
    padding: 0;
    margin-bottom: 0;
    position: relative;
    z-index: 2;
}

.org-chart-svg {
    width: 100%;
    height: auto;
    max-width: 2200px;
    min-height: auto;
}

/* ========== SVG STYLES FOR SUPERIOR APPEARANCE ========== */

.org-chart-svg .org-line {
    stroke: rgba(255, 255, 255, 0.8);
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    animation: drawLine 1.2s ease-out forwards;
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
}

.org-chart-svg .job-box {
    fill: #1a3a6b;
    stroke: rgba(255, 255, 255, 0.4);
    stroke-width: 2;
    rx: 12;
    ry: 12;
    filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.3));
    animation: cardFadeSlideUp 0.7s ease-out forwards;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.org-chart-svg .job-box:hover {
    transform: translateY(-6px);
    filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.35));
    stroke: rgba(255, 255, 255, 0.5);
}

.org-chart-svg .job-text {
    fill: #FFFFFF;
    font-size: 14px;
    text-anchor: middle;
    dominant-baseline: middle;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.org-chart-svg .dept-pill {
    fill: #2563b8;
    stroke: rgba(255, 255, 255, 0.35);
    stroke-width: 2;
    filter: drop-shadow(0 8px 22px rgba(0, 0, 0, 0.25));
    animation: deptFadeSlideUp 0.8s ease-out forwards;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.org-chart-svg .dept-pill:hover {
    transform: translateY(-4px);
    filter: drop-shadow(0 8px 24px rgba(0, 0, 0, 0.25));
    stroke: rgba(255, 255, 255, 0.35);
}

.org-chart-svg .dept-text {
    fill: white;
    font-size: 16px;
    font-weight: 700;
    text-anchor: middle;
    dominant-baseline: middle;
    letter-spacing: 0.2px;
}

.org-chart-svg .dept-text-secondary {
    fill: rgba(255, 255, 255, 0.75);
    font-size: 12px;
    font-weight: 500;
    text-anchor: middle;
    dominant-baseline: middle;
}

/* ========== STAGGERED ANIMATIONS ========== */

/* President box - appears 1st */
.org-chart-svg rect[x="975"] {
    animation-delay: 0.3s;
}

/* SVP boxes */
.org-chart-svg rect[x="900"][y="157"] {
    animation-delay: 0.5s;
}

/* Department pills - appear after lines */
.org-chart-svg circle,
.org-chart-svg ellipse {
    animation-delay: 0.9s;
}

/* First dept pill */
.org-chart-svg rect[x="165"][y="390"] {
    animation-delay: 0.9s;
}

.org-chart-svg rect[x="465"][y="390"] {
    animation-delay: 1.0s;
}

.org-chart-svg rect[x="765"][y="390"] {
    animation-delay: 1.1s;
}

.org-chart-svg rect[x="1065"][y="390"] {
    animation-delay: 1.2s;
}

.org-chart-svg rect[x="1365"][y="390"] {
    animation-delay: 1.3s;
}

.org-chart-svg rect[x="1665"][y="390"] {
    animation-delay: 1.4s;
}

/* Job boxes appear last */
.org-chart-svg rect[y="517"],
.org-chart-svg rect[y="622"],
.org-chart-svg rect[y="727"],
.org-chart-svg rect[y="832"],
.org-chart-svg rect[y="937"],
.org-chart-svg rect[y="1042"] {
    animation-delay: 1.5s;
}

/* ========== ANIMATION KEYFRAMES ========== */

@keyframes orgTitleFadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes orgSubtitleFadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes cardFadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes deptFadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes drawLine {
    from {
        stroke-dashoffset: 1000;
        opacity: 0;
    }
    to {
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

/* ========== RESPONSIVE DESIGN ========== */

@media (max-width: 1199px) {
    .organizational-structure-section {
        padding: 2.5rem 2rem;
    }

    .org-section-title {
        font-size: 2rem;
        margin-bottom: 0.6rem;
    }

    .org-section-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .org-chart-svg {
        min-height: auto;
    }
}

@media (max-width: 768px) {
    .organizational-structure-section {
        padding: 2rem 1.5rem;
    }

    .org-section-title {
        font-size: 1.6rem;
        margin-bottom: 0.5rem;
    }

    .org-section-subtitle {
        font-size: 0.95rem;
        margin-bottom: 1.2rem;
    }

    .hierarchy-diagram-new {
        padding: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .org-chart-svg {
        min-height: auto;
        min-width: 1500px;
    }
}

@media (max-width: 576px) {
    .organizational-structure-section {
        padding: 2rem 1rem;
    }

    .org-section-title {
        font-size: 1.35rem;
        margin-bottom: 0.4rem;
    }

    .org-section-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1rem;
    }

    .hierarchy-diagram-new {
        padding: 0;
    }

    .org-chart-svg {
        min-height: auto;
        min-width: 1350px;
    }

    .org-chart-svg .job-text {
        font-size: 12px;
    }

    .org-chart-svg .dept-text {
        font-size: 13px;
    }
}
