/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f8f8;
}

a {
    text-decoration: none;
    color: #1976d2;
}

a:hover {
    color: #004ba0;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

.btn {
    display: inline-block;
    background-color: #1976d2;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #004ba0;
    color: white;
}

/* 布局 */
header, main, footer {
    width: 100%;
}

header {
    background-color: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.logo {
    text-align: center;
    padding: 20px 0;
}

.logo h1 {
    color: #1976d2;
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.logo p {
    color: #666;
}

/* 导航 */
nav {
    background-color: #1976d2;
}

nav ul {
    display: flex;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
}

nav li {
    position: relative;
}

nav a {
    display: block;
    color: white;
    padding: 15px 25px;
    transition: background-color 0.3s;
}

nav a:hover, nav a.active {
    background-color: #004ba0;
    color: white;
}

/* 汉堡菜单按钮 */
.menu-toggle {
    display: none;
    background-color: #1976d2;
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 1.5rem;
    cursor: pointer;
    width: 100%;
    text-align: right;
}

.menu-toggle:focus {
    outline: none;
}

/* 轮播图 */
.banner {
    position: relative;
    margin-bottom: 30px;
}

.slideshow-container {
    max-width: 1200px;
    position: relative;
    margin: auto;
}

.mySlides {
    display: none;
    position: relative;
}

.mySlides img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.text {
    color: white;
    font-size: 2rem;
    padding: 8px 12px;
    position: absolute;
    bottom: 30px;
    width: 100%;
    text-align: center;
    text-shadow: 0 0 10px rgba(0,0,0,0.7);
    font-weight: bold;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    margin-top: -22px;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
}

.dots {
    text-align: center;
    position: absolute;
    bottom: 20px;
    width: 100%;
}

.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 5px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.active-dot, .dot:hover {
    background-color: white;
}

/* 渐变动画 */
.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
}

/* 主内容 */
main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

section {
    margin-bottom: 50px;
}

section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #1976d2;
    font-size: 2rem;
    position: relative;
    padding-bottom: 10px;
}

section h2::after {
    content: '';
    position: absolute;
    width: 50px;
    height: 3px;
    background-color: #1976d2;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.intro {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 50px;
}

.intro p {
    font-size: 1.1rem;
    color: #666;
}

/* 卡片样式 */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card h3 {
    margin: 15px 0 10px;
    padding: 0 20px;
    color: #1976d2;
}

.card p {
    padding: 0 20px;
    margin-bottom: 20px;
    color: #666;
}

.card .btn {
    margin: 0 20px 20px;
}

/* 文章列表 */
.post-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
    gap: 30px;
}

.post {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.post h3 {
    margin-bottom: 10px;
    color: #1976d2;
}

.post .date {
    color: #999;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.post p {
    margin-bottom: 20px;
    color: #666;
}

/* 页脚 */
footer {
    background-color: #333;
    color: white;
    padding: 50px 0 20px;
    margin-top: 50px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    padding: 0 20px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    color: #1976d2;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ccc;
}

.footer-section a:hover {
    color: white;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-icons img {
    width: 30px;
    height: 30px;
}

.copyright {
    text-align: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #999;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 汉堡菜单样式 */
    .menu-toggle {
        display: block;
    }
    
    nav ul {
        flex-direction: column;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.5s ease-out;
    }
    
    nav ul.show {
        max-height: 500px;
    }
    
    nav a {
        text-align: center;
        padding: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .mySlides img {
        height: 300px;
    }
    
    .text {
        font-size: 1.5rem;
    }
    
    .card-container, .post-container {
        grid-template-columns: 1fr;
    }
}

/* 关于页样式 */
.about-container {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-top: 30px;
}

.profile-img {
    text-align: center;
}

.profile-img img {
    border-radius: 50%;
    width: 300px;
    height: 300px;
    object-fit: cover;
    margin: 0 auto;
    border: 5px solid #1976d2;
}

.about-content h2 {
    text-align: left;
    margin-top: 0;
}

.about-content h2::after {
    left: 0;
    transform: none;
}

@media (max-width: 768px) {
    .about-container {
        grid-template-columns: 1fr;
    }
} 