/* ==========================================
   荆门市少儿乒乓球训练基地 — MICROCORE INTELLIGENCE
   国球红白 · 中国红主色 · 干净利落 · 乒乓基因
   ========================================== */

:root {
    /* ── 品牌色 中国红 ── */
    --brand:        #C41E3A;
    --brand-hover:  #9B1B30;
    --brand-light:  rgba(196,30,58,0.06);

    /* ── 背景 红白基调 ── */
    --bg:           #FFFFFF;
    --bg-warm:      #FFF5F5;
    --white:        #FFFFFF;

    /* ── 文字层级 纯黑系 ── */
    --title:        #111111;
    --body:         #333333;
    --muted:        #666666;

    /* ── 红色装饰边框 ── */
    --border:       #E0D5D5;
    --border-light: #EDE5E5;
    --border-accent: #C41E3A;
    --shadow-sm:    0 1px 4px rgba(0,0,0,0.03);
    --shadow-md:    0 2px 12px rgba(0,0,0,0.05);
    --shadow-lg:    0 8px 30px rgba(0,0,0,0.06);

    /* ── 圆角 ── */
    --radius-sm:    6px;
    --radius-md:    8px;
    --radius-lg:    8px;

    /* ── 过渡 ── */
    --transition:   0.25s ease;

    /* ── 向后兼容别名（旧模板使用） ── */
    --primary:      var(--brand);
    --primary-dark: var(--brand-hover);
    --primary-light:var(--brand-light);
    --accent:       #999;
    --text:         var(--body);
    --text-muted:   var(--muted);
    --ink:          var(--title);
    --ink-light:    var(--body);
    --red:          var(--brand);
    --red-dark:     var(--brand-hover);
    --red-light:    var(--brand-light);
    --gold:         #999;
    --gold-light:   #bbb;
    --gold-dark:    #666;
    --paper:        var(--bg);
    --paper-dark:   var(--bg-warm);
    --blue-50:      var(--brand-light);
    --blue-200:     rgba(196,30,58,0.15);
    --blue-400:     rgba(196,30,58,0.40);
    --blue-500:     var(--brand);
    --blue-600:     var(--brand-hover);
    --blue-700:     var(--brand-hover);
    --blue-900:     #7A1222;
    --slate-50:     var(--bg);
    --slate-200:    var(--border);
    --slate-400:    var(--muted);
    --slate-600:    var(--body);
    --slate-700:    var(--body);
    --slate-800:    var(--title);
}

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

html { scroll-behavior: auto; }

/* 页面顶部红色装饰条 */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: var(--border-accent);
    z-index: 1001;
}

body {
    font-family: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", -apple-system, sans-serif;
    color: var(--body);
    background: var(--bg);
    line-height: 1.8;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; display: block; }

/* ═══════════════════════════════════════════
   导航栏 — 极简无边框，与背景融合
   ═══════════════════════════════════════════ */
.header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    background: var(--bg);
    border-bottom: 2px solid var(--border-accent);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 48px;
    height: 116px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 14px;
}

.logo-icon {
    width: 104px;
    height: 104px;
    object-fit: contain;
    border-radius: var(--radius-sm);
}

.logo-text h1 {
    font-size: 21px;
    font-weight: 600;
    color: var(--title);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.logo-text p {
    font-size: 12.5px;
    color: var(--muted);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.nav-menu { display: flex; gap: 2px; }

.nav-link {
    display: block;
    padding: 8px 18px;
    font-size: 13.5px;
    font-weight: 400;
    color: var(--body);
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    letter-spacing: 0.3px;
}

.nav-link:hover {
    color: var(--brand);
    background: var(--brand-light);
}

.nav-link.active {
    color: var(--brand);
    font-weight: 500;
}

/* ═══════════════════════════════════════════
   主内容区
   ═══════════════════════════════════════════ */
.page-main {
    margin-top: 116px;
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════
   Hero 区域 — 静态大图 + 无动画
   ═══════════════════════════════════════════ */
.hero-section {
    position: relative;
    min-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    overflow: hidden;
}

/* 轮播容器改为静态展示 */
.carousel {
    position: relative;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    height: 500px;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
}

.carousel-inner {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-item {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.8s ease;
}

.carousel-item.active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.carousel-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.carousel-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0.15) 100%);
}

.carousel-bg-light {
    background-size: auto 80%;
    background-color: var(--white);
    background-position: center;
}

.carousel-bg-light::after { display: none; }

.carousel-caption {
    position: absolute;
    left: 50%;
    bottom: 16%;
    transform: translateX(-50%);
    z-index: 2;
    text-align: center;
}

.carousel-caption h2 {
    font-size: 36px;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 16px rgba(0,0,0,0.2);
    letter-spacing: 3px;
    line-height: 1.5;
}

.carousel-indicators {
    display: none; /* 静态展示，隐藏指示器 */
}

/* Hero 波浪 */
.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0; right: 0;
    height: 80px;
    overflow: hidden;
    z-index: 2;
    pointer-events: none;
}

