body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
}

header {
    background-color: #4770ff;
    color: white;
    padding: 20px;
    text-align: center;
}

#categories {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 20px;
}

.category {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    margin: 10px;
    padding: 20px;
    width: calc(25% - 40px); /* Четыре карточки на строку с учетом отступов */
    box-sizing: border-box;
    text-align: center;
}

.category img {
    max-width: 100%;
    height: auto;
    margin-bottom: 10px;
}

.description p {
    margin: 5px 0;
}

h2 {
    color: #4770ff;
}

form {
    display: flex;
    flex-direction: column;
}

.form2 {
    display: flex;
    flex-direction: column;
}

label {
    margin-bottom: 5px;
}

input, textarea {
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
}

button {
    padding: 10px;
    background-color: #4770ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.button-a {
    padding: 10px 70px;
    background-color: #4770ff;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
}

button:hover {
    background-color: #e5533d;
}

#not-found {
    display: flex;
    justify-content: center;
    padding: 20px;
    margin: 20px;
}

.not-found-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    max-width: 500px;
    width: 100%;
    box-sizing: border-box;
}

/* Адаптивные стили */
@media (max-width: 1200px) {
    .category {
        width: calc(33.33% - 40px); /* Три карточки на строку */
    }
}

@media (max-width: 900px) {
    .category {
        width: calc(50% - 40px); /* Две карточки на строку */
    }
}

@media (max-width: 600px) {
    #categories {
        flex-direction: column;
        align-items: center;
    }
    .category {
        width: calc(100% - 40px); /* Одна карточка на строку */
    }
}

#reviews {
    padding: 20px;
}

#reviews h2 {
    text-align: center;
}

.reviews-container {
    display: flex;
    justify-content: space-between;
}

.review {
    background-color: #f9f9f9;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
    text-align: center;
    width: 30%; /* Ширина отзыва */
    box-sizing: border-box;
}

.review img {
    border-radius: 50%;
    margin-bottom: 10px;
    width: 100px;
    height: 100px;
}

.review h3 {
    margin: 10px 0;
}

.review p {
    margin: 5px 0;
}

.review img.client-photo {
    border-radius: 50%;
}

.review img.review-photo {
    border-radius: 10%;
    width: 100%; /* Устанавливаем ширину изображения равной ширине карточки */
    height: 350px; /* Фиксированная высота для одинакового размера */
    object-fit: cover; /* Обеспечиваем обрезку изображения, сохраняя его центр */
}

.review-text {
    margin-top: 10px;
    width: 100%; /* Устанавливаем ширину текста равной ширине карточки */
    text-align: center; /* Выравниваем текст по центру */
    overflow: hidden; /* Обрезаем текст, если он выходит за пределы карточки */
    white-space: normal; /* Позволяем переносу текста на следующую строку */
    text-overflow: clip; /* Убираем многоточие в конце текста */
}

/* Адаптивные стили для отзывов */
@media (max-width: 1200px) {
    .reviews-container {
        flex-wrap: wrap;
        justify-content: space-around;
    }

    .review {
        width: calc(50% - 20px); /* Две отзыва на строку */
    }
}

@media (max-width: 600px) {
    .review {
        width: calc(100% - 20px); /* Один отзыв на строку */
    }
}


/* Стили для подменю */
.submenu {
    margin: 20px 0;
    padding: 10px 0;
    background-color: #f4f4f4;
    text-align: left;
    padding-left: 20px;
    font-size: 18px;
}

.submenu a {
    color: #333;
    text-decoration: none;
    margin-right: 10px;
}

.submenu a:hover {
    text-decoration: underline;
}