/* ============================================================
   华中师范大学在职研究生招生信息网 — 主样式
   设计语言：玻璃拟态 / 渐变品牌色 / 磁吸微交互 / 明暗双主题
   ============================================================ */

:root {
    --brand-blue: #1a5fb4;
    --brand-purple: #534ab7;
    --brand-green: #0f6e56;
    --brand-grad: linear-gradient(120deg, #1a5fb4 0%, #534ab7 55%, #0f6e56 100%);

    --bg: #f5f7fb;
    --bg-soft: #eef2f9;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --text: #1b2330;
    --text-soft: #55607a;
    --border: #e4e9f2;
    --shadow-sm: 0 2px 10px rgba(26, 47, 89, .06);
    --shadow-md: 0 10px 30px rgba(26, 47, 89, .10);
    --shadow-lg: 0 24px 60px rgba(26, 47, 89, .16);
    --radius: 18px;
    --radius-sm: 12px;
    --maxw: 1200px;
    --header-h: 72px;
    --ease: cubic-bezier(.16, 1, .3, 1);
}

[data-theme="dark"] {
    --bg: #0c1018;
    --bg-soft: #121826;
    --surface: #161d2c;
    --surface-2: #1c2436;
    --text: #eaf0fb;
    --text-soft: #9aa6bd;
    --border: #283246;
    --shadow-sm: 0 2px 10px rgba(0, 0, 0, .3);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, .42);
    --shadow-lg: 0 24px 60px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    font-size: 16px;
    transition: background .4s var(--ease), color .4s var(--ease);
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- 文字与通用 ---------- */
.text-soft { color: var(--text-soft); }
.gradient-text {
    background: var(--brand-grad);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent; color: transparent;
}
.section { padding: 72px 0; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); letter-spacing: -.5px; margin-bottom: 12px; }
.section-head p { color: var(--text-soft); font-size: 17px; }
.eyebrow {
    display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 2px;
    text-transform: uppercase; color: var(--brand-blue);
    padding: 6px 14px; border-radius: 100px; background: color-mix(in srgb, var(--brand-blue) 12%, transparent);
    margin-bottom: 16px;
}

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
    font-size: 15px; font-weight: 600; padding: 12px 24px; border-radius: 100px;
    border: 1px solid transparent; transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease);
    will-change: transform;
}
.btn-primary { background: var(--brand-grad); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-ghost { border-color: var(--border); color: var(--text); background: var(--surface); }
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--brand-blue); color: var(--brand-blue); }
.btn-phone { background: var(--brand-green); color: #fff; white-space: nowrap; flex-shrink: 0; }
.btn-phone:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-phone [aria-hidden="true"] { margin-right: 6px; }
.magnetic { transition: transform .3s var(--ease); }

/* ---------- 顶部条 ---------- */
.topbar { background: var(--brand-grad); color: #fff; font-size: 14px; }
.topbar .container { display: flex; justify-content: space-between; align-items: center; height: 40px; gap: 16px; }
.topbar .container > div:first-child {
    min-width: 0; flex: 1;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.topbar .right { display: inline-flex; align-items: center; gap: 14px; flex-shrink: 0; }
.topbar a { display: inline-flex; align-items: center; gap: 6px; opacity: .92; white-space: nowrap; }
.topbar a:hover { opacity: 1; }

/* ---------- 导航 ---------- */
.header {
    position: sticky; top: 0; z-index: 100;
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    background: color-mix(in srgb, var(--surface) 80%, transparent);
    border-bottom: 1px solid var(--border);
    transition: box-shadow .3s var(--ease);
}
.header.scrolled { box-shadow: var(--shadow-md); }
.header .container { display: flex; align-items: center; height: var(--header-h); gap: 20px; min-width: 0; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; min-width: 0; flex-shrink: 0; }
.brand .logo {
    width: 40px; height: 40px; border-radius: 12px;
    display: block; object-fit: contain;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}
.brand-text { line-height: 1.25; white-space: nowrap; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav a {
    padding: 9px 14px; border-radius: 10px; font-size: 15px; font-weight: 500; color: var(--text-soft);
    transition: background .2s, color .2s; white-space: nowrap;
}
.nav a:hover, .nav a.active { color: var(--brand-blue); background: color-mix(in srgb, var(--brand-blue) 10%, transparent); }
.nav-more { position: relative; }
.nav-more .dropdown {
    position: absolute; top: calc(100% + 8px); right: 0; min-width: 200px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-6px);
    transition: all .2s var(--ease);
}
.nav-more:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-more .dropdown a { display: block; padding: 10px 12px; border-radius: 8px; }
.header-actions { display: flex; align-items: center; gap: 10px; margin-left: 8px; }
.theme-toggle {
    width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface);
    cursor: pointer; display: grid; place-items: center; font-size: 18px; transition: transform .25s var(--ease), border-color .2s;
}
.theme-toggle:hover { transform: rotate(15deg) scale(1.05); border-color: var(--brand-blue); }
.nav-toggle { display: none; }

/* ---------- 英雄区 ---------- */
.hero {
    position: relative; overflow: hidden; padding: 80px 0 96px;
    background:
        radial-gradient(900px 500px at 12% -10%, color-mix(in srgb, var(--brand-blue) 22%, transparent), transparent 60%),
        radial-gradient(800px 480px at 92% 0%, color-mix(in srgb, var(--brand-purple) 22%, transparent), transparent 60%),
        var(--bg-soft);
}
.hero::after {
    content: ""; position: absolute; inset: 0;
    background-image: radial-gradient(rgba(255,255,255,.5) 1px, transparent 1px);
    background-size: 26px 26px; opacity: .5; pointer-events: none;
}
.hero .container { position: relative; z-index: 1; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(32px, 4.6vw, 56px); line-height: 1.12; letter-spacing: -1px; margin-bottom: 20px; }
.hero p.lead { font-size: 19px; color: var(--text-soft); margin-bottom: 30px; max-width: 560px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; }
.hero-badges { display: flex; gap: 14px; margin-top: 34px; flex-wrap: wrap; }
.hero-badge {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
    padding: 14px 18px; box-shadow: var(--shadow-sm); min-width: 130px;
}
.hero-badge b { display: block; font-size: 24px; background: var(--brand-grad); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero-badge span { font-size: 13px; color: var(--text-soft); }
.hero-card {
    background: var(--surface); border: 1px solid var(--border); border-radius: 24px; padding: 28px;
    box-shadow: var(--shadow-lg); position: relative; overflow: hidden;
}
.hero-card::before { content: ""; position: absolute; inset: 0; background: var(--brand-grad); opacity: .05; }
.hero-card h3 { font-size: 18px; margin-bottom: 16px; }
.hero-card .row { display: flex; justify-content: space-between; padding: 12px 0; border-bottom: 1px dashed var(--border); }
.hero-card .row:last-child { border-bottom: 0; }
.hero-card .row span { color: var(--text-soft); font-size: 14px; }
.hero-card .row b { font-size: 15px; }

/* ---------- 卡片 ---------- */
.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 26px; box-shadow: var(--shadow-sm); transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .3s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: color-mix(in srgb, var(--brand-blue) 35%, var(--border)); }
.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); }

