/* R365-HEADER: 리딩365 g5 화면 상단. 새 디자인(css/style.css)의 .site-header 와 같은 모양.
   테마가 글자 크기 기준을 바꾸므로 rem 을 쓰지 않고 px 로 적는다. 클래스는 전부 r365h- 접두사. */
@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard.css');

/* 옛 상단은 DOM 에 남기고(테마 스크립트가 참조) 화면에서만 숨긴다 */
#at_header { display: none !important; }

.r365h {
  position: fixed; top: 0; left: 0; right: 0; height: 72px; z-index: 500;
  display: flex; align-items: center;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 1px 0 #e7e9f2;
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif;
  font-size: 15px; line-height: 1.6; word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  transition: box-shadow 0.25s ease;
}
.r365h.r365h-scrolled { box-shadow: 0 2px 10px rgba(31, 35, 51, 0.06); }
.r365h-spacer { height: 72px; }
.r365h *, .r365h *::before, .r365h *::after { box-sizing: border-box; }
/* 테마가 a·span 에 글꼴을 따로 지정해서 덮어쓴다 */
.r365h, .r365h * { font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif !important; }
.r365h a, .r365h a:hover, .r365h a:focus { text-decoration: none; }
.r365h a:focus-visible, .r365h button:focus-visible { outline: 2px solid #2b3387; outline-offset: 2px; }

.r365h-in {
  width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px;
  display: flex; align-items: center; justify-content: space-between;
}

.r365h-logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 20px; color: #1d2361 !important; }
.r365h-logo img { width: 34px; height: 34px; display: block; }

/* R365-CLINIC: 5분 자가진단 · 리딩 클리닉 메뉴 — 소개 페이지(.nav-diag/.nav-clinic)와 같은 알약 */
.r365h-item.r365h-diag > a, .r365h-item.r365h-clinic > a { height: auto; padding: 8px 16px; border-radius: 999px; color: #fff !important; font-weight: 800; gap: 6px; white-space: nowrap; transition: background 0.15s ease, transform 0.15s ease; }
.r365h-item.r365h-diag > a { background: #ff6f6f; box-shadow: 0 4px 12px rgba(255, 111, 111, 0.35); }
.r365h-item.r365h-clinic > a { background: #2b3387; box-shadow: 0 4px 12px rgba(43, 51, 135, 0.3); }
.r365h-item.r365h-diag:hover > a { background: #ef4f4f; color: #fff !important; transform: translateY(-1px); }
.r365h-item.r365h-clinic:hover > a { background: #1d2361; color: #fff !important; transform: translateY(-1px); }
.r365h-nav .r365h-diag + .r365h-clinic { margin-left: -14px; }
.r365h-new { display: inline-block; padding: 2px 7px; border-radius: 999px; background: #ffd23f; color: #1d2361; font-size: 10px; font-weight: 800; letter-spacing: 0.04em; line-height: 1.3; }
.r365h-new.r365h-free { background: #fff; color: #ef4f4f; }
@media (max-width: 1180px) and (min-width: 961px) {
  .r365h-nav { gap: 16px; }
  .r365h-item > a { font-size: 13px; }
  .r365h-item.r365h-diag > a, .r365h-item.r365h-clinic > a { padding: 7px 12px; }
  .r365h-nav .r365h-diag + .r365h-clinic { margin-left: -8px; }
}
@media (max-width: 960px) {
  .r365h-item.r365h-diag, .r365h-item.r365h-clinic { border-bottom: 0; padding: 6px 0; }
  .r365h-item.r365h-diag > a, .r365h-item.r365h-clinic > a { flex: 0 0 auto; min-height: 0; padding: 10px 20px; font-size: 15px; }
  .r365h-nav .r365h-diag + .r365h-clinic { margin-left: 0; }
}

.r365h-nav { display: flex; align-items: stretch; gap: 32px; }
.r365h-item { position: relative; display: flex; align-items: center; height: 72px; }
.r365h-item > a { white-space: nowrap; display: flex; align-items: center; height: 100%; font-weight: 600; font-size: 15px; color: #4d5166 !important; transition: color 0.15s ease; }
.r365h-item:hover > a, .r365h-item.r365h-dd-open > a { color: #2b3387 !important; }
.r365h-only-m { display: none; }

.r365h-dd { display: none; width: 40px; height: 40px; padding: 0; border: 0; background: none; cursor: pointer; align-items: center; justify-content: center; color: #767b91; flex-shrink: 0; }
.r365h-dd svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.r365h-dd-open .r365h-dd svg { transform: rotate(180deg); }

.r365h-menu {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%) translateY(6px);
  min-width: 200px; padding: 10px; background: #fff; border-radius: 18px;
  box-shadow: 0 16px 40px rgba(31, 35, 51, 0.12);
  opacity: 0; pointer-events: none; transition: opacity 0.18s ease, transform 0.18s ease; z-index: 50;
}
.r365h-item:hover .r365h-menu, .r365h-item:focus-within .r365h-menu { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); }
.r365h-menu a { display: block; padding: 10px 14px; border-radius: 10px; font-size: 14px; font-weight: 600; color: #4d5166 !important; white-space: nowrap; }
.r365h-menu a:hover { background: #eef0fb; color: #2b3387 !important; }

.r365h-cta { display: flex; align-items: center; gap: 10px; }
.r365h-nick { font-size: 14px; color: #4d5166; white-space: nowrap; }
@media (max-width: 1500px) { .r365h-nick { display: none; } }
@media (max-width: 1100px) { .r365h-hide-md { display: none !important; } }
.r365h-nick b { color: #1d2361; font-weight: 700; }
.r365h-btn {
  display: inline-flex; align-items: center; justify-content: center; height: 42px; padding: 0 20px;
  border-radius: 999px !important; font-weight: 700; font-size: 14px; white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.r365h-btn-line { background: #fff; color: #2b3387 !important; border: 1.5px solid #e7e9f2; }
.r365h-btn-line:hover { border-color: #2b3387; }
.r365h-btn-navy { background: #2b3387; color: #fff !important; border: 1.5px solid #2b3387; }
.r365h-btn-navy:hover { background: #1d2361; border-color: #1d2361; }
.r365h-btn-coral { background: #ff6f6f; color: #fff !important; border: 1.5px solid #ff6f6f; box-shadow: 0 10px 24px rgba(255, 111, 111, 0.35); }
.r365h-btn-coral:hover { background: #ef4f4f; border-color: #ef4f4f; }
.r365h-ico { width: 16px; height: 16px; margin-right: 6px; flex-shrink: 0; }
.r365h-link { font-size: 14px; font-weight: 600; color: #4d5166 !important; white-space: nowrap; padding: 0 4px; }
.r365h-link:hover { color: #2b3387 !important; }

.r365h-toggle { display: none; width: 40px; height: 40px; padding: 0; border: 0; background: none; cursor: pointer; align-items: center; justify-content: center; }
.r365h-toggle span, .r365h-toggle span::before, .r365h-toggle span::after { content: ''; display: block; width: 22px; height: 2px; background: #1d2361; position: relative; transition: transform 0.2s ease; }
.r365h-toggle span::before { position: absolute; top: -7px; }
.r365h-toggle span::after { position: absolute; top: 7px; }
.r365h-toggle.r365h-active span { background: transparent; }
.r365h-toggle.r365h-active span::before { top: 0; transform: rotate(45deg); }
.r365h-toggle.r365h-active span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 960px) {
  .r365h-nav {
    position: fixed; top: 72px; left: 0; right: 0; max-height: calc(100vh - 72px); overflow-y: auto;
    flex-direction: column; gap: 0; background: #fff; padding: 8px 24px 20px;
    box-shadow: 0 8px 24px rgba(31, 35, 51, 0.08);
    display: none;
  }
  .r365h-nav.r365h-open { display: flex; }
  .r365h-item { height: auto; flex-wrap: wrap; border-bottom: 1px solid #e7e9f2; padding: 4px 0; }
  .r365h-item > a { height: auto; min-height: 44px; flex: 1; font-size: 16px; }
  .r365h-only-m { display: flex; }
  .r365h-dd { display: flex; }
  .r365h-menu, .r365h-item:hover .r365h-menu, .r365h-item:focus-within .r365h-menu {
    position: static; transform: none; box-shadow: none; opacity: 1; pointer-events: auto;
    flex-basis: 100%; min-width: 0; padding: 0 0 0 12px; display: none; border-radius: 0;
  }
  .r365h-nav .r365h-item.r365h-dd-open .r365h-menu { display: block; padding: 0 0 10px 12px; }
  .r365h-menu a { font-size: 15px; padding: 11px 14px; }
  .r365h-hide-m { display: none; }
  .r365h-nick { display: none; }
  .r365h-toggle { display: flex; }
  .r365h-cta { margin-left: auto; margin-right: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .r365h, .r365h * { transition: none !important; }
}

/* R365-TOPBAR: 로그인한 사람에게만 보이는 맨 위 작은 띠. 상단 막대·여백·모바일 메뉴를 32px 아래로 민다 */
.r365h-top { position: fixed; top: 0; left: 0; right: 0; height: 32px; z-index: 501; background: #1d2361; color: #fff; font-size: 13px; line-height: 1; }
.r365h-top, .r365h-top * { font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Malgun Gothic', sans-serif !important; }
.r365h-top-in { max-width: 1160px; margin: 0 auto; padding: 0 24px; height: 100%; display: flex; align-items: center; justify-content: flex-end; gap: 16px; white-space: nowrap; }
.r365h-top b { font-weight: 700; color: #fff; }
.r365h-top a, .r365h-top a:hover { color: #fff !important; font-weight: 600; opacity: 0.85; text-decoration: none; }
.r365h-top a:hover { opacity: 1; text-decoration: underline; }
.r365h-top + .r365h { top: 32px; }
.r365h-top + .r365h + .r365h-spacer { height: 104px; }
@media (max-width: 960px) { .r365h-top + .r365h .r365h-nav { top: 104px; max-height: calc(100vh - 104px); } }

/* R365-LEARN-PILL: 나의 학습방 — 5분 자가진단·리딩 클리닉과 같은 알약, 하늘색 배경 */
.r365h-item.r365h-learn > a { height: auto; padding: 8px 16px; border-radius: 999px; background: #1a8fbf; color: #fff !important; font-weight: 800; white-space: nowrap; box-shadow: 0 4px 12px rgba(26, 143, 191, 0.32); transition: background 0.15s ease, transform 0.15s ease; }
.r365h-item.r365h-learn:hover > a { background: #12749c; color: #fff !important; transform: translateY(-1px); }
.r365h-nav .r365h-learn + .r365h-diag { margin-left: -14px; }
@media (max-width: 1180px) and (min-width: 961px) { .r365h-item.r365h-learn > a { padding: 7px 12px; } .r365h-nav .r365h-learn + .r365h-diag { margin-left: -8px; } }
@media (max-width: 960px) { .r365h-item.r365h-learn { border-bottom: 0; padding: 6px 0; } .r365h-item.r365h-learn > a { flex: 0 0 auto; min-height: 0; padding: 10px 20px; font-size: 15px; } .r365h-nav .r365h-learn + .r365h-diag { margin-left: 0; } }
