/* Sunshine Wellness — 교육자료(Learn) 섹션 전용 스타일 (자체 완결, 메인 style.css와 독립) */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --green: #3B6259;
  --deep: #1a2e2a;
  --gold: #e8a04a;
  --ivory: #FAF7F2;
  --gray: #F5F5F3;
  --line: #e8e8e4;
  --text: #333;
  --muted: #777;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--text);
  background: #fff;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

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

.lw {                         /* 공통 가로폭 래퍼 */
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 24px;
}
/* 허브(index)만 1160px로 — 프로그램 페이지와 폭 통일. 본문 모듈 페이지는 960px 유지 */
body.hub .lw { max-width: 1160px; }

/* ===== Header ===== */
.learn-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.learn-header .lw {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.learn-logo { display: flex; flex-direction: column; line-height: 1.1; }
.learn-logo .en { font-size: 15px; font-weight: 800; letter-spacing: .02em; color: var(--deep); }
.learn-logo .kr { font-size: 11px; color: var(--muted); }
.learn-back {
  font-size: 13px; font-weight: 700; color: var(--green);
  padding: 7px 14px; border: 1px solid var(--line); border-radius: 8px;
  transition: background .2s, color .2s;
}
.learn-back:hover { background: var(--green); color: #fff; }

/* ===== Hero ===== */
.learn-hero {
  background: var(--ivory);
  border-bottom: 1px solid var(--line);
  padding: 72px 0 64px;
  text-align: center;
}
.learn-hero .label {
  font-size: 11px; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--green); margin-bottom: 16px;
}
.learn-hero h1 {
  font-size: 34px; font-weight: 800; color: var(--deep);
  line-height: 1.3; margin-bottom: 16px;
}
.learn-hero .sub {
  font-family: 'Merriweather', Georgia, serif;
  font-size: 16px; color: var(--muted); max-width: 640px;
  margin: 0 auto; line-height: 1.9;
}

/* ===== 더 읽어보기 · References (허브 하단) ===== */
.learn-refs {
  margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--line);
}
.learn-refs .label {
  font-size: 11px; font-weight: 700; letter-spacing: .22em;
  text-transform: uppercase; color: var(--green); margin-bottom: 14px;
}
.learn-refs ul { list-style: none; padding: 0; margin: 0; }
.learn-refs li { margin-bottom: 12px; }
.learn-refs a { font-size: 15px; font-weight: 700; color: var(--deep); text-decoration: none; }
.learn-refs a:hover { color: var(--green); text-decoration: underline; }
.learn-refs li span { display: block; font-size: 13px; color: var(--muted); line-height: 1.7; margin-top: 4px; }

