/* =============================================================
   国小安亲托管班 · 对外首页样式
   与后台（style.css）完全独立：后台是工作台，讲效率；
   首页是给家长看的门面，讲温度和信任，所以用暖色纸感底色 + 陶土橙。
   ============================================================= */

:root {
    --ink: #23211f;
    --ink-2: #4a453f;
    --muted: #7d766d;
    --paper: #fdfbf7;
    --paper-2: #f7f2ea;
    --brand: #e0602c;
    --brand-dark: #c44c1c;
    --brand-soft: #fdf0e8;
    --accent: #2f7d5f;
    --accent-soft: #eaf4ef;
    --line: #ece5db;
    --white: #fff;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow-sm: 0 1px 2px rgba(60, 42, 28, .05), 0 4px 14px rgba(60, 42, 28, .05);
    --shadow-md: 0 2px 6px rgba(60, 42, 28, .06), 0 18px 40px rgba(60, 42, 28, .10);
    --shadow-lg: 0 30px 70px rgba(60, 42, 28, .16);
    --nav-h: 72px;
    --wrap: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 15px;
    line-height: 1.75;
    color: var(--ink);
    background: var(--paper);
    -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; }

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -.02em;
    line-height: 1.25;
}

p { margin: 0; }

.wrap {
    width: 100%;
    /* 1440 及以下维持 1180 的设计宽度；更宽的视口（含浏览器缩小后 CSS 视口变大）
       按 80vw 跟着长，否则内容会缩成中间一条，两边全空着。
       80vw 在 1475 以下都小于 1180，所以常规桌面尺寸的排版不受影响。 */
    max-width: max(var(--wrap), 80vw);
    margin: 0 auto;
    padding: 0 24px;
}

/* ---------------- 按钮 ---------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font-size: 14.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .16s ease, background .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.btn:active { transform: translateY(1px); }

.btn-primary {
    background: var(--brand);
    color: #fff;
    box-shadow: 0 6px 18px rgba(224, 96, 44, .26);
}

.btn-primary:hover {
    background: var(--brand-dark);
    box-shadow: 0 10px 26px rgba(224, 96, 44, .32);
}

.btn-ghost {
    background: transparent;
    color: var(--ink);
    border-color: var(--line);
}

.btn-ghost:hover { border-color: #d8cfc2; background: #fff; }

.btn-light {
    background: rgba(255, 255, 255, .14);
    color: #fff;
    border-color: rgba(255, 255, 255, .38);
    backdrop-filter: blur(6px);
}

.btn-light:hover { background: rgba(255, 255, 255, .24); }

.btn-sm { height: 38px; padding: 0 18px; font-size: 13.5px; }

.btn-block { width: 100%; }

/* ---------------- 顶部导航 ---------------- */
.site-nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 100;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    background: rgba(253, 251, 247, .82);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.site-nav.scrolled {
    background: rgba(253, 251, 247, .96);
    border-bottom-color: var(--line);
    box-shadow: 0 1px 20px rgba(60, 42, 28, .06);
}

.site-nav .wrap {
    display: flex;
    align-items: center;
    gap: 28px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 11px;
    flex-shrink: 0;
}

.brand .mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: linear-gradient(140deg, var(--brand) 0%, #f09055 100%);
    color: #fff;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0;
    box-shadow: 0 6px 16px rgba(224, 96, 44, .28);
}

.brand .name {
    font-size: 16.5px;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.15;
}

.brand .name small {
    display: block;
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: .06em;
    margin-top: 2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
}

.nav-links a {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14.5px;
    color: var(--ink-2);
    transition: background .16s ease, color .16s ease;
}

.nav-links a:hover { background: var(--brand-soft); color: var(--brand-dark); }

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    margin-left: auto;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--ink);
}

