/* {模板路径}/static/css/style.css */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

a {
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

a:hover {
    color: #ff5e57;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
}

/* Header Styles */
header {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo h1 {
    font-size: 22px;
    color: #ff5e57;
    font-weight: 700;
}

nav ul {
    display: flex;
}

nav ul li {
    margin-left: 20px;
}

nav ul li a {
    font-weight: 600;
    padding: 5px 10px;
    border-radius: 4px;
}

nav ul li a:hover {
    background-color: #ff5e57;
    color: #fff;
}

/* Banner Styles */
.banner {
    background: linear-gradient(135deg, #ff5e57 0%, #ff3f34 100%);
    color: #fff;
    padding: 60px 0;
    text-align: center;
}

.banner-content h2 {
    font-size: 32px;
    margin-bottom: 15px;
}

.banner-content p {
    font-size: 18px;
    margin-bottom: 30px;
}

.search-box {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
}

.search-box input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.search-box button {
    padding: 12px 25px;
    background-color: #333;
    color: #fff;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.search-box button:hover {
    background-color: #222;
}

/* Section Styles */
section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    font-size: 28px;
    margin-bottom: 10px;
    color: #333;
    position: relative;
    display: inline-block;
}

.section-header h2:after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: #ff5e57;
}

.section-header p {
    color: #777;
    font-size: 16px;
}

/* Card Styles */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 25px;
}

.card {
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);
}

.card-img {
    height: 180px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.card:hover .card-img img {
    transform: scale(1.05);
}

.card-content {
    padding: 15px;
}

.card-content h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.card-content p {
    color: #777;
    font-size: 14px;
}

/* Category Styles */
.category-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
}

.category-item {
    text-align: center;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.category-item:hover {
    transform: translateY(-5px);
}

.category-item img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.category-item h3 {
    padding: 10px;
    font-size: 16px;
}

/* Article Styles */
.article-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.article-item {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.article-item h3 {
    font-size: 18px;
    margin-bottom: 15px;
    color: #333;
}

.article-item p {
    color: #666;
    font-size: 14px;
    line-height: 1.7;
}

/* Footer Styles */
footer {
    background-color: #222;
    color: #fff;
    padding: 60px 0 30px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 40px;
}

.footer-logo p {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #ff5e57;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 15px;
    position: relative;
}

.footer-section h3:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #ff5e57;
}

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

.footer-section ul li a {
    color: #aaa;
    font-size: 14px;
}

.footer-section ul li a:hover {
    color: #ff5e57;
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #444;
    color: #aaa;
    font-size: 14px;
}

.copyright p {
    margin-bottom: 10px;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .card-container,
    .article-container {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    }
}

@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }
    
    nav ul {
        margin-top: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    nav ul li {
        margin: 5px;
    }
    
    .banner-content h2 {
        font-size: 24px;
    }
    
    .footer-content {
        flex-direction: column;
    }
    
    .footer-logo {
        margin-bottom: 30px;
    }
    
    .footer-links {
        gap: 20px;
    }
    
    .footer-section {
        width: 100%;
        margin-bottom: 20px;
    }
}

@media (max-width: 576px) {
    .card-container,
    .category-container,
    .article-container {
        grid-template-columns: 1fr;
    }
    
    section {
        padding: 40px 0;
    }
    
    .section-header h2 {
        font-size: 24px;
    }
}