/* 基础样式重置 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    color: #333;
    margin-bottom: 0.5em;
}

a {
    color: #007aff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #0056b3;
}

img {
    max-width: 100%;
    height: auto;
}

/* 顶部导航栏样式 */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo img {
    height: 50px;
}

.nav-menu {
    display: flex;
    gap: 30px;
}

.nav-menu a {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    padding: 5px 0;
    position: relative;
}

.nav-menu a:hover {
    color: #007aff;
}

.nav-menu a:after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: #007aff;
    transition: width 0.3s ease;
}

.nav-menu a:hover:after {
    width: 100%;
}

/* 汉堡菜单 */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 21px;
    cursor: pointer;
}

.menu-toggle span {
    height: 3px;
    width: 100%;
    background-color: #333;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* 轮播图样式 */
.swiper {
    width: 100%;
    height: 350px;
    margin: 20px 0 0 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    overflow: hidden;
}

.swiper-slide {
    position: relative;
    background: #f5f5f5;
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.swiper-slide:hover img {
    transform: scale(1.05);
}

.swiper-button-next,
.swiper-button-prev {
    color: #fff;
    background: rgba(0,0,0,0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: rgba(0,0,0,0.6);
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: #fff;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
    background: #007aff;
}

/* 内容区域样式 */
.content-section { 
    padding: 10px 20px; 
    text-align: center; 
}

.content-grid { 
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 15px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.content-item { 
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background-color: #fff;
}

.content-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.content-item img { 
    width: 100%; 
    height: 180px; 
    object-fit: cover; 
}

.content-item p {
    padding: 15px;
    margin: 0;
    font-weight: 500;
}

/* 党员列表样式 */
.party-members-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.member-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    padding: 20px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.member-card img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #f0f0f0;
}

.member-card h3 {
    margin-top: 15px;
    color: #333;
    font-size: 1.2em;
}

/* 党员详情页样式 */
.detail-container {
    max-width: 800px;
    margin: 30px auto;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.detail-item {
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
    padding-bottom: 10px;
    border-bottom: 1px dashed #eee;
}

.detail-container img {
    max-width: 200px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: block;
    border: 3px solid #f0f0f0;
}

/* 页脚样式 */
footer {
    background: #f8f9fa;
    padding: 40px 20px;
    margin-top: 50px;
    text-align: center;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: left;
}

footer h3 {
    color: #333;
    margin-bottom: 15px;
}

footer p, footer a {
    color: #666;
    margin: 5px 0;
}

footer a:hover {
    color: #007aff;
}

footer ul {
    list-style: none;
    padding: 0;
}

footer .social-links {
    display: flex;
    gap: 15px;
}

footer .copyright {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    color: #999;
}

/* 响应式样式 */
@media (max-width: 992px) {
    .swiper {
        height: 300px;
    }
    
    .content-grid, .party-members-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .swiper {
        height: 300px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 15px;
        margin-top: 20px;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .swiper {
        height: 200px;
    }
    
    .content-grid, .party-members-container {
        grid-template-columns: 1fr;
    }
    
    .member-card img {
        width: 120px;
        height: 120px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .detail-item {
        flex-direction: column;
    }
}

/* 表单样式 */
.form-container {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

input[type="text"],
input[type="tel"],
input[type="email"],
input[type="url"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    transition: border-color 0.3s;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #007aff;
    outline: none;
}

button {
    padding: 10px 16px;
    margin-right: 8px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary {
    background-color: #007aff;
    color: white;
}

.btn-primary:hover {
    background-color: #0056b3;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.btn-warning {
    background-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #e0a800;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #c82333;
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
    background-color: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
}

tr:hover {
    background-color: #f5f5f5;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}
