/* --- CSS Reset --- */
body, h1, h2, h3, p, ul, li, figure, form, input, textarea, button {
    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;
    background-color: #f4f4f9;
    color: #333;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
}

/* --- 顶部栏 --- */
.header {
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2c3e50;
    text-decoration: none;
}

.nav ul {
    list-style: none;
}

.nav ul li {
    display: inline-block;
    margin-left: 25px;
}

.nav a {
    text-decoration: none;
    color: #555;
    font-size: 1rem;
    padding-bottom: 5px;
    transition: color 0.3s, border-bottom 0.3s;
}

.nav a:hover, .nav a.active {
    color: #007bff;
    border-bottom: 2px solid #007bff;
}

/* --- 内容部分 --- */
.main-content {
    flex-grow: 1;
    padding: 50px 0;
}

.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
    color: #2c3e50;
}

.page-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* 卡片式布局 */
.share-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #eee;
}

.card-content {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h2 {
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.card-content p {
    color: #555;
    margin-bottom: 20px;
    flex-grow: 1;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: #888;
    border-top: 1px solid #f0f0f0;
    padding-top: 15px;
    margin-top: auto;
}

.card-footer .read-more {
    text-decoration: none;
    color: #007bff;
    font-weight: bold;
}

/* 关于我们 和 联系我们 页面样式 */
.content-section {
    background: #fff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    max-width: 800px;
    margin: 0 auto;
}

.content-section h2 {
    color: #2c3e50;
    margin-bottom: 20px;
}

.content-section p, .content-section li {
    margin-bottom: 15px;
    line-height: 1.8;
}

/* 联系表单 */
.contact-form .form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.contact-form button {
    display: inline-block;
    background-color: #007bff;
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s;
}

.contact-form button:hover {
    background-color: #0056b3;
}


/* --- 底部栏 --- */
.footer {
    background-color: #343a40;
    color: #f8f9fa;
    text-align: center;
    padding: 20px 0;
    font-size: 0.9rem;
    margin-top: auto; /* 确保底部栏始终在页面底部 */
}

.footer p {
    margin: 5px 0;
}

.footer a {
    color: #adb5bd;
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}