:root {
    --babypowder: rgba(253, 255, 252, 1);
    --raisinblack: rgba(33, 26, 29, 1);
    --primary: rgba(0, 74, 173, 1);
    --secondary: rgba(93, 187, 230, 1);
    --purple: rgba(81, 51, 151, 1);
    --pink: rgba(138, 59, 151, 1);
}

.maincontent {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    flex-direction: column;
}

#title-services {
    margin-bottom: 1rem;
}

.services-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.serviceitem {
    overflow: hidden;
    border: 4px solid var(--secondary);
    border-radius: 2rem;
    padding: 1rem;
    background-color: var(--babypowder);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.serviceitem:hover {
    background-color: rgba(93, 187, 230, 0.1);
    transform: translateY(-5px);
}

.service-title {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--primary);
    cursor: pointer;
    padding: 0 1rem;
    transition: color 0.3s ease;
    font-size: 1.2rem;
    font-weight: bold;
}

.service-title:hover {
    color: var(--secondary);
}

.service-title::after {
    content: "▲";
    font-size: 1.5rem;
    color: var(--primary);
    transition: transform 0.3s ease, color 0.3s ease;
}

.service-title.open::after {
    transform: rotate(180deg);
    color: var(--secondary);
}

.details-container {
    display: none;
    opacity: 0;
    max-height: 0;
    transition: opacity 0.3s ease, max-height 0.3s ease;
}

.details-container.show {
    display: flex;
    flex-direction: column;
    opacity: 1;
    max-height: 2000px; 
}

.content-container {
    margin: 1rem 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.text-container {
    flex: 2;
    text-align: left;
    min-width: 300px;
    max-width: 600px;
}

.service-description {
    color: var(--raisinblack);
    line-height: 1.8;
}

.features-list {
    margin-top: 1rem;
    padding-left: 1.5rem;
}

.features-list li {
    list-style: disc;
    margin-bottom: 0.5rem;
    color: var(--raisinblack);
}

.image-container {
    flex: 1;
    display: flex;
    justify-content: flex-end; 
    max-width: 400px;
}

.image-container img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 2rem;
    object-fit: cover;
    object-position: center;
}

.benefits-container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.benefit-box {
    flex: 1 1 calc(30% - 1rem);
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--secondary);
    color: var(--babypowder);
    padding: 1rem;
    border-radius: 2rem;
    text-align: center;
    box-shadow: 0px 5px 12px -5px rgba(33, 26, 29, 0.6);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefit-box:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0px 8px 20px -5px rgba(33, 26, 29, 0.8);
}

.benefit-number {
    width: 3rem;
    height: 3rem;
    background-color: var(--primary);
    color: var(--babypowder);
    font-size: 1.5rem;
    font-weight: bold;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    margin-bottom: 0.5rem;
}

.benefit-box p {
    font-size: 1rem;
    margin: 0;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .content-container {
        flex-direction: column;
        align-items: center;
    }

    .text-container {
        max-width: 100%;
        text-align: center;
    }

    .image-container {
        max-width: 100%;
        max-height: 250px;
        margin-top: 1rem;
    }

    .image-container img {
        max-width: 100%; /* La imagen ocupa todo el ancho disponible */
        height: auto;
    }

    .benefits-container {
        flex-direction: column;
        gap: 1rem;
    }

    .benefit-box {
        flex: 1 1 100%;
    }
}