@charset "UTF-8";
/**
 * index.css
 * 아이와 함께하는 돈 공부 - 메인 인덱스 페이지 스타일
 */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

html,
body {
    overflow-x: clip;
    width: 100%;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, Arial, sans-serif;
    background: #f3f5f9;
    color: #222;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

/* ── 웹 접근성: 본문 바로가기 (Skip Navigation) ── */
.skip-nav {
    position: absolute;
    top: -9999px;
    left: 50%;
    transform: translateX(-50%);
    background: #1a2332;
    color: #fff;
    padding: 12px 24px;
    font-weight: 700;
    border-radius: 0 0 8px 8px;
    z-index: 99999;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: top 0.2s ease;
}

.skip-nav:focus {
    top: 0;
    outline: 2px solid #3b82f6;
}

/* ── 글로벌 네비게이션 헤더 (category.html과 완벽 일치) ── */
body>header {
    background: #1a2332;
    border-bottom: 1px solid #1a2332;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, .15);
    will-change: transform;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

nav {
    max-width: 1060px;
    margin: auto;
    padding: 24px 41px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.logo {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    line-height: 1;
}

.nav-logo-img {
    height: 48px;
    width: auto;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
    image-rendering: -webkit-optimize-contrast;
    transition: transform .2s ease, opacity .2s ease;
}

.logo:hover .nav-logo-img {
    transform: scale(1.03);
    opacity: 0.95;
}

.nav-links {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
}

.nav-links a {
    color: #c8d8ea;
    text-decoration: none;
    font-size: 18px;
    padding: 9px 19px;
    border-radius: 20px;
    transition: background .2s, color .2s;
}

.nav-links a:hover,
.nav-links a.on {
    background: #173b63;
    color: #fff;
}

/* ── 헤더 금융 키워드 검색창 ── */
.nav-search-form {
    display: inline-flex;
    align-items: center;
    position: relative;
    margin-left: 10px;
}

.nav-search-input {
    width: 175px;
    height: 36px;
    padding: 0 34px 0 14px;
    font-size: 13.5px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    outline: none;
    transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: inherit;
}

.nav-search-input::placeholder {
    color: rgba(255, 255, 255, 0.55);
    font-size: 13px;
}

.nav-search-input:focus {
    width: 220px;
    background: rgba(255, 255, 255, 0.16);
    border-color: #38a169;
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.25);
}

.nav-search-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color .2s ease, transform .2s ease;
}

.nav-search-btn:hover {
    color: #4ade80;
    transform: scale(1.1);
}



/* ── 히어로 배너 (메인 랜드마크 최상단 H1 구획) ── */
header.hero,
.hero {
    background: none;
    border: none;
    position: static;
    box-shadow: none;
    color: #173b63;
    padding: 34px 24px 24px;
    text-align: center;
}

.hero h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -.5px;
    margin-bottom: 8px;
    line-height: 1.32;
}

.hero .sub {
    font-size: 14px;
    opacity: .88;
    max-width: 640px;
    margin: 0 auto;
    line-height: 1.55;
    word-break: keep-all;
}

/* ── 본문 레이아웃 (PC 슬림 최적화) ── */
main {
    max-width: 1060px;
    margin: 0 auto;
    padding: 0 24px 50px;
}

.sec-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 28px 0 14px;
}

.sec-header:first-of-type {
    margin-top: 0;
}

.sec-title {
    font-size: 18px;
    font-weight: 800;
    color: #173b63;
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
}

.sec-more {
    font-size: 13.5px;
    font-weight: 600;
    color: #2563eb;
    text-decoration: none;
    transition: color .18s;
}

.sec-more:hover {
    color: #173b63;
    text-decoration: underline;
}

/* ── 최신 글 리스트 (스크린샷 231 일치 가로형 피드 레이아웃) ── */
.posts {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 28px;
}

.card.post {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 18px 22px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 8px rgba(0, 0, 0, .03);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.card.post:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px rgba(23, 59, 99, .08);
    border-color: #aac1e0;
}

.card.post:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* 왼쪽 텍스트 정보 */
.card.post .post-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.card.post h2,
.card.post h3 {
    font-size: 16.5px;
    font-weight: 700;
    color: #173b63;
    line-height: 1.45;
    margin: 0 0 7px;
    word-break: keep-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color .18s;
}

.card.post:hover h2,
.card.post:hover h3 {
    color: #2563eb;
}

