.fases-acordeon {
    display: flex;
    gap: 18px;
    height: 585px;
    margin-top: 40px;
}

.fase-item {
    position: relative;
    flex: 1 1 0;
    overflow: hidden;
    border-radius: 100px;
    cursor: pointer;
    transition: flex-grow .6s cubic-bezier(.4, 0, .2, 1), border-radius .6s cubic-bezier(.4, 0, .2, 1);
}
.fase-item.active {
    flex-grow: 3;
    border-radius: 24px;
    cursor: default;
}

.fase-1 { background: #ece6ff; }
.fase-2 { background: #e6f4ff; }
.fase-3 { background: #f9e6fd; }
.fase-4 { background: #ffe8e6; }

/* Círculo con número */
.fase-num {
    position: absolute;
    top: 36px;
    left: calc(50% - 36px);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #fff;
    color: #3f83d0;
    font-size: 22px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
    transition: top .6s cubic-bezier(.4, 0, .2, 1), left .6s cubic-bezier(.4, 0, .2, 1), color .3s;
}
.fase-item.active .fase-num {
    top: 163px;
    left: 22px;
    color: #1a6fc4;
}

/* Texto vertical (cerrado) */
.fase-label {
    position: absolute;
    bottom: 40px;
    left: 50%;
    writing-mode: vertical-rl;
    transform: translateX(-50%) rotate(180deg);
    color: #1a6fc4;
    font-size: 20px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 1;
    transition: opacity .3s .25s;
}
.fase-item.active .fase-label {
    opacity: 0;
    transition-delay: 0s;
}

/* Contenido (abierto) */
.fase-content {
    position: absolute;
    top: 163px;
    left: 22px;
    right: 22px;
    padding-top: 92px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s;
}
.fase-item.active .fase-content {
    opacity: 1;
    pointer-events: auto;
    transition: opacity .4s .3s;
}
.fase-content h3 {
    color: #1a6fc4;
    font-size: 28px;
    margin-bottom: 18px;
}
.fase-content p {
    color: #4a4a8a;
    font-size: 14px;
    line-height: 27px;
    margin: 0;
    text-align: left;
}

/* Móvil: apilado vertical */
@media (max-width: 991px) {
    .fases-acordeon {
        flex-direction: column;
        height: auto;
    }
    .fase-item {
        flex: none;
        height: 84px;
        border-radius: 42px;
        transition: height .6s cubic-bezier(.4, 0, .2, 1), border-radius .6s;
    }
    .fase-item.active {
        height: 430px;
        border-radius: 24px;
    }
    .fase-num,
    .fase-item.active .fase-num {
        top: 6px;
        left: 6px;
    }
    .fase-item.active .fase-num { top: 20px; left: 20px; }
    .fase-label {
        writing-mode: horizontal-tb;
        transform: translateY(-50%);
        top: 42px;
        bottom: auto;
        left: 100px;
        right: 16px;
        white-space: normal;
        line-height: 1.15;
    }
    .fase-content,
    .fase-item.active .fase-content {
        top: 20px;
        left: 20px;
        right: 20px;
        padding-top: 90px;
    }
}

/* Introducción sobre las fases */
.fases-intro {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
    color: #4a4a8a;
    font-size: 20px;
    line-height: 1.5;
    text-wrap: balance;
}
@media (min-width: 992px) {
    .fases-intro { white-space: nowrap; max-width: none; }
}
@media (min-width: 992px) and (max-width: 1199px) {
    .fases-intro { font-size: 18px; }
}
@media (max-width: 767px) {
    .fases-intro { font-size: 17px; max-width: 30em; }
}
