.topic-panel-block__container {
    padding: 100px 380px;
}

.topic-panel-block__container h2 {
    font-size: 36px;
    line-height: 40px;
    font-weight: bold;
    color: black;
    margin-bottom: 60px;
}

.topic-panel-block__menu {
    display: flex;
    gap: 100px;
}

.topic-panel-block__menu-item ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 30px;
    width: 211px;
}

.topic-panel-block__menu-item ul li {
    font-size: 20px;
    line-height: 24px;
    font-weight: 400;
    font-style: normal;
    color: black;
}

.topic-panel-block__item-content p {
    font-size: 18px;
    line-height: 24px;
    font-weight: 400;
    font-style: normal;
    color: black;
}

.topic-panel-block__item-title {
    font-size: 30px;
    line-height: 40px;
    font-weight: 400;
    font-style: normal;
    color: #6802C1;
    margin-bottom: 40px;
}

.topic-panel-block__content {
    display: flex;
    flex-direction: column;
}

/* Ocultar todos los items por defecto */
.topic-panel-block__item {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transform: translateY(20px);
    transition:
        max-height 0.4s ease,
        opacity 0.4s ease,
        transform 0.4s ease;
    margin: 0;
}

/* Mostrar sólo el activo */
.topic-panel-block__item.active {
    max-height: 1000px;
    /* suficiente para tu contenido más alto */
    opacity: 1;
    transform: translateY(0);
    margin-bottom: 40px;
    /* aquí va el “gap” entre bloques */
}

.topic-panel-block__item:not(.active) p {
    margin: 0;
    padding: 0;
}

.topic-panel-block__item img {
    margin-bottom: 40px;
}

/* Cursor y estilo para las opciones de menú */
.topic-panel-block__menu-item li {
    cursor: pointer;
}

.topic-panel-block__menu-item li.active {
    color: #6802C1;
}

@media (min-width: 1200px) and (max-width: 1670px) {
    .topic-panel-block__container {
        padding: 100px 99px;
    }

    .content-cards__flexible-title {
        font-size: 17px;
    }

    .content-cards__flexible-text ul, .content-cards__flexible-text p {
        font-size: 17px;
    }
}

@media (max-width: 768px) {
    .topic-panel-block__container {
        padding: 40px 20px;
    }

    .topic-panel-block__menu {
        flex-direction: column;
        gap: 20px;
    }

    .topic-panel-block__menu-item ul {
        width: 100%;
        flex-direction: row;
        gap: 5px;
        justify-content: center;
    }

    .topic-panel-block__menu-item ul li {
        font-size: 15px;
        line-height: 18px;
        text-align: center;
    }

    .topic-panel-block__item.active {
        margin-bottom: 0;
    }

    .topic-panel-block__item img {
        width: 60px;
        height: 60px;
        margin-bottom: 20px;
    }

    .topic-panel-block__item-title {
        font-size: 18px;
        line-height: 46px;
        margin-bottom: 20px;
    }

    .topic-panel-block__item-content p {
        font-size: 16px;
        line-height: 26px;
    }

    .content-cards__content h2 {
        font-size: 20px;
        line-height: 24px;
    }
}
