/**
 * Trust Components v1.0
 * --------------------------------------------------------------
 * dummy 페이지 (.td-*) + 헤더/푸터/CTA/배지/히어로 등 컴포넌트.
 * 모든 색상·폰트·간격은 trust-design-system.css 의 :root 변수 참조.
 * industry.json brand_tokens 가 :root override 해도 자동 반영됨.
 */

/* ════════════════════════ dummy 페이지 ════════════════════════ */
/*
 * .td 는 부모 entry-content (테마 layout constraint) 를 escape 하고
 * viewport 풀 폭으로 확장한다. 그래야 .td-hero/.td-section 의 배경이
 * 풀 가로로 펼쳐지고, 안쪽 .td-wrap 만 1280px 제한으로 가운데 정렬된다.
 * — Twenty Twenty-Five, Twenty Twenty-Four 등 블록 테마 호환 alignfull 트릭.
 */
.td {
    font-family: var(--font-base);
    color: var(--trust-text);
    line-height: 1.6;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: 100vw;
    max-width: 100vw;
}
.td * { box-sizing: border-box; }
/* sticky 헤더 깨지 않으면서 가로 스크롤바 방지 (overflow:clip 사용) */
html { overflow-x: clip; }
/* 테마가 .entry-content > * 에 max-width 강제하는 경우 추가 보호 */
.entry-content > .td,
.wp-block-post-content > .td {
    max-width: 100vw !important;
}

.td-hero {
    background: linear-gradient(135deg, var(--trust-primary) 0%, var(--trust-primary-dark) 100%);
    padding: 120px 32px 105px;
    text-align: center;
    color: #fff;
    min-height: 480px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
@media (max-width: 599px) {
    .td-hero { padding: 90px 20px 75px; min-height: 360px; }
}
.td-hero h1 { font-size: var(--fs-h1); font-weight: 800; margin: 0 0 16px; line-height: 1.2; color: #fff; }
.td-hero p  { font-size: 1.05rem; opacity: 0.9; margin: 0 0 32px; max-width: 640px; margin-left: auto; margin-right: auto; }

.td-btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: var(--trust-radius);
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    cursor: pointer;
    transition: opacity var(--transition-fast);
    margin: 4px;
}
.td-btn--primary { background: var(--trust-accent); color: #fff; }
.td-btn--outline { background: transparent; color: #fff; border: 2px solid rgba(255, 255, 255, 0.7); }
.td-btn--dark    { background: var(--trust-primary); color: #fff; }
.td-btn:hover    { opacity: 0.85; }

.td-section            { padding: 64px 32px; }
.td-section--gray      { background: var(--trust-bg-alt); }
.td-section--dark      { background: var(--trust-primary); color: #fff; }
.td-wrap               { max-width: 1280px; margin: 0 auto; }
.td-h2                 { font-size: var(--fs-h2); font-weight: 800; text-align: center; margin: 0 0 40px; }
.td-h2--white          { color: #fff; }

.td-badge-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    padding: 32px 20px;
    background: #fff;
    border-bottom: 1px solid var(--trust-border);
}
.td-badge { text-align: center; min-width: 90px; }
.td-badge__val { font-size: 2.2rem; font-weight: 900; color: var(--trust-primary); line-height: 1; }
.td-badge__lbl { font-size: var(--fs-xs); color: var(--trust-muted); margin-top: 4px; }

.td-grid { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 600px) { .td-grid--2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) {
    .td-grid--3 { grid-template-columns: repeat(3, 1fr); }
    .td-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* 깨끗한 카드: border 없음, 좌측 라인 없음, 워터마크 없음 — 그림자 + radius 만 */
.td-card {
    background: #fff;
    border-radius: var(--trust-radius-lg);
    padding: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: none;
    transition: transform .2s ease, box-shadow .2s ease;
}
.td-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
}
.td-card__icon  { font-size: 1.85rem; margin-bottom: 10px; }
.td-card__title { font-size: 1.02rem; font-weight: 700; margin: 0 0 6px; color: var(--trust-text); }
.td-card__desc  { font-size: 0.85rem; color: var(--trust-muted); line-height: 1.55; margin: 0; }

/*
 * Step 카드: 좌측 라인 X, 우상단 워터마크 숫자 X.
 * 좌측 작은 둥근 컬러 박스 (.td-step__num) + 깨끗한 그림자만.
 * 컬러는 primary 네이비 (카톡 노란색과 충돌 회피).
 */
.td-step {
    position: relative;
    padding: 22px 20px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    border: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: transform .2s ease, box-shadow .2s ease;
    /* 우상단 워터마크 효과 절대 사용 X */
    overflow: hidden;
}
.td-step:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
}
.td-step__num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--trust-primary), color-mix(in srgb, var(--trust-primary) 70%, var(--trust-accent)));
    color: #fff;
    font-weight: 800;
    font-size: 0.95rem;
    line-height: 1;
    letter-spacing: -0.02em;
    box-shadow: 0 6px 14px color-mix(in srgb, var(--trust-primary) 24%, transparent);
}
.td-step__title { font-weight: 700; margin: 0; font-size: 1rem; color: var(--trust-text); line-height: 1.4; }
.td-step__desc  { font-size: 0.85rem; color: var(--trust-muted); margin: 0; line-height: 1.55; }

.td-quote {
    background: rgba(255, 255, 255, 0.12);
    border-radius: var(--trust-radius-lg);
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.td-quote__text   { font-size: 0.95rem; line-height: 1.8; color: rgba(255, 255, 255, 0.92); margin: 0 0 12px; }
.td-quote__author { font-size: var(--fs-xs); color: rgba(255, 255, 255, 0.6); }

.td-expert-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: transform .2s ease, box-shadow .2s ease;
}
.td-expert-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
}
.td-expert-card__thumb {
    height: 180px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--trust-primary) 13%, transparent), color-mix(in srgb, var(--trust-primary) 33%, transparent));
    display: flex; align-items: center; justify-content: center;
    font-size: 3.5rem; font-weight: 900; color: var(--trust-primary);
}
.td-expert-card__body  { padding: 14px; }
.td-expert-card__role  { font-size: 0.75rem; color: var(--trust-soft); margin: 0 0 4px; }
.td-expert-card__name  { font-size: 1.05rem; font-weight: 700; margin: 0 0 6px; line-height: 1.4; }
.td-expert-card__spec  { font-size: 0.8rem; color: var(--trust-primary); margin: 0 0 10px; line-height: 1.5; }
.td-expert-card__btn   { font-size: 0.82rem; color: var(--trust-primary); font-weight: 600; text-decoration: none; }
.td-expert-card__btn:hover { text-decoration: underline; }

