/* TruPeople Departments & Designations — page-specific (20% unique) */

/* Overview: org-chart visual instead of product screenshot */
.tp-dept-overview-visual-frame {
    position: relative;
    min-height: 340px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.tp-dept-org-chart {
    width: 100%;
    max-width: 300px;
    height: auto;
}

.tp-dept-org-node {
    transform-origin: center;
    transition: transform 0.35s ease;
}

.tp-dept-overview-block.is-visible .tp-dept-org-node--root {
    animation: tp-dept-node-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.1s;
}

.tp-dept-overview-block.is-visible .tp-dept-org-node--mid-left {
    animation: tp-dept-node-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.25s;
}

.tp-dept-overview-block.is-visible .tp-dept-org-node--mid-right {
    animation: tp-dept-node-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.35s;
}

.tp-dept-overview-block.is-visible .tp-dept-org-node--leaf-left,
.tp-dept-overview-block.is-visible .tp-dept-org-node--leaf-right {
    animation: tp-dept-node-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.5s;
}

.tp-dept-overview-block.is-visible .tp-dept-org-line {
    animation: tp-dept-line-grow 0.5s ease both;
    animation-delay: 0.15s;
    transform-origin: top center;
}

@keyframes tp-dept-node-pop {
    0% {
        opacity: 0;
        transform: scale(0.6) translateY(12px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes tp-dept-line-grow {
    0% {
        opacity: 0;
        stroke-dashoffset: 40;
    }
    100% {
        opacity: 1;
        stroke-dashoffset: 0;
    }
}

/* Problem section: split panel with illustrative cards + timeline list */
.tp-dept-problems {
    display: grid;
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
    gap: 2.5rem;
    align-items: stretch;
}

.tp-dept-problems-visual {
    position: relative;
    border-radius: 28px;
    overflow: hidden;
    background: linear-gradient(145deg, #062f35 0%, #083e45 42%, #0b5560 100%);
    min-height: 420px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.75rem;
    box-shadow: 0 28px 60px rgba(8, 62, 69, 0.22);
}

.tp-dept-problems-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 22%, rgba(168, 240, 223, 0.14) 0%, transparent 42%),
        radial-gradient(circle at 82% 78%, rgba(255, 120, 120, 0.08) 0%, transparent 38%);
    pointer-events: none;
}

.tp-dept-problems-visual-grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    width: 100%;
}

.tp-dept-problems-illust {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    padding: 1.1rem 0.85rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
}

.tp-dept-problems-illust-art {
    width: 100%;
    max-width: 135px;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tp-dept-problems-illust-art--teams{
    max-width: 170px;
}

.tp-dept-problems-illust-art svg {
    width: 100%;
    height: 100%;
    display: block;
}

.tp-dept-problems-illust-label {
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.4;
}

.tp-dept-problems-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0.5rem 0;
}

.tp-dept-problems-title {
    color: #083e45;
    font-size: clamp(1.65rem, 2.4vw, 2.15rem);
    font-weight: 700;
    line-height: 1.25;
    margin: 0.85rem 0 1.75rem;
    max-width: 28rem;
}

.tp-dept-problems-list {
    list-style: none;
    margin: 0;
    padding: 0 0 0 0.25rem;
    position: relative;
}

.tp-dept-problems-list::before {
    content: '';
    position: absolute;
    left: 23px;
    top: 28px;
    bottom: 28px;
    width: 2px;
    background: linear-gradient(180deg, rgba(8, 62, 69, 0.08) 0%, rgba(8, 62, 69, 0.22) 50%, rgba(168, 240, 223, 0.55) 100%);
    border-radius: 2px;
}

.tp-dept-problems-item {
    display: flex;
    align-items: flex-start;
    gap: 1.15rem;
    padding: 0.85rem 1rem 0.85rem 0;
    border-radius: 16px;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.tp-dept-problems-icon {
    width: 48px;
    height: 48px;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(8, 62, 69, 0.12);
    color: var(--tp-base-color);
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
    position: relative;
    z-index: 1;
}

.tp-dept-problems-icon .tp-outline-svg {
    width: 1.45rem;
    height: 1.45rem;
}

.tp-dept-problems-text {
    color: #243b40;
    font-weight: 600;
    font-size: 1.02rem;
    line-height: 1.55;
    padding-top: 0.65rem;
}

.tp-dept-problems-footnote {
    margin: 1.5rem 0 0;
    padding: 1rem 1.15rem;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(168, 240, 223, 0.22) 0%, rgba(168, 240, 223, 0.08) 100%);
    border: 1px solid rgba(8, 62, 69, 0.1);
    color: #3d5a5f;
    font-weight: 600;
    line-height: 1.55;
    font-size: 0.98rem;
}

/* Workflow: vertical hierarchy tree art */
.tp-dept-hierarchy-art {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 340px;
}

.tp-dept-hierarchy-svg {
    width: 100%;
    max-width: 280px;
    height: auto;
}

.tp-dept-hierarchy-level {
    transform-origin: center;
}

.tp-dept-hierarchy-art.is-visible .tp-dept-hierarchy-level--1 {
    animation: tp-dept-node-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.05s;
}

.tp-dept-hierarchy-art.is-visible .tp-dept-hierarchy-level--2 {
    animation: tp-dept-node-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.2s;
}

.tp-dept-hierarchy-art.is-visible .tp-dept-hierarchy-level--3 {
    animation: tp-dept-node-pop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    animation-delay: 0.35s;
}

.tp-dept-hierarchy-art.is-visible .tp-dept-hierarchy-line {
    animation: tp-dept-line-grow 0.45s ease both;
    animation-delay: 0.12s;
}

@media (max-width: 991px) {
    .tp-dept-problems {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .tp-dept-problems-visual {
        min-height: 320px;
        order: 2;
    }

    .tp-dept-problems-content {
        order: 1;
    }

    .tp-dept-problems-visual-grid {
        grid-template-columns: 1fr;
    }

    .tp-dept-overview-visual-frame {
        min-height: 280px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tp-dept-overview-block.is-visible .tp-dept-org-node,
    .tp-dept-overview-block.is-visible .tp-dept-org-line,
    .tp-dept-hierarchy-art.is-visible .tp-dept-hierarchy-level,
    .tp-dept-hierarchy-art.is-visible .tp-dept-hierarchy-line {
        animation: none;
    }

    .tp-dept-problems-item:hover {
        transform: none;
    }
}
