/* 청년 대출 계산기 — loan.html (기존 서브페이지와 톤 통일) */

[id^="section-"] {
    scroll-margin-top: 80px;
}

.loan-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* HERO */
.loan-hero {
    padding: 64px 0 72px;
    background: linear-gradient(165deg, #eef4fb 0%, #f6f8fb 50%, #fff 100%);
    border-bottom: 1px solid #e8eaee;
}

.loan-hero__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center;
    max-width: 1120px;
    margin: 0 auto;
}

.loan-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: #0078c8;
    background: #e8f4fc;
    margin-bottom: 16px;
}

.loan-hero__title {
    font-size: clamp(1.75rem, 4vw, 2.45rem);
    font-weight: 800;
    line-height: 1.28;
    color: #111827;
    margin: 0 0 16px;
    letter-spacing: -0.03em;
}

.loan-hero__lead {
    font-size: 1.05rem;
    line-height: 1.75;
    color: #5c6370;
    margin: 0 0 28px;
}

.loan-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.loan-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 12px 22px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 10px;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
    box-sizing: border-box;
}

.loan-btn--primary {
    background: linear-gradient(135deg, #0078c8 0%, #0c8ecf 100%);
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 120, 200, 0.28);
}

.loan-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 120, 200, 0.35);
}

.loan-btn--ghost {
    background: #fff;
    color: #0078c8;
    border-color: #c5dce8;
}

.loan-btn--ghost:hover {
    background: #f0f7fc;
    transform: translateY(-2px);
}

.loan-btn--block {
    width: 100%;
    margin-top: 8px;
}

.loan-btn--more {
    margin-top: 16px;
    width: 100%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    display: block;
}

/* (장식용 아이콘 박스 영역 제거됨) */

/* MAIN */
.loan-main {
    padding: 40px 0 64px;
    background: #f0f2f5;
}

.loan-source-note {
    font-size: 12px;
    color: #8b919c;
    max-width: 1120px;
    margin: 0 auto 20px;
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px solid #eef1f5;
    line-height: 1.5;
}

.loan-calc-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    align-items: start;
    max-width: 1120px;
    margin: 0 auto;
}

.loan-card {
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 20px;
    padding: 28px 26px 32px;
    box-shadow: 0 8px 30px rgba(15, 23, 42, 0.06);
    transition: box-shadow 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.loan-card:hover {
    box-shadow: 0 12px 36px rgba(99, 102, 241, 0.1);
    border-color: rgba(199, 210, 254, 0.8);
}

.loan-card__head {
    margin-bottom: 22px;
    padding-bottom: 18px;
    border-bottom: 1px solid #eef1f5;
}

.loan-card__title {
    font-size: 1.2rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 6px;
}

.loan-card__desc {
    font-size: 13px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.loan-field {
    margin-bottom: 20px;
}

.loan-fieldset {
    border: none;
    padding: 0;
    margin: 0 0 20px;
}

.loan-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
}

.loan-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.loan-input {
    padding: 11px 14px;
    border: 1px solid #d8dde3;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.loan-input:focus {
    outline: none;
    border-color: #0c8ecf;
    box-shadow: 0 0 0 3px rgba(12, 142, 207, 0.12);
}

.loan-input--money {
    flex: 1;
    max-width: 240px;
}

.loan-input--narrow {
    max-width: 120px;
}

.loan-unit {
    font-size: 14px;
    color: #6b7280;
    font-weight: 600;
}

.loan-slider {
    width: 100%;
    margin-top: 12px;
    height: 28px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: transparent;
    cursor: pointer;
}

.loan-slider::-webkit-slider-runnable-track {
    height: 6px;
    border-radius: 999px;
    background: linear-gradient(to right, #0c8ecf var(--loan-pct, 50%), #d9d9d9 var(--loan-pct, 50%), #d9d9d9 100%);
}

.loan-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    margin-top: -6px;
    border-radius: 50%;
    background: #0c8ecf;
    box-shadow: 0 1px 4px rgba(12, 142, 207, 0.4);
}

.loan-slider::-moz-range-track {
    height: 6px;
    border-radius: 999px;
    background: #d9d9d9;
}

.loan-slider::-moz-range-progress {
    background: #0c8ecf;
    height: 6px;
    border-radius: 999px;
}

.loan-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border: none;
    border-radius: 50%;
    background: #0c8ecf;
}

