/* 公共变量定义 */
:root {
    --primary-color: #9F1F1F;
    --secondary-color: #E8C547;
    --accent-color: #3A6351;
    --light-bg: #F8F4E9;
    --dark-text: #333333;
    --light-text: #666666;
}

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Noto Serif SC", "SimSun", serif;
    line-height: 1.8;
    color: var(--dark-text);
    background-color: var(--light-bg);
    background-image: url('https://www.transparenttextures.com/patterns/rice-paper-2.png');
}

/* 容器样式 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--dark-text);
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
    border: 2px solid var(--secondary-color);
}

.btn:hover {
    background-color: transparent;
    color: var(--secondary-color);
}

.btn-outline {
    background-color: transparent;
    color: white;
    border: 2px solid white;
    margin-left: 15px;
}

.btn-outline:hover {
    background-color: white;
    color: var(--dark-text);
}

/* 顶部导航栏 */
.top-bar {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 0;
    font-size: 0.9rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.social-links a {
    color: white;
    margin-left: 15px;
    text-decoration: none;
    transition: color 0.3s;
}

.social-links a:hover {
    color: var(--secondary-color);
}

/* 主导航栏 */
header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    height: 80px;
    z-index: 100;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    height: 50px;
    margin-right: 10px;
}

.logo-text h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
    line-height: 1.2;
}

.logo-text span {
    font-size: 0.9rem;
    color: var(--light-text);
    display: block;
}

nav {
    transition: all 0.3s ease;
}

nav ul {
    display: flex;
    list-style: none;
}

nav li {
    margin-left: 25px;
    position: relative;
}

nav a,
a {
    color: var(--dark-text);
    text-decoration: none;
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

nav a:after,
a:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s;
}

nav a:hover:after,
a:hover:after {
    width: 100%;
}

/* 页脚样式 */
footer {
    background-color: var(--dark-text);
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-column h3 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-column p {
    opacity: 0.7;
    margin-bottom: 15px;
    line-height: 1.6;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: white;
    opacity: 0.7;
    text-decoration: none;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    opacity: 0.7;
    font-size: 0.9rem;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    header {
        height: auto;
        padding: 0px 10px 0px;
    }

    .menu-toggle {
        display: block;
        position: absolute;
        top: -5px;
        right: 10px;
        z-index: 1000;
    }

    nav {
        display: none;
        max-height: 0;
        overflow: hidden;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background-color: white;
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
    }

    nav.active {
        display: block;
        max-height: 500px;
        /* 设置一个足够大的值以容纳所有菜单项 */
        transition: max-height 0.5s ease-in-out;
    }

    nav li {
        margin: 0;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    nav a {
        display: block;
        padding: 15px 20px;
    }

    nav a:after {
        display: none;
    }

    /* 确保菜单在关闭时完全隐藏 */
    nav:not(.active) {
        display: block;
        visibility: hidden;
    }
}