/* ============================================================
 *  Homepage v2 — Redesigned Navigation & Hero
 *  Adds modern visuals on top of existing HTML structure.
 * ============================================================ */

/* ─── Navbar v2 ────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 70px;
  background: rgba(10, 37, 64, 0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.navbar.scrolled {
  height: 60px;
  background: rgba(10, 37, 64, 0.92);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

/* Brand */
.navbar .brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  font-weight: 700;
}
.navbar .brand-mark {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #E8A838 0%, #F5C76B 100%);
  color: #0A2540;
  font-size: 20px;
  font-weight: 900;
  border-radius: 10px;
  box-shadow: 0 4px 12px rgba(232, 168, 56, 0.35);
  font-family: 'Noto Serif SC', serif;
}
.navbar .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}
.navbar .brand-text .zh {
  font-size: 17px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}
.navbar .brand-text .en {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 2px;
}

/* Nav links */
.navbar .nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}
.navbar .nav-links > li {
  position: relative;
}
.navbar .nav-links > li > a {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  transition: all 0.15s ease;
  white-space: nowrap;
}
.navbar .nav-links > li > a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
}
.navbar .nav-links > li > a::after {
  content: none;
}

/* Dropdown */
.navbar .nav-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  min-width: 240px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(10, 37, 64, 0.18), 0 4px 12px rgba(10, 37, 64, 0.08);
  padding: 8px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 100;
  border: 1px solid #E5E9EF;
}
.navbar .nav-links > li:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.navbar .nav-dropdown a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #2D3748;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.12s ease;
}
.navbar .nav-dropdown a:hover {
  background: #F0F4FA;
  color: #0A2540;
}
.navbar .nav-dropdown .dd-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1D6FB8 0%, #2D8CD4 100%);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  flex-shrink: 0;
}

/* CTA area */
.navbar .nav-cta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.navbar .nav-cta .btn-ghost {
  color: rgba(255, 255, 255, 0.82);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.navbar .nav-cta .btn-ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.25);
}
.navbar .nav-cta .btn-primary {
  background: linear-gradient(135deg, #E8A838 0%, #F5C76B 100%);
  color: #0A2540;
  border: none;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(232, 168, 56, 0.3);
}
.navbar .nav-cta .btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(232, 168, 56, 0.4);
}

/* Lang switch */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}
.lang-switch:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.lang-switch .lang-sep {
  color: rgba(255, 255, 255, 0.3);
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  cursor: pointer;
}

/* ─── Hero v2 ──────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 140px 0 100px;
  margin-top: 0;
  background:
    radial-gradient(ellipse at top right, rgba(45, 140, 212, 0.18) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(232, 168, 56, 0.1) 0%, transparent 45%),
    linear-gradient(180deg, #0A2540 0%, #132F52 55%, #1A3A63 100%);
  color: #fff;
  overflow: hidden;
}

/* Subtle grid pattern */
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at center top, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at center top, black 30%, transparent 70%);
  pointer-events: none;
}

/* Bottom curve divider */
.hero::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 80px;
  background: var(--bg-page);
  clip-path: ellipse(70% 100% at 50% 100%);
  -webkit-clip-path: ellipse(70% 100% at 50% 100%);
}

.hero-inner {
  position: relative;
  z-index: 1;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(232, 168, 56, 0.12);
  border: 1px solid rgba(232, 168, 56, 0.25);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  color: #F5C76B;
  margin-bottom: 24px;
}
.hero-badge .dot {
  width: 6px;
  height: 6px;
  background: #E8A838;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(232, 168, 56, 0.2);
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(232, 168, 56, 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(232, 168, 56, 0.08); }
}

.hero h1 {
  font-size: 52px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.025em;
  color: #fff;
  margin-bottom: 20px;
}
.hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, #F5C76B 0%, #E8A838 50%, #F5D28A 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  position: relative;
}

.hero-subtitle {
  font-size: 18px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.72);
  margin-bottom: 36px;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

