/* ==========================================================================
   다음머니 추가 스타일 — 배경 영상을 정지 이미지로 바꾸고, 본문형 하위페이지를 붙인다.
   styles.css(원본 레이아웃) 뒤에 읽힌다.
   ========================================================================== */

/* ── 색 토큰 덮어쓰기 ────────────────────────────────────────────────
   대표 이미지가 앰버·황금 계열이라 파란 강조색을 앰버로 바꿔 맞춘다.
   남색(--navy)은 그대로 두어 남색 + 앰버 조합으로 간다.
   styles.css 는 원본이라 손대지 않고 여기서만 덮어쓴다. */
:root {
    --blue: #c0392b;        /* 강조 — 흰 바탕에서 명암비 5.44 */
    --blue-light: #e38b82;  /* 강조 밝은 쪽 — 남색 바탕 */
    --teal: #dd7469;        /* 히어로 제목 강조 */
}

/* ── 배경 영상 자리에 이미지 ─────────────────────────────────────────── */
.hero-video-wrap img,
.video-divider img,
.contact-video-wrap img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ── 글자 로고 ───────────────────────────────────────────────────────── */
.logo { gap: 10px; }

.logo-mark {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: linear-gradient(135deg, var(--blue) 0%, var(--blue-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.logo-mark svg { width: 20px; height: 20px; }

.logo-text {
    font-size: 1.32rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--white);
    transition: color var(--transition);
}

.logo-sub {
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.14em;
    color: rgba(255, 255, 255, 0.6);
    transition: color var(--transition);
}

#header.scrolled .logo-text { color: var(--text-primary); }
#header.scrolled .logo-sub { color: var(--gray-400); }

.footer-logo { display: flex; align-items: center; gap: 10px; height: auto; }
.footer-logo .logo-text { color: var(--white); }
.footer-logo .logo-sub { color: rgba(255, 255, 255, 0.55); }

/* ── 하위페이지 히어로 ───────────────────────────────────────────────── */
.page-hero {
    position: relative;
    height: 62vh;
    min-height: 430px;
    display: flex;
    align-items: center;
    overflow: hidden;
    background: var(--navy-dark);
}

.page-hero-media { position: absolute; inset: 0; z-index: 0; }

.page-hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(105deg, rgba(15, 26, 46, 0.95) 0%, rgba(26, 39, 68, 0.8) 55%, rgba(15, 26, 46, 0.6) 100%);
}

.page-hero .container { position: relative; z-index: 2; }

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.62);
    margin-bottom: 20px;
}

.breadcrumb a:hover { color: var(--blue-light); }
.breadcrumb i { font-style: normal; opacity: 0.45; }

.page-hero h1 {
    font-size: clamp(1.85rem, 4.2vw, 2.95rem);
    font-weight: 800;
    line-height: 1.34;
    letter-spacing: -0.03em;
    color: var(--white);
    margin-bottom: 18px;
    word-break: keep-all;
}

.page-hero-desc {
    max-width: 660px;
    font-size: 1.02rem;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.82);
    word-break: keep-all;
}

.page-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
}

.page-hero-meta span {
    padding: 7px 15px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 999px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ── 본문(doc) ───────────────────────────────────────────────────────── */
.doc { padding: 96px 0 40px; }

.doc-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 288px;
    gap: 56px;
    align-items: start;
}

.doc-body { min-width: 0; }
.doc-body > section { margin-bottom: 62px; }
.doc-body > section:last-child { margin-bottom: 0; }

.doc-body h2 {
    position: relative;
    font-size: clamp(1.32rem, 2.4vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.44;
    color: var(--navy);
    padding-bottom: 16px;
    margin-bottom: 22px;
    border-bottom: 2px solid var(--gray-200);
    word-break: keep-all;
}

.doc-body h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -2px;
    width: 54px;
    height: 2px;
    background: var(--blue);
}

.doc-body h3 {
    font-size: 1.06rem;
    font-weight: 700;
    color: var(--navy);
    margin: 30px 0 12px;
    letter-spacing: -0.02em;
    word-break: keep-all;
}

