/* 前端页面专用样式 */

/* 全局布局 */
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-content {
    flex: 1;
}

/* 容器宽度 */
.container {
    max-width: 1400px !important;
    margin: 0 auto;
    padding: 0 20px;
}

/* 新闻分类按钮 */
.news-categories {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

/* 产品分类按钮 */
.product-categories {
    display: flex;
    gap: 10px;
    margin: 20px 0;
}

/* 统一分类按钮样式 */
.category-btn {
    padding: 8px 20px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.category-btn:hover,
.category-btn.active {
    background: #199003;
    color: #fff;
    border-color: #199003;
}

/* 新闻列表 */
.news-list {
    margin-top: 30px;
}

.news-item {
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-item:last-child {
    border-bottom: none;
}

.news-item h3 {
    margin: 0;
    font-size: 18px;
    flex: 1;
}

.news-item h3 a {
    color: #333;
    text-decoration: none;
}

.news-item h3 a:hover {
    color: #199003;
}

.news-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #999;
}

.news-meta .category {
    color: #199003;
    display: none;
}

.news-meta .date {
    white-space: nowrap;
}

.news-desc {
    display: none;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin: 40px 0;
}

.page-btn {
    padding: 8px 15px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
}

.page-btn:hover,
.page-btn.active {
    background: #199003;
    color: #fff;
    border-color: #199003;
}

/* 产品网格布局 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

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

.product-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

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

.product-name {
    padding: 15px;
    margin: 0;
    font-size: 16px;
    color: #333;
}

.product-desc {
    padding: 0 15px 15px;
    margin: 0;
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    display: none;
}

/* 首页板块间距 */
.home-section {
    padding: 20px 0;
}

/* 首页两列布局 */
.two-column {
    display: flex;
    gap: 40px;
    margin: 20px 0;
}

.two-column .column {
    flex: 1;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #199003;
    padding-bottom: 10px;
}

.section-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.more-link {
    color: #199003;
    text-decoration: none;
    font-size: 14px;
}

.more-link:hover {
    text-decoration: underline;
}

/* 关于我们简介 */
.about-brief {
    line-height: 1.8;
    color: #666;
    max-height: 300px;
    overflow: hidden;
    position: relative;
}

.about-brief::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
    pointer-events: none;
}

.about-brief p {
    text-indent: 2em;
    margin: 0 0 10px 0;
}

/* 新闻列表 */
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
    height: 300px;
    overflow: hidden;
}

.news-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px dashed #ddd;
}

.news-list li:last-child {
    border-bottom: none;
}

.news-list a {
    flex: 1;
    color: #333;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.news-list a:hover {
    color: #199003;
}

.news-list .date {
    color: #999;
    font-size: 14px;
    margin-left: 10px;
}

/* 产品展示区 */
.products-section {
    background: #f5f5f5;
    padding: 40px 0;
}

.section-title {
    text-align: center;
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.product-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

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

.product-item h3 {
    padding: 15px;
    margin: 0;
    font-size: 16px;
    text-align: center;
    color: #333;
}

.product-item a {
    text-decoration: none;
    color: inherit;
}

/* 响应式 */
@media (max-width: 1200px) {
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .two-column {
        flex-direction: column;
        gap: 30px;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .products-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1440px) {
    .container {
        max-width: 100% !important;
    }
}

/* Logo样式 */
.logo img {
    height: 50px !important;
    width: auto;
}

/* 头部布局 */
.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 导航样式 */
.nav ul {
    display: flex;
    gap: 10px;
    align-items: center;
    list-style: none;
    margin: 0;
}

.nav a {
    font-size: 20px !important;
    font-weight: bold !important;
    color: #333;
    transition: all 0.3s;
    display: block;
    padding: 8px 15px;
    border-radius: 4px;
}

.nav a:hover {
    background-color: #199003;
    color: #fff !important;
}

.nav a.active {
    background-color: #199003;
    color: #fff !important;
}

/* 搜索框 */
.search-box {
    position: relative;
    margin-left: 10px;
}

.search-box input {
    padding: 8px 35px 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    width: 150px;
    font-size: 14px;
    transition: all 0.3s;
}

.search-box input:focus {
    outline: none;
    border-color: #199003;
    width: 220px;
}

.search-box button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 5px 10px;
    font-size: 16px;
}

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

/* 页脚贴底 */
.footer {
    margin-top: auto;
    background-color: #f2f2f2 !important;
    padding: 10px 0 !important;
    color: #333 !important;
}

.footer * {
    color: #333 !important;
}

.footer-links {
    margin-bottom: 5px !important;
    justify-content: flex-start !important;
    gap: 20px !important;
}

.footer-bottom {
    padding-top: 5px !important;
}

.footer-links a,
.footer-bottom,
.footer-bottom a,
.footer-bottom p,
.footer p,
.footer span,
.footer div {
    color: #333 !important;
}

.footer-links a:hover,
.footer-bottom a:hover {
    color: #fff !important;
}

/* 右侧间距 */
.footer-right {
    gap: 10px !important;
}

/* 首页关于我们和最新动态区块标题样式 */
section.intro-section h2.section-title,
section.news-section h2.section-title,
.intro-section h2.section-title,
.news-section h2.section-title,
.intro-section > h2,
.news-section > h2,
.intro-section .block-title,
.news-section .block-title {
    font-size: 18px !important;
    font-weight: normal !important;
    color: #000 !important;
    border: none !important;
    border-bottom: none !important;
    padding-bottom: 10px !important;
    margin-bottom: 15px !important;
    margin-top: 2px !important;
}

.intro-section h2::after,
.news-section h2::after,
section.intro-section h2::after,
section.news-section h2::after {
    display: none !important;
}

/* 查看详情/查看更多链接样式 */
.intro-section a[href*="about"],
.news-section a[href*="news"],
.block-title a {
    font-weight: normal !important;
    color: #000 !important;
    text-decoration: none;
}

.intro-section a[href*="about"]:hover,
.news-section a[href*="news"]:hover,
.block-title a:hover {
    color: #199003 !important;
}

/* 最新动态列表样式 */
.news-list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.news-list li {
    margin-bottom: 12px;
    line-height: 1.8;
}

.news-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #000 !important;
    font-size: 14px;
    transition: color 0.3s;
    text-decoration: none;
}