/* ---------------- Hero ---------------- */
.hero {
    position: relative;
    min-height: min(88vh, 760px);
    padding-top: var(--nav-h);
    display: flex;
    align-items: center;
    overflow: hidden;
    background: linear-gradient(150deg, #2a2622 0%, #4a3b30 55%, #6b4a34 100%);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* 背景图轻微放大 + 缓慢推近，让静态页面有一点呼吸感 */
    animation: heroZoom 24s ease-out forwards;
}

@keyframes heroZoom {
    from { transform: scale(1.06); }
    to { transform: scale(1); }
}

.hero-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    /* 左侧压暗保文字可读，右侧留亮让照片露出来。
       之前整体压到 0.82 太重，照片看着像一层灰雾，这里按横向渐变分层。 */
    background:
        linear-gradient(100deg,
            rgba(24, 19, 14, .88) 0%,
            rgba(24, 19, 14, .64) 32%,
            rgba(24, 19, 14, .26) 60%,
            rgba(24, 19, 14, .06) 100%),
        linear-gradient(to top, rgba(24, 19, 14, .52) 0%, transparent 42%);
}

/* 无照片时的兜底背景：暖色渐变 + 柔光斑，避免一片死黑 */
.hero.is-empty .hero-bg {
    background:
        radial-gradient(900px 480px at 18% 22%, rgba(240, 144, 85, .38) 0%, transparent 62%),
        radial-gradient(720px 460px at 88% 78%, rgba(47, 125, 95, .30) 0%, transparent 60%),
        linear-gradient(150deg, #2a2622 0%, #43352a 60%, #5d4130 100%);
}

.hero.is-empty .hero-bg::after { background: none; }

.hero .wrap {
    position: relative;
    z-index: 2;
    padding-top: 40px;
    padding-bottom: 72px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    height: 32px;
    padding: 0 14px 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .22);
    color: rgba(255, 255, 255, .92);
    font-size: 12.5px;
    letter-spacing: .02em;
    backdrop-filter: blur(6px);
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #7ee2b0;
    box-shadow: 0 0 0 4px rgba(126, 226, 176, .18);
}

.hero h1 {
    max-width: 15em;
    margin: 22px 0 0;
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.14;
    color: #fff;
    letter-spacing: -.03em;
    /* 照片右半边会露出来，给标题一点投影，避免亮部吃掉笔画 */
    text-shadow: 0 2px 28px rgba(18, 13, 9, .34);
}

.hero h1 em {
    font-style: normal;
    color: #ffc9a8;
    position: relative;
}

.hero-sub {
    max-width: 34em;
    margin-top: 20px;
    font-size: clamp(15px, 1.6vw, 17px);
    line-height: 1.85;
    color: rgba(255, 255, 255, .84);
    text-shadow: 0 1px 18px rgba(18, 13, 9, .32);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 34px;
}

.hero-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    margin-top: 54px;
    border-top: 1px solid rgba(255, 255, 255, .16);
    padding-top: 24px;
    /* 640px 是 1180 容器下的设计值；容器变宽时按 50% 跟随，别把三项挤在左半边 */
    max-width: max(640px, 50%);
}

.hero-facts .fact {
    padding-right: 34px;
    margin-right: 34px;
    border-right: 1px solid rgba(255, 255, 255, .16);
}

.hero-facts .fact:last-child { border-right: 0; margin-right: 0; padding-right: 0; }

.hero-facts .k {
    font-size: 12px;
    color: rgba(255, 255, 255, .55);
    letter-spacing: .08em;
}

.hero-facts .v {
    margin-top: 3px;
    font-size: 17px;
    font-weight: 600;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.hero-scroll {
    position: absolute;
    left: 50%;
    bottom: 26px;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, .55);
    font-size: 11px;
    letter-spacing: .18em;
}

.hero-scroll .line {
    width: 1px;
    height: 34px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, .5), transparent);
    animation: scrollHint 2.2s ease-in-out infinite;
}

@keyframes scrollHint {
    0%, 100% { opacity: .3; transform: scaleY(.6); transform-origin: top; }
    50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

/* ---------------- 通用区块 ---------------- */
.section { padding: 96px 0; }

/* 锚点跳转时给固定导航留出高度，否则标题会被压在导航下面 */
section[id] { scroll-margin-top: calc(var(--nav-h) + 8px); }

.section.tight { padding: 72px 0; }

/* ---------- 托管班简介 ----------
   一段话 + 一排标签。放在「关于我们」之后、「环境风貌」之前，
   用浅底的 paper-2 把这一屏和上下两屏区分开，滚动时有个呼吸。 */
.intro-section {
    background: var(--paper-2);
}

.intro-body {
    /* 62% 在 1180 容器下约 702px，仍取 820；容器越宽这一段也跟着变宽 */
    max-width: max(820px, 62%);
    margin: 0 auto;
    text-align: center;
}

.intro-body p {
    font-size: 16px;
    line-height: 2.05;
    color: var(--ink-2);
}

.intro-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 30px;
}