.card.post p {
    font-size: 13.5px;
    color: #556980;
    line-height: 1.58;
    margin: 0 0 9px;
    word-break: keep-all;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card.post .date {
    font-size: 12px;
    color: #8fa1b5;
    line-height: 1.3;
    font-weight: 500;
}

/* 오른쪽 대표 이미지(썸네일 - 16:9 표준 비율로 텍스트 잘림 완전 방지) */
.card.post .post-thumb {
    flex-shrink: 0;
    width: 160px;
    aspect-ratio: 16 / 9;
    height: auto;
    border-radius: 9px;
    overflow: hidden;
    background: #edf2f7;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}

.card.post .post-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform .3s ease;
}

.card.post:hover .post-thumb img {
    transform: scale(1.05);
}

/* ── 푸터 (category.html과 완벽 일치) ── */
footer {
    background: #1a2332;
    color: #7a8fa6;
    text-align: center;
    padding: 36px 20px;
    padding-bottom: calc(36px + env(safe-area-inset-bottom, 0px));
    font-size: 13px;
    line-height: 1.8;
}

footer b {
    color: #c8d8ea;
    font-size: 14.5px;
}

.footer-links {
    margin: 10px 0 6px;
}

.footer-links a {
    color: #9cb2cb;
    font-size: 13px;
    text-decoration: none;
    margin: 0 7px;
    transition: color .2s;
}

.footer-links a:hover {
    color: #ffffff;
    text-decoration: underline;
}

footer small {
    display: block;
    margin-top: 6px;
    opacity: .75;
}

footer .copyright {
    color: #8fa2ba;
    font-size: 12.5px;
    margin: 10px 0 0;
    letter-spacing: .2px;
}

/* ── 복리 시뮬레이터 컴팩트 티저 위젯 (PC 슬림 최적화) ── */
.sim-teaser {
    background: #fff;
    border: 1px solid #d8e2ee;
    border-radius: 14px;
    padding: 20px 24px 18px;
    margin-bottom: 24px;
    box-shadow: 0 3px 16px rgba(23, 59, 99, .05);
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
    align-items: center;
}

.sim-teaser-left h2 {
    font-size: 17.5px;
    font-weight: 800;
    color: #173b63;
    margin-bottom: 6px;
    line-height: 1.35;
    word-break: keep-all;
}

.sim-teaser-left>p {
    font-size: 13px;
    color: #4e6277;
    line-height: 1.5;
    margin-bottom: 12px;
    word-break: keep-all;
}

.teaser-highlight {
    color: #0d9e6e;
    font-weight: 800;
}

.sim-teaser-inputs {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
}

.teaser-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.teaser-label {
    font-size: 12px;
    font-weight: 700;
    color: #273e56;
    min-width: 60px;
    cursor: pointer;
    user-select: none;
}

.teaser-input-wrap {
    display: inline-flex;
    align-items: center;
    background: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 6px;
    padding: 1px 7px;
    height: 28px;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
    touch-action: manipulation;
}

.teaser-input-wrap:focus-within {
    border-color: #173b63;
    box-shadow: 0 0 0 2px rgba(23, 59, 99, .10);
}

.teaser-num {
    width: 62px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 800;
    color: #173b63;
    text-align: right;
    outline: none;
    font-family: inherit;
    height: 26px;
    line-height: 26px;
    appearance: textfield;
    -moz-appearance: textfield;
}

.teaser-num::-webkit-outer-spin-button,
.teaser-num::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.teaser-unit {
    font-size: 11.5px;
    font-weight: 700;
    color: #64748b;
    margin-left: 3px;
    white-space: nowrap;
}

.sim-teaser-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 18px;
    border-radius: 20px;
    background: #173b63;
    color: #fff;
    font-size: 12.5px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s, transform .18s, box-shadow .18s;
}

.sim-teaser-btn:hover {
    background: #1e5a9c;
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(23, 59, 99, .18);
}