.doc-body p {
    font-size: 1rem;
    line-height: 1.92;
    color: var(--text-secondary);
    margin-bottom: 16px;
    word-break: keep-all;
}

.doc-body p strong { color: var(--navy); font-weight: 700; }

.doc-list { margin: 6px 0 20px; }

.doc-list li {
    position: relative;
    padding-left: 22px;
    margin-bottom: 11px;
    font-size: 0.98rem;
    line-height: 1.82;
    color: var(--text-secondary);
    word-break: keep-all;
}

.doc-list li::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 13px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--blue);
}

.doc-list li b { color: var(--navy); font-weight: 700; }

.doc-note {
    border-left: 3px solid var(--blue);
    background: var(--gray-50);
    border-radius: 0 10px 10px 0;
    padding: 20px 24px;
    margin: 22px 0;
}

.doc-note p { margin: 0; font-size: 0.95rem; line-height: 1.85; }
.doc-note p + p { margin-top: 10px; }

.doc-table-wrap { overflow-x: auto; margin: 20px 0 24px; }

.doc-table {
    width: 100%;
    min-width: 480px;
    border-collapse: collapse;
    font-size: 0.94rem;
}

.doc-table caption {
    caption-side: top;
    text-align: left;
    font-size: 0.86rem;
    color: var(--gray-400);
    padding-bottom: 10px;
    word-break: keep-all;
}

.doc-table th,
.doc-table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--gray-200);
    text-align: left;
    line-height: 1.7;
    word-break: keep-all;
}

.doc-table thead th {
    background: var(--navy);
    color: var(--white);
    font-weight: 700;
    font-size: 0.9rem;
    border-bottom: none;
}

.doc-table tbody th {
    width: 26%;
    font-weight: 700;
    color: var(--navy);
    background: var(--gray-50);
}

.doc-table td { color: var(--text-secondary); }
.doc-table tbody tr:last-child th,
.doc-table tbody tr:last-child td { border-bottom: none; }

.doc-steps { counter-reset: docstep; margin: 22px 0 26px; }

.doc-steps li {
    counter-increment: docstep;
    position: relative;
    padding: 0 0 24px 58px;
    border-left: 2px solid var(--gray-200);
    margin-left: 17px;
}

.doc-steps li:last-child { border-left-color: transparent; padding-bottom: 0; }

.doc-steps li::before {
    content: counter(docstep);
    position: absolute;
    left: -18px;
    top: -4px;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--navy);
    color: var(--white);
    font-size: 0.86rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-steps li b {
    display: block;
    color: var(--navy);
    font-size: 1.02rem;
    font-weight: 700;
    margin-bottom: 6px;
}

.doc-steps li span {
    display: block;
    color: var(--text-secondary);
    font-size: 0.96rem;
    line-height: 1.82;
    word-break: keep-all;
}

/* ── 옆 목차 ─────────────────────────────────────────────────────────── */
.doc-aside { position: sticky; top: 104px; }

.doc-toc {
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 24px 22px;
    background: var(--white);
}

.doc-toc h4 {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--gray-400);
    margin-bottom: 14px;
}

.doc-toc li { margin-bottom: 10px; }

.doc-toc a {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    display: block;
    word-break: keep-all;
}

.doc-toc a:hover { color: var(--blue); }

.doc-cta {
    margin-top: 20px;
    border-radius: 14px;
    padding: 26px 22px;
    background: var(--navy);
    color: var(--white);
}

.doc-cta h4 { font-size: 1.02rem; font-weight: 700; margin-bottom: 8px; }
.doc-cta p { font-size: 0.87rem; line-height: 1.7; color: rgba(255, 255, 255, 0.72); margin-bottom: 16px; }

.doc-cta-tel {
    display: block;
    text-align: center;
    padding: 13px;
    border-radius: 9px;
    background: var(--blue);
    color: var(--white);
    font-weight: 700;
    font-size: 1rem;
}