.news-list li a:hover {
    color: #199003 !important;
}

.news-list .news-title {
    flex: 1;
    color: #000;
}

.news-list .news-date {
    color: #999;
    white-space: nowrap;
    margin-left: 15px;
}

/* 隐藏新闻日期和描述 */
.news-list span,
.news-list p {
    display: inline !important;
}

/* 关于我们和最新动态区块高度一致 */
.intro-section,
.news-section {
    min-height: 350px;
}

.intro-section > div,
.intro-section > p {
    max-height: 400px;
    overflow: hidden;
}

/* 分割线颜色 */
.section-title {
    border-bottom-color: #A6A6A6 !important;
}

.section-title::after {
    border-bottom-color: #A6A6A6 !important;
}

.intro-section,
.products-section,
.news-section {
    border-top-color: #A6A6A6 !important;
    border-bottom-color: #A6A6A6 !important;
}

h1, h2, h3, h4 {
    border-bottom-color: #A6A6A6 !important;
}

hr {
    border-color: #A6A6A6 !important;
    background-color: #A6A6A6 !important;
}

/* 所有边框线统一为灰色 */
.header {
    border-bottom: 1px solid #A6A6A6 !important;
}

.footer {
    border-top: 1px solid #A6A6A6 !important;
}

/* ============================== */
/* 错误页面样式 - 404 和 500 页面 */
/* ============================== */

.error-page {
    padding: 80px 0;
    text-align: center;
    background: #f8f9fa;
    min-height: 60vh;
    display: flex;
    align-items: center;
}

.error-content {
    max-width: 600px;
    margin: 0 auto;
}

.error-code {
    font-size: 120px;
    font-weight: bold;
    color: #e74c3c;
    line-height: 1;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
}

.error-title {
    font-size: 32px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
}

.error-message {
    font-size: 18px;
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.error-description {
    font-size: 16px;
    color: #888;
    margin-bottom: 40px;
    line-height: 1.6;
}

.error-actions {
    margin-bottom: 40px;
}

.error-btn {
    display: inline-block;
    padding: 12px 30px;
    margin: 0 8px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid;
}

.error-btn-primary {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.error-btn-primary:hover {
    background: #2980b9;
    border-color: #2980b9;
    color: white;
}

.error-btn-secondary {
    background: #27ae60;
    color: white;
    border-color: #27ae60;
}

.error-btn-secondary:hover {
    background: #219a52;
    border-color: #219a52;
    color: white;
}

.error-btn-outline {
    background: transparent;
    color: #e74c3c;
    border-color: #e74c3c;
}

.error-btn-outline:hover {
    background: #e74c3c;
    color: white;
}

.error-suggestions {
    border-top: 1px solid #eee;
    padding-top: 30px;
    margin-top: 30px;
}

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

.error-suggestions ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.error-suggestions li {
    display: inline-block;
    margin: 0 15px;
}

.error-suggestions a {
    color: #3498db;
    text-decoration: none;
    font-size: 16px;
}

.error-suggestions a:hover {
    text-decoration: underline;
}

.error-contact {
    border-top: 1px solid #eee;
    padding-top: 30px;
    margin-top: 30px;
}

.error-contact p {
    color: #666;
    margin-bottom: 15px;
}

.contact-info {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: inline-block;
}

.contact-info p {
    margin: 10px 0;
    font-size: 16px;
}

.contact-info a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* 错误页面响应式设计 */
@media (max-width: 768px) {
    .error-code {
        font-size: 80px;
    }
    
    .error-title {
        font-size: 24px;
    }
    
    .error-actions .error-btn {
        display: block;
        margin: 10px auto;
        width: 200px;
    }
    
    .error-suggestions li {
        display: block;
        margin: 8px 0;
    }
    
    .contact-info {
        padding: 15px;
    }
}

/* ============================== */
/* Sitemap 网站地图样式 */
/* ============================== */

.sitemap-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    margin: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.sitemap-section {
    margin-bottom: 40px;
}

.sitemap-section:last-child {
    margin-bottom: 0;
}

.sitemap-section h2 {
    color: #199003;
    border-bottom: 2px solid #199003;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 22px;
    font-weight: 600;
}

.sitemap-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 12px;
}

.sitemap-list li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}

.sitemap-list li:last-child {
    border-bottom: none;
}

.sitemap-list a {
    color: #333;
    text-decoration: none;
    transition: all 0.3s;
    display: block;
    padding: 5px 0;
    font-size: 15px;
}

.sitemap-list a:hover {
    color: #199003;
    padding-left: 10px;
    background-color: #f9f9f9;
    border-radius: 4px;
}

.sitemap-count {
    color: #666;
    font-size: 14px;
    margin-left: 10px;
    background: #f0f0f0;
    padding: 2px 8px;
    border-radius: 12px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sitemap-list {
        grid-template-columns: 1fr;
    }
    
    .sitemap-content {
        padding: 20px;
        margin: 10px 0;
    }
    
    .sitemap-section h2 {
        font-size: 20px;
    }
}

/* 空状态提示 */
.sitemap-empty {
    text-align: center;
    color: #666;
    padding: 40px 20px;
    font-style: italic;
}

.sitemap-empty p {
    margin: 0;
    font-size: 16px;
}