/* Contact Section Complete Fix */

/* Основные исправления для всех размеров */
#contact {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 60px 0 80px 0;
}

#contact .max-w-7xl {
    max-width: 1200px;
}

/* Переопределяем grid для лучшей адаптивности */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
    margin-bottom: 0;
}

/* Левая колонка - форма */
.contact-form-container {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(71, 85, 105, 0.1);
    height: fit-content;
}

.contact-form-container h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.2;
}

.contact-form-container p {
    color: #64748b;
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.4;
}

/* Правая колонка - контакты */
.contact-info {
    background: white;
    padding: 32px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(71, 85, 105, 0.1);
    height: fit-content;
}

.contact-info h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 24px;
    line-height: 1.2;
}

/* Стили формы */
.form-group {
    margin-bottom: 16px;
}

.form-group:last-of-type {
    margin-bottom: 20px;
}

/* Специальные отступы для сетки полей */
.grid.md\\:grid-cols-2.gap-4 {
    gap: 16px;
    margin-bottom: 16px;
}

/* Убираем дополнительные отступы после сетки */
.grid.md\\:grid-cols-2.gap-4 + .form-group {
    margin-top: 0;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
    font-size: 14px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 400;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* Кнопка отправки */
.cta-button.contact-cta {
    width: 100%;
    background: #dc2626;
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    display: block;
    text-decoration: none;
    box-sizing: border-box;
    font-family: inherit;
    line-height: 1.2;
    text-align: center;
}

.cta-button.contact-cta:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
}

/* Контактные элементы */
.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f1f5f9;
}

.contact-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.contact-item svg {
    width: 115px;
    height: 20px;
    color: #264ddc;
    flex-shrink: 0;
    margin-top: 2px;
}

.contact-item div {
    flex: 1;
}

.contact-item p.font-semibold {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 4px;
    font-size: 15px;
}

.contact-item p:not(.font-semibold) {
    color: #475569;
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.contact-item a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.contact-item a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Telegram блок */
.mt-8.p-6.bg-gradient-to-r {
    margin-top: 32px;
    padding: 24px;
    border-radius: 12px;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.mt-8.p-6.bg-gradient-to-r h4 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.mt-8.p-6.bg-gradient-to-r p {
    font-size: 13px;
    line-height: 1.5;
    margin-bottom: 16px;
    opacity: 0.95;
}

.mt-8.p-6.bg-gradient-to-r a {
    display: inline-block;
    background: white;
    color: #059669;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s ease;
}

.mt-8.p-6.bg-gradient-to-r a:hover {
    background: #f9fafb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Чекбокс */
.form-group label.flex {
    display: flex !important;
    align-items: flex-start !important;
    gap: 12px;
    font-weight: 400;
    color: #6b7280;
}

.form-group input[type="checkbox"] {
    width: auto !important;
    margin: 0 !important;
    flex-shrink: 0;
    margin-top: 2px !important;
}

/* Планшеты */
@media (max-width: 1023px) {
    .contact-grid {
        gap: 32px;
    }
    
    .contact-form-container,
    .contact-info {
        padding: 28px;
    }
    
    .contact-form-container h3,
    .contact-info h3 {
        font-size: 22px;
    }
}

/* Мобильные устройства */
@media (max-width: 767px) {
    #contact {
        padding: 40px 0 60px 0;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .contact-form-container,
    .contact-info {
        padding: 24px;
        border-radius: 12px;
    }
    
    .contact-form-container h3,
    .contact-info h3 {
        font-size: 20px;
        margin-bottom: 16px;
    }
    
    .form-group {
        margin-bottom: 14px;
    }
    
    .grid.md\\:grid-cols-2.gap-4 {
        gap: 14px;
        margin-bottom: 14px;
    }
    
    .form-group input,
    .form-group select {
        padding: 12px 14px;
        font-size: 16px; /* Предотвращает zoom на iOS */
    }
    
    .cta-button.contact-cta {
        padding: 14px 20px;
        font-size: 15px;
    }
    
    .contact-item {
        margin-bottom: 16px;
        padding-bottom: 16px;
    }
    
    .mt-8.p-6.bg-gradient-to-r {
        margin-top: 24px;
        padding: 20px;
    }
}

/* Очень маленькие экраны */
@media (max-width: 360px) {
    .contact-form-container,
    .contact-info {
        padding: 20px;
    }
    
    .form-group input,
    .form-group select {
        padding: 10px 12px;
    }
    
    .cta-button.contact-cta {
        padding: 12px 16px;
        font-size: 14px;
    }
}