.hero-wave svg { width: 100%; height: 100%; }

.wave { fill: var(--bg); }

/* ═══════════════════════════════════════════
   Hero 左右分栏
   ═══════════════════════════════════════════ */
.hero-grid {
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 48px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
    width: 100%;
}

.hero-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 22px;
}

.hero-tag {
    font-size: 12px;
    font-weight: 500;
    color: var(--body);
    letter-spacing: 2.5px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 42px;
    font-weight: 700;
    color: var(--title);
    line-height: 1.25;
    letter-spacing: 1px;
}

.hero-desc {
    font-size: 15px;
    font-weight: 400;
    color: var(--body);
    line-height: 1.9;
    max-width: 460px;
}

.hero-buttons {
    display: flex;
    gap: 14px;
    padding-top: 8px;
}

.hero-visual {
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 420px;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--bg-warm);
    position: relative;
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 蝴蝶标签 */
.hero-butterfly-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(26,71,130,0.88);
    color: #fff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1px;
    z-index: 5;
}

.hero-butterfly-badge img {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

/* 轮播指示器 */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 5;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.4);
    cursor: pointer;
    transition: background 0.25s ease, width 0.25s ease;
}

.carousel-dot.active {
    background: #fff;
    width: 24px;
    border-radius: 4px;
}

/* 响应式 */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        padding: 48px 28px;
    }
    .hero-visual {
        order: -1;
        max-height: 300px;
    }
    .hero-title { font-size: 32px; }
}

@media (max-width: 640px) {
    .hero-grid { padding: 32px 20px; }
    .hero-title { font-size: 26px; }
    .hero-buttons { flex-direction: column; width: 100%; }
}

/* ═══════════════════════════════════════════
   内容区块 — 大量留白
   ═══════════════════════════════════════════ */
.content-section {
    padding: 100px 28px;
    position: relative;
    z-index: 1;
}

.content-section:nth-child(even) {
    background: var(--white);
}

.container {
    max-width: 1140px;
    margin: 0 auto;
}

.section-title {
    font-size: 28px;
    font-weight: 700;
    color: var(--title);
    text-align: center;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.section-subtitle {
    font-size: 14px;
    color: var(--muted);
    text-align: center;
    margin-bottom: 52px;
    letter-spacing: 0.3px;
}

.section-line {
    width: 40px;
    height: 2px;
    background: var(--brand);
    margin: 0 auto 16px;
    border-radius: 1px;
}

.section-label {
    display: block;
    text-align: center;
    font-size: 12px;
    font-weight: 500;
    color: var(--brand);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 8px;
}

/* ═══════════════════════════════════════════
   卡片
   ═══════════════════════════════════════════ */
.card {
    background: var(--white);
    border: none;
    border-radius: var(--radius-md);
    padding: 36px 28px;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition);
}

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

/* ═══════════════════════════════════════════
   按钮体系
   ═══════════════════════════════════════════ */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-sm);
    letter-spacing: 0.4px;
    cursor: pointer;
    transition: background var(--transition), box-shadow var(--transition), transform var(--transition);
    border: none;
}

.btn-primary {
    background: var(--brand);
    color: #fff;
}

.btn-primary:hover {
    background: var(--brand-hover);
    box-shadow: 0 6px 20px rgba(26,71,130,0.25);
    transform: translateY(-1px);
}

.btn-outline {
    background: var(--white);
    color: var(--title);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--bg-warm);
    border-color: #c8c3b6;
}

.btn-gold {
    background: var(--brand);
    color: #fff;
}

