/* Стили для страницы контактов - адаптивный дизайн */

/* Общие стили для контейнера */
.contacts-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.contacts-container h1 {
    font-size: 36px;
    margin-bottom: 30px;
    color: #2c3e50;
    text-align: center;
}

/* Сетка для карточек */
.contacts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
}

/* Карточки */
.contact-card {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    word-wrap: break-word;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.contact-card h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
}

/* Стили для email */
.contact-card p {
    color: #7f8c8d;
    margin-bottom: 10px;
}

.contact-card .email-link {
    color: #3498db;
    text-decoration: none;
    font-size: 18px;
    word-break: break-all;
    transition: color 0.3s ease;
    display: inline-block;
}

.contact-card .email-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Социальные сети - ИСПРАВЛЕНО */
.contact-social-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    
}

.contact-social-link {
    color: #7f8c8d;
    text-decoration: none;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    transition: color 0.3s ease, transform 0.2s ease;
    width: fit-content;
    padding: 5px 0;
}

.contact-social-link:hover {
    transform: translateX(5px);
    color: #2c3e50;
}

.contact-social-link i {
    width: 30px;
    font-size: 24px;
    flex-shrink: 0;
    text-align: center;
}

.contact-social-link .social-text {
    flex-shrink: 0;
}

.contact-social-link.telegram i { color: #0088cc; }
.contact-social-link.vk i { color: #4a76a8; }
.contact-social-link.github i { color: #333; }

.contact-social-link:hover {
    color: #2c3e50;
}

/* Форма обратной связи */
.feedback-form-container {
    background: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
}

.feedback-form-container h2 {
    color: #2c3e50;
    margin-bottom: 20px;
    font-size: 24px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    padding: 12px 28px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: background 0.3s ease, transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.submit-btn:hover {
    background: #2980b9;
    transform: translateY(-2px);
}

.submit-btn:active {
    transform: translateY(0);
}

/* Сообщения об успехе/ошибке */
.alert-message {
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    animation: slideDown 0.3s ease;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== АДАПТИВНЫЕ СТИЛИ ========== */

/* Планшеты (768px - 1024px) */
@media (max-width: 768px) {
    .contacts-container {
        margin: 20px auto;
        padding: 0 15px;
    }

    .contacts-container h1 {
        font-size: 28px;
        margin-bottom: 20px;
    }

    .contacts-grid {
        gap: 20px;
        margin-bottom: 30px;
    }

    .contact-card {
        padding: 20px;
    }

    .contact-card h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .contact-card .email-link {
        font-size: 16px;
    }

    .feedback-form-container {
        padding: 20px;
    }
    
    .social-link {
        font-size: 15px;
    }
    
    .social-link i {
        width: 28px;
        font-size: 22px;
    }
}

/* Мобильные устройства (до 767px) */
@media (max-width: 767px) {
    .contacts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .contacts-container h1 {
        font-size: 24px;
    }

    .contact-card {
        padding: 20px;
    }

    .contact-card h2 {
        font-size: 20px;
        margin-bottom: 15px;
    }

    .social-links {
        gap: 12px;
    }
    
    .social-link {
        font-size: 15px;
        gap: 10px;
    }

    .social-link i {
        width: 25px;
        font-size: 20px;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px;
        font-size: 14px;
    }

    .submit-btn {
        width: 100%;
        padding: 12px;
        justify-content: center;
    }
}

/* Маленькие мобильные устройства (до 480px) */
@media (max-width: 480px) {
    .contacts-container {
        margin: 10px auto;
        padding: 0 10px;
    }

    .contacts-container h1 {
        font-size: 22px;
        margin-bottom: 15px;
    }

    .contact-card {
        padding: 15px;
    }

    .contact-card h2 {
        font-size: 18px;
        margin-bottom: 12px;
    }

    .contact-card .email-link {
        font-size: 14px;
    }

    .contact-card p {
        font-size: 13px;
    }

    .feedback-form-container {
        padding: 15px;
    }

    .form-group {
        margin-bottom: 12px;
    }

    .form-group label {
        font-size: 14px;
    }

    .submit-btn {
        font-size: 14px;
        padding: 10px;
    }

    .alert-message {
        padding: 12px;
        font-size: 14px;
    }
    
    .social-link {
        font-size: 14px;
        gap: 8px;
    }
    
    .social-link i {
        width: 22px;
        font-size: 18px;
    }
}

/* Для очень больших экранов (опционально) */
@media (min-width: 1400px) {
    .contacts-container {
        max-width: 1000px;
    }
}

/* Стили для загрузки при отправке */
.submit-btn.loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.submit-btn.loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    right: 15px;
    margin-top: -9px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}