.td-article {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: transform .2s ease, box-shadow .2s ease;
}
.td-article:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
}
.td-article__thumb  {
    height: 140px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--trust-primary) 8%, transparent), color-mix(in srgb, var(--trust-primary) 21%, transparent));
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; color: var(--trust-primary); font-weight: 600;
}
.td-article__body  { padding: 14px; }
.td-article__cat   { font-size: 0.72rem; color: #fff; background: var(--trust-primary); padding: 2px 8px; border-radius: 10px; display: inline-block; margin-bottom: 6px; }
.td-article__title { font-size: 0.92rem; font-weight: 700; margin: 0 0 6px; line-height: 1.4; color: var(--trust-text); }
.td-article__date  { font-size: 0.75rem; color: var(--trust-soft); }

/* archive 빈 상태 + 페이지네이션 */
.td-empty { text-align: center; padding: 40px 16px; color: var(--trust-muted); }
.td-empty p { margin: 0 0 8px; font-size: 1rem; }
.td-empty__hint { font-size: 0.88rem; color: var(--trust-soft); }
.td-empty__hint a { color: var(--trust-primary); font-weight: 600; }

.td-pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}
.td-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    min-height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    background: #fff;
    color: var(--trust-text);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: background var(--transition-fast), color var(--transition-fast);
}
.td-pagination .page-numbers:hover { background: var(--trust-bg-alt); }
.td-pagination .page-numbers.current {
    background: var(--trust-primary);
    color: #fff;
}

.td-faq        { border: 1px solid var(--trust-border); border-radius: var(--trust-radius); overflow: hidden; }
.td-faq-item   { border-bottom: 1px solid var(--trust-border); padding: 16px 20px; }
.td-faq-item:last-child { border-bottom: none; }
.td-faq-q      { font-weight: 700; color: var(--trust-text); margin: 0 0 6px; font-size: 0.95rem; }
.td-faq-a      { color: var(--trust-muted); font-size: 0.87rem; line-height: 1.7; margin: 0; }

.td-map {
    height: 200px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--trust-primary) 9%, transparent), color-mix(in srgb, var(--trust-primary) 21%, transparent));
    border-radius: var(--trust-radius);
    display: flex; align-items: center; justify-content: center;
    color: var(--trust-primary); font-weight: 600; font-size: 0.9rem; text-align: center;
}

.td-kakao-btn {
    background: var(--trust-kakao);
    color: var(--trust-kakao-text);
    display: inline-block;
    padding: 16px 36px;
    border-radius: var(--trust-radius);
    font-size: 1.1rem;
    font-weight: 700;
    text-decoration: none;
    margin: 8px;
}
.td-kakao-btn:hover { opacity: 0.88; }

