/* =========================================================
   수익화 강의 플랫폼 — 디자인 시스템
   레이아웃 레퍼런스: fastcampus.co.kr
   ========================================================= */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css");

:root {
  --ink: #14151a;
  --ink-2: #3d4150;
  --ink-3: #6b7080;
  --line: #e7e9ef;
  --line-2: #f0f1f5;
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --bg-dark: #14151a;
  --primary: #ff4800;        /* fastcampus 시그니처 코럴 */
  --primary-dark: #e03f00;
  --primary-soft: #fff1ea;
  --free: #1f6feb;           /* 무료 뱃지 블루 */
  --free-soft: #eaf2ff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 28px rgba(20, 21, 26, .08);
  --shadow-hover: 0 14px 40px rgba(20, 21, 26, .14);
  --maxw: 1180px;
  --gnb-h: 64px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Pretendard", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- GNB ---------- */
.gnb {
  position: sticky; top: 0; z-index: 100;
  height: var(--gnb-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.gnb__inner { display: flex; align-items: center; gap: 28px; height: 100%; }
.gnb__logo { font-weight: 800; font-size: 20px; letter-spacing: -.4px; }
.gnb__logo b { color: var(--primary); }
.gnb__menu { display: flex; gap: 24px; margin-left: 8px; }
.gnb__menu a { font-size: 15px; font-weight: 600; color: var(--ink-2); padding: 6px 0; }
.gnb__menu a:hover, .gnb__menu a.is-active { color: var(--ink); }
.gnb__menu a.is-active { box-shadow: inset 0 -2px 0 var(--primary); }
.gnb__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.btn-login {
  border: 1px solid var(--line); background: #fff; color: var(--ink);
  font-weight: 700; font-size: 14px; padding: 9px 16px; border-radius: 999px;
}
.btn-login:hover { border-color: var(--ink-3); }

/* 유저 아이콘 (로그인 후) */
.user-menu { position: relative; }
.user-icon {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--ink); color: #fff; border: none;
  font-weight: 800; font-size: 14px; display: grid; place-items: center;
}
.user-dd {
  position: absolute; right: 0; top: 46px; width: 180px;
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 6px; display: none;
}
.user-dd.open { display: block; }
.user-dd a, .user-dd button {
  display: block; width: 100%; text-align: left; background: none; border: none;
  padding: 10px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.user-dd a:hover, .user-dd button:hover { background: var(--bg-soft); color: var(--ink); }
.user-dd hr { border: none; border-top: 1px solid var(--line-2); margin: 6px 0; }

/* ---------- 롤링 배너 ---------- */
.banner { padding: 24px 0 8px; }
.banner__viewport { position: relative; overflow: hidden; border-radius: var(--radius); }
.banner__track { display: flex; transition: transform .5s cubic-bezier(.22,.61,.36,1); }
.banner__slide {
  min-width: 100%;
  height: 320px;
  display: flex; align-items: center;
  padding: 0 56px; color: #fff;
  background-size: cover; background-position: center;
}
.banner__slide .eyebrow { font-size: 14px; font-weight: 700; opacity: .9; letter-spacing: .2px; }
.banner__slide h2 { font-size: 34px; font-weight: 800; margin: 10px 0 6px; letter-spacing: -.6px; line-height: 1.25; }
.banner__slide p { font-size: 16px; opacity: .92; margin: 0; }
.banner__dots { display: flex; gap: 8px; justify-content: center; margin-top: 14px; }
.banner__dots button { width: 8px; height: 8px; border-radius: 999px; border: none; background: var(--line); padding: 0; }
.banner__dots button.is-active { width: 22px; background: var(--primary); }
.banner__arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: rgba(255,255,255,.9); color: var(--ink); font-size: 18px;
  display: grid; place-items: center; box-shadow: var(--shadow);
}
.banner__arrow.prev { left: 16px; } .banner__arrow.next { right: 16px; }

/* ---------- 섹션 / 카드 그리드 ---------- */
.section { padding: 40px 0; }
.section__head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 20px; }
.section__title { font-size: 24px; font-weight: 800; letter-spacing: -.5px; }
.section__title .count { color: var(--ink-3); font-size: 16px; font-weight: 700; margin-left: 8px; }
.section__more { font-size: 14px; font-weight: 700; color: var(--ink-3); }
.section__more:hover { color: var(--primary); }

.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }

