/* ============================================================
   ОСНОВНЫЕ СТИЛИ - СТРОГИЙ ОФИЦИАЛЬНЫЙ СТИЛЬ
   ============================================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', Times, serif;
    background: #e8e4de;
    background-image:
        linear-gradient(rgba(200, 190, 180, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(200, 190, 180, 0.3) 1px, transparent 1px);
    background-size: 40px 40px;
    min-height: 100vh;
    padding: 30px;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    background: #fcf9f6;
    border: 3px solid #3d2b1f;
    border-radius: 0;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px 60px 40px;
    position: relative;
}

/* ===== НОВАЯ ШАПКА С ГЕРБАМИ ===== */
.header-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0 15px;
    border-bottom: 2px solid #3d2b1f;
    margin-bottom: 5px;
}

.emblems-left,
.emblems-right {
    width: 70px;
    height: 70px;
    flex-shrink: 0;
}

.emblems-left img,
.emblems-right img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.header-center {
    text-align: center;
    flex: 1;
    padding: 0 15px;
}

.ministry-name {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 20px;
    font-weight: 700;
    color: #2c1810;
    letter-spacing: 3px;
    text-transform: uppercase;
}

.department-name {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 14px;
    font-weight: 400;
    color: #5a4a3a;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 2px;
}

/* ===== ШАПКА ===== */
.header {
    text-align: center;
    margin-bottom: 25px;
    padding: 15px 0 20px;
    border-bottom: 2px solid #3d2b1f;
    position: relative;
}

.header h1 {
    font-family: 'Georgia', 'Times New Roman', serif;
    color: #2c1810;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.header .subtitle {
    color: #5a4a3a;
    font-size: 13px;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 400;
}

.confidential-badge {
    display: inline-block;
    background: #3d2b1f;
    color: #f0e8d8;
    padding: 3px 22px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 2px;
    margin-top: 10px;
    text-transform: uppercase;
    font-family: 'Georgia', serif;
}

