/* Estilos generales */
details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    position: relative;
}

details summary::before {
    content: "+";
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    transition: transform 0.5s, opacity 0.5s, left 0.5s;
}

details[open] summary::before {
    content: "-";
    transform: translateX(-50%) rotate(180deg);
    opacity: 1;
}

details summary::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 1px;
    width: 50%;
    border-bottom: 1px solid #727272;
    z-index: -1;
    transition: width 0.5s ease-out;
}

details[open] summary::after {
    width: 100%;
}

details summary::-webkit-details-marker {
    display: none;
}

/* Estilos para dispositivos móviles */
@media (max-width: 768px) {
    details summary::before {
        left: 100%;
        transform: translateX(-100%);
    }

    details[open] summary::before {
        transform: translateX(-100%) rotate(180deg);
    }

    details summary::after {
        width: 50%;
    }

    details[open] summary::after {
        width: 100%;
    }
}

/* Estilos para tabletas y escritorio */
@media (min-width: 769px) {
    details summary::before {
        left: 50%;
        transform: translateX(-50%);
    }

    details[open] summary::before {
        left: 100%;
        transform: translateX(-100%) rotate(180deg);
    }

    details summary::after {
        width: 50%;
    }

    details[open] summary::after {
        width: 100%;
    }
}