/* ---------- Header polish (LCB-inspired) ---------- */
body.page header [data-id="logo"] .site-title,
body.page .site-title {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 700;
  color: #16324f !important;
  letter-spacing: 0.02em;
}
body.page header .menu > li > a {
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #16324f;
  font-weight: 500;
}
body.page header .menu > li > a:hover {
  color: #c9a227;
}
body.page header [data-header*="middle"],
body.page header .ct-header {
  border-bottom: 1px solid #ece8df;
  box-shadow: 0 2px 18px rgba(22, 50, 79, 0.05);
}
body.page .site-branding .site-description { display: none; }

/* ---------- Footer: LANDMANN-style editorial columns ---------- */
body.page footer,
body.page .ct-footer {
  background: #101418 !important;
  color: #e9edf2;
  margin-top: 0 !important;
}
body.page .ct-footer [data-row="middle"] {
  padding-top: 76px !important;
  padding-bottom: 64px !important;
  border-top: 1px solid rgba(201, 162, 39, 0.35);
}
/* Force horizontal columns (Blocksy stacks them by default). */
body.page .ct-footer [data-row="middle"] .ct-container {
  display: grid !important;
  grid-template-columns: 1.35fr 0.8fr 1.15fr 0.9fr;
  gap: 56px;
  align-items: start;
  max-width: 1320px;
  margin: 0 auto;
}
body.page .ct-footer [data-row="middle"] [data-column] {
  width: auto !important;
  max-width: none !important;
  flex: none !important;
  float: none !important;
}
@media (max-width: 1100px) {
  body.page .ct-footer [data-row="middle"] .ct-container {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }
}
@media (max-width: 640px) {
  body.page .ct-footer [data-row="middle"] .ct-container {
    grid-template-columns: 1fr;
  }
}
body.page .ct-footer .ruyi-footer-brand {
  display: block;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2.6rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #ffffff;
  margin: 16px 0 14px;
}
body.page .ct-footer .footer-logo-mark { width: 64px; height: 64px; object-fit: contain; }
body.page .ct-footer .ruyi-f-tagline { color: #9aa7b5; font-size: 14.5px !important; line-height: 1.8; }
body.page .ct-footer .ruyi-f-contact { margin-top: 18px; font-size: 14px !important; }
body.page .ct-footer .ruyi-f-title {
  color: #ffffff;
  font-family: 'Nunito', sans-serif;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0 0 22px;
  padding: 0;
  border: none;
}
body.page .ct-footer ul.ruyi-f-links { list-style: none; margin: 0; padding: 0; }
body.page .ct-footer ul.ruyi-f-links li { margin-bottom: 12px; }
body.page .ct-footer ul.ruyi-f-links a {
  color: #e9edf2 !important;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border-bottom: none;
  transition: color 0.22s ease, padding-left 0.22s ease;
}
body.page .ct-footer ul.ruyi-f-links a:hover {
  color: #e8b06a !important;
  padding-left: 6px;
}
body.page .ct-footer .ruyi-f-hashtag {
  color: #e8b06a !important;
  font-size: 19px !important;
  font-weight: 800;
  letter-spacing: 0.04em;
  margin-bottom: 20px;
}
body.page .ct-footer .ruyi-f-social { display: flex; gap: 12px; margin-bottom: 22px; }
body.page .ct-footer .ruyi-f-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(233, 237, 242, 0.3);
  border-radius: 50%;
  color: #e9edf2 !important;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
body.page .ct-footer .ruyi-f-social a:hover {
  background: #c9a227;
  border-color: #c9a227;
  color: #101418 !important;
}
body.page .ct-footer .ruyi-f-campus { color: #9aa7b5; font-size: 13.5px !important; line-height: 1.8; }
body.page .ct-footer p,
body.page .ct-footer .widget,
body.page .ct-footer .textwidget { color: #e9edf2 !important; }
body.page .ct-footer [data-id="copyright"],
body.page .ct-footer .footer-copyright {
  color: rgba(233, 237, 242, 0.45);
  font-size: 12.5px;
  letter-spacing: 0.08em;
  text-align: center;
  padding: 24px 0 !important;
}
body.page .ct-footer [data-row="bottom"] { border-top: 1px solid rgba(233, 237, 242, 0.1); }

/* ---------- Hero & motion ---------- */
.ruyi-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.ruyi-hero .ruyi-motion-host {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0.35;
  pointer-events: none;
}
.ruyi-hero .ruyi-motion-host .ml-root {
  width: 100%;
  height: 100%;
  background: transparent;
}
/* hide the lab's demo card labels; keep abstract glass panels only */
.ruyi-motion-host .ml-caption,
.ruyi-motion-host .ml-sub,
.ruyi-motion-host .ml-headline,
.ruyi-motion-host .ml-plane > * {
  display: none !important;
}

/* Stats band: numbers must be light on navy */
body.page .ruyi-stats-band .wp-block-heading { color: #ffffff !important; }
body.page .ruyi-stats-band p { color: #e8b06a !important; }
/* Mobile: compact 2x2 grid instead of a tall stacked wall */
@media (max-width: 768px) {
  body.page .entry-content > .wp-block-group {
    padding-top: 56px !important;
    padding-bottom: 56px !important;
  }
  body.page .entry-content > .wp-block-group.ruyi-stats-band {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
  }
  body.page .ruyi-stats-band .wp-block-columns {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 28px 16px;
  }
  body.page .ruyi-stats-band .wp-block-column { flex-basis: auto !important; margin: 0 !important; }
  body.page .ruyi-stats-band .wp-block-heading { font-size: 34px !important; margin-bottom: 4px !important; }
  body.page .ruyi-stats-band p { font-size: 12px !important; letter-spacing: 0.12em; }
}

/* ---------- Dropdown menus (courses / language) ---------- */
#ruyi-lab-header .ruyi-dd { position: relative; }
#ruyi-lab-header .ruyi-dd-menu {
  position: absolute;
  top: calc(100% + 1px);
  right: 0;
  min-width: 180px;
  background: #ffffff;
  border: 1px solid #ece8df;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(13, 28, 48, 0.16);
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
  z-index: 50;
}
/* invisible bridge so the pointer can travel from button to menu */
#ruyi-lab-header .ruyi-dd-menu::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 0;
  right: 0;
  height: 14px;
}
/* language selector: compact with globe icon */
#ruyi-lab-header .ruyi-dd:not(.ruyi-mega) .ruyi-dd-menu {
  top: calc(100% + 2px);
  right: -6px;
  min-width: 0;
  width: max-content;
  padding: 6px;
  border-radius: 10px;
}
#ruyi-lab-header .ruyi-dd:not(.ruyi-mega) .ruyi-dd-menu a {
  padding: 9px 16px;
  font-size: 15px;
}
#ruyi-lab-header .ruyi-lang-btn::before {
  content: '';
  display: inline-block;
  width: 15px;
  height: 15px;
  margin-right: 6px;
  vertical-align: -2px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 4 5.7 4 9s-1.5 6.4-4 9c-2.5-2.6-4-5.7-4-9s1.5-6.4 4-9Z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c2.5 2.6 4 5.7 4 9s-1.5 6.4-4 9c-2.5-2.6-4-5.7-4-9s1.5-6.4 4-9Z'/%3E%3C/svg%3E") center/contain no-repeat;
}
#ruyi-lab-header .ruyi-lang-btn {
  border: 1px solid rgba(201, 162, 39, 0.5);
  padding: 9px 14px !important;
  margin-left: 10px;
}
#ruyi-lab-header .hf-actions .ruyi-dd { display: flex; align-items: center; }
#ruyi-lab-header .hf-actions .ruyi-dd-menu { top: calc(100% + 14px) !important; }