.intro-tag {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    border-radius: 999px;
    background: var(--white);
    border: 1px solid var(--line);
    font-size: 13.5px;
    color: var(--ink-2);
    box-shadow: var(--shadow-sm);
}

/* 后台把要点清空后容器是空的，别留一段空白 */
.intro-tags:empty {
    display: none;
}

.section-head {
    max-width: max(620px, 48%);
    margin-bottom: 48px;
}

.section-head.center {
    max-width: max(640px, 50%);
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .14em;
    color: var(--brand);
    text-transform: uppercase;
}

.eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    opacity: .55;
}

.section-head.center .eyebrow::before { display: none; }

.section-head h2 {
    margin-top: 14px;
    font-size: clamp(26px, 3.4vw, 38px);
}

.section-head .desc {
    margin-top: 16px;
    font-size: 15.5px;
    line-height: 1.9;
    color: var(--muted);
}

/* ---------------- 数据条 ---------------- */
.stats {
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: var(--white);
}

.stats .wrap {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0;
    padding-top: 34px;
    padding-bottom: 34px;
}

.stat {
    padding: 0 26px;
    border-right: 1px solid var(--line);
}

.stat:first-child { padding-left: 0; }

.stat:last-child { border-right: 0; padding-right: 0; }

.stat .num {
    font-size: clamp(28px, 3.2vw, 38px);
    font-weight: 700;
    letter-spacing: -.03em;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    line-height: 1.1;
}

/* 只缩小单位（年/人/%），数字本体保持与「1:6」同字号同色 */
.stat .num span + span {
    font-size: .5em;
    font-weight: 600;
    color: var(--brand);
    margin-left: 2px;
}

.stat .label {
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
}

/* ---------------- 机构介绍 ---------------- */
.about {
    display: grid;
    grid-template-columns: 1.02fr 1fr;
    gap: 64px;
    align-items: center;
}

.about-media {
    position: relative;
    aspect-ratio: 4 / 3.2;
    border-radius: 24px;
    overflow: hidden;
    background: var(--paper-2);
    box-shadow: var(--shadow-md);
}

.about-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-media .placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #bdb3a5;
    background: repeating-linear-gradient(45deg, #f7f2ea, #f7f2ea 12px, #f3ece1 12px, #f3ece1 24px);
    font-size: 13px;
    text-align: center;
    padding: 24px;
}

.about-media .stamp {
    position: absolute;
    right: -18px;
    bottom: 26px;
    width: 132px;
    padding: 16px 14px;
    border-radius: 16px;
    background: #fff;
    box-shadow: var(--shadow-md);
    text-align: center;
}

.about-media .stamp .big {
    font-size: 26px;
    font-weight: 700;
    color: var(--brand);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}

.about-media .stamp .small {
    font-size: 11.5px;
    color: var(--muted);
    margin-top: 4px;
    line-height: 1.5;
}

.about-body h2 {
    font-size: clamp(25px, 3.2vw, 35px);
    margin-top: 14px;
}

.about-body > p {
    margin-top: 18px;
    color: var(--muted);
    line-height: 1.95;
}

.about-list {
    margin-top: 30px;
    display: grid;
    gap: 18px;
}

.about-item {
    display: flex;
    gap: 14px;
}

.about-item .ico {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
}