.loan-slider-ticks {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #888;
    margin-top: 6px;
}

.loan-hint {
    font-size: 12px;
    color: #8b919c;
    margin: 8px 0 0;
}

.loan-rate-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.loan-rate-pill {
    padding: 8px 16px;
    border: 1px solid #d8dde3;
    border-radius: 999px;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
}

.loan-rate-pill:hover {
    border-color: #0c8ecf;
    color: #0078c8;
}

.loan-rate-pill.is-active {
    border-color: #0c8ecf;
    background: #e8f4fc;
    color: #0078c8;
}

.loan-year-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.loan-year-tab {
    flex: 1;
    min-width: 72px;
    padding: 10px 12px;
    border: 1px solid #d8dde3;
    border-radius: 10px;
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.loan-year-tab.is-active {
    border-color: #0c8ecf;
    background: linear-gradient(180deg, #f0f7fc, #e8f2fa);
    color: #0078c8;
}

.loan-method-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.loan-method-tab {
    padding: 14px 16px;
    border: 2px solid #d8dde3;
    border-radius: 12px;
    background: #fff;
    font-size: 15px;
    font-weight: 700;
    color: #5c6370;
    cursor: pointer;
    transition: all 0.2s ease;
}

.loan-method-tab.is-active {
    border-color: #0c8ecf;
    background: #f0f7fc;
    color: #0078c8;
    box-shadow: 0 2px 10px rgba(12, 142, 207, 0.15);
}

.loan-field--optional {
    font-size: 13px;
    color: #6b7280;
}

.loan-check {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
}

.loan-error {
    color: #dc2626;
    font-size: 13px;
    min-height: 1.25em;
    margin: 0 0 8px;
}

/* 결과 */
.loan-result-method {
    font-size: 13px;
    font-weight: 700;
    color: #0c8ecf;
    margin: 0 0 12px;
}

.loan-result-hero {
    padding: 20px 18px;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #f0f7fc 0%, #e8f2fa 100%);
    border: 1px solid #c5dce8;
    border-radius: 14px;
    text-align: center;
}

.loan-result-hero__label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 8px;
}

.loan-result-hero__value {
    margin: 0;
    font-size: clamp(1.85rem, 4vw, 2.35rem);
    font-weight: 800;
    color: #0078c8;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    word-break: keep-all;
}

.loan-result-won {
    font-size: 1.25rem;
    font-weight: 700;
    margin-left: 4px;
}

.loan-result-list {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

.loan-result-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eef1f5;
    font-size: 15px;
    color: #4b5563;
}

.loan-result-list li:last-child {
    border-bottom: none;
}

.loan-result-list strong {
    color: #0078c8;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.loan-result-summary {
    font-size: 14px;
    line-height: 1.65;
    color: #4b5563;
    margin: 0;
    padding: 16px;
    background: #f9fafb;
    border-radius: 10px;
    border: 1px solid #eef1f5;
}

/* 비교 */
.loan-compare {
    margin-top: 32px;
    padding: 26px 24px;
    background: #fff;
    border: 1px solid #e8eaee;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.05);
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
}

.loan-compare__title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #111827;
    margin: 0 0 6px;
}

.loan-compare__desc {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 20px;
}

.loan-compare-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.loan-compare-card {
    padding: 20px 18px;
    border: 1px solid #e8eaee;
    border-radius: 12px;
    background: #fafbfc;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.loan-compare-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.loan-compare-card__name {
    font-size: 1.05rem;
    font-weight: 800;
    color: #0078c8;
    margin: 0 0 8px;
}

.loan-compare-card__tip {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.5;
    margin: 0 0 14px;
}

.loan-compare-stats {
    list-style: none;
    margin: 0;
    padding: 0;
}

