/* ============================================================
   edubai.com.cn 基础样式
   设计语言：科技蓝 #0A2463 / 深空灰 / 金色点缀
   响应式 · 双语(中/英) · 无外部依赖
   ============================================================ */

:root {
  --primary: #0A2463;
  --primary-600: #12307d;
  --primary-300: #6b86c4;
  --accent: #C9A24B;       /* 科技金点缀 */
  --accent-soft: #e8d9a8;
  --ink: #1a2233;
  --ink-2: #55607a;
  --ink-3: #8b94a8;
  --bg: #ffffff;
  --bg-soft: #f5f7fb;
  --bg-soft-2: #eef2f9;
  --line: #e4e9f2;
  --white: #ffffff;
  --shadow: 0 12px 40px rgba(10, 36, 99, .10);
  --shadow-sm: 0 4px 16px rgba(10, 36, 99, .08);
  --radius: 14px;
  --radius-sm: 8px;
  --maxw: 1180px;
  --header-h: 74px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
          "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 布局容器 ---------- */
.container { width: min(100% - 40px, var(--maxw)); margin-inline: auto; }
.section { padding: 88px 0; }
.section--soft { background: var(--bg-soft); }
.section--dark { background: var(--primary); color: var(--white); }

/* ---------- 通用标题 ---------- */
.eyebrow {
  display: inline-block;
  font-size: 13px; font-weight: 700; letter-spacing: .12em;
  color: var(--accent); text-transform: uppercase;
  margin-bottom: 14px;
}
.section-title {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.25; font-weight: 800;
  letter-spacing: -.02em; color: var(--ink);
}
.section--dark .section-title { color: var(--white); }
.section-sub {
  margin-top: 16px; max-width: 640px;
  color: var(--ink-2); font-size: 17px;
}
.section--dark .section-sub { color: rgba(255,255,255,.78); }
.center { text-align: center; }
.center .section-sub { margin-inline: auto; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 26px; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 600; border: 1.5px solid transparent;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease, color .2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--primary); color: var(--white); box-shadow: var(--shadow-sm); }
.btn--primary:hover { background: var(--primary-600); box-shadow: var(--shadow); }
.btn--accent { background: var(--accent); color: #2a2008; }
.btn--accent:hover { background: #d9b45c; }
.btn--ghost { border-color: rgba(255,255,255,.5); color: var(--white); }
.btn--ghost:hover { background: rgba(255,255,255,.12); }
.btn--outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn--outline:hover { background: var(--primary); color: var(--white); }
.btn + .btn { margin-left: 12px; }

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  height: var(--header-h);
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  height: 100%; display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 21px; color: var(--primary); letter-spacing: -.02em; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--primary), var(--primary-300));
  display: grid; place-items: center;
  box-shadow: 0 4px 12px rgba(10,36,99,.28);
}
.brand__mark svg { width: 20px; height: 20px; }
.brand__text small { display: block; font-size: 10px; font-weight: 600; color: var(--ink-3); letter-spacing: .14em; line-height: 1; margin-top: 3px; }

.nav__links { display: flex; align-items: center; gap: 4px; }
.nav__links a {
  padding: 9px 14px; border-radius: 8px; font-size: 15px; font-weight: 600; color: var(--ink-2);
  transition: color .2s, background .2s;
}
.nav__links a:hover { color: var(--primary); background: var(--bg-soft-2); }
.nav__links a.active { color: var(--primary); }
.nav__links a.active::after {
  content: ""; display: block; height: 2px; width: 18px; margin: 5px auto -7px;
  background: var(--accent); border-radius: 2px;
}
.nav__actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  font-size: 13px; font-weight: 700; color: var(--ink-2);
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--white);
}
.lang-toggle:hover { border-color: var(--primary-300); color: var(--primary); }
.nav__cta { display: none; }
.nav__toggle {
  display: none; width: 42px; height: 42px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--white); color: var(--primary);
  align-items: center; justify-content: center;
}
.nav__toggle svg { width: 22px; height: 22px; }

/* 移动端菜单 */
.mobile-menu {
  position: fixed; inset: var(--header-h) 0 0 0; z-index: 99;
  background: rgba(255,255,255,.98); backdrop-filter: blur(12px);
  padding: 24px 20px; transform: translateY(-12px); opacity: 0;
  visibility: hidden; transition: all .25s ease; overflow-y: auto;
}
.mobile-menu.open { transform: none; opacity: 1; visibility: visible; }
.mobile-menu a {
  display: block; padding: 15px 4px; font-size: 18px; font-weight: 600;
  border-bottom: 1px solid var(--line); color: var(--ink);
}
.mobile-menu a.active { color: var(--primary); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: var(--white);
  background: linear-gradient(120deg, #06183f 0%, var(--primary) 55%, #163a86 100%);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 80% 20%, rgba(201,162,75,.18), transparent 42%),
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: auto, 46px 46px, 46px 46px;
  mask-image: radial-gradient(ellipse at 60% 40%, #000 30%, transparent 78%);
}
.hero__inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center;
  min-height: 560px; padding: 80px 0;
}
.hero__badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border: 1px solid rgba(255,255,255,.25);
  border-radius: 100px; font-size: 13px; color: rgba(255,255,255,.9); margin-bottom: 24px;
}
.hero__badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero h1 {
  font-size: clamp(38px, 6vw, 66px); line-height: 1.12; font-weight: 800; letter-spacing: -.03em;
}
.hero h1 .hl { color: var(--accent); }
.hero__lead { margin-top: 22px; max-width: 560px; font-size: 18px; color: rgba(255,255,255,.82); }
.hero__actions { margin-top: 34px; }

