/*
 * Study China Admissions
 * Public homepage typography
 *
 * One consistent type system:
 * DM Sans for headings, body copy, navigation, buttons and forms.
 */

:root {
  --sca-font:
    "DM Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif;
}

/* Base typography */
html,
body {
  font-family: var(--sca-font);
  font-kerning: normal;
  font-synthesis: none;
}

body,
button,
input,
select,
textarea {
  font-family: var(--sca-font) !important;
}

body {
  font-weight: 400;
  letter-spacing: 0;
}

/* Ensure all homepage components inherit the same family */
header,
main,
footer,
nav,
section,
article,
div,
span,
p,
a,
button,
input,
select,
textarea,
label,
small,
strong,
b,
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--sca-font) !important;
}

/* Main hero heading */
h1,
.hero h1 {
  font-weight: 700 !important;
  letter-spacing: -0.045em !important;
  line-height: 0.99 !important;
  text-wrap: balance;
}

/* Main section headings */
h2,
.section-title h2,
.cta h2 {
  font-weight: 700 !important;
  letter-spacing: -0.038em !important;
  line-height: 1.03 !important;
  text-wrap: balance;
}

/* Card and supporting headings */
h3,
.route h3,
.uni h3,
.step h3 {
  font-weight: 700 !important;
  letter-spacing: -0.027em !important;
  line-height: 1.08 !important;
}

h4,
h5,
h6,
.footer h2 {
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  line-height: 1.15 !important;
}

/* Body and descriptive copy */
p,
.hero-text,
.section-title p,
.route p,
.uni p,
.step p,
.cta p,
.footer p,
.copy {
  font-weight: 400 !important;
  letter-spacing: 0 !important;
  word-spacing: normal !important;
}

/* Brand */
.brand,
.brand * {
  font-family: var(--sca-font) !important;
}

.brand strong {
  font-weight: 700 !important;
  letter-spacing: -0.025em !important;
}

.brand small {
  font-weight: 600 !important;
  letter-spacing: 0.18em !important;
}

/* Uppercase labels */
.eyebrow,
.topbar {
  font-family: var(--sca-font) !important;
  font-weight: 700 !important;
  letter-spacing: 0.16em !important;
  text-transform: uppercase;
}

/* Navigation and controls */
.nav,
.nav a,
.apply,
.btn,
.quick,
.quick span,
.search-head,
.search-box label,
.search-row,
.tags,
.strip,
.meta,
.route-links,
.chips,
.footer-links,
.footer-nice-entry,
button,
label {
  font-family: var(--sca-font) !important;
  font-weight: 700 !important;
}

/* Buttons and links */
button,
.btn,
.apply,
.route-links a,
.uni a,
.footer-links a {
  font-weight: 700 !important;
  letter-spacing: -0.01em !important;
}

/* Form fields */
input,
select,
textarea {
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}

/* Program cards */
.route h3 {
  text-transform: uppercase;
}

/* University and process cards */
.uni h3,
.step h3 {
  text-transform: none;
}

/* Footer company information */
.footer-nice-entry > div:first-child {
  font-weight: 700 !important;
  letter-spacing: -0.012em !important;
}

.footer-nice-entry > div:last-child {
  font-weight: 500 !important;
  letter-spacing: 0 !important;
}

/* Tablet */
@media (max-width: 1100px) {
  h1,
  .hero h1 {
    letter-spacing: -0.04em !important;
  }

  h2,
  .section-title h2,
  .cta h2 {
    letter-spacing: -0.034em !important;
  }
}

/* Mobile */
@media (max-width: 720px) {
  h1,
  .hero h1 {
    letter-spacing: -0.035em !important;
    line-height: 1.01 !important;
  }

  h2,
  .section-title h2,
  .cta h2 {
    letter-spacing: -0.028em !important;
    line-height: 1.04 !important;
  }

  h3,
  .route h3,
  .uni h3,
  .step h3 {
    letter-spacing: -0.02em !important;
  }

  .eyebrow,
  .topbar {
    letter-spacing: 0.13em !important;
  }
}

/* SCA ADMISSION STEP IMAGES START */

.step {
  position: relative;
  overflow: hidden;
  padding: 0 0 28px !important;
  background: #ffffff;
}

.step-media {
  position: relative;
  width: 100%;
  height: 185px;
  margin: 0 0 25px;
  overflow: hidden;
  background: #eee6e3;
}