.doc-cta-tel:hover { background: var(--blue-light); }

.doc-cta-sms {
    display: block;
    text-align: center;
    margin-top: 9px;
    padding: 12px;
    border-radius: 9px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    font-size: 0.92rem;
    font-weight: 600;
}

.doc-cta-sms:hover { border-color: var(--blue-light); color: var(--blue-light); }

/* ── 자주 묻는 질문 ──────────────────────────────────────────────────── */
.faq-list { border-top: 1px solid var(--gray-200); }

.faq-item { border-bottom: 1px solid var(--gray-200); }

.faq-q {
    width: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 22px 4px;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font);
    font-size: 1.02rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--navy);
    line-height: 1.6;
    word-break: keep-all;
}

.faq-q::after {
    content: "";
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    margin-top: 7px;
    border-right: 2px solid var(--blue);
    border-bottom: 2px solid var(--blue);
    transform: rotate(45deg);
    transition: transform var(--transition);
}

.faq-item.open .faq-q::after { transform: rotate(-135deg); }

.faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-slow);
}

.faq-item.open .faq-a { max-height: 520px; }

.faq-a p {
    padding: 0 4px 24px;
    margin: 0;
    font-size: 0.97rem;
    line-height: 1.9;
    color: var(--text-secondary);
    word-break: keep-all;
}

/* 메인 FAQ 섹션은 밝은 바탕 위에 온다 */
.section.faq { background: var(--gray-50); }

/* ── 관련 문서 ───────────────────────────────────────────────────────── */
.rel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
    gap: 18px;
    margin-top: 24px;
}

.rel-card {
    display: block;
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 24px 22px;
    background: var(--white);
    transition: var(--transition);
}

.rel-card:hover {
    border-color: var(--blue);
    transform: translateY(-4px);
    box-shadow: 0 14px 34px rgba(26, 39, 68, 0.09);
}

.rel-card span {
    display: block;
    font-size: 0.73rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--blue);
    margin-bottom: 9px;
}

.rel-card h3 {
    font-size: 1.04rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
    letter-spacing: -0.02em;
}

.rel-card p {
    font-size: 0.88rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin: 0;
    word-break: keep-all;
}

/* ── 아래쪽 CTA 띠 ───────────────────────────────────────────────────── */
.cta-band {
    background: linear-gradient(120deg, var(--navy-dark) 0%, var(--navy-light) 100%);
    padding: 74px 0;
    color: var(--white);
}

.cta-band-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.cta-band h2 {
    font-size: clamp(1.4rem, 2.8vw, 1.95rem);
    font-weight: 800;
    line-height: 1.44;
    letter-spacing: -0.03em;
    margin-bottom: 10px;
    word-break: keep-all;
}

.cta-band p { color: rgba(255, 255, 255, 0.74); font-size: 0.96rem; line-height: 1.75; word-break: keep-all; }

.cta-band-actions { display: flex; flex-wrap: wrap; gap: 12px; }

.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 16px 28px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    transition: var(--transition);
}

.cta-btn svg { width: 18px; height: 18px; }

.cta-btn--tel { background: var(--blue); color: var(--white); }
.cta-btn--tel:hover { background: var(--blue-light); transform: translateY(-2px); }

.cta-btn--sms { border: 1px solid rgba(255, 255, 255, 0.36); color: var(--white); }
.cta-btn--sms:hover { border-color: var(--blue-light); color: var(--blue-light); }

/* ── 폼 부가 ─────────────────────────────────────────────────────────── */
.privacy-note {
    margin-top: 10px;
    font-size: 0.79rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.5);
}

.form-status {
    margin-top: 14px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #ffc2c2;
    min-height: 1px;
}

/* ── 푸터 문서 목록 ──────────────────────────────────────────────────── */
.footer-docs ul { columns: 2; column-gap: 20px; }
.footer-docs li { margin-bottom: 9px; break-inside: avoid; }