.about-item:nth-child(2) .ico { background: var(--accent-soft); color: var(--accent); }
.about-item:nth-child(3) .ico { background: #eef3ff; color: #3b6ef6; }

.about-item .t {
    font-weight: 600;
    font-size: 15px;
}

.about-item .d {
    margin-top: 3px;
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.75;
}

/* ---------------- 照片墙 ---------------- */
.gallery-section {
    background: linear-gradient(180deg, var(--white) 0%, var(--paper-2) 100%);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.gallery-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 32px;
    flex-wrap: wrap;
    margin-bottom: 34px;
}

.gallery-head .section-head { margin-bottom: 0; }

.filters {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter {
    height: 36px;
    padding: 0 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-2);
    font-size: 13.5px;
    font-family: inherit;
    cursor: pointer;
    transition: all .16s ease;
}

.filter:hover { border-color: #d6cabb; }

.filter.active {
    background: var(--ink);
    border-color: var(--ink);
    color: #fff;
}

.filter .cnt {
    opacity: .55;
    margin-left: 5px;
    font-variant-numeric: tabular-nums;
}

/* 首图放大成 2×2，形成杂志式版式；筛选后首图会变，视觉依然成立 */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 232px;
    gap: 16px;
}

.g-card {
    position: relative;
    border: 0;
    padding: 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #e9e2d7;
    cursor: zoom-in;
    box-shadow: var(--shadow-sm);
    transition: transform .28s cubic-bezier(.2, .7, .3, 1), box-shadow .28s ease;
}

.g-card:first-child {
    grid-column: span 2;
    grid-row: span 2;
}

/* 照片不足 4 张时不放大首图，否则右边会留出一大片空白 */
.gallery-grid.sparse .g-card:first-child {
    grid-column: auto;
    grid-row: auto;
}

.g-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s cubic-bezier(.2, .7, .3, 1);
}

.g-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

.g-card:hover img { transform: scale(1.045); }

.g-card .cap {
    position: absolute;
    inset: auto 0 0 0;
    padding: 40px 18px 16px;
    text-align: left;
    color: #fff;
    background: linear-gradient(to top, rgba(24, 18, 13, .74), transparent);
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .24s ease, transform .24s ease;
}

.g-card:hover .cap { opacity: 1; transform: translateY(0); }

.g-card .cap .t {
    font-size: 14.5px;
    font-weight: 600;
}

.g-card .cap .c {
    font-size: 11.5px;
    color: rgba(255, 255, 255, .72);
    margin-top: 2px;
    letter-spacing: .04em;
}

.g-card .tag {
    position: absolute;
    top: 12px;
    left: 12px;
    height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .9);
    color: var(--ink);
    font-size: 11.5px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity .24s ease;
}

.g-card:hover .tag { opacity: 1; }

/* 空态 */
.gallery-empty {
    grid-column: 1 / -1;
    padding: 64px 24px;
    border-radius: var(--radius);
    border: 1.5px dashed #ddd2c2;
    background: rgba(255, 255, 255, .6);
    text-align: center;
    color: var(--muted);
}

.gallery-empty .ico {
    width: 56px;
    height: 56px;
    margin: 0 auto 16px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: var(--brand-soft);
    color: var(--brand);
}

.gallery-empty .t {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink-2);
}

.gallery-empty .d {
    margin-top: 8px;
    font-size: 13.5px;
    line-height: 1.8;
}

.gallery-empty .btn { margin-top: 20px; }

/* 加载骨架 */
.g-skeleton {
    border-radius: var(--radius-sm);
    background: linear-gradient(100deg, #efe8dd 30%, #f7f2ea 50%, #efe8dd 70%);
    background-size: 220% 100%;
    animation: shimmer 1.4s infinite linear;
}

.g-skeleton:first-child { grid-column: span 2; grid-row: span 2; }

@keyframes shimmer {
    from { background-position: 120% 0; }
    to { background-position: -120% 0; }
}

/* ---------------- 一日流程 ---------------- */
.dayline {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
    margin-top: 8px;
    position: relative;
}

.dayline::before {
    content: "";
    position: absolute;
    top: 27px;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--line) 8%, var(--line) 92%, transparent);
}

.day-step {
    position: relative;
    text-align: center;
    padding: 0 12px;
}

.day-step .time {
    font-size: 13px;
    font-weight: 700;
    color: var(--brand);
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
}

.day-step .dot {
    position: relative;
    width: 13px;
    height: 13px;
    margin: 14px auto 0;
    border-radius: 50%;
    background: #fff;
    border: 2.5px solid var(--brand);
    box-shadow: 0 0 0 5px var(--paper);
}

.day-step:nth-child(2n) .dot { border-color: var(--accent); }

.day-step .t {
    margin-top: 16px;
    font-size: 15px;
    font-weight: 600;
}