/* ---------- Mobile: capsule keeps logo + compact language + hamburger ---------- */
@media (max-width: 999px) {
  #ruyi-lab-header .hf-actions .ruyi-header-extra,
  #ruyi-lab-header .hf-cta { display: none !important; }
  #ruyi-lab-header .hf-bar {
    padding: 0 10px;
    width: calc(100vw - 16px) !important;
    max-width: calc(100vw - 16px) !important;
  }
  #ruyi-lab-header .ruyi-logo-mark { width: 32px; height: 32px; margin-right: 8px; }
  #ruyi-lab-header .hf-logo strong { font-size: 1.12rem; letter-spacing: 0; }
  #ruyi-lab-header .hf-logo small { display: none; }
  #ruyi-lab-header .hf-actions { gap: 6px !important; flex-shrink: 0; }
  #ruyi-lab-header [data-hf-menu] {
    width: 38px;
    height: 38px;
    min-width: 38px;
    flex-shrink: 0;
    position: static !important;
    right: auto !important;
    inset: auto !important;
    margin: 0;
  }
  #ruyi-lab-header .ruyi-lang-btn {
    display: inline-flex !important;
    align-items: center;
    white-space: nowrap;
    font-size: 12px !important;
    line-height: 1 !important;
    height: 32px;
    min-height: 0 !important;
    padding: 0 10px !important;
    margin: 0;
    border-radius: 999px !important;
    flex-shrink: 0;
  }
  #ruyi-lab-header .ruyi-lang-btn::before { width: 12px; height: 12px; margin-right: 4px; }
  #ruyi-lab-header .hf-actions .ruyi-dd-menu { top: calc(100% + 16px) !important; right: -4px; }
}
@media (max-width: 400px) {
  #ruyi-lab-header .hf-logo strong { font-size: 1.02rem; }
  #ruyi-lab-header .ruyi-logo-mark { width: 28px; height: 28px; }
  #ruyi-lab-header .ruyi-lang-btn { font-size: 11.5px !important; padding: 0 8px !important; }
}
#ruyi-lab-header .ruyi-dd:hover .ruyi-dd-menu,
#ruyi-lab-header .ruyi-dd:focus-within .ruyi-dd-menu,
#ruyi-lab-header .ruyi-dd.open .ruyi-dd-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
#ruyi-lab-header .ruyi-dd-menu a {
  color: #16324f;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  padding: 11px 14px;
  border-radius: 9px;
  line-height: 1.45;
  transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}
