@charset "utf-8";
/* ============================================================
   마음프로그램 메인 리뉴얼 (2026 고도화)
   Figma: 01_최종 pc(1920) / 01_최종 모바일(360)
   기준 폭 1024px 에서 모바일 ↔ PC 레이아웃 전환
   ============================================================ */

/* ---------- 폰트 ---------- */
@font-face {
    font-family: 'Pretendard';
    src: url("../fonts/Pretendard-Medium.woff2") format("woff2");
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: 'Pretendard';
    src: url("../fonts/Pretendard-Bold.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

/* ---------- 디자인 토큰 ---------- */
:root {
    --mp-bg:        #faf7f2;
    --mp-ink:       #23424a;   /* 기본 텍스트 · 안정화 기법 */
    --mp-sub:       #667074;   /* 보조 텍스트 */
    --mp-green:     #5c7048;   /* 마음프로그램이란 */
    --mp-teal:      #2e6e77;   /* 심리교육 */
    --mp-icon-1:    #f3f8f4;
    --mp-icon-2:    #f6f8f2;
    --mp-icon-3:    #f4f7fa;
    --mp-link-bg:   #dceae7;
    --mp-link-ink:  #1f5b60;
    --mp-link-sub:  #5e8a87;
    --mp-guide-bg:  #f2f5f3;
    --mp-card-sh:   0 8px 12px rgba(0, 0, 0, .05);
    --mp-font:      'Pretendard', 'SpoqaHanSans-Regular', -apple-system, sans-serif;
}

/* ---------- 리셋 ---------- */
/* 이 파일은 메인(index.html)에서만 로드된다 — 아래 전역 배경도 메인에만 적용됨 */
html, body {
    background: var(--mp-bg) !important;
    width: 100%;
    margin: 0;
}
#page_home.mp-page,
#page_home.mp-page.ui-page,
#page_home.mp-page .mp-main {
    background: var(--mp-bg);
    width: 100%;
    min-height: 100vh;
}
.mp-page * {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}
.mp-page p { margin: 0; }

.mp-wrap {
    font-family: var(--mp-font);
    background: var(--mp-bg);
    min-height: 100%;
    overflow-x: hidden;
}

/* ============================================================
   헤더
   ============================================================ */
.mp-header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
    padding: 0 16px;
    background: var(--mp-bg);
    padding-top: env(safe-area-inset-top);
}
.mp-header::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: 0;
    height: 1px;
    background: rgba(35, 66, 74, .1);
}
.mp-logo { display: flex; align-items: center; }
.mp-logo img { display: block; height: 26px; width: auto; }

/* PC 전용 GNB — 모바일에서는 숨김 */
.mp-gnb { display: none; }

/* 모바일 햄버거 */
.mp-menu-btn {
    width: 24px; height: 20px;
    padding: 0; border: 0; background: none;
    display: flex; flex-direction: column;
    justify-content: center; gap: 4.5px;
    cursor: pointer;
}
.mp-menu-btn span {
    display: block;
    width: 16px; height: 1.6px;
    background: var(--mp-ink);
    margin-left: auto;
}

/* ============================================================
   본문 컨테이너
   ============================================================ */
.mp-main {
    padding: 16px 16px 24px;
}

/* ============================================================
   Hero
   ============================================================ */
.mp-hero {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    aspect-ratio: 343 / 140;
}
/* aspect-ratio 미지원 폴백 */
@supports not (aspect-ratio: 1) {
    .mp-hero { height: 0; padding-bottom: 40.8%; }
}
.mp-hero img {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center 70%;
}
.mp-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(36, 66, 98, .40) 0%, rgba(36, 66, 98, .40) 100%),
        linear-gradient(47deg, rgba(36, 66, 98, 1) 20%, rgba(36, 66, 98, 0) 57%);
}
.mp-hero-copy {
    position: absolute;
    left: 16px;
    bottom: 22px;
    z-index: 1;
    color: #fff;
}
.mp-hero-copy .mp-hero-title {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -.64px;
    margin-bottom: 6px;
}
.mp-hero-copy .mp-hero-sub {
    font-weight: 500;
    font-size: 12px;
    letter-spacing: -.48px;
}