.day-step .d {
    margin-top: 6px;
    font-size: 12.5px;
    color: var(--muted);
    line-height: 1.7;
}

/* ---------------- 特色服务 ---------------- */
.features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.feature {
    padding: 28px 24px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.feature:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: transparent;
}

.feature .ico {
    width: 44px;
    height: 44px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: var(--brand-soft);
    color: var(--brand);
    margin-bottom: 18px;
}

.feature:nth-child(2) .ico { background: var(--accent-soft); color: var(--accent); }
.feature:nth-child(3) .ico { background: #eef3ff; color: #3b6ef6; }
.feature:nth-child(4) .ico { background: #fdf3e3; color: #ea8c00; }

.feature .t { font-size: 16px; font-weight: 700; }

.feature .d {
    margin-top: 8px;
    font-size: 13.5px;
    color: var(--muted);
    line-height: 1.8;
}

/* ---------------- 联系 / 报名 ---------------- */
.contact {
    background: var(--ink);
    color: #fff;
    padding: 88px 0;
}

.contact .wrap {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: 64px;
    align-items: center;
}

.contact .eyebrow { color: #ffb98f; }

.contact h2 {
    margin-top: 14px;
    font-size: clamp(26px, 3.4vw, 38px);
    color: #fff;
}

.contact .desc {
    margin-top: 16px;
    color: rgba(255, 255, 255, .62);
    line-height: 1.9;
    max-width: 32em;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 30px;
}

.contact-card {
    padding: 30px 28px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .1);
}

.contact-card .row {
    display: flex;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.contact-card .row:last-child { border-bottom: 0; padding-bottom: 0; }

.contact-card .row:first-child { padding-top: 0; }

.contact-card .ico {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, .09);
    color: #ffc9a8;
}

.contact-card .k {
    font-size: 11.5px;
    color: rgba(255, 255, 255, .45);
    letter-spacing: .06em;
}

.contact-card .v {
    font-size: 14.5px;
    color: #fff;
    margin-top: 2px;
    line-height: 1.6;
}

/* ---------------- 页脚 ---------------- */
.site-foot {
    background: #1b1917;
    color: rgba(255, 255, 255, .45);
    padding: 34px 0;
    font-size: 13px;
}

.site-foot .wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.site-foot .links {
    display: flex;
    gap: 20px;
}

.site-foot a:hover { color: #fff; }

/* ---------------- 灯箱 ---------------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 999;
    display: none;
    background: rgba(16, 13, 10, .94);
    backdrop-filter: blur(6px);
    padding: 56px 72px;
}

.lightbox.open { display: flex; flex-direction: column; }

.lb-stage {
    flex: 1;
    min-height: 0;
    display: grid;
    place-items: center;
}

.lb-stage img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 40px 90px rgba(0, 0, 0, .55);
}

.lb-bar {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-top: 20px;
    color: #fff;
}

.lb-bar .t { font-size: 15px; font-weight: 600; }

.lb-bar .d {
    margin-top: 4px;
    font-size: 12.5px;
    color: rgba(255, 255, 255, .55);
    max-width: 60vw;
}

.lb-bar .idx {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .5);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

.lb-close,
.lb-prev,
.lb-next {
    position: absolute;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .22);
    background: rgba(255, 255, 255, .08);
    color: #fff;
    cursor: pointer;
    transition: background .16s ease;
}

.lb-close:hover,
.lb-prev:hover,
.lb-next:hover { background: rgba(255, 255, 255, .2); }

.lb-close { top: 18px; right: 20px; }

.lb-prev { left: 16px; top: 50%; transform: translateY(-50%); }

.lb-next { right: 16px; top: 50%; transform: translateY(-50%); }

/* ---------------- 滚动淡入 ---------------- */
.reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .6s cubic-bezier(.2, .7, .3, 1), transform .6s cubic-bezier(.2, .7, .3, 1);
}

.reveal.in {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; transition: none; }
    .hero-bg img { animation: none; }
    .hero-scroll .line { animation: none; }
}

/* ---------------- 响应式 ---------------- */
@media (max-width: 1024px) {
    .about { gap: 40px; }
    .features { grid-template-columns: repeat(2, 1fr); }
    .contact .wrap { grid-template-columns: 1fr; gap: 40px; }
    .gallery-grid { grid-auto-rows: 200px; }
}

@media (max-width: 860px) {
    :root { --nav-h: 64px; }

    .nav-links {
        position: fixed;
        top: var(--nav-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        margin: 0;
        padding: 10px 16px 18px;
        background: rgba(253, 251, 247, .98);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 18px 30px rgba(60, 42, 28, .1);
        display: none;
    }

    .nav-links.open { display: flex; }

    .nav-links a { padding: 12px 14px; border-radius: 10px; }

    .nav-toggle { display: inline-flex; }

    .nav-actions { display: none; }

    .hero { min-height: 0; padding-top: calc(var(--nav-h) + 40px); padding-bottom: 56px; }

    .hero .wrap { padding-top: 0; padding-bottom: 0; }

    .hero-facts { margin-top: 36px; gap: 22px 0; }

    .hero-facts .fact { padding-right: 22px; margin-right: 22px; }

    .hero-scroll { display: none; }

    .section { padding: 64px 0; }

    .section.tight { padding: 52px 0; }

    .stats .wrap { grid-template-columns: repeat(2, 1fr); gap: 26px 0; }

    .stat { padding: 0 18px; }

    .stat:nth-child(2n) { border-right: 0; padding-right: 0; }

    .stat:nth-child(2n+1) { padding-left: 0; }

    .stat:nth-child(n+3) { padding-top: 22px; border-top: 1px solid var(--line); }

    .about { grid-template-columns: 1fr; gap: 36px; }

    .about-media { order: -1; }

    .about-media .stamp { right: 16px; bottom: 16px; }

    .gallery-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 168px; gap: 12px; }

    .g-card:first-child { grid-column: span 2; grid-row: span 1; }

    .dayline { grid-template-columns: 1fr; gap: 0; text-align: left; }

    .dayline::before {
        top: 0;
        bottom: 0;
        left: 6px;
        right: auto;
        width: 1px;
        height: auto;
        background: linear-gradient(to bottom, transparent, var(--line) 6%, var(--line) 94%, transparent);
    }

    .day-step {
        display: grid;
        grid-template-columns: 13px 1fr;
        gap: 0 18px;
        text-align: left;
        padding: 0 0 26px;
    }

    .day-step:last-child { padding-bottom: 0; }

    .day-step .dot { margin: 4px 0 0; grid-row: span 3; align-self: start; }

    .day-step .time,
    .day-step .t,
    .day-step .d { grid-column: 2; }

    .day-step .time { order: 0; }

    .day-step .t { margin-top: 2px; }

    .day-step .d { margin-top: 2px; }

    .contact { padding: 64px 0; }

    .lightbox { padding: 64px 16px 24px; }

    .lb-prev, .lb-next { width: 38px; height: 38px; }

    .lb-prev { left: 8px; }

    .lb-next { right: 8px; }
}

@media (max-width: 560px) {
    .features { grid-template-columns: 1fr; }
    .hero h1 { font-size: 30px; }
    .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
    .g-card:first-child { grid-column: span 1; grid-row: span 1; }
    .gallery-head { gap: 20px; }
    .site-foot .wrap { flex-direction: column; align-items: flex-start; }
}

/* =============================================================
   师资力量
   首页只展示前 4 位，完整名单在 /teachers 页；两处共用同一套卡片组件。
   ============================================================= */
.teachers-section {
    background: var(--white);
    border-top: 1px solid var(--line);
}

.teachers-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 44px;
}