#ruyi-lab-header .ruyi-dd-menu a:hover {
  background: #f7f2e7;
  color: #a8842a;
  padding-left: 20px;
}
#ruyi-lab-header .ruyi-caret { font-size: 11px; margin-left: 2px; }
#ruyi-lab-header .ruyi-logo-mark {
  width: 44px;
  height: 44px;
  object-fit: contain;
  margin-right: 12px;
  flex-shrink: 0;
}
#ruyi-lab-header .hf-logo { flex-direction: row !important; align-items: center; }
#ruyi-lab-header .ruyi-logo-text { display: flex; flex-direction: column; }
#ruyi-lab-header .hf-logo strong { line-height: 1.1; }
#ruyi-lab-header .hf-logo small {
  font-family: 'Nunito', sans-serif;
  font-size: 11px;
  letter-spacing: 0.18em;
  color: inherit;
  opacity: 0.9;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Contact info inside capsule ---------- */
#ruyi-lab-header .ruyi-header-extra {
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin-right: 6px;
  text-align: right;
  font-size: 11.5px;
  line-height: 1.5;
  letter-spacing: 0.03em;
}
#ruyi-lab-header .ruyi-header-extra a {
  color: inherit;
  text-decoration: none;
  opacity: 0.85;
}
#ruyi-lab-header .ruyi-header-extra a:hover { color: #c9a227; opacity: 1; }
@media (max-width: 1200px) { #ruyi-lab-header .ruyi-header-extra { display: none; } }

/* ---------- Mega menu with images ---------- */
#ruyi-lab-header .ruyi-mega-menu {
  min-width: 760px;
  right: auto;
  left: 50%;
  transform: translate(-50%, 10px);
  padding: 18px;
  border-radius: 18px;
  white-space: normal;
}
#ruyi-lab-header .ruyi-dd-menu a { white-space: normal; }
#ruyi-lab-header .ruyi-mega:hover .ruyi-mega-menu,
#ruyi-lab-header .ruyi-mega:focus-within .ruyi-mega-menu,
#ruyi-lab-header .ruyi-mega.open .ruyi-mega-menu {
  transform: translate(-50%, 0);
}
#ruyi-lab-header .ruyi-mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
#ruyi-lab-header .ruyi-mega-item {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  overflow: hidden;
  padding: 0 !important;
  background: #fbfaf7;
  border: 1px solid #efe9dd;
}
#ruyi-lab-header .ruyi-mega-item:hover {
  background: #f7f2e7 !important;
  padding-left: 0 !important;
  box-shadow: 0 8px 20px rgba(13, 28, 48, 0.1);
}
#ruyi-lab-header .ruyi-mega-thumb {
  display: block;
  height: 92px;
  overflow: hidden;
}
#ruyi-lab-header .ruyi-mega-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease;
}
#ruyi-lab-header .ruyi-mega-item:hover .ruyi-mega-thumb img { transform: scale(1.08); }
#ruyi-lab-header .ruyi-mega-copy { padding: 10px 12px 12px; }
#ruyi-lab-header .ruyi-mega-copy strong {
  display: block;
  color: #16324f;
  font-size: 15px;
  line-height: 1.4;
  white-space: normal;
}
#ruyi-lab-header .ruyi-mega-copy small {
  display: block;
  color: #7a8698;
  font-size: 12.5px;
  font-weight: 400;
  margin-top: 5px;
  line-height: 1.5;
  white-space: normal;
}
#ruyi-lab-header .ruyi-mega-copy em {
  display: inline-block;
  font-style: normal;
  color: #a8842a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  margin-top: 7px;
}
#ruyi-lab-header .ruyi-mega-footer {
  display: block;
  text-align: center;
  margin-top: 12px;
  padding: 11px;
  border-top: 1px solid #efe9dd;
  color: #a8842a !important;
  font-weight: 800 !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 12px !important;
}