.loan-compare-stats li {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    padding: 8px 0;
    border-bottom: 1px solid #eef1f5;
    color: #4b5563;
}

.loan-compare-stats strong {
    color: #111827;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

/* 스케줄 */
.loan-schedule {
    margin-top: 28px;
    max-width: 1120px;
    margin-left: auto;
    margin-right: auto;
}

.loan-schedule__title {
    font-size: 1.1rem;
    font-weight: 800;
    margin: 0 0 6px;
}

.loan-schedule__desc {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 16px;
}

.loan-table-wrap {
    overflow-x: auto;
    border: 1px solid #e8eaee;
    border-radius: 12px;
    background: #fff;
}

.loan-table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    font-size: 14px;
}

.loan-table thead {
    background: linear-gradient(180deg, #f0f7fc, #e8f2fa);
}

.loan-table th,
.loan-table td {
    padding: 12px 14px;
    text-align: right;
    border-bottom: 1px solid #eef1f5;
}

.loan-table th:first-child,
.loan-table td:first-child {
    text-align: center;
}

.loan-table__empty {
    text-align: center !important;
    color: #9ca3af;
    padding: 24px !important;
}

.loan-table tbody tr:hover {
    background: #fafbfc;
}

.loan-table.is-expanded {
    max-height: none;
}

.loan-schedule .loan-table-wrap.loan-table--scroll {
    max-height: 360px;
    overflow-y: auto;
}

/* 정보 섹션 */
.loan-info {
    padding: 72px 0;
    background: #fff;
}

.loan-info--muted {
    background: #f6f8fb;
}

.loan-triple {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1120px;
    margin: 0 auto;
}

.loan-tip-card {
    padding: 22px 20px;
    border: 1px solid #e8eaee;
    border-radius: 14px;
    background: #fff;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.loan-tip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 14px 36px rgba(15, 23, 42, 0.1);
}

.loan-tip-card__title {
    font-size: 1rem;
    font-weight: 800;
    color: #0078c8;
    margin: 0 0 10px;
    line-height: 1.45;
}

.loan-tip-card__text {
    font-size: 14px;
    color: #5c6370;
    line-height: 1.6;
    margin: 0;
}

.loan-audience {
    list-style: none;
    max-width: 720px;
    margin: 0 auto;
    padding: 0;
}

.loan-audience__item {
    position: relative;
    padding: 16px 18px 16px 48px;
    margin-bottom: 12px;
    background: #fff;
    border: 1px solid #e8eaee;
    border-radius: 12px;
    font-size: 15px;
    color: #374151;
}

.loan-audience__item::before {
    content: "";
    position: absolute;
    left: 18px;
    top: 1.35rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #0c8ecf;
}

.loan-checklist {
    max-width: 720px;
    margin: 0 auto;
    padding-left: 22px;
    color: #4b5563;
    line-height: 1.85;
    font-size: 15px;
}

.loan-faq {
    padding: 72px 0;
    background: #fff;
}

.loan-notice {
    padding: 40px 0 56px;
    background: #f0f2f5;
}

.loan-notice__text {
    max-width: 800px;
    margin: 0 auto;
    font-size: 13px;
    color: #6b7280;
    line-height: 1.65;
    text-align: center;
}

.loan-reveal {
    opacity: 0;
    transform: translateY(14px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.loan-reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 991px) {
    .loan-hero__grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .loan-hero__actions {
        justify-content: center;
    }

    .loan-hero__visual {
        order: -1;
    }

    .loan-calc-layout {
        grid-template-columns: 1fr;
    }

    .loan-compare-grid {
        grid-template-columns: 1fr;
    }

    .loan-triple {
        grid-template-columns: 1fr;
    }

    .loan-input--money {
        max-width: none;
    }
}

@media (max-width: 767px) {
    .loan-hero {
        padding: 48px 0 40px;
    }

    .loan-method-tabs {
        grid-template-columns: 1fr;
    }

    .loan-result-hero__value {
        font-size: 1.65rem;
    }
}