/* Search box */
.search-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 8px 8px 18px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
  max-width: 620px;
  margin: 0 auto 20px;
  position: relative;
}
.search-icon { color: rgba(255, 255, 255, 0.5); flex-shrink: 0; }
.search-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 16px;
  font-family: inherit;
  padding: 10px 4px;
  min-width: 0;
}
.search-input::placeholder { color: rgba(255, 255, 255, 0.4); }
.search-clear {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.6);
  cursor: pointer;
  flex-shrink: 0;
}
.search-clear:hover { background: rgba(255, 255, 255, 0.18); color: #fff; }
.search-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, #E8A838 0%, #F5C76B 100%);
  color: #0A2540;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  box-shadow: 0 2px 8px rgba(232, 168, 56, 0.3);
}
.search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(232, 168, 56, 0.45);
}
.search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  z-index: 10;
  display: none;
  text-align: left;
}
.search-dropdown.show { display: block; }

/* Search tags */
.search-tags {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 48px;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}
.search-tags-label { margin-right: 4px; }
.search-tag {
  padding: 4px 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-family: inherit;
  border-radius: 100px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.search-tag:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

/* Hero stats */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
.hero-stat { text-align: center; }
.hero-stat .num {
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.hero-stat .num span {
  color: #E8A838;
  font-size: 24px;
  margin-left: 1px;
}
.hero-stat .label {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.6);
}

/* ─── Section headings v2 ──────────────────────────────────── */
.section-header {
  text-align: center;
  margin-bottom: 48px;
}
.section-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  color: #E8A838;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.section-title {
  font-size: 36px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0A2540;
  margin-bottom: 12px;
}
.section-desc {
  font-size: 17px;
  color: #6B7A8C;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ─── Exam / profession cards v2 ──────────────────────────── */
.exam-card, .prof-card {
  position: relative;
  background: #fff;
  border: 1px solid #E5E9EF;
  border-radius: 16px;
  padding: 28px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}
.exam-card:hover, .prof-card:hover {
  transform: translateY(-4px);
  border-color: #D1D9E3;
  box-shadow: 0 16px 40px rgba(10, 37, 64, 0.10), 0 4px 12px rgba(10, 37, 64, 0.06);
}
.exam-card::before, .prof-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1D6FB8, #2D8CD4);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.exam-card:hover::before, .prof-card:hover::before {
  transform: scaleX(1);
}

/* ─── Footer v2 ────────────────────────────────────────────── */
.footer {
  background: #0A2540;
  color: rgba(255, 255, 255, 0.7);
  padding: 64px 0 24px;
}
.footer h4 {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
}
.footer a {
  color: rgba(255, 255, 255, 0.6);
  transition: color 0.15s ease;
}
.footer a:hover { color: #F5C76B; }

/* ─── Dark mode adjustments ────────────────────────────────── */
html[data-theme="dark"] .hero {
  background:
    radial-gradient(ellipse at top right, rgba(45, 140, 212, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at bottom left, rgba(232, 168, 56, 0.06) 0%, transparent 45%),
    linear-gradient(180deg, #051830 0%, #0A2540 55%, #132F52 100%);
}
html[data-theme="dark"] .hero::after {
  background: var(--bg-page);
}

/* ─── Responsive ───────────────────────────────────────────── */
@media (max-width: 1024px) {
  .navbar .nav-links { display: none; }
  .mobile-menu-btn { display: flex; }
  .hero { padding: 120px 0 80px; }
  .hero h1 { font-size: 40px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

@media (max-width: 768px) {
  .navbar { height: 60px; }
  .navbar.scrolled { height: 54px; }
  .navbar .brand-text .en { display: none; }
  .navbar .brand-text .zh { font-size: 15px; }
  .navbar .brand-mark { width: 34px; height: 34px; font-size: 17px; border-radius: 8px; }
  .nav-cta .btn-ghost:not(.lang-switch) { display: none; }
  .nav-user-btn span { display: none; }

  .hero { padding: 100px 0 64px; }
  .hero h1 { font-size: 32px; }
  .hero-subtitle { font-size: 15px; }
  .search-box { padding: 6px 6px 6px 12px; border-radius: 12px; }
  .search-btn { padding: 8px 14px; font-size: 13px; }
  .search-tags { font-size: 12px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 16px; }
  .hero-stat .num { font-size: 24px; }
  .hero-stat .num span { font-size: 18px; }
  .hero-stat .label { font-size: 12px; }
}
