/* Shared navigation layout with a sky-to-paper scroll transition. */
/* Shared OY LAND shell. Page-specific imagery and reading layouts keep their identity. */
:root {
  --oy-ink: #10294a;
  --oy-blue: #1952bb;
  --oy-muted: #526e8c;
  --oy-line: #d5e2ef;
  --oy-paper: #f9fcff;
  --oy-gutter: clamp(20px, 5.3vw, 88px);
  --oy-header-height: 78px;
  --oy-ease: cubic-bezier(.16, 1, .3, 1);
  --oy-section-title: clamp(30px, 3.4vw, 44px);
}
html:has(.course-preview) { scroll-padding-top: calc(var(--oy-header-height) + 20px); }
.course-preview :is(a, button, summary, input, select):focus-visible { outline: 2px solid var(--oy-blue); outline-offset: 5px; }
.course-preview > .oy-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--oy-header-height); min-height: var(--oy-header-height);
  display: flex; align-items: center; gap: 24px; padding: 0 max(var(--oy-gutter), calc((100vw - 1440px) / 2));
  --nav-surface: var(--nav-scroll, 0);
  border: 0; border-bottom: 1px solid rgb(213 226 239 / var(--nav-surface));
  background: rgb(249 252 255 / var(--nav-surface)); backdrop-filter: blur(calc(var(--nav-surface) * 14px));
  box-shadow: 0 8px 28px rgb(65 111 157 / calc(var(--nav-surface) * .08));
  color: var(--oy-ink); font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}