/* ---------- Slim info bar + dropdowns end ---------- */

/* ---------- Motion Lab header (replaces Blocksy header) ---------- */
body.page #header { display: none !important; }
body.page .hero-section { display: none !important; }
body.page .entry-header { display: none !important; }

#ruyi-lab-header { position: relative; z-index: 900; }
#ruyi-lab-header .hf-footnote,
#ruyi-lab-header [data-hf-search],
#ruyi-lab-header .hf-search-box,
#ruyi-lab-header .hf-search-results { display: none !important; }

/* Floating capsule: transparent over hero at top, solid white once scrolled */
#ruyi-lab-header .hf-bar {
  transition: background 0.45s ease, box-shadow 0.45s ease, color 0.45s ease, width 0.35s ease, height 0.25s ease, border-color 0.45s ease;
}
#ruyi-lab-header .hf-demo[data-scrolled="false"] .hf-bar {
  background: transparent;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
#ruyi-lab-header .hf-demo[data-scrolled="true"] .hf-bar {
  background: rgba(255, 255, 255, 0.94);
  color: #16324f;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(236, 232, 223, 0.9) !important;
  box-shadow: 0 8px 26px rgba(13, 28, 48, 0.12);
}
#ruyi-lab-header .hf-logo strong {
  font-family: 'Ink Free', 'Segoe Print', 'Bradley Hand', cursive !important;
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: 0.01em;
}
#ruyi-lab-header .hf-logo small {
  letter-spacing: 0.14em;
  font-size: 14px !important;
  font-weight: 700;
  text-transform: uppercase;
  opacity: 0.95;
}
#ruyi-lab-header .hf-nav button {
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 15px;
  font-weight: 700;
  border-radius: 999px;
  position: relative;
  transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
#ruyi-lab-header .hf-nav button::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 6px;
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: #c9a227;
  transform: translateX(-50%);
  transition: width 0.28s cubic-bezier(0.2, 0.75, 0.2, 1);
}
#ruyi-lab-header .hf-nav button:hover {
  color: #c9a227;
  transform: translateY(-1px);
}
#ruyi-lab-header .hf-nav button:hover::after { width: 60%; }
#ruyi-lab-header .hf-nav button[aria-current="location"]::after { width: 0; }
#ruyi-lab-header .hf-nav button.ruyi-active { color: #c9a227; }
#ruyi-lab-header .hf-nav button.ruyi-active::after { width: 60%; }
#ruyi-lab-header .hf-indicator { display: none; }
/* center the main nav absolutely within the capsule */
#ruyi-lab-header .hf-bar { position: relative; }
#ruyi-lab-header .hf-nav {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
}