.btn-gold:hover {
    background: var(--brand-hover);
    box-shadow: 0 6px 20px rgba(26,71,130,0.25);
    transform: translateY(-1px);
}

.btn-block { display: block; width: 100%; text-align: center; }

/* ═══════════════════════════════════════════
   页脚 — 浅色融合
   ═══════════════════════════════════════════ */
.footer {
    background: var(--bg-warm);
    color: var(--body);
    position: relative;
    z-index: 1;
    border-top: 3px solid var(--border-accent);
}

.footer-main {
    max-width: 1140px;
    margin: 0 auto;
    padding: 48px 28px 36px;
    display: grid;
    grid-template-columns: 1fr 160px 1fr;
    gap: 40px;
    align-items: start;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    width: 40px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
}

.footer-name { font-size: 15px; font-weight: 600; color: var(--title); margin-bottom: 2px; }
.footer-en { font-size: 10px; color: var(--muted); letter-spacing: 2px; }

.footer-qrcode { text-align: center; }
.footer-qrcode img { background: #fff; padding: 6px; border-radius: var(--radius-md); }
.footer-qrcode p { font-size: 11px; margin-top: 8px; color: var(--muted); }

.footer-info h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; color: var(--title); }
.footer-info p { font-size: 12px; margin-bottom: 5px; color: var(--muted); }

.footer-contact-form {
    border-top: 1px solid var(--border);
    background: var(--white);
}

.footer-bottom {
    padding: 14px 28px;
    text-align: center;
    border-top: 1px solid var(--border-light);
}

.footer-bottom p { font-size: 11px; color: var(--muted); }

/* ═══════════════════════════════════════════
   子页 Hero — 静态极简
   ═══════════════════════════════════════════ */
.page-hero {
    background: var(--bg);
    padding: 80px 24px 56px;
    text-align: center;
}

.page-hero-title {
    font-size: 30px;
    font-weight: 700;
    color: var(--title);
    letter-spacing: 1px;
    position: relative;
    display: inline-block;
}
.page-hero-title::after {
    content: '';
    display: block;
    width: 48px;
    height: 3px;
    background: var(--border-accent);
    margin: 14px auto 0;
    border-radius: 2px;
}

.page-hero-subtitle {
    font-size: 14px;
    color: var(--muted);
    margin-top: 8px;
    letter-spacing: 0.5px;
}

/* ═══════════════════════════════════════════
   首页教练卡片
   ═══════════════════════════════════════════ */
.home-coach-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 20px;
    margin-top: 8px;
}

.home-coach-card {
    text-align: center;
    padding: 28px 16px;
    background: var(--white);
    border: 1px solid var(--border-light);
    border-left: 3px solid transparent;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition), transform var(--transition), border-left-color var(--transition);
}
.home-coach-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    border-left-color: var(--border-accent);
}

.home-coach-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 14px;
    background: var(--brand-light);
}

.home-coach-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
    opacity: 0.7;
}

.home-coach-card h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--title);
    margin-bottom: 2px;
}

.home-coach-role {
    font-size: 12px;
    color: var(--brand);
    font-weight: 500;
}

/* ═══════════════════════════════════════════
   联系表单
   ═══════════════════════════════════════════ */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    background: var(--white);
    color: var(--body);
    transition: border-color var(--transition);
    font-family: inherit;
}

.form-input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-light);
}

.form-input-dark {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    outline: none;
    background: var(--white);
    color: var(--body);
    transition: border-color var(--transition);
    font-family: inherit;
}

.form-input-dark::placeholder { color: #aaa; }
.form-input-dark:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 4px var(--brand-light);
}

select.form-input, select.form-input-dark {
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
}

.form-success {
    text-align: center;
    padding: 14px 16px;
    margin-bottom: 16px;
    background: #ecfdf5;
    color: #065f46;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
}

/* ═══════════════════════════════════════════
   搜索
   ═══════════════════════════════════════════ */
.nav-search-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 6px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 13px;
    margin-left: 10px;
    transition: var(--transition);
}

.nav-search-btn:hover { background: var(--brand-light); color: var(--brand); border-color: var(--brand); }

.search-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.4);
    backdrop-filter: blur(4px);
    z-index: 2000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 18vh;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.search-overlay.search-open { opacity: 1; pointer-events: auto; }