.td-form { display: flex; flex-direction: column; gap: 12px; max-width: 480px; margin: 0 auto; }
.td-form input, .td-form select, .td-form textarea {
    width: 100%; padding: 12px 14px; border: 1px solid #d1d5db; border-radius: var(--trust-radius);
    font-size: 0.9rem; font-family: var(--font-base);
}
.td-form textarea { height: 100px; resize: vertical; }
.td-form button {
    background: var(--trust-primary); color: #fff; border: none;
    padding: 14px; border-radius: var(--trust-radius);
    font-size: 1rem; font-weight: 700; cursor: pointer; font-family: var(--font-base);
}
.td-form button:hover { opacity: 0.88; }

.td-tag {
    display: inline-block; padding: 6px 16px; border-radius: 20px;
    border: 1px solid #d1d5db; font-size: 0.82rem; margin: 4px;
    cursor: pointer; color: #374151 !important; text-decoration: none;
    transition: background .2s, color .2s, border-color .2s;
}
.td-tag:hover, .td-tag--active,
a.td-tag:hover, a.td-tag--active {
    background: var(--trust-primary) !important;
    color: #fff !important;
    border-color: var(--trust-primary) !important;
}

/* 테마 entry-content padding/margin 제거 — 히어로 위 빈 공간 해결 */
body.trust-themed .entry-content,
body.trust-themed .wp-block-post-content,
body.trust-themed main.wp-block-group,
body.trust-themed .is-layout-constrained {
    padding-top: 0 !important;
    margin-top: 0 !important;
}
body.trust-themed .td { margin-top: 0 !important; }
body.trust-themed .td > :first-child { margin-top: 0 !important; }

.td-recruit-benefit { display: flex; gap: 14px; align-items: flex-start; padding: 16px 0; border-bottom: 1px solid var(--trust-border); }
.td-recruit-benefit:last-child { border-bottom: none; }
.td-recruit-benefit__icon  { font-size: 1.6rem; min-width: 32px; }
.td-recruit-benefit__title { font-weight: 700; margin-bottom: 4px; }
.td-recruit-benefit__desc  { font-size: 0.85rem; color: var(--trust-muted); }

/* 모바일 폴리시: 320~599px 폰트·spacing·CTA 여백 */
@media (max-width: 599px) {
    .td-hero        { padding: 60px 16px 50px; }
    .td-hero h1     { font-size: 1.65rem; line-height: 1.25; }
    .td-hero p      { font-size: 0.95rem; }
    .td-section     { padding: 48px 16px; }
    .td-h2          { font-size: 1.35rem; margin: 0 0 28px; }
    .td-badge__val  { font-size: 1.6rem; }
    .td-badge-row   { gap: 20px; padding: 24px 16px; }
    .td-grid        { gap: 16px; }
    .td-card        { padding: 16px; }
    .td-step        { padding: 18px 16px; gap: 10px; }
    .td-step__num   { width: 38px; height: 38px; min-width: 38px; font-size: 0.88rem; }
    .td-expert-card__body  { padding: 12px; }
    .td-expert-card__thumb { height: 150px; font-size: 2.8rem; }
    .td-article__body  { padding: 12px; }
    .td-article__thumb { height: 120px; }
    .td-btn         { padding: 13px 22px; font-size: 0.95rem; min-height: 48px; }
    .td-kakao-btn   { padding: 14px 28px; font-size: 1rem; min-height: 48px; }
    .td-faq-item    { padding: 14px 16px; }
}

/* ════════════════════════ trust-site-footer ════════════════════════ */
.trust-site-footer {
    background: var(--trust-primary);
    color: #fff;
    padding: 48px 16px 24px;
    margin-top: 48px;
    font-size: var(--fs-sm);
    line-height: 1.7;
}
.trust-site-footer a { color: rgba(255, 255, 255, 0.85); }
.trust-site-footer a:hover { color: var(--trust-accent); }

.trust-site-footer__inner {
    max-width: 1280px;
    margin: 0 auto;
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr;
}

/*
 * 모바일: 아코디언 (button 토글, 본문 collapsed).
 * 데스크톱(768px+): 일반 4컬럼 그리드 + button 은 일반 h4 처럼 보임.
 */
.trust-site-footer__toggle {
    width: 100%;
    background: transparent;
    border: none;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    text-align: left;
    padding: 14px 0;
    margin: 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}
.trust-site-footer__toggle:focus-visible {
    outline: 2px solid var(--trust-accent);
    outline-offset: 2px;
}
.trust-site-footer__toggle-icon {
    width: 12px;
    height: 12px;
    position: relative;
    flex-shrink: 0;
    transition: transform var(--transition-base);
}
.trust-site-footer__toggle-icon::before,
.trust-site-footer__toggle-icon::after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.85);
    top: 50%;
    left: 0;
    width: 12px;
    height: 2px;
    transform: translateY(-50%);
}
.trust-site-footer__toggle-icon::after {
    transform: translateY(-50%) rotate(90deg);
    transition: transform var(--transition-base);
}
.trust-site-footer__col.is-open .trust-site-footer__toggle-icon::after {
    transform: translateY(-50%) rotate(0deg);
}