/* ---------- Back to top button ---------- */
.ruyi-totop {
  position: fixed;
  right: 28px;
  bottom: 28px;
  z-index: 1100;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, #e3b74f, #c9a227);
  color: #16324f;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(201, 162, 39, 0.4);
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s, box-shadow 0.25s ease;
}
.ruyi-totop.ruyi-totop-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.ruyi-totop:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(201, 162, 39, 0.5); }
/* center the main nav between logo and actions */
#ruyi-lab-header .hf-nav { margin-left: auto; margin-right: auto; }
#ruyi-lab-header .hf-cta {
  background: linear-gradient(135deg, #e3b74f, #c9a227) !important;
  color: #16324f !important;
  border-radius: 999px !important;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 800;
  padding: 12px 24px;
  box-shadow: 0 6px 18px rgba(201, 162, 39, 0.35);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
#ruyi-lab-header .hf-cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(201, 162, 39, 0.45);
}
body.admin-bar #ruyi-lab-header .hf-stack { top: 44px; }
@media (max-width: 782px) {
  body.admin-bar #ruyi-lab-header .hf-stack { top: 58px; }
}

/* Let the hero slide up underneath the floating header (no Blocksy top spacing). */
body.page #main.site-main,
body.page .ct-container-full[data-vertical-spacing],
body.page .ct-container[data-vertical-spacing] {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* Pages without a full-bleed hero: solid capsule for contrast. */
#ruyi-lab-header.ruyi-solid .hf-bar {
  background: rgba(255, 255, 255, 0.95) !important;
  color: #16324f !important;
  border: 1px solid #ece8df !important;
}

/* ---------- Typography: softer & larger ---------- */
body.page {
  font-family: 'Nunito', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  font-size: 19px;
  line-height: 1.8;
}
body.page .entry-content p:not(.ruyi-hero *) { font-size: 19px !important; line-height: 1.85; }
body.page .wp-block-heading {
  font-family: 'Cormorant Garamond', Georgia, 'Songti SC', serif !important;
  font-weight: 600;
  letter-spacing: 0.01em;
}
body.page .wp-block-cover h1 { font-size: clamp(44px, 6vw, 84px) !important; }
body.page h2.wp-block-heading { font-size: clamp(30px, 3.4vw, 46px) !important; }
body.page h3.wp-block-heading { font-size: clamp(22px, 2vw, 28px) !important; }

/* ---------- Buttons: pill, lift, soft shadow ---------- */
body.page .wp-block-button__link,
body.page .wp-element-button {
  border-radius: 999px !important;
  font-family: 'Nunito', sans-serif;
  font-weight: 800 !important;
  letter-spacing: 0.08em;
  padding: 16px 34px !important;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}
