.page-services {
    background: var(--gradient-background-light);
}

.section-services {
    display: flex;
    flex-direction: column;
    gap: 80px;
    padding-block: 80px;

    h2 {
        text-align: center;
    }
}

.services-list {
    display: flex;
    flex-direction: column;
    gap: 48px;
}


.services-item {
    padding: 24px;
    border-radius: var(--border-radius-15);
    border: 1px solid var(--background-color-light-gray);
    background: var(--background-color-white);

    summary {
        display: flex;
        flex-direction: column;
        gap: 20px;
        cursor: pointer;
        list-style: none;
    }

    /* Убираем стандартный маркер details */
    summary::-webkit-details-marker {
        display: none;
    }

    /* Анимация для плавного раскрытия */
    .services-item__content {
        margin-top: var(--spacing-sm);
        overflow: hidden;
        transition: all 0.3s ease-out;
        max-height: 0;
        opacity: 0;
    }

    /* Состояние когда аккордеон открыт */
    &[open] .services-item__content {
        max-height: 1000px;
        opacity: 1;
    }
}

.services-item__top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.service-item__title {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);

    h3 {
        font-size: var(--font-size-h3);
        font-weight: 600;
    }

    h4 {
        font-weight: 400;
        font-size: var(--font-size-sm);
        color: var(--color-text-black);
    }
}

.service-item__price {
    display: flex;
    align-items: center;
    border: 1px solid var(--color-button-primary-blue-light);
    padding: 4px 6px;
    border-radius: var(--border-radius-15);
    background: var(--background-color-light-blue);
    width: fit-content;

    p {
        color: var(--color-button-primary-blue-light);
        font-size: var(--font-size-xs);
        font-weight: 400;

    }
}

.service-item__main {
    padding-bottom: var(--spacing-sm);
    border-bottom: 1px solid var(--border-color-gray);
}

.service-item__tags {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 19px 18px 28px 18px;
    border-radius: var(--border-radius-15);
    background: var(--background-color-light-gray-2);

    h5 {
        font-size: var(--font-size-h5);
        font-weight: 600;
    }

}

.service-item__tags-list {
    display: flex;
    gap: 16px;

    p {
        padding: 3px 6px;
        border-radius: var(--border-radius-15);
        font-size: var(--font-size-xs);
        color: var(--color-text-gray);
        font-weight: 400;
        border: 1px solid var(--color-text-gray);
    }
}

.service-item__tags-button {
    padding: 3px 6px;
    border-radius: var(--border-radius-15);
    border: 1px solid var(--color-button-primary-blue);
    background: var(--background-color-light-blue);
    width: fit-content;

    span {
        font-weight: 600;
        color: var(--color-button-primary-blue);
        font-size: var(--font-size-xs);
    }
}

.service-item__button-learn-more,
.services-item__collapse-button {
    display: flex;
    gap: 8px;
    align-items: center;
    align-self: center;
    background: none;
    border: none;
    color: var(--color-text-deep-blue);
    cursor: pointer;

    padding: 12px 16px;
    font-weight: 600;
    transition: opacity 0.2s ease;

    svg {
        fill: var(--color-text-deep-blue);
        font-size: var(--font-size-sm);
        transition: transform 0.3s ease;
    }

    &:hover svg {
        transform: translateY(2px);
    }
}

/* Поворот стрелки в кнопке "Learn more" при открытии */
.services-item[open] .service-item__button-learn-more svg {
    transform: rotate(180deg);
}

/* Поворот стрелки в кнопке "Collapse" */
.services-item__collapse-button svg {
    transform: rotate(180deg);
}

/* Скрываем кнопку "Learn more" когда аккордеон открыт */
.services-item[open] .service-item__button-learn-more {
    display: none;
}

/* Показываем кнопку "Collapse" только когда аккордеон открыт */
.services-item__collapse-button {
    display: none;
}

.services-item[open] .services-item__collapse-button {
    display: flex;
}

.services-item__content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-lg);

    h3 {
        font-size: var(--font-size-h4);
        font-weight: 500;
    }
}


.services-content__donor-button {
    display: flex;
    align-items: flex-start;
    gap: var(--spacing-sm);
    padding: 13px 14px 10px 14px;
    background: var(--background-color-light-gray-2);
    margin-top: var(--spacing-sm);
    border-radius: var(--border-radius-15);

    img {
        height: 100%;
    }

}

.services-content__donor-info {
    display: flex;
    flex-direction: column;
    gap: 5px;


    h4 {
        font-size: var(--font-size-xs);
        font-weight: 400;
        color: var(--color-text-gray);
    }

    p {
        font-size: var(--font-size-sm);
        font-weight: 400;
        color: var(--color-text-black);
    }
}


.services-content__projects {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-sm);

}

.services-content__projects-list {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.services-content__projects-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px;
    background: var(--background-color-light-blue);
    border: 1px solid var(--color-button-primary-blue);
    border-radius: var(--border-radius-15);

    h4 {
        font-size: var(--font-size-xs);
        font-weight: 400;
        color: var(--color-button-primary-blue);

    }

    p {
        color: var(--color-text-gray);
        font-size: 15px;
        font-weight: 400;
    }
}