/* @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap'); */
@font-face {
    font-family: 'Bebas Neue';
    src: url('./fonts/BebasNeue-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
/* ===== Сброс и базовые стили ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    /* font-family: 'Roboto', Arial, sans-serif; */
    font-family: 'Bebas Neue', sans-serif;
    min-height: 100vh;
    min-height: 100svh;                    /* для мобильных */
    background-color: #1a1a2e;

    /* Фон на весь экран */
    background-image: url('fon-form.png?v=4');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
section {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0 20px;
    border-bottom: 2px solid #1a1a2e;
}

section p {
    color: #164477;
    font-weight: 500;
}
section h1 {
    color: #164477;
    letter-spacing: -1px;
}
section h3 {
    color: #164477;
    font-weight: 600;
    }

main {
    /* background-image: url('fon-form.png');  ← убрать */
    /* background-position: center;             ← убрать */
    /* background-repeat: no-repeat;            ← убрать */
    background-color: transparent;             /* ← или убрать вообще */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0 auto;
    min-height: 100svh;                        /* на всю высоту экрана */
}

/* ===== Контейнер формы ===== */
.form-container {
    width: 100%;
    max-width: 480px;
    max-height: calc(100svh - 40px);          /* не выше экрана */
    overflow-y: auto;                          /* внутренний скролл */
    overscroll-behavior: contain;              /* не «пробрасывает» скролл на страницу */
    -webkit-overflow-scrolling: touch;         /* плавный скролл на iOS */

    background: rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 40px 35px;
    box-shadow: 0 10px 40px rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(1px);
    margin: 30px 0;
    scrollbar-width: thin;                     /* тонкий скроллбар (Firefox) */
}

.form-content {
    width: 100%;
}

/* ===== Заголовок ===== */
.form-header {
    text-align: center;
    margin-bottom: 35px;
}

.logo {
    width: 100px;
    height: auto;
    display: block;
}

.form-header h1 {
    font-size: 22px;
    font-weight: 600;
    color: #164477;
    letter-spacing: 2px;
    line-height: 1.3;
}

/* ===== Группа полей ===== */

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

.required {
    color: #e74c3c;
    font-weight: bold;
}

/* ===== Поля ввода ===== */
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    color: #164477;
    background-color: #F7FAFC;
    border: 2px solid #B7C9D2;
    border-radius: 10px;
    outline: none;
    transition: all 0.3s ease;
    font-family: 'Bebas Neue', sans-serif;
}

.form-group input[type="text"]::placeholder,
.form-group input[type="email"]::placeholder,
.form-group input[type="tel"]::placeholder,
.form-group textarea::placeholder {
    color: #71899A;
}

.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group textarea:focus {
    border-color: #0755B5;
    background-color: #FFFFFF;
    box-shadow: 0 0 0 3px rgba(7, 85, 181, 0.1);
}

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

/* ===== Ошибки валидации ===== */
.form-group input.error,
.form-group textarea.error {
    border-color: #e74c3c;
    background-color: #fff5f5;
}

.form-group input.error:focus,
.form-group textarea.error:focus {
    box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.1);
}

.error-message {
    display: block;
    font-size: 12px;
    color: #e74c3c;
    margin-top: 6px;
    min-height: 18px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.error-message.visible {
    opacity: 1;
}

/* ===== Согласие на обработку данных ===== */

.consent-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: #e0e0e0;
    line-height: 1.5;
}

.consent-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    cursor: pointer;
    flex-shrink: 0;
    accent-color: #0755B5;
}

/* ===== Загрузка файлов ===== */

.file-upload-area {
    border: 2px dashed #B7C9D2;
    border-radius: 10px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #F7FAFC;
    position: relative;
}

.file-upload-area:hover {
    border-color: #0755B5;
    background-color: #FFFFFF;
}

.file-upload-area.dragover {
    border-color: #0755B5;
    background-color: rgba(7, 85, 181, 0.05);
}

.file-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}

.file-upload-icon {
    margin-bottom: 15px;
}

.file-upload-text {
    font-size: 16px;
    font-weight: 600;
    color: #0755B5;
    margin-bottom: 8px;
}

.file-upload-hint {
    font-size: 13px;
    color: #71899A;
    margin-bottom: 5px;
}

.file-upload-formats {
    font-size: 12px;
    color: #B7C9D2;
}

.file-list {
    margin-top: 15px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 15px;
    background-color: #F7FAFC;
    border: 1px solid #B7C9D2;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #164477;
}

.file-item-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-right: 10px;
}

.file-item-size {
    color: #71899A;
    margin-right: 10px;
    white-space: nowrap;
}

.file-item-remove {
    background: none;
    border: none;
    color: #e74c3c;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
    padding: 0 5px;
    transition: color 0.3s ease;
}

