/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部样式 */
header {
    background-color: #e74c3c;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: #fff;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #2c3e50;
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.menu-toggle span {
    height: 3px;
    width: 25px;
    background-color: #fff;
    margin: 3px 0;
    transition: 0.3s ease;
}

/* 轮播图样式 */
.slider {
    width: 100%;
    height: 500px;
    overflow: hidden;
    position: relative;
}

.slider img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 主要内容样式 */
main {
    padding: 40px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 2rem;
    color: #e74c3c;
}

/* 关于我们样式 */
.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.about-text {
    flex: 1;
    min-width: 250px;
}

.about-image {
    flex: 1;
    min-width: 250px;
    max-width: 400px;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    max-height: 300px;
    object-fit: cover;
}

/* 调整关于我们的section-title样式 */
.about-section .section-title {
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.about-text h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.about-text p {
    margin-bottom: 20px;
    font-size: 0.9rem;
    line-height: 1.6;
}

.about-text .btn {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* 产品列表样式 */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.product-item {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.product-item img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
}

.product-item h3 {
    margin-bottom: 10px;
    color: #e74c3c;
}

/* 新闻列表样式 */
.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.news-item {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.news-item img,
.support-item img {
    width: 100%;
    height: 200px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.news-item h3 {
    margin-bottom: 10px;
    color: #e74c3c;
}

.news-meta {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin-bottom: 15px;
}

/* 联系我们样式 */
.contact-container {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.contact-form {
    flex: 1;
    min-width: 300px;
}

.contact-item {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.contact-item i {
    margin-right: 15px;
    color: #e74c3c;
    font-size: 1.2rem;
}

/* 表单样式 */
form {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #e74c3c;
}

.btn {
    display: inline-block;
    background-color: #e74c3c;
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    text-decoration: none;
}

.btn:hover {
    background-color: #c0392b;
}

/* 页脚样式 */
footer {
    background-color: #2c3e50;
    color: #fff;
    padding: 40px 0;
    margin-top: 40px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.footer-section h3 {
    margin-bottom: 20px;
    color: #e74c3c;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #e74c3c;
}

.footer-bottom {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #34495e;
    font-size: 0.9rem;
}

/* 技术支持样式 */
.support-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.support-item {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 后端管理样式 */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background-color: #2c3e50;
    color: #fff;
    padding: 20px 0;
}

.admin-sidebar h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #e74c3c;
}

.admin-sidebar ul {
    list-style: none;
}

.admin-sidebar ul li {
    margin-bottom: 10px;
}

.admin-sidebar ul li a {
    display: block;
    padding: 12px 20px;
    color: #fff;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.admin-sidebar ul li a:hover,
.admin-sidebar ul li a.active {
    background-color: #e74c3c;
}

.admin-main {
    flex: 1;
    padding: 30px;
    background-color: #f4f4f4;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.data-table th,
.data-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background-color: #e74c3c;
    color: #fff;
    font-weight: 500;
}

.data-table tr:hover {
    background-color: #f5f5f5;
}

/* 响应式设计 */
@media (max-width: 768px) {
    /* 移动端导航 */
.nav-links {
    position: fixed;
    right: -100%;
    top: 70px;
    flex-direction: column;
    background-color: #e74c3c;
    width: 100%;
    text-align: center;
    transition: 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.nav-links.active {
    right: 0;
}

.nav-links li {
    margin: 15px 0;
}

.menu-toggle {
    display: flex;
}

/* 移动端轮播图 */
.slider {
    height: 300px;
}
    
    /* 移动端表单 */
    form {
        padding: 20px;
    }
    
    /* 后端管理响应式 */
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        padding: 10px 0;
    }
    
    .admin-sidebar ul {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .admin-sidebar ul li {
        margin: 0 5px;
    }
    
    .admin-sidebar ul li a {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
    }
    
    main {
        padding: 20px 0;
    }
    
    .product-grid,
    .news-grid,
    .support-grid {
        grid-template-columns: 1fr;
    }
}