.contacts {
    width: 100%;
    padding: clamp(16px, 2vh, 24px);
    padding-top: 120px;
    box-sizing: border-box;
    margin: 0 auto;
    max-width: 1440px;
}

.contacts-box {
    margin: 0 auto;
    background-color: #f9f9f7;
    border-radius: clamp(16px, 2vh, 24px);
    width: 100%;
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.contacts-content {
    padding: clamp(24px, 3vh, 32px);
    max-width: 1200px;
    margin: 0 auto;
}

.contacts-content h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 2rem;
    font-weight: 700;
    color: #252525;
    position: relative;
    display: inline-block;
}

.contacts-content h1::after {
    content: '';
    position: absolute;
    width: 40%;
    height: 3px;
    bottom: -8px;
    left: 0;
    background-color: #4ae0a0;
}

.contacts-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

/* Карточки с контактной информацией */
.contacts-info {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contacts-card {
    display: flex;
    gap: 1.5rem;
    background-color: #fff;
    padding: 1.5rem;
    border-radius: clamp(10px, 1.2vh, 16px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.contacts-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.contacts-card-icon {
    flex: 0 0 50px;
    height: 50px;
    background-color: rgba(74, 224, 160, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    color: #252525;
}

.contacts-card-icon i {
    font-size: 1.5rem;
}

.contacts-card-text {
    flex: 1;
}

.contacts-card-text h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #252525;
}

.contacts-card-text p {
    font-size: 1rem;
    color: #555;
    line-height: 1.5;
}

.contacts-card-text a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contacts-card-text a:hover {
    color: #4ae0a0;
}

/* Блок с социальными сетями */
.contacts-social {
    margin-top: 1rem;
}

.contacts-social h3 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    color: #252525;
}

.contacts-social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: #fff;
    font-size: 1.5rem;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.social-link:nth-child(1) {
    background-color: #5181b8; /* VK */
}

.social-link:nth-child(2) {
    background-color: #0088cc; /* Telegram */
}

.social-link:nth-child(3) {
    background-color: #ee8208; /* OK */
}

.social-link:nth-child(4) {
    background-color: #ff0000; /* YouTube */
}

.social-link:hover {
    background-color: #4ae0a0;
}

/* Форма обратной связи */
.contacts-form {
    background-color: #fff;
    padding: 1.5rem;
    border-radius: clamp(10px, 1.2vh, 16px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
}

.contacts-form h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: #252525;
    position: relative;
    display: inline-block;
}

.contacts-form h2::after {
    content: '';
    position: absolute;
    width: 40%;
    height: 3px;
    bottom: -8px;
    left: 0;
    background-color: #4ae0a0;
}

.form-group {
    margin-bottom: 1.5rem;
    width: 100%;
    box-sizing: border-box;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #252525;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    max-width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4ae0a0;
    box-shadow: 0 0 0 3px rgba(74, 224, 160, 0.2);
}

/* Добавляем стиль для полей с ошибкой */
.input-error-message {
    display: none;
    font-size: 0.8rem;
    color: #ff4d4d;
    margin-top: 0.3rem;
}

/* Показываем сообщение об ошибке */
.form-group input.is-invalid + .input-error-message,
.form-group textarea.is-invalid + .input-error-message {
    display: block;
}

.form-privacy {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 0.5rem;
}

.form-privacy input {
    width: auto;
    margin-top: 0.3rem;
}

.form-privacy label {
    margin-bottom: 0;
    font-size: 0.9rem;
    font-weight: normal;
    flex: 1;
    min-width: 0;
}

.form-privacy .input-error-message {
    flex-basis: 100%;
    margin-left: 1.5rem;
}

.contacts-submit-button {
    background-color: #252525;
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s ease;
    width: 100%;
}

.contacts-submit-button:hover {
    background-color: #4ae0a0;
}

/* Блок с картой */
.contacts-map-block {
    margin-top: 3rem;
}

.contacts-map-block h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    color: #252525;
    position: relative;
    display: inline-block;
}

.contacts-map-block h2::after {
    content: '';
    position: absolute;
    width: 40%;
    height: 3px;
    bottom: -8px;
    left: 0;
    background-color: #4ae0a0;
}

.contacts-map {
    width: 100%;
    height: 500px;
    border-radius: clamp(10px, 1.2vh, 16px);
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Стили для валидации формы */
.form-group input.is-invalid,
.form-group textarea.is-invalid {
    border-color: #ff4d4d;
    box-shadow: 0 0 0 3px rgba(255, 77, 77, 0.2);
}

.form-group input.is-invalid:focus,
.form-group textarea.is-invalid:focus {
    border-color: #ff4d4d;
}

/* Стили для сообщения об успешной отправке */
.success-message {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #fff;
    border-radius: 10px;
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 5px 30px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transition: bottom 0.3s ease, opacity 0.3s ease;
    max-width: 90%;
    width: 500px;
}

.success-message.show {
    bottom: 30px;
    opacity: 1;
}

.success-icon {
    flex: 0 0 50px;
    height: 50px;
    background-color: rgba(74, 224, 160, 0.2);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: #4ae0a0;
}

.success-text {
    flex: 1;
}

.success-text h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #252525;
}

.success-text p {
    font-size: 0.9rem;
    color: #555;
    margin: 0;
}

.close-message {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: #f0f0f0;
    border: none;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 1.2rem;
    color: #666;
    transition: background-color 0.3s ease;
}

.close-message:hover {
    background-color: #ddd;
}

/* Адаптивность */
@media screen and (max-width: 960px) {
    .contacts-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contacts-content h1 {
        font-size: 2rem;
    }
    
    .contacts-form h2,
    .contacts-map-block h2 {
        font-size: 1.5rem;
    }
    
    .contacts-map {
        height: 400px;
    }
    
    .form-group {
        margin-bottom: 1.2rem;
    }
}

@media screen and (max-width: 640px) {
    .contacts-content {
        padding: 16px;
    }
    
    .contacts-content h1 {
        font-size: 1.7rem;
    }
    
    .contacts-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1rem;
        padding: 1.2rem;
    }
    
    .contacts-card-icon {
        margin-bottom: 0.5rem;
    }
    
    .contacts-social-links {
        justify-content: center;
    }
    
    .contacts-map {
        height: 300px;
    }
    
    .form-privacy {
        align-items: flex-start;
    }
    
    .success-message {
        width: calc(100% - 40px);
        padding: 1rem;
    }
    
    .success-icon {
        flex: 0 0 40px;
        height: 40px;
        font-size: 1.5rem;
    }
    
    .success-text h3 {
        font-size: 1.1rem;
    }
    
    .success-text p {
        font-size: 0.8rem;
    }
    
    .contacts-form {
        padding: 1rem;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 0.7rem 0.8rem;
        font-size: 0.95rem;
    }
    
    .contacts-wrapper {
        gap: 1.5rem;
    }
}

/* Иконки в футере тоже делаем квадратными */
.footer__social a {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-size: 1.3rem;
    transition: background-color 0.3s;
    margin-right: 10px;
} 