body.page .wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background: linear-gradient(135deg, #e3b74f, #c9a227) !important;
  color: #16324f !important;
  border: none !important;
  box-shadow: 0 8px 22px rgba(201, 162, 39, 0.32);
}
body.page .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 30px rgba(201, 162, 39, 0.42);
}
body.page .wp-block-button.is-style-outline .wp-block-button__link {
  border: 1.5px solid rgba(255, 255, 255, 0.75) !important;
  color: #fff !important;
  background: rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(6px);
}
body.page .wp-block-button.is-style-outline .wp-block-button__link:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  transform: translateY(-3px);
}
.ruyi-hero .wp-block-cover__image-background { z-index: 0; }
.ruyi-hero .wp-block-cover__background { z-index: 0; }
.ruyi-hero .wp-block-cover__inner-container {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 980px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.ruyi-hero .wp-block-cover__inner-container .wp-block-buttons { justify-content: center; }

/* ---------- Typography & blocks ---------- */
body.page .wp-block-heading { color: #16324f; }
body.page .wp-block-cover .wp-block-heading,
body.page .ruyi-hero .wp-block-heading { color: #ffffff; }
body.page .entry-header,
body.page .hero-section[data-type="type-1"] { display: none; }
body.page .wp-block-button__link:hover { filter: brightness(1.08); }
body.page .wp-block-table { border: none; }
body.page .wp-block-table th { background: #16324f; color: #fff; border: none; padding: 12px 16px; }
body.page .wp-block-table td { border: 1px solid #e7e2d8; padding: 12px 16px; }
body.page .wp-block-details { border: 1px solid #e7e2d8; border-radius: 4px; padding: 14px 20px; margin-bottom: 12px; background: #fbfaf7; }
body.page .wp-block-details summary { font-weight: 600; color: #16324f; cursor: pointer; }
body.page .wp-block-quote { border-left: 3px solid #c9a227; font-family: Georgia, serif; font-style: italic; font-size: 1.1rem; color: #3d4a5c; }
body.page .wp-block-quote cite { font-style: normal; font-size: 0.85rem; color: #c9a227; letter-spacing: .1em; }

[data-scroll-reveal] { will-change: transform, opacity; }
/* ---------- Reading progress bar ---------- */
.ruyi-reading-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, #e3b74f, #c9a227);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 1200;
  pointer-events: none;
}

/* ---------- Hero entrance choreography ---------- */
@keyframes ruyiRise {
  from { opacity: 0; transform: translateY(46px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes ruyiKern {
  from { opacity: 0; letter-spacing: 0.6em; }
  to { opacity: 1; }
}
body.page .ruyi-hero .wp-block-cover__inner-container > * {
  opacity: 0;
  animation: ruyiRise 1s cubic-bezier(0.2, 0.75, 0.2, 1) forwards;
}
body.page .ruyi-hero .wp-block-cover__inner-container > *:nth-child(1) { animation-delay: 0.15s; animation-name: ruyiKern; }
body.page .ruyi-hero .wp-block-cover__inner-container > *:nth-child(2) { animation-delay: 0.35s; }
body.page .ruyi-hero .wp-block-cover__inner-container > *:nth-child(3) { animation-delay: 0.55s; }
body.page .ruyi-hero .wp-block-cover__inner-container > *:nth-child(4) { animation-delay: 0.7s; }
body.page .ruyi-hero .wp-block-cover__inner-container > *:nth-child(5) { animation-delay: 0.85s; }
@media (prefers-reduced-motion: reduce) {
  body.page .ruyi-hero .wp-block-cover__inner-container > * { animation: none; opacity: 1; }
}
/* scrubbed headings & images */
body.page .entry-content h2.wp-block-heading,
body.page .entry-content h3.wp-block-heading { will-change: transform, opacity; }
body.page .wp-block-image { overflow: hidden; border-radius: 6px; }
body.page .wp-block-image img { will-change: transform; }
body.page .wp-block-image { transition: transform 0.5s cubic-bezier(0.2, 0.75, 0.2, 1); }
body.page .wp-block-image:hover { transform: scale(1.015); }
body.page .wp-block-cover__image-background { will-change: transform; }
.ruyi-eyebrow { letter-spacing: 0.28em; text-transform: uppercase; font-size: 0.78rem; opacity: 0.85; }
.ruyi-course-card { transition: transform 0.35s ease, box-shadow 0.35s ease; }
.ruyi-course-card:hover { transform: translateY(-4px); }

/* ---------- Section rhythm & separation ---------- */
body.page .entry-content > .wp-block-group {
  padding-top: 92px !important;
  padding-bottom: 92px !important;
}
body.page .entry-content > .wp-block-group + .wp-block-group {
  border-top: 1px solid #e9e3d7;
}
/* bands with their own background don't need the hairline */
body.page .entry-content > .wp-block-group.ruyi-stats-band,
body.page .entry-content > .wp-block-group.ruyi-cta,
body.page .entry-content > .wp-block-group[style*="f7f4ee"] {
  border-top: none;
}
body.page .entry-content > .wp-block-group.ruyi-stats-band {
  padding-top: 64px !important;
  padding-bottom: 64px !important;
}
/* subtle top label line for each section */
body.page .entry-content > .wp-block-group:not(.ruyi-cta):not(.ruyi-stats-band) > .wp-block-heading:first-child {
  position: relative;
}

/* ---------- CTA: big finale band ---------- */
body.page .entry-content > .wp-block-group.ruyi-cta {
  padding-top: 110px !important;
  padding-bottom: 110px !important;
  border-top: 4px solid #c9a227 !important;
  position: relative;
  background-image: radial-gradient(ellipse at 50% 0%, rgba(201, 162, 39, 0.16), transparent 65%) !important;
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  border-radius: 0;
  overflow: hidden;
}
/* CTA flows straight into the footer — no white gap. */
body.page .ruyi-cta { margin-bottom: 0 !important; }
body.page:not(:has(.ruyi-cta)):not(:has(.cta-banner)) #main.site-main { padding-bottom: 56px !important; }
body.page .ruyi-cta .wp-block-heading {
  font-size: clamp(40px, 4.6vw, 62px) !important;
  color: #ffffff !important;
}
body.page .ruyi-cta p {
  font-size: 21px !important;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
body.page .ruyi-cta .wp-block-button__link {
  font-size: 17px !important;
  padding: 20px 46px !important;
}
body.page .ruyi-cta .wp-block-separator {
  width: 96px !important;
  border-top-width: 3px !important;
}

/* ---------- News cards: unified image ratio ---------- */
.ruyi-news-img {
  width: 100%;
  aspect-ratio: 1536 / 957;
  object-fit: cover;
  display: block;
}

/* ---------- Course/story cards: unified image ratio ---------- */
.ruyi-course-img img,
figure.ruyi-course-img img {
  width: 100%;
  aspect-ratio: 1536 / 957;
  object-fit: cover;
  display: block;
}

/* ---------- Remove hero glass-panel motion layer (flashing artifact) ---------- */
.ruyi-hero .ruyi-motion-host {
  display: none !important;
}

/* ---------- Hero entrance: clean fade-rise only (no kern, no stagger) ---------- */
body.page .ruyi-hero .wp-block-cover__inner-container > * {
  animation-name: ruyiRise !important;
  animation-delay: 0s !important;
  animation-duration: .8s !important;
}

/* ---------- Partner logo sizing ---------- */
.ruyi-partner-logo img,
figure.ruyi-partner-logo img {
  width: auto;
  max-width: 300px;
  margin: 0 auto;
  display: block;
  border-radius: 6px;
}

/* ---------- Image + text rows: equal height, vertically centered ---------- */
.ruyi-media-row.wp-block-columns {
  align-items: center;
}
.ruyi-media-row > .wp-block-column > .wp-block-image {
  height: 100%;
  margin: 0;
}
.ruyi-media-row > .wp-block-column > .wp-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 6px;
}
@media (max-width: 782px) {
  .ruyi-media-row > .wp-block-column > .wp-block-image img {
    height: auto;
  }
}

/* Force the image figure to fill its equal-height column */
.ruyi-media-row > .wp-block-column:has(> .wp-block-image) {
  display: flex;
}
.ruyi-media-row > .wp-block-column:has(> .wp-block-image) > .wp-block-image {
  flex: 1 1 auto;
  display: flex;
  margin: 0;
}
.ruyi-media-row > .wp-block-column:has(> .wp-block-image) > .wp-block-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 6px;
}

/* Vertically center text content in image+text rows */
.ruyi-media-row > .wp-block-column:not(:has(> .wp-block-image)) {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Full-width CTA banner: break free of the constrained group width */
.cta-banner.wp-block-group {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  border-radius: 0;
}

/* CTA banner sits flush against the footer: remove container bottom padding on pages that end with a CTA */
body.page:has(.cta-banner) .site-main,
body.page:has(.cta-banner) .ct-container-full {
  padding-bottom: 0 !important;
}

/* Remove the last container padding so a full-width CTA meets the footer exactly */
body.page:has(.ruyi-cta) .ct-container-full,
body.page:has(.cta-banner) .ct-container-full {
  padding-bottom: 0 !important;
}

/* ---------- Mobile header: full-width flat bar instead of a rounded floating pill ---------- */
@media (max-width: 782px) {
  #ruyi-lab-header .hf-stack {
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 0 !important;
  }
  header.hf-bar,
  #ruyi-lab-header header.hf-bar {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: 0 2px 12px rgba(13, 28, 48, 0.08) !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
  }
}