/* 专业卡 */
.program-card { position: relative; overflow: hidden; }
.program-card .bar { position: absolute; top: 0; left: 0; right: 0; height: 5px; background: var(--brand-grad); }
.program-card .icon {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; font-weight: 800;
    color: #fff; background: var(--brand-grad); margin-bottom: 16px; box-shadow: var(--shadow-sm);
}
.program-card h3 { font-size: 20px; margin-bottom: 6px; }
.program-card .meta { color: var(--text-soft); font-size: 14px; margin: 10px 0; }
.program-card .tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 18px; }
.chip { font-size: 12px; padding: 5px 11px; border-radius: 100px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-soft); }
.program-card .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.program-card .price { font-weight: 800; color: var(--brand-blue); font-size: 18px; }

/* ---------- 学员故事滚动卡片 ---------- */
.story-scroll {
    display: flex; gap: 22px; overflow-x: auto; padding: 8px 4px 24px; scroll-snap-type: x mandatory;
    scrollbar-width: thin;
}
.story-scroll::-webkit-scrollbar { height: 8px; }
.story-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 100px; }
.story-card {
    scroll-snap-align: start; flex: 0 0 340px; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.story-card:hover { transform: translateY(-6px) scale(1.01); box-shadow: var(--shadow-lg); }
.story-card .top { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.avatar {
    width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center;
    color: #fff; font-size: 22px; font-weight: 700; flex: 0 0 auto;
}
.story-card .name { font-weight: 700; font-size: 17px; }
.story-card .role { font-size: 13px; color: var(--text-soft); }
.story-card .quote { font-size: 16px; line-height: 1.6; border-left: 3px solid var(--brand-blue); padding-left: 14px; margin: 6px 0 14px; color: var(--text); }
.story-card .metrics { display: flex; gap: 16px; margin: 12px 0; }
.story-card .metric b { display: block; font-size: 20px; color: var(--brand-purple); }
.story-card .metric span { font-size: 12px; color: var(--text-soft); }
.story-card .more { margin-top: auto; color: var(--brand-blue); font-weight: 600; font-size: 14px; }
.story-card .tagrow { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.story-card .tagrow .chip { font-size: 11px; padding: 3px 9px; }

/* ---------- 面包屑 ---------- */
.breadcrumb { padding: 16px 0; font-size: 14px; color: var(--text-soft); }
.breadcrumb a:hover { color: var(--brand-blue); }
.breadcrumb span.sep { margin: 0 9px; opacity: .5; }
.breadcrumb span.current { color: var(--text); }

/* ---------- 资讯列表 ---------- */
.news-list { display: grid; gap: 18px; }
.news-item {
    display: grid; grid-template-columns: 160px 1fr; gap: 20px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 18px; transition: transform .3s var(--ease), box-shadow .3s;
}
.news-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.news-thumb { border-radius: 12px; min-height: 110px; background: var(--brand-grad); display: grid; place-items: center; color: #fff; font-size: 13px; }
.news-item h3 { font-size: 18px; margin-bottom: 8px; }
.news-item .meta { font-size: 13px; color: var(--text-soft); margin-bottom: 8px; }
.news-item .summary { color: var(--text-soft); font-size: 14px; }

/* ---------- FAQ ---------- */
.faq-group { margin-bottom: 36px; }
.faq-group > h3 { font-size: 20px; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.faq-group > h3::before { content: ""; width: 6px; height: 22px; border-radius: 4px; background: var(--brand-grad); }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 12px; background: var(--surface); overflow: hidden; }
.faq-item summary {
    cursor: pointer; padding: 18px 22px; font-weight: 600; font-size: 16px; list-style: none;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .plus { color: var(--brand-blue); font-size: 22px; transition: transform .25s var(--ease); flex: 0 0 auto; }
.faq-item[open] summary .plus { transform: rotate(45deg); }
.faq-item .answer { padding: 0 22px 20px; color: var(--text-soft); }
.faq-item .answer ul { padding-left: 20px; list-style: disc; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; gap: 16px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea, .field select {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    background: var(--surface); color: var(--text); font-size: 15px; font-family: inherit; transition: border-color .2s, box-shadow .2s;
}
.field input:focus, .field textarea:focus, .field select:focus { outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-blue) 18%, transparent); }
.field textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

/* ---------- 数据块 ---------- */
.feature-list { display: grid; gap: 14px; }
.feature-list .item { display: flex; gap: 14px; align-items: flex-start; }
.feature-list .ic { width: 38px; height: 38px; border-radius: 10px; background: color-mix(in srgb, var(--brand-blue) 12%, transparent); color: var(--brand-blue); display: grid; place-items: center; flex: 0 0 auto; font-weight: 700; }

/* ---------- 页脚 ---------- */
.footer { background: var(--bg-soft); border-top: 1px solid var(--border); padding: 56px 0 28px; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
.footer h4 { font-size: 16px; margin-bottom: 16px; }
.footer a { color: var(--text-soft); font-size: 14px; display: block; padding: 5px 0; }
.footer a:hover { color: var(--brand-blue); }
.footer .contact-line { display: flex; align-items: center; gap: 10px; padding: 6px 0; color: var(--text-soft); font-size: 14px; }
.footer .contact-line b { color: var(--text); font-size: 17px; }
.footer-bottom { border-top: 1px solid var(--border); margin-top: 32px; padding-top: 20px; text-align: center; color: var(--text-soft); font-size: 13px; }

/* ---------- 工具类 ---------- */
.center { text-align: center; }
.mt-s { margin-top: 16px; } .mt-m { margin-top: 32px; } .mt-l { margin-top: 56px; }
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 1100px) {
    .header .container { gap: 14px; }
    .nav a { padding: 9px 11px; font-size: 14px; }
    .btn-phone-text { display: none; }
    .btn-phone { width: 40px; height: 40px; padding: 0; border-radius: 50%; justify-content: center; }
    .btn-phone [aria-hidden="true"] { margin-right: 0; }
    .topbar .right .topbar-email { display: none; }
}
@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; }
    .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
    .nav { position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch;
        background: var(--surface); border-bottom: 1px solid var(--border); padding: 12px; gap: 2px;
        transform: translateY(-120%); transition: transform .3s var(--ease); box-shadow: var(--shadow-lg); }
    .nav.open { transform: translateY(0); }
    .nav a { padding: 13px 14px; }
    .nav-more .dropdown { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 0 14px; }
    .nav-toggle { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; }
    .topbar .right { display: none; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; }
    .news-item { grid-template-columns: 1fr; }
    .hero { padding: 56px 0 64px; }
}