.card { display: block; border-radius: var(--radius); overflow: hidden; transition: transform .18s, box-shadow .18s; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.card__thumb { position: relative; aspect-ratio: 16/9; background: var(--bg-soft); overflow: hidden; }
.card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.card__badge {
  position: absolute; top: 12px; left: 12px; z-index: 2;
  font-size: 12px; font-weight: 800; padding: 5px 10px; border-radius: 999px;
}
.badge-free { background: var(--free); color: #fff; }
.badge-live { background: rgba(255,72,0,.95); color: #fff; }
.card__body { padding: 14px 4px 4px; }
.card__cat { font-size: 12px; font-weight: 700; color: var(--primary); }
.card__title { font-size: 16px; font-weight: 700; letter-spacing: -.3px; margin: 6px 0 8px; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card__instructor { font-size: 13px; color: var(--ink-3); }
.card__meta { display: flex; align-items: center; justify-content: space-between; margin-top: 10px; }
.card__price { font-size: 17px; font-weight: 800; }
.card__price.free { color: var(--free); }
.card__price del { color: var(--ink-3); font-weight: 600; font-size: 13px; margin-right: 6px; }

/* ---------- 빈 상태 ---------- */
.empty {
  text-align: center; padding: 64px 20px; background: var(--bg-soft);
  border: 1px dashed var(--line); border-radius: var(--radius);
}
.empty__emoji { font-size: 40px; }
.empty__title { font-size: 20px; font-weight: 800; margin: 14px 0 6px; }
.empty__desc { color: var(--ink-3); font-size: 15px; margin: 0 0 22px; }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 12px; font-weight: 800; font-size: 16px;
  padding: 14px 22px; transition: transform .12s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; }
.btn-outline { background: #fff; border: 1.5px solid var(--line); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); }
.btn-block { width: 100%; }
.btn-kakao { background: #fee500; color: #191600; }
.btn-kakao:hover { background: #f5dc00; }

/* ---------- 랜딩페이지 (2단) ---------- */
.landing { padding: 28px 0 80px; }
.landing__grid {
  display: grid;
  grid-template-columns: 1fr 380px;
  grid-template-areas:
    "thumb   cta"
    "content cta";
  column-gap: 40px;
  row-gap: 28px;            /* 썸네일 하단 여백 */
  align-items: start;
}
.landing__thumb   { grid-area: thumb; }
.landing__content { grid-area: content; }
.cta-col          { grid-area: cta; }
.landing__hero-thumb { width: 100%; aspect-ratio: 16/9; border-radius: var(--radius); object-fit: cover; background: var(--bg-soft); }

/* 모바일 상단 후크 (라이브 일정 + 온보딩 툴팁) — PC 숨김 */
.m-hook { display: none; }
.m-hook__date { font-size: 14px; font-weight: 700; color: var(--ink-2); margin: 12px 0 14px; }
.landing__content h3 { font-size: 22px; font-weight: 800; margin: 40px 0 14px; letter-spacing: -.4px; }
.landing__content p { color: var(--ink-2); font-size: 16px; line-height: 1.75; }
.landing__content ul { color: var(--ink-2); line-height: 1.9; padding-left: 20px; }
.curriculum { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.curriculum__item { display: flex; gap: 14px; padding: 18px 20px; border-bottom: 1px solid var(--line-2); }
.curriculum__item:last-child { border-bottom: none; }
.curriculum__no { font-weight: 800; color: var(--primary); min-width: 28px; }
.curriculum__txt b { display: block; font-size: 15px; }
.curriculum__txt span { font-size: 13px; color: var(--ink-3); }

/* CTA sticky */
.cta-col { position: sticky; top: calc(var(--gnb-h) + 20px); }
.cta {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; position: relative;
  display: flex; flex-direction: column;
  max-height: calc(100vh - var(--gnb-h) - 32px); /* 뷰포트 안에 맞춤 */
}
/* 버튼은 항상 보이도록 하단 고정, 나머지만 내부 스크롤 */
.cta__scroll {
  flex: 1 1 auto; min-height: 0; overflow-y: auto;
  margin: -4px -8px 0; padding: 4px 8px 0;
}
.cta > .btn { flex: 0 0 auto; margin-top: 16px; }
.cta__tip {
  position: relative; margin: 0 0 16px; background: var(--ink); color: #fff;
  font-size: 13.5px; font-weight: 700; padding: 11px 14px; border-radius: 12px; text-align: center;
  animation: bob 1.6s ease-in-out infinite;
}
.cta__tip::after {
  content: ""; position: absolute; left: 50%; bottom: -7px; transform: translateX(-50%);
  border: 7px solid transparent; border-top-color: var(--ink); border-bottom: 0;
}
@keyframes bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.cta__method { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 800;
  color: var(--primary); background: var(--primary-soft); padding: 6px 12px; border-radius: 999px; }
.cta__title { font-size: 21px; font-weight: 800; letter-spacing: -.4px; margin: 14px 0 8px; line-height: 1.35; }
.cta__summary { font-size: 14px; color: var(--ink-3); margin: 0 0 18px; }
.cta__price { display: flex; align-items: baseline; gap: 8px; margin-bottom: 18px; }
.cta__price .amount { font-size: 28px; font-weight: 800; }
.cta__price .amount.free { color: var(--free); }
.cta__price del { color: var(--ink-3); font-size: 16px; }
.cta__row { display: flex; justify-content: space-between; font-size: 14px; padding: 8px 0; border-top: 1px solid var(--line-2); }
.cta__row .k { color: var(--ink-3); }
.cta__row .v { font-weight: 700; }

/* 카운트다운 */
.countdown { background: var(--bg-soft); border-radius: 12px; padding: 12px; margin: 12px 0; text-align: center; }
.countdown__label { font-size: 12px; font-weight: 700; color: var(--ink-3); margin-bottom: 8px; }
.countdown__clock { display: flex; justify-content: center; gap: 8px; }
.countdown__unit { background: var(--ink); color: #fff; border-radius: 8px; padding: 8px 0; min-width: 52px; }
.countdown__unit b { display: block; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.countdown__unit span { font-size: 11px; opacity: .7; }
.countdown.is-urgent .countdown__unit { background: var(--primary); }

/* 혜택 */
.benefits { list-style: none; padding: 0; margin: 12px 0 4px; }
.benefits li { display: flex; gap: 10px; font-size: 14px; color: var(--ink-2); padding: 4px 0; }
.benefits li::before { content: "✓"; color: var(--primary); font-weight: 900; }

/* 모바일 하단 고정 CTA */
.mobile-cta {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: #fff; border-top: 1px solid var(--line); padding: 12px 16px;
  box-shadow: 0 -6px 20px rgba(0,0,0,.06);
  align-items: center; gap: 12px;
}
.mobile-cta .price { font-size: 18px; font-weight: 800; white-space: nowrap; }
.mobile-cta .btn { flex: 1; }

/* ---------- 마이페이지 ---------- */
.page-head { background: var(--bg-dark); color: #fff; padding: 40px 0; }
.page-head h1 { font-size: 26px; font-weight: 800; margin: 0; }
.page-head p { opacity: .7; margin: 8px 0 0; font-size: 14px; }
.tabs { display: flex; gap: 8px; margin: 28px 0 24px; border-bottom: 1px solid var(--line); }
.tabs button {
  background: none; border: none; padding: 12px 4px; margin-right: 20px;
  font-size: 16px; font-weight: 700; color: var(--ink-3); position: relative;
}
.tabs button.is-active { color: var(--ink); }
.tabs button.is-active::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--primary); }
.tabpanel { display: none; } .tabpanel.is-active { display: block; }

.my-card {
  display: grid; grid-template-columns: 200px 1fr auto; gap: 20px; align-items: center;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin-bottom: 16px;
}
.my-card__thumb { width: 200px; aspect-ratio: 16/9; border-radius: var(--radius-sm); object-fit: cover; background: var(--bg-soft); }
.my-card__title { font-size: 17px; font-weight: 700; margin: 0 0 6px; }
.my-card__meta { font-size: 13px; color: var(--ink-3); }
.my-card__status { display: inline-block; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; margin-bottom: 8px; }
.status-applied { background: var(--free-soft); color: var(--free); }
.status-paid { background: var(--primary-soft); color: var(--primary); }
.my-card__actions { display: flex; flex-direction: column; gap: 8px; min-width: 170px; }

/* ---------- 모달 (신청 완료) ---------- */
.modal-bg {
  position: fixed; inset: 0; background: rgba(20,21,26,.5); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 20px;
}
.modal-bg.open { display: flex; }
.modal {
  background: #fff; border-radius: 20px; max-width: 420px; width: 100%;
  padding: 32px 28px; text-align: center; box-shadow: var(--shadow-hover);
}
.modal__check { width: 64px; height: 64px; border-radius: 50%; background: var(--primary-soft);
  color: var(--primary); display: grid; place-items: center; font-size: 32px; margin: 0 auto 16px; }
.modal h3 { font-size: 22px; font-weight: 800; margin: 0 0 8px; }
.modal p { color: var(--ink-3); font-size: 15px; margin: 0 0 22px; }
.modal__link {
  background: var(--bg-soft); border-radius: 12px; padding: 14px; margin-bottom: 16px;
  font-size: 13px; color: var(--ink-2); text-align: left;
}
.modal__link b { display: block; margin-bottom: 6px; }
.modal__actions { display: flex; flex-direction: column; gap: 10px; }
.modal__close { position: absolute; }

/* ---------- 로그인 모달 ---------- */
.auth { max-width: 360px; }
.auth h3 { margin-top: 0; }
.auth p { margin-bottom: 24px; }

/* ---------- 푸터 ---------- */
.footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 40px 0; margin-top: 40px; }
.footer__inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 16px; color: var(--ink-3); font-size: 13px; }
.footer b { color: var(--ink); }

/* ---------- 블로그 ---------- */
.blog-head { padding: 48px 0 4px; }
.blog-head h1 { font-size: 32px; font-weight: 800; letter-spacing: -.6px; margin: 0; }
.blog-head p { color: var(--ink-3); font-size: 16px; margin: 10px 0 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 24px 0 8px; }
.chips button {
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 8px 16px; font-size: 14px; font-weight: 600; color: var(--ink-2);
}
.chips button:hover { border-color: var(--ink-3); }
.chips button.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }

.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px 24px; }
.blog-card { display: block; }
.blog-card__thumb { aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); }
.blog-card__thumb > div { width: 100%; height: 100%; transition: transform .25s; }
.blog-card:hover .blog-card__thumb > div { transform: scale(1.04); }
.blog-card__cat { font-size: 12px; font-weight: 800; color: var(--primary); margin: 14px 0 6px; }
.blog-card__title { font-size: 18px; font-weight: 700; letter-spacing: -.3px; line-height: 1.4; margin: 0 0 8px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card:hover .blog-card__title { color: var(--primary); }
.blog-card__excerpt { font-size: 14px; color: var(--ink-3); line-height: 1.6; margin: 0 0 12px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.blog-card__meta { font-size: 13px; color: var(--ink-3); }

.pagination { display: flex; justify-content: center; gap: 6px; margin: 48px 0; }
.pagination a, .pagination span {
  min-width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 8px; font-size: 14px; font-weight: 700; color: var(--ink-2);
}
.pagination a:hover { background: var(--bg-soft); }
.pagination .is-active { background: var(--ink); color: #fff; }

/* 블로그 글 상세 */
.post { max-width: 720px; margin: 0 auto; padding: 40px 0 80px; }
.post__breadcrumb { font-size: 13px; color: var(--ink-3); margin-bottom: 16px; }
.post__breadcrumb a:hover { color: var(--primary); }
.post__cat { font-size: 13px; font-weight: 800; color: var(--primary); }
.post__title { font-size: 32px; font-weight: 800; line-height: 1.3; letter-spacing: -.5px; margin: 10px 0 14px; }
.post__meta { font-size: 14px; color: var(--ink-3); padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.post__hero { aspect-ratio: 16/9; border-radius: var(--radius); margin: 28px 0; overflow: hidden; }
.post__body { font-size: 17px; line-height: 1.85; color: var(--ink-2); }
.post__body h2 { font-size: 22px; font-weight: 800; color: var(--ink); margin: 36px 0 12px; letter-spacing: -.3px; }
.post__body p { margin: 0 0 18px; }

/* ---------- 반응형 ---------- */
@media (max-width: 1024px) {
  .grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 860px) {
  /* 모바일: 후크 → 썸네일 → 카드내용 → 본문 순으로 재배치 */
  .landing__grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "hook"
      "thumb"
      "cta"
      "content";
    row-gap: 18px;
  }
  .m-hook { display: block; grid-area: hook; }
  .m-hook .cta__tip { margin-bottom: 0; }
  .cta-col { position: static; }
  .cta { display: flex; max-height: none; }   /* 모바일에선 펼쳐서 노출 */
  .cta__scroll { overflow: visible; }
  .cta .cta__tip { display: none; }            /* 카드 안 툴팁 → 상단 후크로 이동 */
  .cta .cta__method { display: none; }         /* 방식 칩 중복 제거(후크에 표시) */
  .mobile-cta { display: flex; }
  .grid { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .banner__slide { height: 220px; padding: 0 28px; }
  .banner__slide h2 { font-size: 24px; }
  .my-card { grid-template-columns: 1fr; }
  .my-card__thumb { width: 100%; }
  .my-card__actions { flex-direction: row; }
  .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 24px 18px; }
  .blog-head h1 { font-size: 26px; }
  .post__title { font-size: 26px; }
}
@media (max-width: 520px) {
  .gnb__menu { gap: 14px; }
  .gnb__logo { font-size: 18px; }
  .grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .section__title { font-size: 20px; }
  .blog-grid { grid-template-columns: 1fr; }
}

/* ---------- WordPress 관리바 보정 ---------- */
body.admin-bar .gnb { top: 32px; }
@media (max-width: 782px) { body.admin-bar .gnb { top: 46px; } }
.cta-col { top: calc(var(--gnb-h) + 20px); }
body.admin-bar .cta-col { top: calc(var(--gnb-h) + 52px); }

/* ---------- 푸터 사업자정보/메뉴 ---------- */
.footer__menu { list-style: none; display: flex; flex-wrap: wrap; gap: 18px; margin: 0; padding: 0; }
.footer__menu a { color: var(--ink-2); font-size: 13px; font-weight: 600; }
.footer__menu a:hover { color: var(--primary); }
.footer__biz { color: var(--ink-3); font-size: 12px; line-height: 1.8; margin-top: 18px; }
.footer__copy { color: var(--ink-3); font-size: 12px; margin-top: 10px; }
@media (max-width: 640px){ .footer__inner{ flex-direction:column; gap:12px; align-items:flex-start; } }
