/* 기본 리셋 및 전역 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1e40af;
    --primary-dark: #1e3a8a;
    --primary-light: #3b82f6;
    --secondary-color: #64748b;
    --accent-color: #0ea5e9;
    --success-color: #059669;
    --danger-color: #dc2626;
    --background-color: #f8fafc;
    --background-secondary: #f1f5f9;
    --white: #ffffff;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: #e2e8f0;
    --border-dark: #cbd5e1;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text-primary);
    background-color: var(--background-color);
    line-height: 1.7;
    letter-spacing: -0.01em;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 헤더 */
.header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo h1 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.tagline {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.2s;
}

.nav-link:hover {
    color: var(--primary-color);
}

/* 히어로 섹션 */
.hero {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 50%, #0ea5e9 100%);
    color: var(--white);
    padding: 6rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(30, 64, 175, 0.05) 0%, rgba(30, 64, 175, 0.1) 100%);
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.15;
    letter-spacing: -0.03em;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.hero-subtitle {
    font-size: 1.35rem;
    margin-bottom: 2.5rem;
    opacity: 0.95;
    font-weight: 400;
    letter-spacing: -0.01em;
    line-height: 1.6;
}

/* 버튼 */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white);
    box-shadow: 0 4px 6px rgba(30, 64, 175, 0.15);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(30, 64, 175, 0.25);
}

.btn-primary:disabled {
    background-color: var(--secondary-color);
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-secondary {
    background-color: var(--white);
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* 섹션 */
.section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

/* About 섹션 */
.about {
    background: var(--white);
}

.about-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.about-card {
    text-align: center;
    padding: 2.5rem 2rem;
    border-radius: 1rem;
    background: var(--white);
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.about-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(30, 64, 175, 0.12);
    border-color: var(--primary-light);
}

.about-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.about-card p {
    color: var(--text-secondary);
}

/* Features 섹션 */
.features {
    background: var(--background-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--white);
    padding: 2.5rem;
    border-radius: 1rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(30, 64, 175, 0.15);
    border-color: var(--primary-light);
}

.feature-number {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: var(--white);
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(30, 64, 175, 0.2);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* 업로드 섹션 */
.upload-section {
    background: var(--white);
    min-height: 600px;
}

.upload-container {
    max-width: 800px;
    margin: 0 auto;
}

.upload-form {
    background: var(--background-color);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* 라디오 버튼 그룹 */
.radio-group label {
    margin-bottom: 0 !important;
}

.radio-group label:hover {
    border-color: var(--primary-color) !important;
    background: #f0f7ff !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.1);
}

.radio-group input[type="radio"]:checked + div {
    color: var(--primary-color);
}

.radio-group input[type="radio"]:checked + div strong {
    color: var(--primary-color);
}

.radio-group label:has(input[type="radio"]:checked) {
    border-color: var(--primary-color) !important;
    background: #eff6ff !important;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* 파일 업로드 */
.file-upload-wrapper {
    position: relative;
}

.file-input {
    display: none;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    border: 2px dashed var(--border-color);
    border-radius: 0.5rem;
    background: var(--white);
    cursor: pointer;
    transition: all 0.2s;
}

.file-label:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

.file-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.file-text {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.file-info {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.file-name {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--white);
    border-radius: 0.25rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

/* 프로그레스 바 */
.progress-container {
    margin-top: 2rem;
}

.progress-bar {
    width: 100%;
    height: 0.5rem;
    background: var(--border-color);
    border-radius: 1rem;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), #667eea);
    border-radius: 1rem;
    transition: width 0.3s;
    width: 0%;
}

.progress-text {
    text-align: center;
    margin-top: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.875rem;
}

/* 결과 컨테이너 */
.result-container {
    margin-top: 2rem;
    background: var(--white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-lg);
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.result-header h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
}

.result-actions {
    display: flex;
    gap: 1rem;
}

.report-content {
    font-size: 0.95rem;
    line-height: 1.8;
}

.report-section {
    margin-bottom: 2rem;
}

.report-section h4 {
    font-size: 1.25rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.report-field {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 1rem;
    margin-bottom: 0.75rem;
    padding: 0.5rem;
    background: var(--background-color);
    border-radius: 0.25rem;
}

.report-field-label {
    font-weight: 600;
    color: var(--text-primary);
}

.report-field-value {
    color: var(--text-secondary);
}

/* 푸터 */
.footer {
    background: var(--text-primary);
    color: var(--white);
    padding: 3rem 0 1rem;
    margin-top: 4rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

.footer-info h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-info p {
    color: rgba(255, 255, 255, 0.7);
}

.footer-info a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--white);
}

.footer-copyright {
    text-align: center;
    padding-top: 2rem;
    margin-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    grid-column: 1 / -1;
}

/* 상담 요약 및 내용 정리 섹션 전용 스타일 */
.summary-section, .content-section {
    border-radius: 8px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s, box-shadow 0.2s;
}

.summary-section:hover, .content-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 텍스트 정렬 및 가독성 개선 */
.report-text-content {
    text-align: justify;
    word-break: keep-all;
    word-wrap: break-word;
    hyphens: auto;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .nav {
        display: none;
    }

    .about-content,
    .features-grid {
        grid-template-columns: 1fr;
    }

    .result-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }

    .report-field {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    /* 모바일에서 상담 요약/내용 정리 패딩 축소 */
    .summary-section, .content-section {
        padding: 15px !important;
    }
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

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

/* 비용 정보 컨테이너 스타일 */
.cost-info-container {
    transition: all 0.3s ease-in-out;
}

.cost-info-container.show {
    animation: fadeIn 0.5s ease-out;
}