.step-media::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(56, 2, 21, 0) 54%,
      rgba(56, 2, 21, 0.19) 100%
    );
}

.step-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.45s ease;
}

.step:hover .step-media img {
  transform: scale(1.035);
}

.step > span,
.step > h3,
.step > p {
  margin-left: 27px;
  margin-right: 27px;
}

.step > span {
  position: relative;
  z-index: 2;
  margin-top: -49px;
  margin-bottom: 21px;
  border: 5px solid #ffffff;
  box-shadow: 0 10px 24px rgba(61, 2, 23, 0.16);
}

.step > h3 {
  margin-top: 0 !important;
  margin-bottom: 12px !important;
}

.step > p {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

@media (max-width: 1100px) {
  .step-media {
    height: 205px;
  }
}

@media (max-width: 720px) {
  .step {
    padding-bottom: 25px !important;
  }

  .step-media {
    height: 215px;
  }

  .step > span,
  .step > h3,
  .step > p {
    margin-left: 23px;
    margin-right: 23px;
  }
}

@media (max-width: 420px) {
  .step-media {
    height: 190px;
  }
}

/* SCA ADMISSION STEP IMAGES END */

/* SCA RESPONSIVE NAVIGATION FIX START */

/*
 * Desktop navigation
 * Restore the horizontal menu on normal laptop and desktop widths.
 */
@media (min-width: 1025px) {
  .header {
    overflow: visible !important;
  }

  .header .nav {
    position: static !important;
    inset: auto !important;
    display: flex !important;
    width: auto !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    flex-direction: row !important;
    align-items: center !important;
    justify-content: center !important;
    gap: clamp(17px, 2vw, 30px) !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .header .nav a {
    display: inline-flex !important;
    min-height: 44px !important;
    padding: 0 !important;
    align-items: center !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
  }

  .menu-btn,
  .menu-toggle,
  .nav-toggle,
  .hamburger,
  .mobile-menu-button,
  button[aria-label*="menu" i] {
    display: none !important;
  }
}

/*
 * Tablet and mobile navigation
 * Compact, right-aligned floating menu rather than a full-width modal.
 */
@media (max-width: 1024px) {
  .header {
    position: sticky !important;
    overflow: visible !important;
  }

  .header .nav {
    position: absolute !important;
    z-index: 1100 !important;
    top: calc(100% + 12px) !important;
    right: clamp(16px, 3vw, 28px) !important;
    left: auto !important;

    width: min(390px, calc(100vw - 32px)) !important;
    max-width: 390px !important;
    max-height: calc(100vh - 125px) !important;

    margin: 0 !important;
    padding: 10px !important;

    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    gap: 3px !important;

    overflow-x: hidden !important;
    overflow-y: auto !important;

    border: 1px solid rgba(166, 7, 50, 0.13) !important;
    border-radius: 20px !important;

    background: rgba(255, 253, 251, 0.98) !important;
    box-shadow:
      0 26px 65px rgba(54, 4, 22, 0.20),
      0 4px 14px rgba(54, 4, 22, 0.08) !important;

    backdrop-filter: blur(18px) !important;
    -webkit-backdrop-filter: blur(18px) !important;
  }

  /*
   * Keep the menu hidden until the existing JavaScript
   * adds the .open class.
   */
  .header .nav:not(.open) {
    display: none !important;
  }

  .header .nav.open {
    display: flex !important;
    animation: sca-menu-open 180ms ease-out both;
  }

  .header .nav a {
    position: relative !important;
    display: flex !important;
    width: 100% !important;
    min-height: 52px !important;
    box-sizing: border-box !important;

    padding: 0 16px !important;
    align-items: center !important;

    color: #202333 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    text-decoration: none !important;

    border: 0 !important;
    border-radius: 12px !important;
    background: transparent !important;

    transition:
      color 160ms ease,
      background-color 160ms ease,
      transform 160ms ease !important;
  }

  .header .nav a::after {
    display: none !important;
  }

  .header .nav a:hover,
  .header .nav a:focus-visible {
    color: var(--red, #a60732) !important;
    background: #fff0f3 !important;
    transform: translateX(2px);
    outline: none !important;
  }

  /*
   * Give the first Apply Online item a subtle CTA treatment
   * without changing the existing HTML.
   */
  .header .nav a:first-child {
    margin-bottom: 5px !important;
    color: #ffffff !important;
    background:
      linear-gradient(
        135deg,
        var(--red, #a60732),
        #8d062b
      ) !important;
    box-shadow: 0 9px 22px rgba(166, 7, 50, 0.20) !important;
  }

  .header .nav a:first-child:hover,
  .header .nav a:first-child:focus-visible {
    color: #ffffff !important;
    background:
      linear-gradient(
        135deg,
        #95052d,
        #790421
      ) !important;
    transform: translateY(-1px);
  }

  .menu-btn,
  .menu-toggle,
  .nav-toggle,
  .hamburger,
  .mobile-menu-button,
  button[aria-label*="menu" i] {
    position: relative !important;
    z-index: 1200 !important;
    flex: 0 0 auto !important;
  }
}

@media (max-width: 540px) {
  .header .nav {
    top: calc(100% + 8px) !important;
    right: 12px !important;
    width: calc(100vw - 24px) !important;
    max-width: none !important;
    max-height: calc(100vh - 105px) !important;
    padding: 9px !important;
    border-radius: 18px !important;
  }

  .header .nav a {
    min-height: 50px !important;
    padding-inline: 15px !important;
    font-size: 15px !important;
  }
}

@keyframes sca-menu-open {
  from {
    opacity: 0;
    transform: translateY(-8px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .header .nav.open {
    animation: none !important;
  }

  .header .nav a {
    transition: none !important;
  }
}

/* SCA RESPONSIVE NAVIGATION FIX END */

/* SCA HOMEPAGE FOOTER SYNC START */

.footer {
  position: relative !important;
  overflow: hidden !important;

  width: 100% !important;
  margin: 0 !important;

  padding:
    clamp(48px, 6vw, 78px)
    clamp(20px, 4vw, 60px)
    28px !important;

  box-sizing: border-box !important;

  color:
    rgba(255, 255, 255, 0.80) !important;

  text-align: center !important;

  background:
    radial-gradient(
      circle at 20% 0%,
      rgba(166, 7, 50, 0.20),
      transparent 36%
    ),
    linear-gradient(
      135deg,
      #24060f 0%,
      #16090d 54%,
      #25030e 100%
    ) !important;

  border-top:
    1px solid rgba(255, 255, 255, 0.08) !important;
}

.footer > * {
  width: min(1180px, 100%) !important;

  margin-left: auto !important;
  margin-right: auto !important;
}

.footer h2,
.footer h3,
.footer h4,
.footer strong {
  color: #ffffff !important;
}

.footer p,
.footer small,
.footer span,
.footer address {
  color:
    rgba(255, 255, 255, 0.68) !important;
}

.footer iframe {
  display: block !important;

  width: min(520px, 100%) !important;
  min-height: 230px !important;

  margin:
    24px auto 30px !important;

  border: 0 !important;
  border-radius: 16px !important;

  box-shadow:
    0 18px 45px rgba(0, 0, 0, 0.24) !important;
}

.footer .footer-links {
  display: flex !important;

  max-width: 1080px !important;

  margin:
    32px auto 28px !important;
  padding:
    30px 0 0 !important;

  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;

  gap: 9px !important;

  border-top:
    1px solid rgba(255, 255, 255, 0.09) !important;
}

.footer .footer-links a {
  display: inline-flex !important;

  min-height: 38px !important;

  padding:
    0 14px !important;

  align-items: center !important;
  justify-content: center !important;

  color:
    rgba(255, 255, 255, 0.82) !important;

  font-family:
    "DM Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Arial,
    sans-serif !important;

  font-size: 13px !important;
  font-weight: 700 !important;
  text-decoration: none !important;

  border:
    1px solid rgba(255, 255, 255, 0.10) !important;
  border-radius: 999px !important;

  background:
    rgba(255, 255, 255, 0.055) !important;
}

.footer .footer-links a:hover,
.footer .footer-links a:focus-visible {
  color: #ffffff !important;

  border-color:
    rgba(255, 255, 255, 0.24) !important;

  background:
    rgba(166, 7, 50, 0.72) !important;
}

@media (max-width: 720px) {
  .footer {
    padding:
      42px 18px 24px !important;
  }

  .footer .footer-links {
    gap: 7px !important;
  }

  .footer .footer-links a {
    min-height: 36px !important;

    padding:
      0 12px !important;

    font-size: 12px !important;
  }

  .footer iframe {
    min-height: 210px !important;
  }
}

/* SCA HOMEPAGE FOOTER SYNC END */
