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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 通用部分样式 */
section {
    padding: 0rem 0;
}

section:nth-child(even) {
    /*background-color: #f8fafc;*/
}

section h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 3rem;
    /*color: #1f2937;*/
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* 卡片通用样式 */
.card {
    background: white;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

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

.card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #1f2937;
}

.card-content p {
    color: #666;
}

/* 动物专题样式 */
.topic-card {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    aspect-ratio: 16/9;
}

.topic-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.topic-content {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 1rem;
    transition: background-color 0.3s;
}

.topic-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: #fff;
} 

.topic-card:hover .topic-content {
    background: rgba(0, 0, 0, 0.7);
}

/* FAQ样式 */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; /* 两列，等宽 */
    gap: 20px; /* 设置列之间的间距 */
    margin: 0 auto;
}

.faq-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.faq-card h3 {
    color: #1f2937;
    margin-bottom: 0.5rem;
}

/* 页脚样式 */
footer {
    background-color: #1f2937;
    color: white;
    padding: 3rem 0 1.5rem;
}

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

.footer-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-section p {
    color: #9ca3af;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    color: #9ca3af;
    text-decoration: none;
    transition: color 0.3s;
}

.social-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: #9ca3af;
}

/* 响应式设计 */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    nav ul {
        gap: 1rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    section {
        padding: 2rem 0;
    }

    .grid {
        /*grid-template-columns: 1fr; */
    }
}