/* === Shared styles for 英卓雅思 website === */
:root {
  --red: #C41E22; --red-deep: #8B1A1C; --red-dark: #5C0F11;
  --gold: #C8A96E; --gold-light: #E8D5B4;
  --ink: #1A1718; --ink-soft: #2D292A;
  --warm: #4A4544; --warm-light: #8C8786;
  --bg-warm: #F5F2ED; --bg-card: #FAF8F5; --white: #FFFFFF; --border: #E5E0D9;
  --font-serif: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --font-sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --shadow-sm: 0 1px 3px rgba(26,23,24,0.06);
  --shadow-md: 0 4px 24px rgba(26,23,24,0.08);
  --shadow-lg: 0 16px 48px rgba(26,23,24,0.12);
  --ease: cubic-bezier(0.25, 0.1, 0.25, 1);
  --ease-slow: cubic-bezier(0.16, 1, 0.3, 1);
}
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(26,23,24,0.12); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: rgba(26,23,24,0.25); }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-sans); color: var(--ink); background: var(--white); line-height: 1.75; font-size: 16px; overflow-x: hidden; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 900; }
h1 { font-size: clamp(2.4rem, 5vw, 3.5rem); font-weight: 900; letter-spacing: -0.01em; line-height: 1.25; }
h2 { font-size: clamp(1.6rem, 3vw, 2.5rem); font-weight: 800; letter-spacing: -0.005em; line-height: 1.3; }
h3 { font-size: clamp(1.1rem, 2vw, 1.5rem); font-weight: 700; line-height: 1.3; }
/* Nav base */
.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; padding: 0 48px; height: 72px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,0.88); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-bottom: 1px solid rgba(0,0,0,0.04); transition: background var(--ease), box-shadow var(--ease), border-color var(--ease); }
.nav-inner { width: 100%; max-width: 1280px; display: flex; align-items: center; justify-content: center; flex-wrap: nowrap; }
.nav.nav-home { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; border-bottom-color: transparent; box-shadow: none; }
.nav.nav-home.scrolled { background: rgba(255,255,255,0.85); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4); border-bottom-color: rgba(0,0,0,0.04); box-shadow: 0 1px 0 rgba(0,0,0,0.04); }
.nav-logo { font-family: var(--font-serif); font-size: 1.4rem; font-weight: 700; text-decoration: none; display: flex; align-items: center; gap: 12px; margin-right: clamp(36px, 4vw, 84px); flex: 0 0 auto; }
.logo-img { height: 36px; width: auto; display: block; transition: opacity var(--ease); }
.logo-img:hover { opacity: 0.85; }
.nav-links { display: flex; align-items: center; gap: clamp(20px, 2vw, 36px); list-style: none; flex: 0 1 auto; min-width: 0; white-space: nowrap; }
.nav-links a { text-decoration: none; font-size: 0.875rem; font-weight: 500; color: var(--ink-soft); letter-spacing: 0.03em; transition: color var(--ease); position: relative; padding: 4px 0; }
.nav-links a:visited { color: var(--ink-soft); }
.nav-links a:hover { color: var(--ink); }
.nav-links a::after { content: ''; position: absolute; bottom: -1px; left: 0; width: 0; height: 1.5px; background: var(--red); transition: width var(--ease); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active { color: var(--red); } .nav-links a.active::after { width: 100%; }
.nav-links a.nav-phone-link, .nav-links a.nav-phone-link:visited { color: var(--red); font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.nav-links a.nav-phone-link:hover { color: var(--red-deep); }
.nav-phone-icon {
  display: inline-block;
  font-size: 0.92rem;
  line-height: 1;
  transform: translateY(0.5px);
}
.nav-back { display: flex; align-items: center; gap: 6px; text-decoration: none; color: var(--warm-light); font-size: 0.875rem; font-weight: 500; transition: color var(--ease); }
.nav-back:hover { color: var(--ink); }
.nav-phone { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 700; color: var(--red); text-decoration: none; letter-spacing: 0.02em; transition: color var(--ease); white-space: nowrap; }
.nav-phone:hover { color: var(--red-deep); }
.nav-right { display: flex; align-items: center; gap: 20px; margin-left: 24px; }
/* Hamburger */
.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; z-index: 101; }
.hamburger span { width: 24px; height: 2px; background: var(--ink); transition: all 0.3s ease; display: block; }
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu { display: none; position: fixed; inset: 0; z-index: 99; background: rgba(0,0,0,0.3); backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.3s ease; }
.mobile-menu.open { display: block; opacity: 1; }
.mobile-menu-panel { position: absolute; top: 0; right: 0; width: 280px; height: 100%; background: white; padding: 100px 32px 32px; display: flex; flex-direction: column; gap: 20px; transform: translateX(100%); transition: transform 0.4s var(--ease-slow); box-shadow: -8px 0 32px rgba(0,0,0,0.1); }
.mobile-menu.open .mobile-menu-panel { transform: translateX(0); }
.mobile-menu a { text-decoration: none; font-size: 1.1rem; font-weight: 500; color: var(--ink); letter-spacing: 0.03em; padding: 8px 0; border-bottom: 1px solid var(--border); transition: color var(--ease); }
.mobile-menu a:hover { color: var(--red); }
.mobile-menu a.nav-phone-link { color: var(--red); font-weight: 700; }
.mobile-menu .mobile-cta { margin-top: 16px; padding: 14px 24px; background: var(--red); color: white; border-radius: 10px; text-align: center; font-weight: 600; text-decoration: none; }
/* Floating contact */
.float-contact { position: fixed; bottom: 32px; right: 32px; z-index: 200; }
.float-btn { width: 56px; height: 56px; border-radius: 50%; background: var(--red); color: white; border: none; cursor: pointer; font-size: 1.5rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 24px rgba(196,30,34,0.35); transition: all 0.3s var(--ease); position: relative; }
.float-btn:hover { transform: scale(1.08); background: var(--red-deep); }
.float-popup { position: absolute; bottom: 72px; right: 0; background: white; border-radius: 16px; padding: 24px; box-shadow: 0 16px 48px rgba(0,0,0,0.15); min-width: 220px; display: none; text-align: center; }
.float-popup.open { display: block; animation: hfadeIn 0.3s ease; }
.float-popup h4 { font-size: 0.95rem; margin-bottom: 12px; color: var(--ink); font-family: var(--font-sans); }
.float-popup .qr-img { width: 140px; height: 140px; border-radius: 12px; margin: 0 auto 12px; display: block; object-fit: cover; }
.float-popup .float-phone { font-size: 1.1rem; font-weight: 700; color: var(--red); display: block; text-decoration: none; margin-top: 8px; }
.float-popup .float-phone:hover { color: var(--red-deep); }
/* Breadcrumb */
.breadcrumb { font-size: 0.8rem; color: var(--warm-light); }
.breadcrumb a { color: var(--warm-light); text-decoration: none; }
.breadcrumb a:hover { color: var(--red); }
.breadcrumb span { color: var(--warm-light); margin: 0 8px; }
/* Section common */
.section { padding: 80px 48px; position: relative; }
.section-label { font-size: 0.75rem; font-weight: 600; color: var(--red); letter-spacing: 0.14em; margin-bottom: 16px; font-family: var(--font-sans); }
.section-title { margin-bottom: 20px; color: var(--ink); }
.section-desc { font-size: 1.05rem; color: var(--warm); max-width: 560px; line-height: 1.85; }
.container { max-width: 1280px; margin: 0 auto; width: 100%; }
.text-center { text-align: center; } .mx-auto { margin-left: auto; margin-right: auto; }
/* Buttons */
.btn-primary { padding: 14px 36px; background: var(--red); color: white; border: none; border-radius: 10px; font-size: 0.95rem; font-weight: 600; cursor: pointer; font-family: var(--font-sans); letter-spacing: 0.03em; transition: all var(--ease); text-decoration: none; display: inline-block; box-shadow: 0 4px 20px rgba(196,30,34,0.25); position: relative; overflow: hidden; }
.btn-primary::after { content: ''; position: absolute; inset: 0; background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.15) 50%, transparent 60%); transform: translateX(-100%); transition: transform 0.6s; }
.btn-primary:hover::after { transform: translateX(100%); }
.btn-primary:hover { background: var(--red-deep); transform: translateY(-2px); box-shadow: 0 8px 32px rgba(196,30,34,0.35); }
/* Wave dividers */
.wave-divider { width: 100%; overflow: hidden; line-height: 0; position: relative; margin-top: -1px; }
.wave-divider svg { width: 100%; height: auto; display: block; }
.wave-divider-bottom { margin-bottom: -1px; }
/* Reveal animation */
.reveal { opacity: 0; transform: translateY(32px); will-change: transform, opacity; transition: opacity 0.8s var(--ease-slow), transform 0.8s var(--ease-slow); }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.08s; } .reveal-delay-2 { transition-delay: 0.16s; } .reveal-delay-3 { transition-delay: 0.24s; } .reveal-delay-4 { transition-delay: 0.32s; } .reveal-delay-5 { transition-delay: 0.4s; }
/* Page enter animation (sub pages) */
@keyframes pageIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.page-hero .page-hero-label { animation: pageIn 0.5s var(--ease-slow) both; }
.page-hero h1 { animation: pageIn 0.5s 0.08s var(--ease-slow) both; }
.page-hero .page-hero-desc { animation: pageIn 0.5s 0.14s var(--ease-slow) both; }
.page-hero .page-hero-divider { animation: pageIn 0.5s 0.2s var(--ease-slow) both; }
/* Media items */
.media-item { text-align: center; transition: all 0.3s ease; }
.media-item:hover { transform: translateY(-2px); }
.media-logo { display: block; font-family: var(--font-serif); font-size: 1.35rem; font-weight: 700; color: var(--ink); letter-spacing: 0.05em; transition: color 0.3s ease; }
.media-item:hover .media-logo { color: var(--red); }
.media-sub { display: block; font-size: 0.72rem; color: var(--warm-light); margin-top: 4px; letter-spacing: 0.04em; }
.media-divider { width: 1px; height: 28px; background: var(--border); }
/* Footer */
.footer { padding: 64px 48px 34px; background: var(--ink); color: rgba(255,255,255,0.55); }
.footer-grid { display: grid; grid-template-columns: minmax(240px, 1.7fr) repeat(4, minmax(120px, 1fr)); gap: 36px; max-width: 1180px; margin: 0 auto; text-align: left; }
.footer-brand { font-family: var(--font-serif); font-size: 1.16rem; font-weight: 700; color: var(--white); margin-bottom: 10px; }
.footer-kicker { color: var(--gold); font-size: 0.78rem; margin-bottom: 12px; letter-spacing: 0.04em; }
.footer-brand-desc { font-size: 0.84rem; line-height: 1.85; max-width: 300px; }
.footer-heading { font-size: 0.82rem; font-weight: 600; color: var(--white); letter-spacing: 0.06em; margin-bottom: 14px; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a,
.footer-links span { color: rgba(255,255,255,0.55); text-decoration: none; font-size: 0.84rem; line-height: 1.7; transition: color var(--ease); }
.footer-links a:hover { color: var(--gold); }
.footer-links-row { display: flex; justify-content: center; gap: 32px; margin-bottom: 24px; flex-wrap: wrap; }
.footer-links-row a { color: rgba(255,255,255,0.55); text-decoration: none; font-size: 0.85rem; transition: color var(--ease); }
.footer-links-row a:hover { color: var(--gold); }
.footer-bottom { max-width: 1180px; margin: 38px auto 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.08); text-align: center; }
.footer-info { font-size: 0.78rem; line-height: 1.8; }
/* Back to top */
.back-top { text-align: center; padding: 40px 48px; }
.back-top a { text-decoration: none; color: var(--red); font-weight: 600; font-size: 0.9rem; transition: color var(--ease); }
.back-top a:hover { color: var(--red-deep); }
/* Page Hero (sub pages) */
.page-hero { padding: 140px 48px 72px; text-align: center; background: linear-gradient(180deg, var(--bg-warm) 0%, var(--white) 100%); position: relative; overflow: hidden; }
.page-hero::before { content: ''; position: absolute; top: -120px; right: -80px; width: 360px; height: 360px; border-radius: 50%; background: var(--red); opacity: 0.04; pointer-events: none; }
.page-hero::after { content: ''; position: absolute; bottom: -60px; left: -60px; width: 180px; height: 180px; border-radius: 50%; background: var(--gold); opacity: 0.08; pointer-events: none; }
.page-hero-label { font-size: 0.75rem; font-weight: 600; color: var(--red); letter-spacing: 0.16em; margin-bottom: 16px; }
.page-hero h1 { margin-bottom: 16px; position: relative; } .page-hero h1 em, .page-hero h1 span { font-style: normal; color: var(--red); }
.page-hero-desc { font-size: 1.05rem; color: var(--warm); max-width: 560px; margin: 0 auto; line-height: 1.85; position: relative; }
.page-hero-divider { width: 64px; height: 3px; background: linear-gradient(90deg, var(--red), var(--gold)); margin: 28px auto 0; border-radius: 2px; }
/* CTA panel */
.cta-box,
.cta-inline {
  margin-top: 60px;
  padding: 40px;
  background: linear-gradient(135deg, rgba(196,30,34,0.04), rgba(200,169,110,0.08));
  border-radius: 18px;
  text-align: center;
  border: 1px solid rgba(200,169,110,0.15);
}
.cta-box p,
.cta-inline p {
  font-size: 0.92rem;
  color: var(--warm);
  margin-bottom: 20px;
}
.cta-box h3,
.cta-inline h3 {
  color: var(--ink);
  margin-bottom: 8px;
}
/* Glass cards */
.glass-card,
.card-glass {
  background: rgba(255,255,255,0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(229,224,217,0.6);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}
.glass-card::before,
.card-glass::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--red), var(--gold));
  opacity: 0;
  transition: opacity 0.4s var(--ease);
}
.glass-card-hover,
.card-glass {
  transition: all 0.4s var(--ease);
}
.glass-card-hover:hover,
.card-glass:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(26,23,24,0.12);
  border-color: rgba(200,169,110,0.2);
}
.glass-card:hover::before,
.card-glass:hover::before {
  opacity: 1;
}
@media (max-width: 1180px) {
  .nav-links, .nav-cta { display: none; }
  .nav-right { display: none; }
  .nav-inner { justify-content: space-between; }
  .nav-logo { margin-right: 0; }
  .hamburger { display: flex; }
}
@media (max-width: 768px) {
  .section, .page-hero { padding: 72px 20px; }
  .nav { padding: 0 20px; }
  .nav-phone { font-size: 0.95rem; }
  .float-contact { bottom: 20px; right: 20px; }
  .cta-box,
  .cta-inline { padding: 28px 20px; }
  .footer { padding: 48px 24px 28px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 28px 24px; }
  .footer-grid > div:first-child { grid-column: 1 / -1; }
  .footer-links-row { gap: 20px; }
  .footer-links-row a { font-size: 0.8rem; }
}