.sim-teaser-btn:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* ── [바톤 웰스 시그니처: 프리미엄 딥 사파이어 & 네온 시안 골드 카드 (PC 슬림 최적화)] ── */
.teaser-result-card {
    background: linear-gradient(145deg, #091a30 0%, #0f2746 55%, #183b63 100%);
    border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 12px;
    padding: 16px 18px 14px;
    color: #fff;
    box-shadow: 0 8px 20px -3px rgba(7, 21, 38, 0.40), inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.teaser-res-label {
    font-size: 11.5px;
    color: #7dd3fc;
    font-weight: 700;
    margin-bottom: 2px;
    letter-spacing: -.2px;
}

.teaser-res-total {
    font-size: 25px;
    font-weight: 800;
    color: #22d3ee;
    margin-bottom: 8px;
    letter-spacing: -.5px;
    text-shadow: 0 0 16px rgba(34, 211, 238, 0.35);
}

.teaser-res-bar-wrap {
    height: 6px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 3px;
    overflow: hidden;
    display: flex;
    margin-bottom: 10px;
}

.teaser-res-bar-p {
    background: #38bdf8;
    height: 100%;
    width: 40%;
    transition: width .3s ease;
}

.teaser-res-bar-r {
    background: #f43f5e;
    height: 100%;
    width: 60%;
    transition: width .3s ease;
}

.teaser-res-rows {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.teaser-res-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #cbdcf0;
}

.tdot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: middle;
}

.tdot-p {
    background: #38bdf8;
}

.tdot-r {
    background: #f43f5e;
}

.teaser-profit-val {
    color: #ffffff;
    font-weight: 700;
}

/* ── 복리 시뮬레이터 장기 투자 안내 (child-tax-gift 핵심 요약 박스 스타일) ── */
.teaser-notice {
    grid-column: 1 / -1;
    margin-top: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px 20px;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.04);
    word-break: keep-all;
}

.teaser-notice-title {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 8px;
    letter-spacing: -.2px;
}

.teaser-notice-desc {
    margin: 0;
    font-size: 13.5px;
    line-height: 1.68;
    color: #475569;
}

.teaser-notice-desc + .teaser-notice-desc {
    margin-top: 6px;
}

/* ── 반응형 미디어 쿼리 ── */
@media (max-width: 900px) {
    .sim-teaser {
        grid-template-columns: 1fr;
        gap: 24px;
    }
}

