/* ========================================
   禅意茶文化风 - 全局样式
   墨绿 + 米白 + 浅棕配色体系
   ======================================== */

:root {
    --color-primary: #2d4a3e;      /* 深墨绿 */
    --color-secondary: #4a6741;    /* 中墨绿 */
    --color-accent: #8b7355;       /* 浅棕 */
    --color-bg-light: #f5f0e8;     /* 米白 */
    --color-bg-warm: #e8e0d5;      /* 暖灰 */
    --color-text-dark: #1a1a1a;    /* 深黑文字 */
    --color-text-gray: #5a5a5a;    /* 灰色文字 */
    --color-white: #ffffff;
    --shadow-soft: 0 4px 20px rgba(45, 74, 62, 0.08);
    --shadow-hover: 0 8px 30px rgba(45, 74, 62, 0.15);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius-card: 12px;
    --border-radius-btn: 6px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    line-height: 1.8;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-smooth);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ========================================
   顶部导航栏 - 固定悬浮式
   ======================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(245, 240, 232, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(45, 74, 62, 0.1);
    transition: var(--transition-smooth);
}

.header.scrolled {
    background: rgba(45, 74, 62, 0.98);
    box-shadow: 0 4px 30px rgba(45, 74, 62, 0.2);
}

.header.scrolled .nav-link,
.header.scrolled .logo-text {
    color: var(--color-bg-light);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
}

.logo-text {
    font-size: 24px;
    font-weight: 600;
    color: var(--color-primary);
    letter-spacing: 2px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 8px;
}

.nav-link {
    padding: 10px 18px;
    color: var(--color-primary);
    font-size: 15px;
    font-weight: 500;
    border-radius: var(--border-radius-btn);
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: var(--transition-smooth);
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 80%;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-secondary);
}

.header.scrolled .nav-link:hover,
.header.scrolled .nav-link.active {
    color: var(--color-bg-light);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--color-primary);
    border-radius: 2px;
    transition: var(--transition-smooth);
}

.header.scrolled .hamburger span {
    background: var(--color-bg-light);
}

/* ========================================
   磁贴式瀑布流布局核心
   ======================================== */
.mosaic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    grid-auto-rows: masonry;
    gap: 25px;
    padding: 40px 0;
}

.mosaic-item {
    background: var(--color-white);
    border-radius: var(--border-radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
    position: relative;
}

.mosaic-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-hover);
}

.mosaic-item.large {
    grid-column: span 2;
    grid-row: span 2;
}

.mosaic-item.medium {
    grid-column: span 2;
}

.mosaic-item.tall {
    grid-row: span 2;
}

/* ========================================
   Hero Banner - 全屏沉浸式
   ======================================== */
.hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 0;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(45, 74, 62, 0.7) 0%, rgba(74, 103, 65, 0.5) 100%);
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--color-white);
    max-width: 900px;
    padding: 0 20px;
}

.hero-title {
    font-size: clamp(32px, 5vw, 64px);
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: 8px;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.3s;
}

.hero-subtitle {
    font-size: clamp(16px, 2.5vw, 22px);
    margin-bottom: 40px;
    font-weight: 300;
    letter-spacing: 4px;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.6s;
}

.hero-cta {
    display: inline-flex;
    gap: 20px;
    opacity: 0;
    animation: fadeInUp 1s ease forwards 0.9s;
}

.btn {
    padding: 14px 36px;
    border-radius: var(--border-radius-btn);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 2px;
    cursor: pointer;
    transition: var(--transition-smooth);
    border: none;
}

.btn-primary {
    background: var(--color-accent);
    color: var(--color-white);
}

.btn-primary:hover {
    background: #a08464;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(139, 115, 85, 0.4);
}

.btn-outline {
    background: transparent;
    color: var(--color-white);
    border: 2px solid var(--color-white);
}

.btn-outline:hover {
    background: var(--color-white);
    color: var(--color-primary);
    transform: translateY(-3px);
}

/* ========================================
   章节通用样式
   ======================================== */
.section {
    padding: 100px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    font-size: clamp(28px, 4vw, 42px);
    color: var(--color-primary);
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: 4px;
}

.section-subtitle {
    font-size: 16px;
    color: var(--color-text-gray);
    max-width: 600px;
    margin: 0 auto;
    line-height: 2;
}

/* ========================================
   卡片组件
   ======================================== */
.card {
    background: var(--color-white);
    border-radius: var(--border-radius-card);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    transition: var(--transition-smooth);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
}

.card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.card:hover .card-img {
    transform: scale(1.05);
}

.card-body {
    padding: 25px;
}

.card-title {
    font-size: 20px;
    color: var(--color-primary);
    margin-bottom: 12px;
    font-weight: 600;
}

.card-text {
    color: var(--color-text-gray);
    font-size: 14px;
    line-height: 1.9;
    margin-bottom: 15px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    color: var(--color-text-gray);
}

/* ========================================
   页脚
   ======================================== */
.footer {
    background: var(--color-primary);
    color: var(--color-bg-light);
    padding: 80px 0 40px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 50px;
}

.footer-section h4 {
    font-size: 18px;
    margin-bottom: 25px;
    color: var(--color-white);
    letter-spacing: 2px;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    color: rgba(245, 240, 232, 0.8);
    font-size: 14px;
}

.footer-section a:hover {
    color: var(--color-white);
    padding-left: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(245, 240, 232, 0.2);
    padding-top: 30px;
    text-align: center;
    font-size: 14px;
    color: rgba(245, 240, 232, 0.6);
}

/* ========================================
   动画效果
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   响应式设计
   ======================================== */
@media (max-width: 992px) {
    .mosaic-item.large,
    .mosaic-item.medium {
        grid-column: span 1;
    }
    
    .mosaic-item.tall {
        grid-row: span 1;
    }
    
    .hero-title {
        font-size: 42px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background: var(--color-primary);
        flex-direction: column;
        padding: 40px 20px;
        transition: var(--transition-smooth);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        color: var(--color-bg-light);
        padding: 15px 20px;
        font-size: 18px;
    }
    
    .hero-title {
        font-size: 32px;
        letter-spacing: 4px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 15px;
    }
    
    .section {
        padding: 60px 0;
    }
}

/* ========================================
   工具类
   ======================================== */
.text-center { text-align: center; }
.text-primary { color: var(--color-primary); }
.text-accent { color: var(--color-accent); }
.mt-20 { margin-top: 20px; }
.mt-40 { margin-top: 40px; }
.mb-20 { margin-bottom: 20px; }
.mb-40 { margin-bottom: 40px; }
