/* =========================================
   БЛОК: КОНТАКТЫ И ФОРМА
   ========================================= */

.contacts-section {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
}

.contacts-blobs {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
  -webkit-mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 30%, transparent 100%);
    mask-image: radial-gradient(ellipse 60% 50% at 50% 50%, black 30%, transparent 100%);
}

.contacts-blob-cyan {
    position: absolute;
    width: 600px; height: 600px;
    background: var(--primary);
    filter: blur(120px);
    opacity: 0.15;
    bottom: -10%; right: -10%;
}

/* --- КОНТЕЙНЕР 1400px --- */
.contacts-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px; /* Защита от прилипания к краям экрана */
}

/* --- ЖЕЛЕЗОБЕТОННЫЙ FLEX --- */
.contacts-layout {
    display: flex;
    flex-direction: row;
    gap: 80px;
    align-items: center; /* Центрируем форму и текст по вертикали */
    justify-content: space-between;
}

/* --- Инфо блок (Слева) --- */
.contacts-info {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    flex: 0 1 500px; /* Ограничиваем ширину левой колонки, чтобы она не растягивалась */
}

.contact-link {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-color); /* Был белый */
    text-decoration: none;
    margin-bottom: 10px;
    transition: color 0.3s;
}

.contact-link:hover { color: var(--primary); }

.contact-address {
    color: #666666; /* Был светлый #a0aab2 */
    font-size: 1.1rem;
    margin-bottom: 30px;
}

/* --- Иконки соцсетей --- */
.contacts-social {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.social-btn {
    width: 45px; height: 45px;
    border-radius: 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex; align-items: center; justify-content: center;
    color: var(--text-color); /* Был белый */
    transition: all 0.3s ease;
}

.social-btn svg { width: 22px; height: 22px; display: block; }

.social-btn:hover { transform: translateY(-3px); color: #fff; /* Возвращаем белый цвет иконки при наведении на цветной фон */ }
.social-btn.wa:hover { background: #25D366; border-color: #25D366; box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3); }
.social-btn.tg:hover { background: #0088CC; border-color: #0088CC; box-shadow: 0 5px 15px rgba(0, 136, 204, 0.3); }

/* --- Форма (Справа) --- */
.contacts-form-box {
    display: flex;
    flex: 1 1 auto; /* Занимает всё оставшееся место */
    width: 100%;
}

.contact-form {
    width: 100%;
    padding: 50px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1; /* Поля в ряду делят место поровну */
}

.form-group label {
    font-size: 0.9rem;
    color: #666666; /* Был светлый #a0aab2 */
    padding-left: 5px;
}

.form-input {
    background: rgba(0, 0, 0, 0.02); /* Был белый полупрозрачный, сделали легкое затемнение */
    border: 1px solid var(--glass-border);
    padding: 16px 20px;
    border-radius: 16px;
    color: var(--text-color); /* Был белый */
    font-family: inherit;
    transition: 0.3s;
    width: 100%;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(10, 197, 209, 0.05); /* При фокусе легкая синяя заливка - отлично смотрится на светлом */
}

.form-input.invalid { border-color: #ff4d4d; }
.error-msg { font-size: 0.8rem; color: #ff4d4d; display: none; padding-left: 5px; }
.form-input.invalid + .error-msg { display: block; }

/* Чекбокс */
.form-agreement { margin-top: 5px; margin-bottom: 5px; }

.custom-checkbox {
    display: flex;
    gap: 12px;
    cursor: pointer;
    font-size: 0.85rem;
    color: #666666; /* Был светлый #8c98a4 */
    line-height: 1.4;
}

.custom-checkbox input { display: none; }

.checkmark {
    min-width: 20px; height: 20px;
    border: 1px solid var(--glass-border);
    border-radius: 4px;
    position: relative;
    transition: 0.3s;
    margin-top: 2px;
}

.custom-checkbox input:checked + .checkmark {
    background: var(--primary);
    border-color: var(--primary);
}

.custom-checkbox input:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    color: #fff; /* Галочка остается белой на синем фоне */
}

.agreement-text a { color: var(--primary); text-decoration: none; }

/* Кнопка: убираем вращение */
.btn-premium.no-spin:hover .icon-circle svg {
    transform: translateX(3px) !important; 
}


/* --- Адаптив --- */
@media (max-width: 992px) {
    /* Меняем направление: контакты сверху, форма снизу */
    .contacts-layout { 
        flex-direction: column; 
        gap: 50px; 
        align-items: stretch;
    }
    
    .contacts-info { 
        flex: auto; 
        max-width: 100%; 
    }
}

@media (max-width: 768px) {
    .contacts-section { padding: 80px 0; }
    .contact-form { padding: 30px 20px; }
    .form-row { flex-direction: column; gap: 20px; } /* Инпуты встают друг под друга */
}