

.contacts-container {
    display: flex;
    gap: 20px;
    background-color: #fff;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    flex-wrap: wrap; /* Разрешаем перенос блоков на новую строку */
}

.contact-card {
    text-align: center;
    padding: 10px;
    border-radius: 10px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    flex: 1 1 300px; /* Гибкие размеры блоков */
    margin: 10px; /* Отступы между блоками */
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.phone-link {
    font-size: 1.2em;
    color: #2c3e50;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center; /* Центрируем текст и иконки */
}

.phone-link:hover {
    color: #3498db;
    text-decoration: none;
}

p {
    color: #7f8c8d;
    margin-top: 10px;
    font-size: 1em;
}

/* Иконки */
.icon {
    width: 24px;
    height: 24px;
    vertical-align: middle;
    margin-right: 10px;
    fill: #2c3e50;
    transition: fill 0.3s ease;
}

.whatsapp-icon {
    fill: #25d366;
}

.phone-link:hover .icon {
    fill: #3498db;
}

.phone-link:hover .whatsapp-icon {
    fill: #128c7e;
}

/* Модальное окно */
.modal_phone {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal_phone.active {
    display: flex;
    animation: fadeInScale 0.3s ease-out;
}

.modal_phone-content {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    position: relative;
    transform: scale(0.8);
    opacity: 0;
    transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    max-width: 90%; /* Ограничиваем ширину на мобильных устройствах */
}

.modal_phone.active .modal_phone-content {
    transform: scale(1);
    opacity: 1;
}

.close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 1.5em;
    cursor: pointer;
    color: #7f8c8d;
}

.close:hover {
    color: #2c3e50;
}

.modal-option {
    display: block;
    margin: 15px 0;
    padding: 10px 20px;
    background-color: #3498db;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.modal-option:hover {
    background-color: #2980b9;
    text-decoration: none;
}

/* Анимация появления модального окна */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(0.8);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

/* Адаптация для мобильных устройств и маленьких экранов */
@media (max-width: 768px) {
    body {
        padding: 20px; /* Добавляем отступы по краям */
        height: auto; /* Убираем фиксированную высоту */
    }

    .contacts-container {
        flex-direction: column; /* Блоки друг под другом */
        gap: 10px;
        padding: 15px;
    }

    .contact-card {
        flex: 1 1 auto; /* Блоки занимают всю ширину */
        margin: 5px 0; /* Уменьшаем отступы */
    }

    .phone-link {
        font-size: 1.2em; /* Уменьшаем размер шрифта */
    }

    p {
        font-size: 0.9em; /* Уменьшаем размер текста */
    }

    .modal_phone-content {
        padding: 15px; /* Уменьшаем отступы внутри модального окна */
    }

    .modal-option {
        padding: 8px 16px; /* Уменьшаем отступы кнопок */
    }
}

/* Адаптация для очень маленьких экранов (например, iPhone SE) */
@media (max-width: 480px) {
    .phone-link {
        font-size: 1em; /* Еще меньше размер шрифта */
        flex-direction: column; /* Иконки и текст друг под другом */
        align-items: center;
    }

    .icon {
        margin-right: 0; /* Убираем отступ справа у иконок */
        margin-bottom: 5px; /* Добавляем отступ снизу */
    }

    .modal_phone-content {
        padding: 10px; /* Еще меньше отступы */
    }

    .modal-option {
        font-size: 0.9em; /* Уменьшаем размер текста кнопок */
    }
}