.teachers-head .section-head { margin-bottom: 0; }

.teachers-more { flex: 0 0 auto; }

.teacher-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.teacher-grid.full {
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.t-card {
    display: flex;
    flex-direction: column;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: transform .28s cubic-bezier(.2, .7, .3, 1), box-shadow .28s ease;
}

.t-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.t-photo {
    position: relative;
    aspect-ratio: 4 / 5;
    background: linear-gradient(155deg, #f4e6d8, #e6cdb7);
    display: grid;
    place-items: center;
    overflow: hidden;
}

.t-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 没有照片时用姓名首字占位，避免出现空白块 */
.t-photo .t-ph {
    font-size: 48px;
    font-weight: 700;
    color: #b78a63;
    letter-spacing: .04em;
}

.t-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 16px 18px 18px;
}

.t-name {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    font-size: 16px;
    font-weight: 700;
}

.t-tag {
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-size: 11.5px;
    font-weight: 600;
}

.t-meta {
    margin-top: 7px;
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--muted);
}

.t-intro {
    margin-top: 10px;
    font-size: 13.5px;
    line-height: 1.95;
    color: var(--ink-2);
}

.teacher-grid.full .t-intro {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.t-more {
    margin-top: auto;
    padding: 14px 0 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 0;
    background: none;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--brand);
    cursor: pointer;
}

