/* ============================================
   梵音静修 - 品牌样式表
   ============================================ */

/* CSS变量 / 品牌色板 */
:root {
    --primary: #10b981;          /* 主色 - 翡翠绿 */
    --primary-dark: #059669;
    --primary-light: #6ee7b7;
    --primary-bg: #ecfdf5;
    --accent: #f59e0b;           /* 辅色 - 琥珀金 */
    --accent-light: #fbbf24;
    --accent-bg: #fffbeb;
    --bg: #f8fafc;
    --bg-card: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
    --radius: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-display: 'Noto Serif SC', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* 重置 */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* APP容器 */
.app-wrapper {
    max-width: 450px;
    margin: 0 auto;
    background: var(--bg-card);
    min-height: 100vh;
    box-shadow: 0 0 40px rgba(0,0,0,0.03);
    position: relative;
    overflow-x: hidden;
}

@media (min-width: 768px) {
    .app-wrapper {
        max-width: 1200px;
        box-shadow: none;
    }
}

.container {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

/* ========== 排版 ========== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }

.section-title {
    text-align: center;
    margin-bottom: 0.5rem;
    font-size: 1.75rem;
    color: var(--text-primary);
}

.section-desc {
    text-align: center;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 2.5rem;
    font-size: 0.95rem;
}

.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.5rem;
    border: none;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    gap: 0.5rem;
    min-height: 44px;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 14px rgba(16,185,129,0.35);
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(16,185,129,0.45);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.btn-lg {
    padding: 0.9rem 2rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    min-height: 36px;
}

.btn-block {
    width: 100%;
}

/* ========== 头部导航 ========== */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.header.scrolled {
    box-shadow: 0 2px 20px rgba(0,0,0,0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
}

.logo-wrap {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.logo-icon {
    width: 32px;
    height: 32px;
    display: block;
}

.logo-text {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
}

.nav {
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
}

.nav-link:hover {
    background: var(--primary-bg);
    color: var(--primary);
}

.nav-link.active {
    background: var(--primary);
    color: white;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
}

.menu-toggle .bar {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

@media (max-width: 767px) {
    .nav {
        display: none;
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: var(--bg-card);
        flex-direction: column;
        padding: 1rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }
    .nav.open {
        display: flex;
    }
    .menu-toggle {
        display: flex;
    }
}

/* ========== Hero区 ========== */
.hero {
    position: relative;
    padding: 3rem 0 4rem;
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--accent-bg) 100%);
    overflow: hidden;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.hero-logo {
    width: 160px;
    height: auto;
    margin-bottom: 0.5rem;
}

.hero-title {
    font-size: 2.2rem;
    color: var(--text-primary);
    max-width: 600px;
}

.hero-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 0.5rem;
}

.hero-bg-shape {
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16,185,129,0.1) 0%, transparent 70%);
    top: -100px;
    right: -100px;
    z-index: 1;
}

@media (min-width: 768px) {
    .hero { padding: 5rem 0 6rem; }
    .hero-title { font-size: 2.8rem; }
}

/* ========== 通用区块 ========== */
.section {
    padding: 3rem 0;
}

/* ========== 特色卡片网格 ========== */
.features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.feature-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: var(--transition);
    text-align: center;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 0.75rem;
    color: var(--primary);
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.4rem;
}

.feature-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

@media (min-width: 768px) {
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========== 课程卡片网格 ========== */
.classes-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.class-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.class-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: var(--transition);
}

.class-card:hover::before {
    opacity: 1;
}

.class-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.class-card .class-type {
    display: inline-block;
    padding: 0.15rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--primary-bg);
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.class-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.class-card .class-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.class-card .class-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.class-card .class-level {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-size: 0.7rem;
    background: var(--accent-bg);
    color: var(--accent);
    margin-top: 0.5rem;
}