/* ============================================================
   카드 3종
   ============================================================ */
.mp-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 19px;
}
.mp-card {
    position: relative;
    background: #fff;
    border-radius: 8px;
    box-shadow: 3px 7px 10px rgba(0, 0, 0, .05);
    padding: 12px 14px 34px;   /* 하단은 화살표 공간 확보 */
    cursor: pointer;
    display: block;
    text-decoration: none;
}
.mp-card-icon {
    width: 86px; height: 86px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}
.mp-card-icon img { display: block; width: 58%; height: auto; }
.mp-card--intro .mp-card-icon { background: var(--mp-icon-1); }
.mp-card--edu   .mp-card-icon { background: var(--mp-icon-2); }
.mp-card--stab  .mp-card-icon { background: var(--mp-icon-3); }

.mp-card-title {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -.64px;
    color: var(--mp-ink);
    margin-bottom: 7px;
}
.mp-card--intro .mp-card-title { color: var(--mp-green); }
.mp-card--edu   .mp-card-title { color: var(--mp-teal); }
.mp-card--stab  .mp-card-title { color: var(--mp-ink); }

.mp-card-line {
    width: 33px; height: 1.6px;
    margin-bottom: 8px;
}
.mp-card--intro .mp-card-line { background: var(--mp-green); }
.mp-card--edu   .mp-card-line { background: var(--mp-teal); }
.mp-card--stab  .mp-card-line { background: var(--mp-ink); }

