/* 설문조사 페이지 전용 스타일 */

.survey-intro {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: var(--white);
    padding: var(--spacing-lg) 0;
    text-align: center;
}

.survey-intro h2 {
    font-size: 2rem;
    margin-bottom: var(--spacing-sm);
}

.survey-intro p {
    font-size: 1.1rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.8;
}

.privacy-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.2);
    padding: 12px 24px;
    border-radius: 30px;
    font-weight: 500;
}

.privacy-badge i {
    font-size: 1.3rem;
}

/* 진행률 표시 */
.progress-container {
    background: var(--white);
    padding: var(--spacing-sm) 0;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 998;
}

.progress-bar {
    height: 8px;
    background: #E0E0E0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: var(--spacing-xs);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
    border-radius: 10px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: var(--dark-color);
    margin: 0;
}

/* 설문 섹션 */
.survey-section {
    padding: var(--spacing-lg) 0;
    background: var(--light-color);
}

.survey-form {
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-lg);
    max-width: 900px;
    margin: 0 auto;
}

.form-section {
    display: none;
}

.form-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.section-title {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 1.8rem;
    color: var(--dark-color);
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-sm);
    border-bottom: 3px solid var(--primary-color);
}

.section-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.form-subsection {
    margin-bottom: var(--spacing-lg);
    padding: var(--spacing-md);
    background: var(--light-color);
    border-radius: 10px;
}

.form-subsection h4 {
    font-size: 1.3rem;
    color: var(--secondary-color);
    margin-bottom: var(--spacing-md);
    font-weight: 600;
}

.form-group {
    margin-bottom: var(--spacing-md);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
}

label {
    display: block;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 8px;
    font-size: 1rem;
}

label.required::after {
    content: ' *';
    color: #E74C3C;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="url"],
select,
textarea {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    background: var(--white);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

input:invalid:not(:placeholder-shown),
select:invalid:not(:placeholder-shown) {
    border-color: #E74C3C;
}

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

/* 체크박스와 라디오 버튼 */
.checkbox-group,
.radio-group {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-xs);
}

.checkbox-label,
.radio-label {
    display: flex;
    align-items: center;
    padding: 12px;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 400;
}

.checkbox-label:hover,
.radio-label:hover {
    background: var(--light-color);
    border-color: var(--primary-color);
}

.checkbox-label input[type="checkbox"],
.radio-label input[type="radio"] {
    width: auto;
    margin-right: 10px;
    cursor: pointer;
}

.checkbox-label input:checked + span,
.radio-label input:checked + span {
    font-weight: 600;
    color: var(--primary-color);
}

/* 연도별 입력 그리드 */
.year-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: var(--spacing-sm);
}

.year-item {
    text-align: center;
}

.year-item label {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #666;
}

.year-item input {
    text-align: center;
    font-weight: 600;
}

/* 사역 분야 그리드 */
.ministry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--spacing-sm);
}

.ministry-item {
    text-align: center;
}

.ministry-item label {
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #666;
    font-weight: 500;
}

.ministry-item input {
    text-align: center;
}

/* 조건부 섹션 */
.conditional-section {
    margin-top: var(--spacing-md);
    padding: var(--spacing-md);
    background: var(--white);
    border-left: 4px solid var(--primary-color);
    border-radius: 5px;
}

/* 동적 필드 추가 */
.dynamic-fields {
    margin-top: var(--spacing-sm);
}

.dynamic-field-item {
    background: var(--light-color);
    padding: var(--spacing-sm);
    border-radius: 8px;
    margin-bottom: var(--spacing-sm);
    position: relative;
}

.remove-field-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #E74C3C;
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.remove-field-btn:hover {
    background: #C0392B;
}

.add-field-btn {
    background: var(--success-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.add-field-btn:hover {
    background: #229954;
}

/* 네비게이션 버튼 */
.form-navigation {
    display: flex;
    justify-content: space-between;
    gap: var(--spacing-sm);
    margin-top: var(--spacing-lg);
    padding-top: var(--spacing-lg);
    border-top: 2px solid var(--border-color);
}

.form-navigation button {
    flex: 1;
    max-width: 200px;
}

.form-navigation button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 제출 버튼 */
.submit-section {
    text-align: center;
    padding: var(--spacing-lg);
    background: var(--light-color);
    border-radius: 10px;
    margin-top: var(--spacing-md);
}

.submit-section h4 {
    font-size: 1.5rem;
    color: var(--dark-color);
    margin-bottom: var(--spacing-sm);
}

.submit-section p {
    color: #666;
    margin-bottom: var(--spacing-md);
    line-height: 1.7;
}

.submit-btn {
    background: var(--success-color);
    color: var(--white);
    border: none;
    padding: 15px 50px;
    font-size: 1.2rem;
    font-weight: 700;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-md);
}

.submit-btn:hover {
    background: #229954;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.submit-btn:disabled {
    background: #95A5A6;
    cursor: not-allowed;
    transform: none;
}

/* 성공 메시지 */
.success-message {
    display: none;
    text-align: center;
    padding: var(--spacing-xl);
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow-lg);
}

.success-message.show {
    display: block;
    animation: fadeIn 0.5s ease;
}

.success-message i {
    font-size: 4rem;
    color: var(--success-color);
    margin-bottom: var(--spacing-md);
}

.success-message h3 {
    font-size: 2rem;
    color: var(--dark-color);
    margin-bottom: var(--spacing-sm);
}

.success-message p {
    font-size: 1.1rem;
    color: #666;
    line-height: 1.7;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .survey-form {
        padding: var(--spacing-md);
    }
    
    .section-title {
        font-size: 1.4rem;
    }
    
    .section-number {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .year-grid {
        grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    }
    
    .ministry-grid {
        grid-template-columns: 1fr;
    }
    
    .form-navigation {
        flex-direction: column;
    }
    
    .form-navigation button {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .survey-intro h2 {
        font-size: 1.5rem;
    }
    
    .survey-intro p {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.2rem;
        flex-direction: column;
        text-align: center;
    }
    
    .year-grid {
        grid-template-columns: 1fr 1fr;
    }
}