/* ===== Module grid ===== */
.learn-section { padding: 64px 0 80px; }
.learn-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
}
/* 허브 레벨(단계) 그룹 헤더 — 그리드 전체 폭 차지 */
.learn-group { grid-column: 1 / -1; display: flex; align-items: center; gap: 14px; margin: 10px 0 0; }
.learn-grid > .learn-group:first-child { margin-top: 0; }
.learn-group .gh-title { font-size: 17px; font-weight: 800; color: var(--deep); white-space: nowrap; }
.learn-group .gh-line { flex: 1; height: 1px; background: var(--line); }
.learn-group .gh-badge { font-size: 11px; font-weight: 800; letter-spacing: .06em; color: #fff; background: var(--green); padding: 4px 11px; border-radius: 999px; white-space: nowrap; }
.learn-group.is-key .gh-title { color: var(--green); }
.learn-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 30px 28px; transition: box-shadow .2s, transform .2s;
}
.learn-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,.08); transform: translateY(-3px); }
.learn-card .ico-row { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.learn-card .ico { font-size: 20px; line-height: 1; }
.learn-card .mod { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--green); }
.learn-card h3 { font-size: 19px; font-weight: 800; color: var(--deep); margin-bottom: 10px; }
.learn-card p { font-size: 14px; color: var(--muted); line-height: 1.6; flex: 1; margin-bottom: 18px; }
.learn-card .go {
  align-self: flex-start; font-size: 13px; font-weight: 700; color: var(--green);
  border: 1.5px solid var(--green); border-radius: 8px; padding: 8px 16px;
  transition: background .2s, color .2s;
}
.learn-card .go:hover { background: var(--green); color: #fff; }
.learn-card .badge {
  align-self: flex-start; font-size: 11px; font-weight: 700; color: var(--muted);
  background: var(--gray); border-radius: 20px; padding: 6px 14px;
}

/* ===== Footer ===== */
.learn-footer {
  background: var(--deep); color: rgba(255,255,255,.8);
  padding: 40px 0; text-align: center; font-size: 13px;
}
.learn-footer a { color: #fff; font-weight: 700; }
.learn-footer .copy { margin-top: 10px; font-size: 12px; color: rgba(255,255,255,.5); }

/* ===== Article (모듈 본문 페이지 공용) ===== */
.learn-article { padding: 56px 0 80px; }
.learn-article h2 { font-size: 24px; font-weight: 800; color: var(--deep); margin: 36px 0 14px; scroll-margin-top: 84px; }
.learn-article h3 { font-size: 18px; font-weight: 700; color: var(--green); margin: 26px 0 10px; }
.learn-article p { font-size: 15px; color: var(--text); line-height: 1.95; margin-bottom: 14px; }
.learn-article ul { margin: 0 0 16px 20px; }
.learn-article li { font-size: 15px; line-height: 1.9; margin-bottom: 6px; }
.learn-article .lead { font-family: 'Merriweather', Georgia, serif; font-size: 17px; color: var(--muted); line-height: 1.95; margin-bottom: 28px; }
.learn-article code { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; font-size: 13px; background: var(--gray); color: var(--deep); padding: 2px 6px; border-radius: 5px; }
.learn-article strong { color: var(--deep); }
.learn-article .learn-part {
  font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase;
  color: var(--green); border-top: 2px solid var(--green); padding-top: 22px;
  margin: 52px 0 8px;
}
.learn-article .learn-part:first-of-type { margin-top: 8px; }

/* ===== 구조 마인드맵 ===== */
.mindmap { text-align: center; margin: 24px 0 8px; }
.mm-center {
  display: inline-block; background: var(--deep); color: #fff;
  font-size: 16px; font-weight: 800; line-height: 1.35;
  padding: 16px 30px; border-radius: 14px;
}
.mm-stem { width: 2px; height: 26px; background: #cfd6d2; margin: 0 auto; }
.mm-branches {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  border-top: 2px solid #cfd6d2; padding-top: 26px;
}
.mm-branch { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding-bottom: 12px; overflow: hidden; text-align: left; }
.mm-part { color: #fff; font-size: 12px; font-weight: 800; padding: 12px 14px; line-height: 1.35; }
.mm-branch ul { list-style: none; margin: 10px 0 0; padding: 0 14px; }
.mm-branch li { font-size: 12.5px; line-height: 1.45; border-left: 2px solid var(--line); margin-bottom: 3px; transition: background .15s; }
.mm-branch li a { display: block; color: var(--text); text-decoration: none; padding: 6px 0 6px 12px; }
.mm-branch li:hover { background: var(--gray); }
.mm-branch li:hover a { color: var(--deep); }
.mm-branch.b1 .mm-part { background: #3B6259; } .mm-branch.b1 li { border-left-color: #3B6259; }
.mm-branch.b2 .mm-part { background: #b06a30; } .mm-branch.b2 li { border-left-color: #b06a30; }
.mm-branch.b3 .mm-part { background: #6a4f9a; } .mm-branch.b3 li { border-left-color: #6a4f9a; }
.mm-branch.b4 .mm-part { background: #1e6868; } .mm-branch.b4 li { border-left-color: #1e6868; }
@media (max-width: 720px) {
  .mm-branches { grid-template-columns: 1fr; gap: 12px; padding-top: 20px; }
  .mm-center { font-size: 15px; }
}

/* ===== 용어 사전(glossary) ===== */
.term { padding: 16px 0; border-bottom: 1px solid var(--line); scroll-margin-top: 84px; }
.term-name { font-size: 15px; font-weight: 800; color: var(--deep); margin-bottom: 5px; }
.term-name span { font-size: 12px; font-weight: 500; color: var(--muted); margin-left: 6px; letter-spacing: .02em; }
.term-def { font-size: 14px; color: var(--text); line-height: 1.8; margin-bottom: 4px; }
.term-site { font-size: 12.5px; color: var(--green); margin: 0; }
.term-site a { color: var(--green); font-weight: 700; text-decoration: none; border-bottom: 1px solid currentColor; }

/* ===== 모듈 이전/다음 내비게이션 ===== */
.mod-home { text-align: center; margin-top: 44px; }
.mod-home a { font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: none; }
.mod-home a:hover { color: var(--green); }
.mod-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 16px; padding-top: 24px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.mod-nav.only-next { justify-content: flex-end; }
.mod-nav.only-prev { justify-content: flex-start; }
.mod-nav a { flex: 1; min-width: 150px; display: block; text-decoration: none; border: 1px solid var(--line); border-radius: 12px; padding: 14px 18px; font-size: 14px; font-weight: 800; color: var(--deep); transition: background .2s, color .2s, border-color .2s; }
.mod-nav a:hover { background: var(--green); color: #fff; border-color: var(--green); }
.mod-nav a:hover .nav-label { color: rgba(255,255,255,.85); }
.mod-nav .nav-next { text-align: right; }
.mod-nav .nav-label { display: block; font-size: 11px; font-weight: 600; color: var(--green); margin-bottom: 4px; letter-spacing: .02em; }
@media (max-width: 560px) { .mod-nav a { flex-basis: 100%; } }

/* 카드 내 링크 2개 나란히 */
.learn-card .go-row { display: flex; gap: 10px; flex-wrap: wrap; }
.learn-card .go.alt { color: var(--muted); border-color: var(--line); }
.learn-card .go.alt:hover { background: var(--deep); color: #fff; border-color: var(--deep); }

/* ===== 여행 영어(TTS) 모듈 ===== */
.pe-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  background: var(--gray); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 16px; margin: 8px 0 6px;
  position: sticky; top: 72px; z-index: 20;
}
.pe-tool-label { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--muted); }
.pe-speed { display: inline-flex; background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 3px; }
.pe-speed-btn {
  font-family: inherit; font-size: 13px; font-weight: 700; color: var(--muted);
  background: transparent; border: 0; border-radius: 7px; padding: 6px 14px; cursor: pointer;
  transition: background .15s, color .15s;
}
.pe-speed-btn.is-active { background: var(--green); color: #fff; }
.pe-note { font-size: 13px; color: #b06a30; background: #fdf6ec; border: 1px solid #f0dcc0; border-radius: 10px; padding: 10px 14px; margin: 4px 0 0; }

.pe-list { margin: 4px 0 8px; }
.pe-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 4px; border-bottom: 1px solid var(--line);
}
.pe-item:last-child { border-bottom: 0; }
.pe-text { flex: 1; min-width: 0; }
.pe-en { font-size: 15.5px; font-weight: 700; color: var(--deep); line-height: 1.5; margin: 0 0 3px; }
.pe-ko { font-size: 13.5px; color: var(--muted); line-height: 1.55; margin: 0; }
.pe-say {
  flex: none; width: 44px; height: 44px; font-size: 18px; cursor: pointer;
  background: #fff; border: 1.5px solid var(--line); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background .15s, border-color .15s, transform .1s;
}
.pe-say:hover { background: var(--ivory); border-color: var(--green); }
.pe-say:active { transform: scale(.92); }
.pe-say.is-playing { background: var(--green); border-color: var(--green); animation: pePulse 1s ease-in-out infinite; }
.pe-say:disabled { opacity: .4; cursor: not-allowed; }
@keyframes pePulse { 0%,100% { box-shadow: 0 0 0 0 rgba(59,98,89,.4); } 50% { box-shadow: 0 0 0 6px rgba(59,98,89,0); } }

@media (max-width: 560px) {
  .pe-en { font-size: 15px; }
  .pe-say { width: 40px; height: 40px; font-size: 17px; }
}

/* ===== Responsive ===== */
@media (max-width: 1000px) {
  .learn-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .learn-hero { padding: 56px 0 48px; }
  .learn-hero h1 { font-size: 26px; }
  .learn-grid { grid-template-columns: 1fr; }
}