.mp-card-desc {
    font-weight: 500;
    font-size: 11.5px;
    line-height: 1.45;
    letter-spacing: -.4px;
    color: var(--mp-sub);
    word-break: keep-all;
}
/* 좁은 화면에서는 시안의 강제 줄바꿈을 무시하고 자연스럽게 흐르게 */
.mp-card-desc br { display: none; }
.mp-card-arrow {
    position: absolute;
    right: 10px; bottom: 10px;
    width: 17px; height: 17px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mp-card--intro .mp-card-arrow { background: #8aa06f; }
.mp-card--edu   .mp-card-arrow { background: #a8bd8e; }
.mp-card--stab  .mp-card-arrow { background: #2f6ea8; }
.mp-card-arrow svg { width: 5px; height: 9px; }
.mp-card-arrow svg path { stroke: #fff; stroke-width: 2; fill: none; }

/* 안정화 기법 — 모바일에서 가로 전체 + 아이콘 좌측 배치 */
.mp-card--stab {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 20px 15px 26px;
}
.mp-card--stab .mp-card-icon { margin: 0; flex: 0 0 86px; }
.mp-card--stab .mp-card-body { flex: 1; }

/* ============================================================
   링크 밴드 (국가트라우마센터 / 마음건강평가)
   ============================================================ */
.mp-links {
    position: relative;
    background: var(--mp-link-bg);
    border-radius: 14px;
    margin-top: 12px;
    overflow: hidden;
}
.mp-links::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 4px;
    background: var(--mp-teal);
}
.mp-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 18px;
    cursor: pointer;
    text-decoration: none;
}
.mp-link + .mp-link::before {
    content: '';
    position: absolute;
    left: 18px; right: 18px; top: 0;
    height: 1px;
    background: rgba(31, 91, 96, .13);
}
.mp-link-icon {
    flex: 0 0 32px;
    width: 32px; height: 32px;
    border-radius: 50%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}
.mp-link-icon img { width: 17px; height: auto; display: block; }
.mp-link-body { flex: 1; min-width: 0; }
.mp-link-title {
    display: block;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.4;
    letter-spacing: -.28px;
    color: var(--mp-link-ink);
}
.mp-link-desc {
    display: block;
    font-weight: 500;
    font-size: 11px;
    line-height: 1.4;
    letter-spacing: -.22px;
    color: var(--mp-link-sub);
    margin-top: 2px;
}
.mp-link-chev {
    flex: 0 0 auto;
    width: 5px; height: 10px;
}
.mp-link-chev svg { width: 100%; height: 100%; }
.mp-link-chev svg path { stroke: var(--mp-link-ink); stroke-width: 2; fill: none; }

/* ============================================================
   사용가이드 바
   ============================================================ */
.mp-guide {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--mp-guide-bg);
    border-radius: 8px;
    padding: 20px 18px;
    margin-top: 12px;
    cursor: pointer;
    text-decoration: none;
}
.mp-guide-title {
    font-weight: 700;
    font-size: 16px;
    letter-spacing: -.64px;
    color: var(--mp-ink);
    flex: 0 0 auto;
}
.mp-guide-desc {
    font-weight: 500;
    font-size: 13px;
    letter-spacing: -.6px;
    color: var(--mp-sub);
    flex: 1;
    min-width: 0;
}
.mp-guide-chev { flex: 0 0 auto; width: 7px; height: 12px; }
.mp-guide-chev svg { width: 100%; height: 100%; }
.mp-guide-chev svg path { stroke: var(--mp-ink); stroke-width: 2; fill: none; }

/* ============================================================
   태블릿 (600px 이상) — 카드 여백 확대
   ============================================================ */
@media screen and (min-width: 600px) {
    .mp-header { height: 68px; padding: 0 32px; }
    .mp-logo img { height: 32px; }

    .mp-main { padding: 24px 32px 32px; }

    /* 넓어진 만큼 배너를 납작하게 */
    .mp-hero { aspect-ratio: 2.9 / 1; border-radius: 12px; }
    .mp-hero-copy { left: 32px; bottom: 32px; }
    .mp-hero-copy .mp-hero-title { font-size: 26px; margin-bottom: 8px; }
    .mp-hero-copy .mp-hero-sub { font-size: 15px; }

    .mp-cards { gap: 20px; margin-top: 24px; }
    .mp-card { padding: 24px 22px 46px; }
    .mp-card-icon { width: 104px; height: 104px; margin: 0 0 18px; }
    .mp-card-title { font-size: 18px; margin-bottom: 8px; }
    .mp-card-line { width: 38px; height: 2px; margin-bottom: 10px; }
    .mp-card-desc { font-size: 13.5px; line-height: 1.5; letter-spacing: -.3px; }
    .mp-card-arrow { width: 22px; height: 22px; right: 18px; bottom: 18px; }
    .mp-card-arrow svg { width: 6px; height: 11px; }

    .mp-card--stab { gap: 24px; padding: 24px 22px 46px; }
    .mp-card--stab .mp-card-icon { flex: 0 0 104px; margin: 0; }

    .mp-links { margin-top: 20px; }
    .mp-link { padding: 18px 24px; gap: 14px; }
    .mp-link-icon { flex: 0 0 40px; width: 40px; height: 40px; }
    .mp-link-icon img { width: 20px; }
    .mp-link-title { font-size: 16px; }
    .mp-link-desc { font-size: 12.5px; }

    .mp-guide { padding: 24px; margin-top: 20px; }
    .mp-guide-title { font-size: 18px; }
    .mp-guide-desc { font-size: 14.5px; }
}

/* ============================================================
   PC (1024px 이상) — Figma 01_최종 pc
   ============================================================ */
@media screen and (min-width: 1024px) {

    /* 헤더 */
    .mp-header {
        height: 88px;
        padding: 0 clamp(24px, 5.2vw, 100px);
        max-width: 1920px;
        margin: 0 auto;
        gap: 24px;
    }
    .mp-logo img { height: clamp(32px, 2.5vw, 48px); }
    .mp-logo { flex-shrink: 1; min-width: 0; overflow: hidden; }
    .mp-menu-btn { display: none; }
    .mp-gnb {
        display: flex;
        align-items: center;
        gap: clamp(18px, 2.5vw, 48px);
        flex-shrink: 0;
    }
    .mp-gnb a {
        font-weight: 500;
        font-size: clamp(14px, .9vw, 17px);
        letter-spacing: -.68px;
        color: var(--mp-ink);
        text-decoration: none;
        white-space: nowrap;
    }
    .mp-gnb a:hover { opacity: .65; }

    /* 본문 */
    .mp-main {
        max-width: 1920px;
        margin: 0 auto;
        padding: 24px clamp(24px, 5.2vw, 100px) 40px;
    }

    /* Hero */
    .mp-hero {
        aspect-ratio: 1720 / 372;
        border-radius: 16px;
    }
    @supports not (aspect-ratio: 1) {
        .mp-hero { height: 0; padding-bottom: 21.6%; }
    }
    .mp-hero::after {
        background:
            linear-gradient(90deg, rgba(36, 66, 98, .28) 0%, rgba(36, 66, 98, .28) 100%),
            linear-gradient(90deg, rgba(36, 66, 98, .95) 0%, rgba(36, 66, 98, .15) 62%, rgba(36, 66, 98, 0) 100%);
    }
    .mp-hero-copy {
        left: clamp(24px, 4.2vw, 80px);
        right: clamp(24px, 4.2vw, 80px);
        bottom: clamp(20px, 3.2vw, 60px);
        top: auto;
        transform: none;
    }
    .mp-hero-copy .mp-hero-title {
        font-size: clamp(24px, 2.4vw, 46px);
        line-height: 1.35;
        letter-spacing: -1.84px;
        margin-bottom: clamp(6px, .85vw, 16px);
    }
    .mp-hero-copy .mp-hero-sub {
        font-size: clamp(13px, 1.05vw, 20px);
        letter-spacing: -.8px;
        opacity: .92;
    }

    /* 카드 3열 — 뷰포트 폭에 따라 유연하게(1920 기준값을 상한으로) */
    .mp-cards {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: clamp(20px, 2.1vw, 40px);
        margin-top: 32px;
    }
    .mp-card {
        border-radius: 12px;
        box-shadow: var(--mp-card-sh);
        padding: clamp(36px, 3.8vw, 72px) clamp(20px, 1.9vw, 36px);
        min-height: clamp(240px, 15.8vw, 304px);
        display: flex;
        align-items: flex-start;
        gap: clamp(16px, 1.5vw, 28px);
    }
    .mp-card-icon {
        width: clamp(96px, 8.4vw, 160px);
        height: clamp(96px, 8.4vw, 160px);
        margin: 0;
        flex: 0 0 clamp(96px, 8.4vw, 160px);
    }
    .mp-card-icon img { width: 58%; }
    .mp-card-body {
        padding-top: clamp(8px, 1.7vw, 32px);
        min-width: 0;
    }
    .mp-card-title {
        font-size: clamp(17px, 1.15vw, 22px);
        letter-spacing: -.88px;
        margin-bottom: 7px;
        white-space: nowrap;
    }
    .mp-card-line { width: 44px; height: 2px; margin-bottom: 14px; }
    .mp-card-desc {
        font-size: clamp(13px, .78vw, 15px);
        line-height: 1.5;
        letter-spacing: -.3px;
        white-space: nowrap;
    }
    .mp-card-desc br { display: inline; }   /* PC는 시안대로 2줄 고정 */
    .mp-card-arrow {
        width: 32px; height: 32px;
        right: clamp(16px, 1.5vw, 28px);
        bottom: clamp(16px, 1.5vw, 28px);
    }
    .mp-card-arrow svg { width: 7px; height: 12px; }

    /* 안정화 기법도 동일 3열 */
    .mp-card--stab {
        grid-column: auto;
        padding: clamp(36px, 3.8vw, 72px) clamp(20px, 1.9vw, 36px);
        gap: clamp(16px, 1.5vw, 28px);
        align-items: flex-start;
    }
    .mp-card--stab .mp-card-icon { flex: 0 0 clamp(96px, 8.4vw, 160px); }

    /* 링크 — 가로 2분할 */
    .mp-links {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 24px;
        background: none;
        border-radius: 0;
        margin-top: 32px;
        overflow: visible;
    }
    .mp-links::before { display: none; }
    .mp-link {
        background: var(--mp-link-bg);
        border-radius: 12px;
        height: 104px;
        padding: 0 32px;
        gap: 20px;
    }
    .mp-link + .mp-link::before { display: none; }
    .mp-link-icon { flex: 0 0 56px; width: 56px; height: 56px; }
    .mp-link-icon img { width: 28px; }
    .mp-link-title { font-size: 20px; letter-spacing: -.4px; }
    .mp-link-desc  { font-size: 14px; letter-spacing: -.28px; margin-top: 3px; }
    .mp-link-chev  { width: 7px; height: 14px; }

    /* 사용가이드 */
    .mp-guide {
        height: 76px;
        border-radius: 12px;
        padding: 0 48px;
        margin-top: 24px;
        gap: 20px;
    }
    .mp-guide-title { font-size: 20px; letter-spacing: -.8px; }
    .mp-guide-desc  { font-size: 17px; letter-spacing: -.68px; }
    .mp-guide-chev  { width: 10px; height: 17px; }
}

/* ============================================================
   중간 PC (1024~1279) — 카드 가로형은 폭이 부족하므로 세로형으로
   ============================================================ */
@media screen and (min-width: 1024px) and (max-width: 1279px) {
    .mp-card {
        flex-direction: column;
        align-items: flex-start;
        padding: 28px 24px 56px;
        min-height: 0;
    }
    .mp-card-icon {
        flex: 0 0 auto;
        width: 108px; height: 108px;
        margin: 0 0 18px;
    }
    .mp-card-body { padding-top: 0; }
    .mp-card-title { font-size: 19px; white-space: normal; }
    .mp-card-desc  { font-size: 14px; white-space: normal; }
    .mp-card-desc br { display: none; }

    .mp-card--stab { flex-direction: column; align-items: flex-start; }
    .mp-card--stab .mp-card-icon { flex: 0 0 auto; width: 108px; height: 108px; }

    .mp-link { padding: 0 20px; gap: 14px; }
    .mp-link-icon { flex: 0 0 44px; width: 44px; height: 44px; }
    .mp-link-icon img { width: 22px; }
    .mp-link-title { font-size: 17px; }
    .mp-link-desc  { font-size: 13px; }

    .mp-guide { padding: 0 28px; }
    .mp-guide-title { font-size: 18px; }
    .mp-guide-desc  { font-size: 15px; }
}

/* ============================================================
   대형 화면 (1920 이상) — 중앙 정렬 유지
   ============================================================ */
@media screen and (min-width: 1921px) {
    .mp-header, .mp-main { max-width: 1920px; }
}

/* ============================================================
   푸터 — 기존 마크업/ID 유지하고 리뉴얼 톤으로 정리
   ============================================================ */
.mp-page .__pageFooterContainer {
    background: var(--mp-bg);
    border-top: 1px solid rgba(35, 66, 74, .1);
    margin-top: 8px;
    padding: 22px 16px calc(22px + env(safe-area-inset-bottom));
}
.mp-page .__pageFooterContainer .center { max-width: 1720px; margin: 0 auto; }

.mp-page .footer_txt1 {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}
.mp-page .footer_txt1 > div {
    padding: 0;
    font-weight: 700;
    font-size: 13px;
    letter-spacing: -.3px;
    color: var(--mp-ink);
    cursor: pointer;
}
.mp-page .footer_txt1 > div:hover { opacity: .65; }
.mp-page .footer_txt1 > div + div { position: relative; padding-left: 15px; }
.mp-page .footer_txt1 > div + div::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 1px; height: 11px;
    background: rgba(35, 66, 74, .22);
}

.mp-page .footer_txt2,
.mp-page .footer_txt3 {
    font-weight: 500;
    font-size: 12px;
    line-height: 1.6;
    letter-spacing: -.3px;
    color: var(--mp-sub);
    word-break: keep-all;
}
.mp-page .footer_txt3 { margin-top: 6px; font-size: 11px; opacity: .8; }

@media screen and (min-width: 1024px) {
    .mp-page .__pageFooterContainer { padding: 32px 100px 40px; margin-top: 16px; }
    .mp-page .footer_txt1 > div { font-size: 14px; }
    .mp-page .footer_txt2 { font-size: 13px; }
    .mp-page .footer_txt3 { font-size: 12px; }
}