.file-item-remove:hover {
    color: #c0392b;
}

.file-item.error {
    border-color: #e74c3c;
    background-color: #fff5f5;
}

.file-item.error .file-item-name {
    color: #e74c3c;
}

/* ===== Кнопка отправки ===== */
.submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    background: #0755B5;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(7, 85, 181, 0.3);
}

.submit-btn:hover:not(:disabled) {
    background: #064a9e;
    box-shadow: 0 6px 20px rgba(7, 85, 181, 0.4);
    transform: translateY(-2px);
}

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

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.submit-btn.sending {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    box-shadow: none;
}

/* ===== Подвал формы ===== */
.form-footer {
    margin-top: 20px;
    text-align: center;
}

.form-footer p {
    font-size: 12px;
    color: #0755B5;
    line-height: 1.6;
}

.form-footer a {
    color: #0755B5;
    text-decoration: none;
    border-bottom: 1px dashed #0755B5;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: #5568d3;
    border-bottom-style: solid;
}

/* ===== Статус формы ===== */

/* ===== Модальное окно статуса формы ===== */


.form-status {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    display: none;
    width: 70%;
    max-width: 400px;
    padding: 10px;
    background: #fff;
    color: #164477;
    border-radius: 10px;
    box-shadow: 0 0 0 100vmax rgba(10, 20, 40, 0.7), 0 15px 50px rgba(0, 0, 0, 0.25);
    text-align: center;
    font-size: 13px;
    line-height: 1.6;
}

.form-status.success,
.form-status.error {
    display: block;
}

.form-status.success {
    color: #164477;
}

.form-status.error {
    color: #e74c3c;
}

/* Убираем старое скрытие элементов формы */
.form-content.success-state .form-header,
.form-content.success-state .form-group,
.form-content.success-state .submit-btn,
.form-content.success-state .form-footer {
    display: none;
}

/* ===== Honeypot (скрытое поле) ===== */
.honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    width: 0;
    overflow: hidden;
}

/* ===== Адаптивность загрузки файлов для планшетов ===== */
@media (max-width: 768px) {
    .file-upload-area {
        padding: 25px 15px;
    }
    
    .file-upload-text {
        font-size: 15px;
    }
    
    .file-upload-hint {
        font-size: 12px;
    }
}

/* ===== Адаптивность для планшетов ===== */
@media (max-width: 768px) {
    .form-container {
        padding: 30px 25px;
        border-radius: 15px;
        width: 70%;
        max-height: calc(100svh - 200px);
    }
    
    .form-header h1 {
        font-size: 20px;
        letter-spacing: 1.5px;
    }
    
    .logo {
        width: 70px;
    }

    
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group textarea {
        padding: 12px 14px;
        font-size: 14px;
    }
    
    .submit-btn {
        padding: 14px;
        font-size: 15px;
    }
}

/* ===== Адаптивность для мобильных ===== */
@media (max-width: 480px) {
    .form-container {
        padding: 15px;
        border-radius: 12px;
    }

    body {
        background-attachment: fixed;
        background-position: top;
         background-size: contain;
    }

    section p {
        font-size: 12px;
    }
    section h1 {
        font-size: 26px;
    }
    .form-header {
        margin-bottom: 15px;
    }
    
    .logo {
        width: 60px;
    }
    
    .form-header h1 {
        font-size: 18px;
        letter-spacing: 0px;
    }

    
    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group textarea {
        padding: 11px 12px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    .form-group textarea {
        min-height: 100px;
    }
    
    .consent-label {
        font-size: 12px;
    }
    
    .consent-label input[type="checkbox"] {
        width: 16px;
        height: 16px;
    }
    
    .submit-btn {
        padding: 13px;
        font-size: 14px;
        letter-spacing: 1px;
    }
    
    .form-footer p {
        font-size: 11px;
    }
    
    .file-upload-area {
        padding: 20px 10px;
    }
    
    .file-upload-icon svg {
        width: 40px;
        height: 40px;
    }
    
    .file-upload-text {
        font-size: 14px;
    }
    
    .file-upload-hint {
        font-size: 11px;
    }
    
    .file-upload-formats {
        font-size: 10px;
    }
    
    .file-item {
        padding: 8px 12px;
        font-size: 12px;
    }
    section h3 {
        font-size: 18px;
        line-height: 15px;
    }
}

@media (max-width: 376px) {
    section h1 {
        font-size: 24px;
    }
    section h3 {
        font-size: 16px;
    }
}

/* ===== Анимация загрузки ===== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.submit-btn.sending::after {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

/* ===== Фокус для доступности ===== */
.form-group input:focus-visible,
.form-group textarea:focus-visible,
.submit-btn:focus-visible,
.consent-label input:focus-visible {
    outline: 2px solid #0755B5;
    outline-offset: 2px;
}