.hero__visual { display: grid; place-items: center; }
.hero__card {
  width: 100%; max-width: 400px; padding: 28px;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  border-radius: 20px; backdrop-filter: blur(8px);
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
}
.hero__stat-row { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.hero__stat-row:last-child { border-bottom: 0; }
.hero__stat-num { font-size: 30px; font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.hero__stat-label { font-size: 13px; color: rgba(255,255,255,.7); }

/* ---------- 特性卡片 ---------- */
.grid { display: grid; gap: 24px; }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

.feature {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px; box-shadow: var(--shadow-sm);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.feature:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--primary-300); }
.feature__icon {
  width: 52px; height: 52px; border-radius: 13px; margin-bottom: 20px;
  background: var(--bg-soft-2); color: var(--primary);
  display: grid; place-items: center;
}
.feature__icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 19px; font-weight: 700; margin-bottom: 10px; }
.feature p { color: var(--ink-2); font-size: 15px; }
.feature__link { margin-top: 16px; display: inline-flex; align-items: center; gap: 6px; color: var(--primary); font-weight: 600; font-size: 14px; }

/* ---------- 数据条 ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; text-align: center; }
.stat__num { font-size: clamp(32px, 5vw, 48px); font-weight: 800; color: var(--accent); letter-spacing: -.02em; }
.stat__label { color: rgba(255,255,255,.8); font-size: 14px; margin-top: 6px; }

/* ---------- 图文分栏 ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.split__media {
  border-radius: var(--radius); min-height: 340px;
  background: linear-gradient(135deg, var(--bg-soft-2), #dce5f4);
  display: grid; place-items: center; color: var(--primary);
  box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.split__media svg { width: 120px; height: 120px; opacity: .35; }
.split__media .tag {
  position: absolute; bottom: 18px; left: 18px; font-size: 12px;
  background: rgba(255,255,255,.85); padding: 6px 12px; border-radius: 100px; color: var(--ink-2);
}

/* ---------- 新闻列表 ---------- */
.news-list { display: grid; gap: 0; border-top: 1px solid var(--line); }
.news-item {
  display: grid; grid-template-columns: 120px 1fr auto; gap: 24px; align-items: center;
  padding: 22px 4px; border-bottom: 1px solid var(--line); transition: background .2s;
}
.news-item:hover { background: var(--bg-soft); }
.news-item__date { font-size: 13px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.news-item__title { font-size: 17px; font-weight: 600; }
.news-item__cat { font-size: 12px; color: var(--primary); background: var(--bg-soft-2); padding: 5px 12px; border-radius: 100px; }

/* ---------- 联系 ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
.contact-info li { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-info__icon { flex: none; width: 44px; height: 44px; border-radius: 11px; background: var(--bg-soft-2); color: var(--primary); display: grid; place-items: center; }
.contact-info__icon svg { width: 21px; height: 21px; }
.contact-info h4 { font-size: 15px; margin-bottom: 2px; }
.contact-info p { color: var(--ink-2); font-size: 15px; }

.form-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 8px; }
.field input, .field textarea, .field select {
  width: 100%; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: 9px;
  font-size: 15px; font-family: inherit; background: var(--white); color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none; border-color: var(--primary-300); box-shadow: 0 0 0 4px rgba(107,134,196,.15);
}
.field textarea { min-height: 120px; resize: vertical; }
.form-note { font-size: 12px; color: var(--ink-3); margin-top: 10px; }

/* ---------- CTA 区 ---------- */
.cta {
  background: linear-gradient(120deg, var(--primary), #163a86);
  color: var(--white); border-radius: 20px; padding: 54px 48px;
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  box-shadow: var(--shadow);
}
.cta h2 { font-size: clamp(24px, 3.5vw, 34px); font-weight: 800; margin-bottom: 8px; }
.cta p { color: rgba(255,255,255,.8); }

/* ---------- 页脚 ---------- */
.site-footer { background: #071a3f; color: rgba(255,255,255,.72); padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; border-bottom: 1px solid rgba(255,255,255,.1); }
.footer-brand .brand { color: var(--white); }
.footer-brand p { margin-top: 18px; font-size: 14px; max-width: 300px; }
.footer-col h5 { color: var(--white); font-size: 15px; margin-bottom: 18px; }
.footer-col a { display: block; font-size: 14px; padding: 6px 0; }
.footer-col a:hover { color: var(--accent); }
.footer-bottom { padding-top: 24px; display: flex; justify-content: space-between; gap: 20px; font-size: 13px; flex-wrap: wrap; }

/* ---------- 页面头部(内页) ---------- */
.page-hero {
  background: linear-gradient(120deg, #06183f, var(--primary));
  color: var(--white); padding: 62px 0 54px; position: relative; overflow: hidden;
}
.page-hero::after {
  content: ""; position: absolute; right: -80px; top: -80px; width: 320px; height: 320px;
  border-radius: 50%; background: radial-gradient(circle, rgba(201,162,75,.2), transparent 70%);
}
.page-hero h1 { font-size: clamp(32px, 5vw, 48px); font-weight: 800; letter-spacing: -.02em; position: relative; }
.page-hero p { color: rgba(255,255,255,.78); margin-top: 12px; font-size: 17px; position: relative; }
.breadcrumb { font-size: 13px; color: rgba(255,255,255,.6); margin-bottom: 16px; position: relative; }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- 时间线 ---------- */
.timeline { position: relative; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline__item { position: relative; padding-bottom: 30px; }
.timeline__item::before { content: ""; position: absolute; left: -30px; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); border: 3px solid var(--white); box-shadow: 0 0 0 2px var(--accent); }
.timeline__year { font-weight: 800; color: var(--primary); }
.timeline__item h4 { margin: 4px 0 6px; font-size: 17px; }
.timeline__item p { color: var(--ink-2); font-size: 15px; }

/* ---------- 通用 ---------- */
.text-accent { color: var(--accent); }
.mt-0 { margin-top: 0; }
.placeholder-note {
  background: #fff8e6; border: 1px dashed var(--accent); color: #7a5c14;
  padding: 12px 18px; border-radius: 10px; font-size: 13px; margin-bottom: 26px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 980px) {
  .hero__inner { grid-template-columns: 1fr; }
  .hero__visual { display: none; }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .split, .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}
@media (max-width: 760px) {
  .section { padding: 60px 0; }
  .nav__links, .nav__actions .lang-toggle, .nav__cta { display: none; }
  .nav__toggle { display: inline-flex; }
  .grid--3, .grid--2, .grid--4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 28px; }
  .hero__inner { min-height: auto; padding: 64px 0; }
  .cta { flex-direction: column; align-items: flex-start; padding: 38px 28px; }
  .news-item { grid-template-columns: 1fr; gap: 6px; }
  .news-item__cat { justify-self: start; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .btn + .btn { margin-left: 0; margin-top: 10px; }
}

/* ---------- 滚动淡入 ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ============================================================
   多语言切换器
   ============================================================ */
.lang-switch { display: inline-flex; align-items: center; gap: 3px; background: var(--bg-soft-2); border-radius: 9px; padding: 3px; }
.lang-switch button {
  border: 0; background: transparent; color: var(--ink-2);
  font-size: 12px; font-weight: 700; padding: 5px 9px; border-radius: 6px;
  transition: background .2s, color .2s; line-height: 1;
}
.lang-switch button:hover { color: var(--primary); }
.lang-switch button.active { background: var(--primary); color: var(--white); box-shadow: 0 2px 8px rgba(10,36,99,.25); }

/* ============================================================
   阿语 RTL 布局：镜像翻转方向性样式
   ============================================================ */
[dir="rtl"] body { text-align: right; }
[dir="rtl"] .brand { flex-direction: row; }
[dir="rtl"] .nav { direction: rtl; }
[dir="rtl"] .nav__links,
[dir="rtl"] .nav__actions { direction: rtl; }
[dir="rtl"] .hero__inner,
[dir="rtl"] .split,
[dir="rtl"] .contact-grid,
[dir="rtl"] .cta,
[dir="rtl"] .footer-bottom,
[dir="rtl"] .news-item,
[dir="rtl"] .contact-info li,
[dir="rtl"] .hero__stat-row { direction: rtl; }
[dir="rtl"] .hero::before { mask-image: radial-gradient(ellipse at 40% 40%, #000 30%, transparent 78%); }
[dir="rtl"] .section-sub { margin-right: 0; }
[dir="rtl"] .center .section-sub { margin-inline: auto; }
[dir="rtl"] .btn + .btn { margin-left: 0; margin-right: 12px; }
[dir="rtl"] .feature__link svg,
[dir="rtl"] .news-item__cat { transform: none; }
[dir="rtl"] .breadcrumb { direction: rtl; }
[dir="rtl"] .contact-info__icon { order: 2; }
[dir="rtl"] .contact-info > div { order: 1; }
[dir="rtl"] .field input,
[dir="rtl"] .field textarea,
[dir="rtl"] .field select { text-align: right; }
[dir="rtl"] .timeline { padding-left: 0; padding-right: 30px; }
[dir="rtl"] .timeline::before { left: auto; right: 6px; }
[dir="rtl"] .timeline__item::before { left: auto; right: -30px; }
[dir="rtl"] .hero__stat-num { direction: ltr; unicode-bidi: embed; }
[dir="rtl"] .stat__num { direction: ltr; unicode-bidi: embed; }
[dir="rtl"] .footer-bottom { flex-direction: row; }
@media (max-width: 760px) {
  [dir="rtl"] .btn + .btn { margin-right: 0; margin-top: 10px; }
}

/* 阿语字体优化 */
html[lang="ar"] body { font-family: "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif; }