.t-more:hover { color: var(--brand-dark); }

.t-skeleton {
    min-height: 340px;
    border-radius: var(--radius);
    background: linear-gradient(100deg, #efe8dd 30%, #f7f2ea 50%, #efe8dd 70%);
    background-size: 220% 100%;
    animation: shimmer 1.4s infinite linear;
}

.teacher-empty {
    grid-column: 1 / -1;
    padding: 52px 24px;
    text-align: center;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: var(--paper);
}

.teacher-empty .t {
    font-size: 16px;
    font-weight: 700;
}

.teacher-empty .d {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.9;
    color: var(--muted);
}

.teacher-empty .btn { margin-top: 18px; }

/* ---------------- 师资页头部 ---------------- */
.page-head {
    padding: calc(var(--nav-h) + 64px) 0 56px;
    background: var(--paper-2);
    border-bottom: 1px solid var(--line);
}

.page-head h1 {
    margin-top: 14px;
    font-size: clamp(28px, 4vw, 44px);
}

.page-head .page-sub {
    max-width: max(640px, 50%);
    margin-top: 16px;
    font-size: 15.5px;
    line-height: 1.95;
    color: var(--muted);
}

.page-head .page-facts {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    margin-top: 24px;
    font-size: 13.5px;
    color: var(--ink-2);
}

.page-head .page-facts b {
    margin-right: 4px;
    font-size: 20px;
    color: var(--brand);
}

/* ---------------- 简历弹窗 ---------------- */
.tmodal {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: none;
}

.tmodal.open { display: block; }

.tmodal-mask {
    position: absolute;
    inset: 0;
    background: rgba(32, 24, 16, .55);
    backdrop-filter: blur(3px);
}

.tmodal-box {
    position: relative;
    display: grid;
    grid-template-columns: 240px 1fr;
    width: min(760px, calc(100% - 32px));
    max-height: calc(100vh - 64px);
    margin: 32px auto;
    background: var(--paper);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    animation: tin .26s cubic-bezier(.2, .7, .3, 1);
}

@keyframes tin {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: none; }
}

.tmodal-photo {
    display: grid;
    place-items: center;
    overflow: hidden;
    background: linear-gradient(155deg, #f4e6d8, #e6cdb7);
}

.tmodal-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.tmodal-photo .t-ph {
    font-size: 58px;
    font-weight: 700;
    color: #b78a63;
}

.tmodal-body {
    max-height: calc(100vh - 64px);
    padding: 32px 32px 28px;
    overflow: auto;
}

.tmodal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .92);
    color: var(--ink-2);
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.tmodal-close:hover { background: #fff; }

.tmodal-name {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 22px;
    font-weight: 700;
}

.tmodal-meta {
    margin-top: 8px;
    font-size: 13.5px;
    color: var(--muted);
}

.tmodal-resume {
    margin-top: 20px;
    font-size: 14.5px;
    line-height: 2.05;
    color: var(--ink-2);
    white-space: pre-line;
}

.tmodal-foot {
    display: flex;
    gap: 10px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

@media (max-width: 1080px) {
    .teacher-grid { grid-template-columns: repeat(2, 1fr); }
    .teacher-grid.full { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
    .teachers-head {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    .teacher-grid,
    .teacher-grid.full { grid-template-columns: 1fr; gap: 16px; }

    .tmodal-box {
        grid-template-columns: 1fr;
        overflow: auto;
    }

    .tmodal-photo {
        height: 220px;
    }

    .tmodal-body {
        max-height: none;
        padding: 24px 22px;
    }
}