@media (max-width: 650px) {
    .teaser-notice {
        padding: 13px 15px;
        margin-top: 14px;
        border-radius: 9px;
    }

    .teaser-notice-title {
        font-size: 13px;
        margin-bottom: 6px;
    }

    .teaser-notice-desc {
        font-size: 13px;
        line-height: 1.6;
    }

    nav {
        padding: 9px 14px 8px;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 5px;
    }

    .logo {
        font-size: 19px;
        justify-content: center;
        text-align: center;
    }

    .nav-links {
        justify-content: center;
        gap: 6px;
        flex-wrap: wrap;
    }

    .nav-links a {
        font-size: 13px;
        padding: 6px 12px;
        display: inline-flex;
        align-items: center;
    }

    .nav-links a:active {
        background: #173b63;
        color: #fff;
    }

    /* 모바일 헤더: 돋보기 아이콘 전용 & 터치 시 확장 UX */
    .nav-links {
        display: flex;
        align-items: center;
        justify-content: center;
        flex-wrap: wrap;
        gap: 6px;
    }

    .nav-search-form {
        margin-left: 4px;
        position: relative;
        display: inline-flex !important;
        align-items: center;
        justify-content: flex-end;
    }

    /* 모바일 헤더: 평소 돋보기 아이콘 ➡️ 터치/클릭 시 PC형으로 확장 */
    .nav-search-input {
        width: 32px !important;
        height: 32px !important;
        padding: 0 !important;
        border-radius: 50% !important;
        background: transparent !important;
        border: 1px solid transparent !important;
        color: transparent !important;
        cursor: pointer;
        position: relative;
        z-index: 2;
        transition: all 0.28s cubic-bezier(0.4, 0, 0.2, 1) !important;
    }

    .nav-search-input::placeholder {
        color: transparent !important;
    }

    .nav-search-form:focus-within .nav-search-input,
    .nav-search-form.active .nav-search-input,
    .nav-search-input:focus {
        width: clamp(125px, 36vw, 160px) !important;
        height: 32px !important;
        padding: 0 30px 0 12px !important;
        border-radius: 20px !important;
        background: rgba(255, 255, 255, 0.16) !important;
        border: 1px solid #38a169 !important;
        color: #ffffff !important;
        cursor: text;
        box-shadow: 0 0 0 2px rgba(56, 161, 105, 0.25) !important;
        z-index: 1;
    }

    .nav-search-form:focus-within .nav-search-input::placeholder,
    .nav-search-form.active .nav-search-input::placeholder,
    .nav-search-input:focus::placeholder {
        color: rgba(255, 255, 255, 0.6) !important;
        font-size: 11.5px;
    }

    .nav-search-btn {
        position: absolute;
        right: 7px !important;
        width: 24px;
        height: 24px;
        z-index: 3;
        pointer-events: auto !important;
    }

    .nav-search-input:focus::placeholder {
        color: rgba(255, 255, 255, 0.7) !important;
    }

    .hero {
        padding: 24px 16px 18px;
    }

    .hero h1 {
        font-size: 21px;
        margin-bottom: 5px;
        word-break: keep-all;
    }

    .hero .sub {
        font-size: 12.5px;
        line-height: 1.45;
    }

    main {
        padding: 14px 12px 36px;
    }

    /* ── 1. 복리 시뮬레이터 티저 위젯 초슬림화 (내용 100% 보존) ── */
    .sim-teaser {
        padding: 13px 13px 14px;
        border-radius: 12px;
        margin-bottom: 18px;
        gap: 12px;
    }

    .sim-teaser-left h2 {
        font-size: 15.5px;
        margin-bottom: 4px;
        line-height: 1.3;
    }

    .sim-teaser-left>p {
        font-size: 12px;
        line-height: 1.45;
        margin-bottom: 10px;
    }

    .sim-teaser-inputs {
        gap: 5px;
        margin-bottom: 10px;
    }

    .teaser-row {
        gap: 8px;
    }

    .teaser-label {
        font-size: 11.5px;
        min-width: 56px;
    }

    .teaser-input-wrap {
        height: 28px;
        padding: 1px 7px;
        border-radius: 6px;
    }

    .teaser-num {
        width: 62px;
        height: 26px;
        line-height: 26px;
        font-size: 16px;
        transform: scale(0.85);
        transform-origin: right center;
    }

    .teaser-unit {
        font-size: 11px;
        margin-left: 2px;
    }

    .sim-teaser-btn {
        width: 100%;
        justify-content: center;
        font-size: 12px;
        padding: 8px 12px;
        min-height: 32px;
        border-radius: 16px;
    }

    .sim-teaser-btn:active {
        background: #112d4e;
        transform: scale(0.98);
    }

    /* 티저 우측 결과 카드 초슬림화 */
    .teaser-result-card {
        padding: 11px 12px 10px;
        border-radius: 10px;
    }

    .teaser-res-label {
        font-size: 10.5px;
        margin-bottom: 1px;
    }

    .teaser-res-total {
        font-size: 21px;
        margin-bottom: 6px;
        line-height: 1.2;
    }

    .teaser-res-bar-wrap {
        height: 5px;
        margin-bottom: 7px;
        border-radius: 3px;
    }

    .teaser-res-rows {
        gap: 4px;
    }

    .teaser-res-row {
        font-size: 11px;
    }

    .tdot {
        width: 6px;
        height: 6px;
        margin-right: 4px;
    }

    /* ── 2. 최신 글 섹션 및 카드 모바일 최적화 ── */
    .sec-header {
        margin: 24px 0 12px;
        padding-bottom: 6px;
    }

    .sec-badge {
        font-size: 9.5px;
    }

    .sec-title {
        font-size: 16.5px;
    }

    .sec-more {
        font-size: 11.5px;
        padding: 4px 9px;
    }

    .posts {
        gap: 10px;
        margin-bottom: 20px;
    }

    .card.post {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 12px 14px;
        gap: 12px;
        border-radius: 10px;
    }

    .card.post .post-info {
        flex: 1;
        min-width: 0;
    }

    .card.post h2 {
        font-size: 14.5px;
        font-weight: 700;
        color: #173b63;
        margin-bottom: 4px;
        line-height: 1.38;
        word-break: keep-all;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .card.post p {
        font-size: 12px;
        line-height: 1.45;
        margin-bottom: 5px;
        color: #556980;
        word-break: keep-all;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .card.post .date {
        font-size: 11px;
        color: #8fa1b5;
        line-height: 1.3;
    }

    .card.post .post-thumb {
        width: 116px;
        aspect-ratio: 16 / 9;
        height: auto;
        border-radius: 8px;
        flex-shrink: 0;
    }

    .card-footer {
        padding-top: 10px;
    }

    .card-read-label {
        font-size: 11.5px;
    }

    .card-arrow-icon {
        width: 22px;
        height: 22px;
    }
}