.footer-note {
    margin-top: 20px;
    font-size: 0.78rem;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.42);
    max-width: 820px;
    word-break: keep-all;
}

/* ── 반응형 ──────────────────────────────────────────────────────────── */
@media (max-width: 992px) {
    .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .doc-aside { position: static; }
    .doc-toc { display: none; }
}

@media (max-width: 768px) {
    .doc { padding: 76px 0 30px; }
    .doc-body > section { margin-bottom: 48px; }
    .page-hero { height: auto; min-height: 0; padding: 130px 0 62px; }
    .cta-band { padding: 56px 0; }
    .cta-band-actions { width: 100%; }
    .cta-btn { flex: 1 1 auto; justify-content: center; }
    .footer-docs ul { columns: 1; }
    .logo-sub { display: none; }
}

/* ── 모바일 메뉴 — 원본은 z-index 999 라 헤더(1000)에 가려 닫기 버튼이 안 눌렸다 ── */
.nav-overlay { z-index: 1100; }

.nav-overlay .close-btn {
    top: 18px;
    right: 20px;
    width: 44px;
    height: 44px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* ── 히어로 문의 버튼 두 개 (전화·문자) ──────────────────────────────── */
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.hero-btn--solid {
    background: var(--blue);
    border-color: var(--blue);
    font-weight: 700;
}

.hero-btn--solid:hover {
    background: var(--white);
    color: var(--navy);
    border-color: var(--white);
}

.hero-btn svg { flex: 0 0 auto; }
.hero-btn:hover svg { transform: none; }

/* ── 폼 자리에 넣은 전화·문자 안내 (contact-form-wrap 안) ─────────────── */
.contact-cta {
    display: flex;
    flex-direction: column;
    gap: 18px;
    color: var(--white);
}

.contact-cta h3 {
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.45;
}

.contact-cta > p {
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.97rem;
    line-height: 1.75;
}

.contact-cta-btns {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-cta-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 24px;
    border-radius: 14px;
    font-weight: 700;
    transition: var(--transition);
}

.contact-cta-btn svg {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
}

.contact-cta-btn b {
    display: block;
    font-size: 1.12rem;
    letter-spacing: -0.02em;
}

.contact-cta-btn span {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    opacity: 0.78;
}

.contact-cta-btn--tel {
    background: var(--blue);
    color: var(--white);
}

.contact-cta-btn--tel:hover {
    background: var(--blue-light);
    transform: translateY(-2px);
}

.contact-cta-btn--sms {
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: var(--white);
}

.contact-cta-btn--sms:hover {
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-2px);
}

.contact-cta-note {
    margin: 0;
    padding-top: 4px;
    color: rgba(255, 255, 255, 0.55);
    font-size: 0.86rem;
    line-height: 1.7;
}

/* ── 플로팅 배너가 CTA 띠·푸터를 가리지 않게 아래쪽 여백 ─────────────── */
.footer .footer-bottom { padding-bottom: 46px; }

@media (max-width: 768px) {
    .hero-actions { flex-direction: column; align-items: flex-start; }
    .hero-btn { width: 100%; justify-content: center; }
    .footer .footer-bottom { padding-bottom: 78px; }
}

/* 비교표 강조 열 (우리 방식) */
.doc-table th.is-key,
.doc-table td.is-key{background:rgba(167,91,14,.07);}
.doc-table thead th.is-key{background:var(--blue);color:#fff;font-weight:800;}
.doc-table td.is-key{color:var(--text-primary);font-weight:700;
  box-shadow:inset 1px 0 0 rgba(167,91,14,.28), inset -1px 0 0 rgba(167,91,14,.28);}
.doc-table tbody tr:last-child td.is-key{box-shadow:inset 1px 0 0 rgba(167,91,14,.28),
  inset -1px 0 0 rgba(167,91,14,.28), inset 0 -2px 0 rgba(167,91,14,.28);}
.doc-table thead th.is-key{box-shadow:inset 0 2px 0 rgba(167,91,14,.5);}
