/* ============================================================
   home.css - 메인 페이지 전용 (index.asp)
   흰 바탕 + 남색 글자 + 파랑 포인트 한 가지, 선 아이콘, 알약 이름표
   ============================================================ */
/* 색은 style.css 공통 변수를 그대로 씀 */
:root {
  --hm-navy:  var(--navy);
  --hm-blue:  var(--primary);
  --hm-blue-d:var(--primary-dark);
  --hm-sky:   var(--sky);
  --hm-ink:   var(--text-sec);
  --hm-gray:  var(--bg-alt);
  --hm-line:  var(--border);
}
html, body { overflow-x: clip; }
.hm { color: var(--hm-ink); letter-spacing: -0.01em; }
.hm h1, .hm h2, .hm h3 { color: var(--hm-navy); letter-spacing: -0.03em; margin: 0; }
.hm p { margin: 0; }
.hm .ico { display: block; flex-shrink: 0; }

/* 알약 이름표 */
.hm-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 14px; border: 1px solid var(--hm-line); border-radius: 999px;
  background: #fff; color: var(--hm-navy); font-size: 16px; font-weight: 600;
}
.hm-chip .ico { color: #e5484d; }

/* 버튼 */
.hm-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 14px 26px; border-radius: var(--btn-radius); font-size: 19px; font-weight: 700;
  text-decoration: none; white-space: nowrap; transition: background .15s, color .15s, border-color .15s;
}
.hm-btn--fill { background: var(--hm-blue); color: #fff; }
.hm-btn--fill:hover { background: var(--hm-blue-d); color: #fff; }
.hm-btn--line { border: 1.5px solid var(--hm-line); color: var(--hm-navy); background: #fff; }
.hm-btn--line:hover { border-color: var(--hm-blue); color: var(--hm-blue); }

/* ---------- 1. 첫 화면 ---------- */
.hm-hero { display: grid; grid-template-columns: 1.15fr 1fr; gap: 48px; align-items: center; padding: 16px 0 56px; }
.hm-hero__title { font-size: 46px; line-height: 1.22; font-weight: 800; margin: 18px 0 16px; }
.hm-hero__title em { font-style: normal; color: var(--hm-blue); }
.hm-hero__desc { font-size: 20px; line-height: 1.7; max-width: 30em; }
.hm-hero__btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.hm-hero .edu-continue { margin: 24px 0 0; }
.hm-stats { display: flex; gap: 40px; margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--hm-line); }
.hm-stats strong { display: block; font-size: 30px; font-weight: 800; color: var(--hm-blue); line-height: 1.2; }
.hm-stats span { font-size: 16px; }

/* 오른쪽: 오늘의 추천 판 */
.hm-today { background: var(--hm-sky); border-radius: 20px; padding: 28px; }
.hm-today__date { font-size: 16px; font-weight: 600; color: var(--hm-blue); }
.hm-today__head { font-size: 24px; font-weight: 800; color: var(--hm-navy); margin: 2px 0 18px; }
.hm-today__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.hm-today__list a {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px; border-radius: 14px; background: #fff;
  color: var(--hm-navy); text-decoration: none;
  box-shadow: 0 1px 2px rgba(27,31,92,.05); transition: box-shadow .15s, transform .15s;
}
.hm-today__list a:hover { box-shadow: 0 6px 18px rgba(27,31,92,.10); transform: translateY(-1px); }
.hm-today__ic { width: 46px; height: 46px; border-radius: 12px; background: var(--hm-sky); color: var(--hm-blue); display: grid; place-items: center; flex-shrink: 0; }
.hm-today__txt { flex: 1; min-width: 0; }
.hm-today__txt strong { display: block; font-size: 20px; font-weight: 700; }
.hm-today__txt span { display: block; font-size: 16px; color: var(--hm-ink); }
.hm-today__go { color: #a3a8c3; }

/* 공지 한 줄 */
.hm-notice {
  display: flex; align-items: center; gap: 14px; margin: 0 0 24px;
  padding: 16px 20px; border: 1px solid var(--hm-line); border-radius: 14px;
  color: var(--hm-navy); text-decoration: none; transition: border-color .15s;
}
.hm-notice:hover { border-color: var(--hm-blue); }
.hm-notice__tag { padding: 3px 12px; border-radius: 999px; background: var(--hm-sky); color: var(--hm-blue); font-size: 16px; font-weight: 700; white-space: nowrap; }
.hm-notice__title { flex: 1; min-width: 0; font-size: 19px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hm-notice__more { font-size: 16px; color: var(--hm-ink); white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }

/* ---------- 섹션 공통 머리 ---------- */
.hm-sec { padding: 64px 0 48px; }
.hm-sec__head { text-align: center; margin-bottom: 36px; }
.hm-sec__title { font-size: 34px; font-weight: 800; line-height: 1.3; margin-top: 12px !important; }
.hm-sec__sub { font-size: 19px; margin-top: 10px !important; }

/* ---------- 2. 처음 오셨다면 ---------- */
.hm-start { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.hm-card {
  display: flex; flex-direction: column; padding: 26px 24px 22px;
  border: 1px solid var(--hm-line); border-radius: 18px; background: #fff;
  color: var(--hm-ink); text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.hm-card:hover { border-color: #c9cef5; box-shadow: 0 10px 28px rgba(27,31,92,.08); }
.hm-card__ic { width: 56px; height: 56px; border-radius: 14px; background: var(--hm-sky); color: var(--hm-blue); display: grid; place-items: center; }
.hm-card__title { font-size: 22px; font-weight: 800; color: var(--hm-navy); margin: 18px 0 6px; }
.hm-card__desc { font-size: 17px; line-height: 1.6; flex: 1; }
.hm-card__go { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-size: 17px; font-weight: 700; color: var(--hm-blue); }

/* ---------- 3. 전체 메뉴 (회색 띠) ---------- */
.hm-band { background: var(--hm-gray); margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.hm-band { padding-left: max(16px, calc(50vw - 50%)); padding-right: max(16px, calc(50vw - 50%)); }
/* 카드 높이가 제각각이라 두 단으로 흘려 빈칸을 없앰 */
.hm-menu { column-count: 2; column-gap: 16px; }
.hm-menu__card { background: #fff; border-radius: 18px; padding: 24px 24px 18px; break-inside: avoid; margin-bottom: 16px; }
.hm-menu__title {
  display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
  font-size: 22px; font-weight: 800; color: var(--hm-navy); text-decoration: none;
}
.hm-menu__title .hm-card__ic { width: 44px; height: 44px; border-radius: 12px; }
.hm-menu__title:hover { color: var(--hm-blue); }
.hm-menu__links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.hm-menu__links a {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  padding: 10px 2px; border-bottom: 1px solid #eef0f5;
  font-size: 18px; color: var(--hm-ink); text-decoration: none;
}
.hm-menu__links a:hover { color: var(--hm-blue); }
.hm-menu__links a .ico { color: #c3c7da; }
.hm-menu__links a:hover .ico { color: var(--hm-blue); }

/* ---------- 4. 파란 안내 띠 ---------- */
.hm-cta {
  display: flex; align-items: center; gap: 24px; flex-wrap: wrap;
  margin: 64px 0 0; padding: 32px 36px; border-radius: 20px;
  background: var(--hm-blue); color: #fff; text-decoration: none;
}
.hm-cta__txt { flex: 1; min-width: 240px; }
.hm-cta__title { display: block; font-size: 26px; font-weight: 800; color: #fff; }
.hm-cta__sub { display: block; font-size: 18px; line-height: 1.6; color: #dfe3ff; margin-top: 4px; }
.hm-cta .hm-btn { background: #fff; color: var(--hm-blue); }
.hm-cta:hover .hm-btn { background: var(--hm-navy); color: #fff; }

/* ---------- 반응형 ---------- */
@media (max-width: 960px) {
  .hm-hero { grid-template-columns: 1fr; gap: 32px; }
  .hm-start { grid-template-columns: repeat(2, 1fr); }
  .hm-menu { column-count: 1; }
}
@media (max-width: 600px) {
  .hm-hero { padding: 0 0 40px; }
  .hm-hero__title { font-size: 34px; }
  .hm-hero__desc { font-size: 19px; }
  .hm-hero__btns .hm-btn { flex: 1 1 100%; justify-content: center; }
  .hm-stats { gap: 28px; }
  .hm-today { padding: 22px 18px; }
  .hm-sec { padding: 48px 0; }
  .hm-sec__title { font-size: 28px; }
  .hm-start { grid-template-columns: 1fr; }
  .hm-menu__card { padding: 20px 18px 14px; }
  .hm-notice__more { display: none; }
  .hm-cta { padding: 26px 22px; }
  .hm-cta .hm-btn { width: 100%; justify-content: center; }
}
@media (max-width: 420px) {
  .hm-menu__links { grid-template-columns: 1fr; }
}
