/* ===== CSS Variables - Premium Style ===== */
:root {
    /* Colors */
    --primary: #144bb8;
    --primary-dark: #0d3a8f;
    --primary-light: #2563eb;
    --secondary: #636f88;

    /* Backgrounds */
    --bg-light: #f6f6f8;
    --bg-white: #ffffff;
    --bg-card: #ffffff;

    /* Text */
    --text-dark: #111318;
    --text-secondary: #636f88;
    --text-light: #9ca3af;

    /* Borders */
    --border-color: #e5e7eb;
    --border-dark: #dcdfe5;

    /* Success/Error */
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    /* Shadows - Premium */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.06), 0 0 1px rgba(0, 0, 0, 0.1);

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-light);
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ===== Container ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 2.5rem;
    }
}

/* ===== Header - Premium ===== */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-color);
    padding: 0 1.5rem;
}

@media (min-width: 768px) {
    .header {
        padding: 0 2.5rem;
    }
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
    /* 모바일 대응 */
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
}

.logo-icon {
    font-size: 1.5rem;
}

.nav {
    display: flex;
    /* 모바일에서도 표시 */
    gap: 1.5rem;
    align-items: center;
    overflow-x: auto;
    /* 너무 좁으면 스크롤 */
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
}

@media (max-width: 768px) {
    .header-content {
        height: auto;
        padding: 0.75rem 0;
        flex-direction: column;
        align-items: flex-start;
    }

    .nav {
        width: 100%;
        gap: 1rem;
        justify-content: flex-start;
    }
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    transition: color var(--transition-fast);
}

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

.mobile-menu-btn {
    display: flex;
    padding: 0.5rem;
    color: var(--text-dark);
}

@media (min-width: 768px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* ===== Hero Section - Premium ===== */
.hero {
    padding: 3rem 0;
    background: linear-gradient(180deg, #ffffff 0%, #f6f6f8 100%);
    border-bottom: 1px solid var(--border-color);
}

.hero-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.hero-title {
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    letter-spacing: -0.02em;
}

@media (min-width: 768px) {
    .hero-title {
        font-size: 2.25rem;
    }
}

.hero-description {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.hero-cta {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 2rem;
}

.hero-stats {
    display: flex;
    gap: 2.5rem;
    justify-content: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

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

.stat-value {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 0.125rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ===== Buttons - Premium ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-weight: 600;
    font-size: 0.875rem;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 4px rgba(20, 75, 184, 0.2);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 8px rgba(20, 75, 184, 0.3);
    transform: translateY(-1px);
}

.btn-secondary {
    background: var(--bg-white);
    color: var(--text-dark);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-light);
    border-color: var(--border-dark);
}

.btn-lg {
    padding: 1rem 1.75rem;
    font-size: 1rem;
}

.btn-block {
    width: 100%;
}

.btn-text {
    color: var(--primary);
    font-weight: 600;
    padding: 0.5rem;
}

.btn-text:hover {
    opacity: 0.8;
}

/* ===== Calculator Section - Premium ===== */
.calculator-section {
    padding: 3rem 0 4rem;
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.section-title {
    font-size: 1.375rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.375rem;
}

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

.section-link {
    color: var(--primary);
    font-weight: 600;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: inline-block;
}

/* ===== Calculator Card - Premium ===== */
.calculator-card {
    background: var(--bg-white);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-color);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    max-width: 560px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .calculator-card {
        padding: 2.5rem;
    }
}

.calculator-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* ===== Form Elements - Premium ===== */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-dark);
}

.label-required {
    color: var(--danger);
}

.label-hint {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.8125rem;
}

.label-auto {
    color: var(--primary);
    font-weight: 500;
    font-size: 0.8125rem;
}

.label-link {
    margin-left: auto;
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 500;
}

.label-link:hover {
    text-decoration: underline;
}

.form-input,
.form-select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border-dark);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-dark);
    background: var(--bg-white);
    transition: all var(--transition-fast);
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.form-input:hover,
.form-select:hover {
    border-color: #c0c5ce;
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(20, 75, 184, 0.1), inset 0 1px 2px rgba(0, 0, 0, 0.04);
}

.form-input::placeholder {
    color: var(--text-light);
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group .form-input {
    padding-right: 3.5rem;
}

.input-suffix {
    position: absolute;
    right: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
}

/* ===== Result Box ===== */
.result-box {
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 0.875rem 1rem;
    text-align: center;
}

.result-box-value {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--text-dark);
}

/* ===== Amount Display ===== */
.amount-display {
    display: none;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(20, 75, 184, 0.04);
    border-left: 3px solid var(--primary);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

/* ===== Calculator Result - Full Width ===== */
.calculator-result {
    width: 100%;
    padding: 2rem 0;
}

/* ===== Situation Summary - Premium ===== */
.situation-summary {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
    line-height: 1.8;
    color: var(--text-dark);
    box-shadow: var(--shadow-card);
}

.situation-summary strong {
    color: var(--primary);
}

.situation-summary .summary-inputs {
    padding-bottom: 0.875rem;
    margin-bottom: 0.875rem;
    border-bottom: 1px dashed var(--border-color);
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.situation-summary .summary-inputs strong {
    color: var(--text-dark);
    font-weight: 600;
}

.situation-summary .summary-logic {
    line-height: 1.9;
}

/* ===== News Grid ===== */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.25rem;
}

.news-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.news-badge {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    background: rgba(20, 75, 184, 0.08);
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 9999px;
    margin-bottom: 0.75rem;
}

.news-title {
    font-size: 1.0625rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.news-description {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ===== Guide Grid ===== */
.guide-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
}

.guide-card {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}

.guide-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.guide-icon {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

.guide-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.guide-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
}

/* ===== CTA Section ===== */
.cta-section {
    background: var(--primary);
    color: white;
    padding: 3.5rem 0;
}

.cta-card {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    font-size: 1.75rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
}

.cta-description {
    font-size: 1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* ===== Footer - Premium ===== */
.footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-color);
    padding: 2.5rem 0 1.5rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .footer-content {
        flex-direction: row;
        justify-content: space-between;
    }
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.footer-description {
    color: var(--text-secondary);
    font-size: 0.875rem;
    line-height: 1.6;
}

.footer-title {
    color: var(--text-dark);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

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

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.875rem;
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-copyright {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    margin-bottom: 0.5rem;
}

.footer-disclaimer {
    color: var(--text-light);
    font-size: 0.75rem;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero {
        padding: 2rem 0;
    }

    .hero-title {
        font-size: 1.625rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .section-header {
        flex-direction: column;
        text-align: center;
    }

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

    .calculator-card {
        padding: 1.5rem;
    }
}

/* ===== AdSense Safe Container ===== */
.ad-container {
    width: 100%;
    max-width: 100%;
    margin: 3rem auto;
    /* 상하 여백을 넉넉히 주어 오클릭 방지 */
    text-align: center;
    overflow: hidden;
    /* 광고가 튀어나오지 않게 */
}

/* 광고 자리 표시자 (Placeholder) */
.ad-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 280px;
    /* CLS 방지용 높이 확보 */
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    color: #cbd5e1;
    font-size: 0.875rem;
    border: 1px dashed #e2e8f0;
}

@media (max-width: 768px) {
    .ad-placeholder {
        height: 250px;
    }
}