/* 全局样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 全局变量 */
:root {
    --primary-color: #8b4513;
    --secondary-color: #d2691e;
    --text-color: #333;
    --bg-color: #f4f4f4;
    --header-height: 80px;
    --container-width: 1200px;
    --grid-gap: 30px;
}

/* 基础样式 */
body {
    font-family: "Microsoft YaHei", sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* 头部样式 */
.header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.header.scrolled {
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
}

.header.header-hidden {
    transform: translateY(-100%);
}

.logo-container {
    display: flex;
    align-items: center;
    padding: 10px 20px;
}

.logo {
    width: 50px;
    height: 50px;
    margin-right: 15px;
}

.logo-container h1 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

/* 导航栏样式 */
.navbar {
    background-color: var(--primary-color);
    padding: 10px 20px;
}

.nav-links {
    display: flex;
    justify-content: center;
    list-style: none;
}

.nav-links li {
    margin: 0 15px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 3px;
    transition: background-color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
    background-color: var(--secondary-color);
}

/* 汉堡菜单 */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 2px 0;
    transition: all 0.3s ease;
    transform-origin: left;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
}

/* 主内容区域 */
.main-content {
    margin-top: calc(var(--header-height) + 20px);
    padding: 0 20px;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--grid-gap);
}

/* 英雄区域 */
.hero {
    grid-column: 1 / -1;
    text-align: center;
    padding: 80px 20px;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/hero-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #fff;
    border-radius: 15px;
    margin-bottom: var(--grid-gap);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* 遗迹卡片区域 */
.featured-sites {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.featured-sites h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    position: relative;
}

.featured-sites h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: var(--primary-color);
    margin: 15px auto 0;
}

.site-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

/* 侧边栏 */
.sidebar {
    background: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    height: fit-content;
}

.recent-news h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 20px;
    position: relative;
}

.recent-news h3::after {
    content: "";
    display: block;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
    margin-top: 10px;
}

.recent-news li {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.recent-news li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* 页脚 */
.footer {
    background-color: #333;
    color: #fff;
    padding: 40px 20px 20px;
    margin-top: 50px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section h4 {
    margin-bottom: 15px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--secondary-color);
}

.copyright {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* 响应式设计优化 */
@media screen and (max-width: 1024px) {
    :root {
        --container-width: 90%;
    }
}

@media screen and (max-width: 768px) {
    .main-content {
        grid-template-columns: 1fr;
        margin-top: 20px;
    }

    .hero {
        padding: 60px 20px;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .featured-sites,
    .sidebar {
        padding: 20px;
    }

    .site-cards {
        grid-template-columns: 1fr;
    }

    .hamburger {
        display: flex;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        transform: translateY(-10px);
        opacity: 0;
        transition: transform 0.3s ease, opacity 0.3s ease;
    }

    .nav-links.active {
        display: flex;
        transform: translateY(0);
        opacity: 1;
    }

    .nav-links li {
        margin: 10px 0;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 10px;
    }
}

@media screen and (max-width: 480px) {
    .hero {
        padding: 40px 15px;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .featured-sites h2 {
        font-size: 1.5rem;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-card {
    animation: fadeIn 0.5s ease-out;
}

/* 遗迹卡片样式 */
.site-card {
    background: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.site-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.card-image {
    position: relative;
    overflow: hidden;
    padding-top: 60%;
}

.card-image img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.site-card:hover .card-image img {
    transform: scale(1.05);
}

.card-content {
    padding: 20px;
}

.card-content h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.card-content p {
    color: var(--text-color);
    margin-bottom: 20px;
    line-height: 1.6;
}

.read-more {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.read-more:hover {
    background-color: var(--secondary-color);
}

/* 新闻列表样式 */
.recent-news ul {
    list-style: none;
}

.recent-news li {
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.recent-news li:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.recent-news a {
    display: block;
    text-decoration: none;
    color: var(--text-color);
    transition: transform 0.3s ease;
}

.recent-news a:hover {
    transform: translateX(5px);
}

.news-date {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.recent-news h4 {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 8px;
    transition: color 0.3s ease;
}

.recent-news a:hover h4 {
    color: var(--secondary-color);
}

.recent-news p {
    font-size: 0.9rem;
    color: #666;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* 面包屑导航 */
.breadcrumb {
    margin: 20px 0;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.breadcrumb ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

.breadcrumb li {
    display: flex;
    align-items: center;
}

.breadcrumb li:not(:last-child)::after {
    content: ">";
    margin: 0 10px;
    color: #999;
}

.breadcrumb a {
    color: var(--primary-color);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

/* 底部导航 */
.footer-nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-nav li {
    margin-bottom: 10px;
}

.footer-nav a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--primary-color);
}

/* 更新底部样式 */
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    padding: 40px 20px;
}

.footer-section h4 {
    color: #fff;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-section p {
    margin-bottom: 10px;
    color: #ccc;
}

@media screen and (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .breadcrumb {
        padding: 10px;
    }
} 