@media (min-width: 768px) {
    .classes-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========== 统计区 ========== */
.stats {
    background: linear-gradient(135deg, var(--primary) 0%, #059669 100%);
    color: white;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    text-align: center;
}

.stat-item {
    padding: 1rem;
}

.stat-item .stat-value {
    font-size: 2rem;
    font-weight: 700;
    font-family: var(--font-display);
}

.stat-item .stat-label {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-top: 0.25rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========== 引语 ========== */
.testimonial-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
    border: 1px solid var(--border);
    max-width: 650px;
    margin: 0 auto;
}

.testimonial-card blockquote {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.testimonial-card cite {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: normal;
}

/* ========== CTA区 ========== */
.cta {
    background: linear-gradient(135deg, var(--accent-bg) 0%, var(--primary-bg) 100%);
    text-align: center;
}

.cta-title {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.cta-text {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.cta-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== 页脚 ========== */
.footer {
    background: var(--text-primary);
    color: rgba(255,255,255,0.8);
    padding: 2.5rem 0 0;
}

.footer-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer-brand {
    grid-column: 1 / -1;
}

.footer-logo {
    width: 140px;
    height: auto;
    margin-bottom: 0.75rem;
    filter: brightness(0) invert(1);
}

.footer-desc {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.6);
    max-width: 300px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-link-title {
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: white;
    margin-bottom: 0.25rem;
}

.footer-links a {
    color: rgba(255,255,255,0.6);
    text-decoration: none;
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-light);
}

.footer-social .social-icons {
    display: flex;
    gap: 0.75rem;
}

.footer-social .social-icons a {
    color: rgba(255,255,255,0.6);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
}

.footer-social .social-icons a:hover {
    color: white;
    background: var(--primary);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.25rem 0;
    margin-top: 2rem;
    text-align: center;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.4);
}

@media (min-width: 768px) {
    .footer-inner {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
    .footer-brand {
        grid-column: auto;
    }
}

/* ========== 内页Hero ========== */
.page-hero {
    padding: 2.5rem 0;
    background: linear-gradient(135deg, var(--primary-bg), var(--accent-bg));
    text-align: center;
}

.page-hero h1 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
}

.page-hero p {
    color: var(--text-secondary);
}

/* ========== 关于页 ========== */
.story-content p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.mission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 2rem;
}

.mission-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border);
    text-align: center;
}

.mission-card h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.mission-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.team-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

.team-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border);
    text-align: center;
    transition: var(--transition);
}

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

.team-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    margin: 0 auto 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: var(--font-display);
}

.team-card h3 {
    font-size: 1rem;
    margin-bottom: 0.2rem;
}

.team-card .team-title {
    font-size: 0.8rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.team-card .team-bio {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

@media (min-width: 768px) {
    .mission-grid { grid-template-columns: repeat(3, 1fr); }
    .team-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ========== 时间轴 ========== */
.timeline-list {
    max-width: 600px;
    margin: 2rem auto 0;
    position: relative;
    padding-left: 2rem;
}

.timeline-list::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.65rem;
    top: 0.25rem;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--bg-card);
}

.timeline-year {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.timeline-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ========== 联系页 ========== */
.contact-grid {
    display: grid;
    gap: 2rem;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.info-label {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.info-item span:last-child {
    font-size: 0.95rem;
}

.contact-social {
    display: flex;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.contact-social a {
    color: var(--text-secondary);
    transition: var(--transition);
}

.contact-social a:hover {
    color: var(--primary);
}

.contact-form-wrap {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border);
}

.contact-form .form-group {
    margin-bottom: 1rem;
}

.contact-form label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.3rem;
    color: var(--text-primary);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: var(--font-body);
    background: var(--bg);
    transition: var(--transition);
    outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
}

.form-success {
    text-align: center;
    padding: 2rem;
}

.success-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 1rem;
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ========== 响应式微调 ========== */
@media (max-width: 374px) {
    .hero-title { font-size: 1.6rem; }
    .features-grid, .classes-grid { grid-template-columns: 1fr; }
}

/* ========== 动画 ========== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content, .section {
    animation: fadeInUp 0.6s ease-out;
}

/* ========== 选择器覆盖 ========== */
::selection {
    background: var(--primary);
    color: white;
}

/* ========== 滚动条美化 ========== */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}