/* ===== ЯЗЫКОВОЙ ПЕРЕКЛЮЧАТЕЛЬ ===== */
.language-selector {
    display: flex;
    justify-content: center;
    gap: 5px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.language-selector button {
    padding: 4px 12px;
    border: 1px solid #c4b5a5;
    border-radius: 2px;
    background: #f5f0eb;
    color: #3d2b1f;
    font-family: 'Georgia', serif;
    font-size: 11px;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.language-selector button:hover {
    background: #e8ddd0;
    border-color: #3d2b1f;
}

.language-selector button.active {
    background: #3d2b1f;
    color: #f0e8d8;
    border-color: #3d2b1f;
}

/* ===== ПРЕДУПРЕЖДЕНИЕ ===== */
.disclaimer {
    background: #f5f0eb;
    border-left: 4px solid #3d2b1f;
    padding: 10px 18px;
    margin-bottom: 25px;
    font-size: 13px;
    color: #3d2b1f;
    font-family: 'Georgia', serif;
    line-height: 1.6;
}

.disclaimer strong {
    color: #3d2b1f;
    font-weight: 700;
}

/* ===== СЕКЦИИ ===== */
.section {
    margin-bottom: 28px;
    padding: 18px 22px 22px;
    background: #fcf9f6;
    border: 1px solid #d8cdc0;
    border-radius: 0;
}

.section-title {
    font-family: 'Georgia', serif;
    font-size: 17px;
    font-weight: 700;
    color: #2c1810;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #3d2b1f;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.section-subtitle {
    font-size: 13px;
    color: #6a5a4a;
    margin-bottom: 16px;
    font-style: italic;
    font-family: 'Georgia', serif;
}

/* ===== ФОРМА ===== */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2c1810;
    margin-bottom: 4px;
    font-size: 14px;
    font-family: 'Georgia', serif;
}

.form-group .optional {
    color: #a09080;
    font-weight: 400;
    font-size: 11px;
    font-style: italic;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 9px 13px;
    border: 1px solid #c4b5a5;
    border-radius: 2px;
    font-size: 14px;
    transition: border-color 0.2s;
    font-family: 'Georgia', serif;
    background: #fcf9f6;
    color: #2c1810;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3d2b1f;
    background: #fff;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #b0a090;
    font-style: italic;
    font-size: 13px;
}

.form-group textarea {
    resize: vertical;
    min-height: 70px;
}

/* ===== РАДИО И ЧЕКБОКСЫ ===== */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

.checkbox-group label {
    display: flex;
    align-items: center;
    font-weight: 400;
    font-size: 14px;
    cursor: pointer;
    padding: 5px 12px;
    background: #fcf9f6;
    border: 1px solid #d8cdc0;
    border-radius: 2px;
    transition: all 0.2s;
    font-family: 'Georgia', serif;
    color: #2c1810;
}

.checkbox-group label:hover {
    border-color: #3d2b1f;
    background: #f5f0eb;
}

.checkbox-group input[type="checkbox"],
.checkbox-group input[type="radio"] {
    width: auto;
    margin-right: 7px;
    accent-color: #3d2b1f;
    flex-shrink: 0;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding-top: 3px;
}

.radio-group label {
    display: flex;
    align-items: center;
    font-weight: 400;
    font-size: 14px;
    cursor: pointer;
    padding: 3px 6px;
    border-radius: 2px;
    transition: background 0.2s;
    font-family: 'Georgia', serif;
    color: #2c1810;
}

.radio-group label:hover {
    background: #f5f0eb;
}

.radio-group input[type="radio"] {
    width: auto;
    margin-right: 9px;
    accent-color: #3d2b1f;
    flex-shrink: 0;
}

/* ===== КНОПКА ОТПРАВКИ ===== */
.btn-submit {
    width: 100%;
    padding: 15px;
    background: #3d2b1f;
    color: #f0e8d8;
    border: 2px solid #3d2b1f;
    border-radius: 2px;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-family: 'Georgia', serif;
}

.btn-submit:hover:not(:disabled) {
    background: #2c1810;
    border-color: #2c1810;
}

.btn-submit:active:not(:disabled) {
    transform: scale(0.98);
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ===== СТАТУС СООБЩЕНИЯ ===== */
.status-message {
    margin-top: 18px;
    padding: 12px 18px;
    border-radius: 2px;
    display: none;
    font-weight: 600;
    font-family: 'Georgia', serif;
}

.status-message.success {
    display: block;
    background: #e8f0e0;
    color: #2c5a2c;
    border: 1px solid #b0c8a0;
}

.status-message.error {
    display: block;
    background: #f0e0e0;
    color: #6a2c2c;
    border: 1px solid #d8b0b0;
}

.status-message.loading {
    display: block;
    background: #e0e8f0;
    color: #2c4a6a;
    border: 1px solid #b0c8d8;
}

/* ===== ВСПОМОГАТЕЛЬНЫЕ КЛАССЫ ===== */
.star {
    color: #8a2c2c;
    margin-left: 2px;
}

.hidden {
    display: none !important;
}

/* ===== АДАПТИВНОСТЬ ===== */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }

    .container {
        padding: 20px;
        border-width: 2px;
    }

    .header-top {
        padding: 8px 0 12px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .emblems-left,
    .emblems-right {
        width: 50px;
        height: 50px;
    }

    .header-center {
        padding: 0 10px;
        flex: 0 0 100%;
        order: 3;
        margin-top: 8px;
    }

    .ministry-name {
        font-size: 16px;
        letter-spacing: 2px;
    }

    .department-name {
        font-size: 12px;
        letter-spacing: 1px;
    }

    .header h1 {
        font-size: 18px;
        letter-spacing: 1px;
    }

    .header .subtitle {
        font-size: 11px;
        letter-spacing: 1px;
    }

    .section {
        padding: 14px;
    }

    .section-title {
        font-size: 15px;
    }

    .checkbox-group {
        flex-direction: column;
    }

    .checkbox-group label {
        width: 100%;
    }

    .language-selector button {
        font-size: 10px;
        padding: 3px 9px;
    }

    .btn-submit {
        font-size: 14px;
        padding: 13px;
        letter-spacing: 2px;
    }

    .confidential-badge {
        font-size: 10px;
        padding: 3px 15px;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 12px;
        border-width: 1px;
    }

    .emblems-left,
    .emblems-right {
        width: 40px;
        height: 40px;
    }

    .ministry-name {
        font-size: 13px;
        letter-spacing: 1px;
    }

    .department-name {
        font-size: 10px;
        letter-spacing: 0.5px;
    }

    .header h1 {
        font-size: 15px;
        letter-spacing: 0.5px;
    }

    .header .subtitle {
        font-size: 10px;
        letter-spacing: 0.5px;
    }

    .section {
        padding: 10px;
    }

    .section-title {
        font-size: 13px;
    }

    .radio-group label,
    .checkbox-group label {
        font-size: 13px;
        padding: 3px 6px;
    }

    .form-group input,
    .form-group textarea {
        font-size: 13px;
        padding: 7px 9px;
    }

    .language-selector button {
        font-size: 9px;
        padding: 2px 7px;
    }

    .btn-submit {
        font-size: 12px;
        padding: 11px;
        letter-spacing: 1px;
    }

    .disclaimer {
        font-size: 12px;
        padding: 8px 12px;
    }

    .confidential-badge {
        font-size: 9px;
        padding: 2px 12px;
        letter-spacing: 1px;
    }
}