/* ============================================
   ОПРОС - Стили
   Переправа через Анадырский лиман
============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(to right, #7c2a36, #461921);
    min-height: 100vh;
    padding: 30px 20px;
}

.survey-container {
    max-width: 950px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 0 0 32px 32px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    animation: fadeIn 0.5s ease-out;
}

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

/* ========== ШАПКА ========== */
.survey-header {
    background: linear-gradient(to right, #d13b51, #461921);
    color: white;
    padding: 35px 40px;
    text-align: center;
    position: relative;
}

.survey-header h1 {
    font-size: 28px;
    margin-bottom: 12px;
    font-weight: 600;
}

.survey-header h1 span {
    font-size: 34px;
    margin-right: 8px;
}

.survey-header p {
    opacity: 0.92;
    font-size: 15px;
    line-height: 1.5;
}

/* ========== КОНТЕНТ ========== */
.survey-content {
    padding: 40px;
}

/* ========== СООБЩЕНИЯ ========== */
.error-msg {
    background: #f8d7da;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 4px solid #dc3545;
    font-weight: 500;
}

.success-msg {
    background: #d4edda;
    color: #155724;
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    border-left: 4px solid #28a745;
    font-weight: 500;
}

/* ========== КАПЧА ========== */
.captcha-section {
    text-align: center;
    padding: 20px 0;
}

.captcha-section h2 {
    color: #1a472a;
    margin-bottom: 15px;
    font-size: 24px;
}

.captcha-desc {
    color: #666;
    margin-bottom: 25px;
}

.captcha-box {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px;
    font-size: 44px;
    text-align: center;
    width: 220px;
    margin: 0 auto 25px;
    font-weight: bold;
    border: 2px solid #1a472a;
    border-radius: 20px;
    letter-spacing: 10px;
    font-family: 'Courier New', monospace;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.captcha-input {
    margin: 20px auto;
}

.captcha-input input {
    width: 220px;
    text-align: center;
    font-size: 20px;
    letter-spacing: 4px;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 12px;
    transition: all 0.3s;
}

.captcha-input input:focus {
    outline: none;
    border-color: #1a472a;
    box-shadow: 0 0 0 3px rgba(26, 71, 42, 0.2);
}

/* ========== ПРОГРЕСС ========== */
.progress-container {
    margin-bottom: 30px;
    background: #f8f9fa;
    padding: 15px 20px;
    border-radius: 16px;
}

.survey-progress-bar {
    height: 10px;
    background: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #c8394e, #191c7a);
    border-radius: 10px;
    transition: width 0.4s ease;
}

.progress-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 13px;
    color: #6c757d;
}

.page-info {
    background: #802735;
    color: white;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 500;
}

/* ========== ГРУППЫ ВОПРОСОВ ========== */
.question-group {
    background: #fafbfc;
    border-radius: 20px;
    margin-bottom: 25px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.group-title {
    background: #802735;
    color: white;
    padding: 16px 24px;
    font-size: 18px;
    font-weight: 600;
}

.question-item {
    padding: 20px 24px;
    border-bottom: 1px solid #eef2f6;
    transition: background 0.2s;
}

.question-item:last-child {
    border-bottom: none;
}

.question-item:hover {
    background: #ffffff;
}

.question-text {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 14px;
    font-size: 16px;
}

.question-required {
    color: #dc3545;
    font-size: 12px;
    margin-left: 8px;
}

/* Опции ответов */
.options-list {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin-top: 8px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.option-item input[type="radio"],
.option-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #1a472a;
}

.option-item label {
    margin: 0;
    cursor: pointer;
    color: #334155;
}

/* Поля ввода */
select, input[type="text"], input[type="email"], textarea {
    padding: 12px 16px;
    border: 1px solid #ced4da;
    border-radius: 12px;
    font-size: 14px;
    width: 100%;
    max-width: 450px;
    transition: all 0.2s;
}

select:focus, input:focus, textarea:focus {
    outline: none;
    border-color: #1a472a;
    box-shadow: 0 0 0 3px rgba(26, 71, 42, 0.15);
}

textarea {
    resize: vertical;
    min-height: 90px;
}

/* ========== КНОПКИ ========== */
.buttons-container {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin-top: 35px;
    flex-wrap: wrap;
}

.survey-btn {
    padding: 14px 32px;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.survey-btn-prev {
    background: #6c757d;
    color: white;
}

.survey-btn-prev:hover:not(:disabled) {
    background: #5a6268;
    transform: translateY(-2px);
}

.survey-btn-prev:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.survey-btn-next {
    background: linear-gradient(135deg, #c8394e, #191c7a);
    color: white;
}

.survey-btn-next:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 71, 42, 0.4);
}

.survey-btn-finish {
    background: linear-gradient(135deg, #c8394e, #191c7a);
    color: white;
}

.survey-btn-finish:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.4);
}

.survey-btn-start {
    background: linear-gradient(135deg, #c8394e, #191c7a);
    color: white;
    font-size: 18px;
    padding: 14px 40px;
}

.survey-btn-start:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(26, 71, 42, 0.4);
}

/* ========== ПОДВАЛ ========== */
.survey-footer {
    background: #f8f9fa;
    padding: 20px 40px;
    text-align: center;
    font-size: 12px;
    color: #6c757d;
    border-top: 1px solid #e9ecef;
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 768px) {
    body {
        padding: 15px;
    }
    
    .survey-content {
        padding: 25px;
    }
    
    .survey-header {
        padding: 25px 20px;
    }
    
    .survey-header h1 {
        font-size: 22px;
    }
    
    .question-item {
        padding: 15px;
    }
    
    .options-list {
        flex-direction: column;
        gap: 10px;
    }
    
    .buttons-container {
        flex-direction: column;
    }
    
    .survey-btn {
        width: 100%;
        text-align: center;
    }
    
    .captcha-box {
        font-size: 32px;
        width: 180px;
        letter-spacing: 6px;
    }
}
/* Информационные блоки */
.info-block {
    margin-bottom: 25px;
}

.info-item {
    padding: 12px 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 500;
}

.info-success {
    background: #d4edda;
    color: #155724;
}

.info-warning {
    background: #fff3cd;
    color: #856404;
}

.warning-msg {
    background: #f8d7da;
    color: #721c24;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    margin-top: 20px;
}

.survey-btn-small {
    display: inline-block;
    padding: 8px 16px;
    background: #6c757d;
    color: white;
    text-decoration: none;
    border-radius: 30px;
    font-size: 12px;
    margin-top: 10px;
}

.question-hint {
    font-size: 13px;
    color: #6c757d;
    margin: 8px 0 12px;
    line-height: 1.4;
}

.conditional-field {
    display: none;
}

.conditional-field.visible {
    display: block;
}

.stars-wrapper {
    display: inline-flex;
    flex-direction: row-reverse;
    gap: 6px;
    margin-top: 8px;
}

.star-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.star-label {
    display: inline-block;
    font-size: 28px;
    color: #ddd;
    cursor: pointer;
    line-height: 1;
}

.stars-wrapper .star-input:checked ~ .star-label,
.stars-wrapper .star-label:hover,
.stars-wrapper .star-label:hover ~ .star-label {
    color: #d13b51;
}

.stars-wrapper:focus-within .star-label {
    outline: none;
}

.trips-container {
    margin-top: 10px;
}

.trip-card {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.trip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e0e0e0;
}

.trip-title {
    font-size: 16px;
    font-weight: 600;
    color: #7c2a36;
    margin: 0;
}

.btn-remove-trip {
    background: #dc3545;
    color: #fff;
    border: none;
    padding: 5px 12px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 12px;
}

.btn-add-trip {
    background: #28a745;
    color: #fff;
    border: none;
    margin-top: 8px;
}

.trip-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.trip-field {
    margin-bottom: 8px;
}

.trip-label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
}

.trip-select,
.trip-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
}

.trip-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.trip-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.field-hint {
    font-size: 11px;
    color: #6c757d;
    display: block;
    margin-top: 4px;
}

@media (max-width: 768px) {
    .stars-wrapper .star-label {
        font-size: 24px;
    }

    .trip-content {
        grid-template-columns: 1fr;
    }
}