/* ========== 全局与复古基调 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Noto Serif SC', 'Songti SC', serif;
    background-color: #F5F1EB;
    color: #4a3728;
    line-height: 1.6;
    scroll-behavior: smooth;
}

/* ========== 导航栏 ========== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #A87868;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: -5px;  /* 图片和文字的间距 */
    margin-left: -160px;  /* 负值往左移，自己调数值 */
    font-size: 1.5em;
    font-weight: bold;
    color: #F5F1EB;
    text-decoration: none;
    letter-spacing: 3px;
    font-family: 'Georgia', serif;
}

.logo-img {
    height: 80px;   /* 图片高度，跟导航栏协调 */
    width: auto;
    object-fit: contain;
}


.nav-links {
    list-style: none;
    display: flex;
    gap: 8px;
}

.nav-links a {
    color: #F5F1EB;
    text-decoration: none;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.95em;
    transition: all 0.3s ease;
    letter-spacing: 1px;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: rgba(245, 241, 235, 0.2);
    color: #fff;
}

/* ========== 首屏 Hero ========== */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: #F5F1EB;
}

/* 背景大图容器 */
.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}


/* 暗色遮罩，保证标题可读 */
.hero-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(245, 241, 235, 0.8);
}

/* Hero背景无缝循环平移 */
.hero-bg {
    display: flex;
    width: fit-content;
    animation: scroll-left 80s linear infinite; /* 移动速度 */
}

.hero-bg .bg-image {
    flex-shrink: 0;
    width: auto;
    height: 100%;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}


/* Hero 内容 */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 40px 60px;
    background: rgba(245, 241, 235, 0.75);
    backdrop-filter: blur(8px);
    border-radius: 16px;
    border: 2px solid rgba(168, 120, 104, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    max-width: 700px;
}

.hero-title {
    font-size: 5em;
    color: #4a3728;
    margin-bottom: 20px;
    letter-spacing: 6px;
    font-weight: 700;
    line-height: 1.3;
    text-shadow: 1px 1px 2px rgba(168, 120, 104, 0.2);
}

.hero-desc {
    font-size: 2em;
    color: #6b5348;
    line-height: 1.8;
    letter-spacing: 1px;
}

/* ========== 四大板块 ========== */
.sections {
    padding: 80px 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 30px;
}

.card {
    background-image: url('./picture/cardbg.jpg');
    background-size: cover;
    background-position: center;
    border: 2px solid #CAA59B;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(168, 120, 104, 0.1);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #B39B56, #A87868, #2C8079);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 36px rgba(168, 120, 104, 0.25);
    border-color: #A87868;
}

.card-image {
    width: 100%;
    height: 160px;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 16px;
    position: relative; z-index: 1
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.card:hover .card-image img {
    transform: scale(1.05);
}

.card-title {
    font-size: 1.6em;
    color: #4a3728;
    margin-bottom: 12px;
    letter-spacing: 2px;
    position: relative; z-index: 1
}

.card-desc {
    font-size: 0.95em;
    color: #8b7265;
    line-height: 1.6;
    position: relative; z-index: 1
}

/* ========== 页脚 ========== */
.footer {
    background-color: #A87868;
    color: #F5F1EB;
    text-align: center;
    padding: 30px;
    font-size: 0.9em;
    letter-spacing: 1px;
}

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .nav-links {
        gap: 4px;
    }

    .nav-links a {
        padding: 6px 12px;
        font-size: 0.85em;
    }

    .hero-title {
        font-size: 2em;
        letter-spacing: 3px;
    }

    .hero-desc {
        font-size: 1em;
    }

    .hero-content {
        padding: 30px 20px;
        margin: 0 20px;
    }

    .cards-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .card {
        min-height: 180px;
        padding: 30px 20px;
    }

    
}

.scroll-hint {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 10;
}

.scroll-hint span {
    display: block;
    width: 14px;
    height: 14px;
    border-right: 3px solid #A87868;
    border-bottom: 3px solid #A87868;
    transform: rotate(45deg);
    margin: -4px 0;
    opacity: 0;
    animation: scrollBounce 2s infinite;
}

.scroll-hint span:nth-child(2) { animation-delay: 0.2s; }
.scroll-hint span:nth-child(3) { animation-delay: 0.4s; }

@keyframes scrollBounce {
    0% { opacity: 0; transform: rotate(45deg) translate(-4px, -4px); }
    50% { opacity: 1; }
    100% { opacity: 0; transform: rotate(45deg) translate(4px, 4px); }
}
