.contacts {
    margin-bottom: 50px;
}

/* Сетка по умолчанию (3 колонки) */
.contacts-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 20px;
}

/* Модификатор для 2 колонок (из настроек SHOW_2_COLS) */
.contacts-row--2-cols {
    grid-template-columns: repeat(2, 1fr);
}

/* Карточка контакта */
.contact-item {
    background-color: #EEE2D6;
    border-radius: 10px;
    padding: 24px;
    display: flex;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.02);
    
    /* Начальное состояние для плавной подгрузки */
    opacity: 0;
    transform: translateY(30px);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.6s ease, 
                box-shadow 0.3s ease;
    will-change: transform, opacity;
}

/* Класс, добавляемый через JS при скролле */
.contact-item.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Современные десктопные эффекты наведения */
@media (hover: hover) {
    .contact-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 12px 24px rgba(35, 28, 26, 0.12);
    }
    
    .contact-phone:hover {
        background-color: #d63d22;
        transform: scale(1.03);
    }
    
    .contact-email:hover {
        background-color: #b07e53;
        transform: scale(1.03);
    }
}

.contact-img {
    flex-shrink: 0;
}

.contact-img img {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
}

.contact-info {
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-fio {
    font-size: 22px;
    color: #231C1A;
    line-height: 26px;
    font-weight: 700;
}

.contact-text {
    font-size: 13px;
    color: #555555;
    line-height: 16px;
    margin-top: 6px;
    margin-bottom: 12px;
}

/* Кнопки контактов (сделаны флексами для выравнивания иконок) */
.contact-phone, 
.contact-email {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 500;
    color: #ffffff;
    text-decoration: none;
    border-radius: 30px;
    width: fit-content;
    transition: background-color 0.25s ease, transform 0.25s ease;
}

.contact-phone {
    background-color: #ED5338;
}

.contact-email {
    background-color: #C59368;
}

.contact-phone img, 
.contact-email img {
    width: 14px;
    height: 14px;
    object-fit: contain;
}


/* --- АДАПТИВНОСТЬ / МОБИЛЬНАЯ ВЕРСТКА --- */

/* Планшетная версия */
@media (max-width: 1024px) {
    .contacts-row,
    .contacts-row--2-cols {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .contact-img img {
        width: 120px;
        height: 120px;
    }
    .contact-fio {
        font-size: 19px;
        line-height: 23px;
    }
}

/* Малые планшеты (до 768px) */
@media (max-width: 768px) {
    .contacts-row,
    .contacts-row--2-cols {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .contact-item {
        padding: 20px;
    }
}

/* Мобильные телефоны (до 480px) */
@media (max-width: 480px) {
    .contact-item {
        flex-direction: column; /* Картинка и текст выстраиваются друг под другом */
        align-items: center;
        text-align: center;
        padding: 20px 15px;
    }
    
    .contact-img {
        margin-bottom: 15px;
    }
    
    .contact-img img {
        width: 130px;
        height: 130px;
    }
    
    .contact-info {
        padding-left: 0;
    }
    
    .contact-phone, 
    .contact-email {
        margin: 8px auto 0 auto; /* Центрирование кнопок */
    }
}