.trust-site-footer__body {
    overflow: hidden;
    max-height: 0;
    transition: max-height var(--transition-base) ease;
    padding-top: 0;
}
.trust-site-footer__col.is-open .trust-site-footer__body {
    max-height: 800px;
    padding-top: 12px;
    padding-bottom: 8px;
}

.trust-site-footer__col ul { list-style: none; margin: 0; padding: 0; }
.trust-site-footer__col li { margin-bottom: 6px; }

.trust-site-footer__legal {
    color: rgba(255, 255, 255, 0.75);
    font-size: var(--fs-xs);
}
.trust-site-footer__legal li { line-height: 1.85; }

.trust-site-footer__bottom {
    max-width: 1280px;
    margin: 32px auto 0;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    text-align: center;
    font-size: var(--fs-xs);
    color: rgba(255, 255, 255, 0.6);
}

/* 데스크톱: 토글 → 일반 헤딩처럼 */
@media (min-width: 768px) {
    .trust-site-footer__inner { grid-template-columns: repeat(2, 1fr); gap: 32px; }

    .trust-site-footer__toggle {
        cursor: default;
        pointer-events: none;
        border-bottom: none;
        padding: 0 0 12px;
    }
    .trust-site-footer__toggle-icon { display: none; }
    .trust-site-footer__body {
        max-height: none;
        padding-top: 0;
        overflow: visible;
    }
}
@media (min-width: 1024px) {
    .trust-site-footer__inner { grid-template-columns: repeat(4, 1fr); }
}

/* ════════════════════════ trust-badges (신뢰지표) ════════════════════ */
.trust-badges {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
    padding: 24px 16px;
    margin: 0 auto;
    max-width: 1280px;
}
@media (min-width: 600px) { .trust-badges { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .trust-badges { grid-template-columns: repeat(4, 1fr); } }

.trust-badge {
    background: #fff;
    border: 1px solid var(--trust-border);
    border-radius: var(--trust-radius-lg);
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}
.trust-badge:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

.trust-badge__val   { font-size: 1.6rem; font-weight: 800; color: var(--trust-primary); margin: 0 0 4px; }
.trust-badge__label { font-size: var(--fs-xs); color: var(--trust-muted); margin: 0; }
.trust-badge__sub   { font-size: 0.7rem; color: var(--trust-soft); margin-top: 2px; }

.trust-badge--placeholder {
    background: var(--trust-bg-alt);
    border-style: dashed;
}
.trust-badge--placeholder .trust-badge__val { color: var(--trust-soft); font-size: 1rem; font-weight: 600; }
.trust-badge--placeholder a {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.78rem;
    color: var(--trust-primary);
    text-decoration: underline;
}

/* ════════════════════════ trust-kakao-cta ════════════════════════ */
.trust-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--trust-kakao);
    color: var(--trust-kakao-text);
    border: none;
    border-radius: var(--trust-radius);
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
    line-height: 1.2;
    min-height: 40px;
}
.trust-cta:hover { opacity: 0.9; color: var(--trust-kakao-text); }
.trust-cta:active { transform: translateY(1px); }
.trust-cta__icon { font-size: 1.05em; }
.trust-cta--sm { padding: 8px 16px;  font-size: var(--fs-sm); min-height: 36px; }
.trust-cta--md { padding: 12px 22px; font-size: var(--fs-body); min-height: 44px; }
.trust-cta--lg { padding: 16px 32px; font-size: 1.1rem; min-height: 52px; }

/* 모바일 fixed CTA */
.trust-cta-fixed {
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    z-index: 80;
    box-shadow: var(--shadow-lg);
    min-height: 48px;
    display: none; /* JS 가 .is-visible 토글 */
    text-align: center;
    justify-content: center;
}
.trust-cta-fixed.is-visible { display: inline-flex; }
@media (min-width: 768px) {
    .trust-cta-fixed { display: none !important; } /* 데스크톱에서는 항상 숨김 */
}

/* ════════════════════════ trust-hero (SVG 패턴) ═══════════════════ */
.trust-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--trust-primary) 0%, var(--trust-primary-dark) 100%);
    color: #fff;
    border-radius: var(--trust-radius-lg);
    padding: 48px 24px;
    text-align: center;
    margin: 16px 0;
}
.trust-hero__pattern {
    position: absolute;
    inset: 0;
    opacity: 0.15;
    pointer-events: none;
}
.trust-hero__pattern svg { width: 100%; height: 100%; }
.trust-hero__content { position: relative; z-index: 1; }