.course-preview .oy-brand {
  display: inline-flex; flex: none; align-items: center; gap: 8px; margin: 0; padding: 0;
  color: #1d5bbd; text-decoration: none; white-space: nowrap; line-height: 1;
}
.course-preview .oy-brand > svg { display: block; flex: none; width: 28px; height: 36px; color: #46a6f2; }
.course-preview .oy-brand > .oy-wordmark { display: block; margin: 0; padding: 0; border: 0; font-size: 22px; font-weight: 700; letter-spacing: .015em; line-height: 1; }
.course-preview .oy-wordmark small { display: block; margin: 7px 0 0; font-size: 8px; font-weight: 400; line-height: 1; letter-spacing: .1em; color: #58779e; }
.course-preview .oy-header > .oy-nav { display: flex; align-items: center; justify-content: center; gap: clamp(12px, 1.3vw, 20px); margin: 0 0 0 auto; padding: 0; background: none; border: 0; box-shadow: none; }
.course-preview .oy-header > .oy-nav a {
  position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  margin: 0; padding: 10px 0; color: var(--oy-ink); font-size: 12px; font-weight: 500; line-height: 1.4;
  white-space: nowrap; text-decoration: none; border: 0; background: none;
  transition: color 160ms ease;
}
.course-preview .oy-header > .oy-nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 2px; height: 2px; background: var(--oy-blue); transform: scaleX(0); transform-origin: center; transition: transform 200ms var(--oy-ease); }
.course-preview .oy-header > .oy-nav a:is([aria-current="page"], [aria-current="true"], .active) { color: var(--oy-blue); text-decoration: none; box-shadow: none; }
.course-preview .oy-header > .oy-nav a:is([aria-current="page"], [aria-current="true"], .active)::after { transform: scaleX(1); }
.course-preview .oy-header > .oy-nav a:hover { color: var(--oy-blue); }
.course-preview .oy-header-actions { display: flex; align-items: center; flex: none; gap: 14px; margin-left: 0; white-space: nowrap; }
.course-preview .oy-login { display: inline-flex; align-items: center; min-height: 44px; font-size: 12px; font-weight: 500; color: var(--oy-ink); text-decoration: none; }
.course-preview .oy-header .oy-contact {
  display: inline-flex; align-items: center; justify-content: center; min-height: 40px; margin: 0; padding: 10px 15px;
  border: 0; border-radius: 24px; background: var(--oy-blue); color: #fff; box-shadow: none;
  font-family: inherit; font-size: 12px; font-weight: 500; line-height: 1.5; text-decoration: none;
  transform: none; transition: background-color 160ms ease; cursor: pointer;
}
.course-preview .oy-header .oy-contact:hover { background: #123f91; transform: none; }
.course-preview .oy-header .oy-menu { display: none; flex: none; place-items: center; width: 40px; height: 44px; padding: 10px; border: 0; border-radius: 6px; background: transparent; color: var(--oy-ink); box-shadow: none; cursor: pointer; }
.course-preview .oy-menu span { display: block; height: 1.5px; width: 20px; margin: 5px 0; background: currentColor; }
.course-preview .oy-menu svg { width: 22px; height: 22px; }
/* Keep the content at its existing height while the sky fills the header area. */
.course-preview .sky { padding-top: var(--oy-header-height); }
.course-preview .oy-header:has(.oy-menu[aria-expanded="true"]) { --nav-surface: 1; }
.course-preview .oy-header:not(.has-surface):not(:has(.oy-menu[aria-expanded="true"])) {
  --oy-ink: #fff; --oy-blue: #fff;
}
.course-preview .oy-header:not(.has-surface):not(:has(.oy-menu[aria-expanded="true"])) :is(.oy-brand, .oy-brand > svg, .oy-wordmark small) { color: #fff; }
.course-preview .oy-header:not(.has-surface):not(:has(.oy-menu[aria-expanded="true"])) .oy-contact { background: #f9fcff; color: #1952bb; }
.course-preview .oy-header :is(.oy-brand, .oy-brand > svg, .oy-wordmark small, .oy-login, .oy-menu, .oy-contact) { transition: color 160ms ease, background-color 160ms ease; }
@media (max-width: 1100px) {
  .course-preview > .oy-header { gap: 18px; }
  .course-preview .oy-header-actions { margin-left: auto; }
  .course-preview .oy-header .oy-menu { display: block; }
  .course-preview .oy-header > .oy-nav {
    display: none; position: absolute; inset: var(--oy-header-height) 0 auto; margin: 0; padding: 16px var(--oy-gutter) 22px;
    grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px 20px; border-radius: 0; border-bottom: 1px solid var(--oy-line);
    background: var(--oy-paper); max-height: calc(100dvh - var(--oy-header-height)); overflow-y: auto;
  }
  .course-preview .oy-header:has(.oy-menu[aria-expanded="true"]) > .oy-nav { display: grid; }
  .course-preview .oy-header > .oy-nav a { min-height: 44px; padding: 12px 0; font-size: 14px; }
  .course-preview .oy-header > .oy-nav a::after { left: 30%; right: 30%; }
}
@media (max-width: 700px) {
  :root { --oy-header-height: 65px; --oy-gutter: 20px; }
  .course-preview > .oy-header { gap: 10px; }
  .course-preview .oy-brand { gap: 5px; }
  .course-preview .oy-brand > svg { width: 23px; height: 32px; }
  .course-preview .oy-brand > .oy-wordmark { font-size: 19px; }
  .course-preview .oy-wordmark small { display: none; }
  .course-preview .oy-header-actions { gap: 9px; }
  .course-preview .oy-login { font-size: 11px; }
  .course-preview .oy-header .oy-contact { min-height: 36px; padding: 8px 10px; font-size: 11px; }
  .course-preview .oy-header .oy-menu { width: 30px; padding: 5px; }
  .course-preview .oy-header > .oy-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 370px) {
  :root { --oy-gutter: 14px; }
  .course-preview .oy-brand > .oy-wordmark { font-size: 17px; }
  .course-preview .oy-brand > svg { width: 20px; }
  .course-preview .oy-header-actions { gap: 6px; }
  .course-preview .oy-login, .course-preview .oy-header .oy-contact { font-size: 10px; }
  .course-preview .oy-header .oy-contact { padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) { .course-preview .oy-header *, .course-preview .oy-header *::after { transition: none !important; } }