.search-modal {
    background: var(--white);
    border-radius: var(--radius-md);
    width: 90%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.search-input {
    width: 100%;
    padding: 18px 20px;
    font-size: 15px;
    border: none;
    border-bottom: 1px solid var(--border);
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    outline: none;
    background: transparent;
    color: var(--body);
}

.search-results { padding: 6px 0; max-height: 280px; overflow-y: auto; }
.search-item { display: block; padding: 12px 20px; font-size: 14px; color: var(--body); transition: var(--transition); }
.search-item:hover { background: var(--brand-light); }
.search-empty { padding: 28px 20px; text-align: center; font-size: 13px; color: var(--muted); }
.search-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 18px; cursor: pointer; color: var(--muted); }

/* ═══════════════════════════════════════════
   主题切换 & 回到顶部
   ═══════════════════════════════════════════ */
.theme-toggle {
    position: fixed;
    bottom: 28px;
    right: 28px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: var(--transition);
}

.theme-toggle:hover {
    box-shadow: var(--shadow-md);
    transform: scale(1.06);
}

.back-to-top {
    position: fixed;
    bottom: 80px;
    right: 28px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    border: none;
    box-shadow: 0 4px 16px rgba(26,71,130,0.25);
    cursor: pointer;
    z-index: 998;
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s, transform 0.3s;
}

.back-to-top:hover { transform: scale(1.06); }

/* ═══════════════════════════════════════════
   汉堡菜单
   ═══════════════════════════════════════════ */
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; z-index: 1001; }
.hamburger span { display: block; width: 20px; height: 2px; background: var(--title); margin: 4px 0; transition: var(--transition); border-radius: 1px; }
.hamburger-active span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.hamburger-active span:nth-child(2) { opacity: 0; }
.hamburger-active span:nth-child(3) { transform: rotate(-45deg) translate(4px, -4px); }

@media (max-width: 768px) {
    .hamburger { display: block; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); }
    .nav-menu {
        display: none;
        position: absolute;
        top: 116px;
        left: 0; right: 0;
        background: rgba(249,246,239,0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        padding: 12px 0;
        gap: 0;
        border-top: 1px solid var(--border);
        z-index: 1000;
    }
    .nav-menu.nav-open { display: flex; }
    .nav-menu .nav-link { padding: 14px 28px; border-radius: 0; font-size: 14px; }
}

/* ═══════════════════════════════════════════
   空状态
   ═══════════════════════════════════════════ */
.empty-state { text-align: center; padding: 56px 24px; color: var(--muted); font-size: 14px; }

/* ═══════════════════════════════════════════
   阅读进度条
   ═══════════════════════════════════════════ */
#reading-progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    background: var(--brand);
    z-index: 10000;
    border-radius: 0 1px 1px 0;
    transition: width 0.1s linear;
}

/* ═══════════════════════════════════════════
   响应式
   ═══════════════════════════════════════════ */
@media (max-width: 768px) {
    .nav-container { padding: 0 20px; }
    .content-section { padding: 64px 20px; }
    .section-title { font-size: 24px; }
    .hero-section { min-height: 60vh; }
    .carousel { height: 320px; border-radius: 0; }
    .carousel-caption h2 { font-size: 24px; }
    .footer-main { grid-template-columns: 1fr; text-align: center; gap: 24px; }
    .footer-brand { justify-content: center; }
    .form-row { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════
   移除旧版动画（覆盖可能残留的动画引用）
   ═══════════════════════════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* 深色模式 — 禁用（保持亮色） */
:root.dark {
    --bg:           #FFFFFF;
    --bg-warm:      #FFF5F5;
    --white:        #FFFFFF;
    --title:        #111111;
    --body:         #333333;
    --muted:        #666666;
    --border:       #E0D5D5;
    --text:         #333333;
    --text-muted:   #666666;
}
:root.dark .header { background: #FFFFFF; }
:root.dark .hero-section { background: #FFFFFF; }
:root.dark .page-hero { background: #FFFFFF; }
:root.dark .page-hero-title { color: #111111; }
:root.dark .search-modal { background: #FFFFFF; }
:root.dark .section-title { color: #111111; }
:root.dark .carousel-bg-light { background-color: #FFFFFF; }
:root.dark .hamburger span { background: #111111; }
:root.dark .form-input { background: #FFFFFF; border-color: #E0D5D5; color: #333333; }
