/**
 * 深圳市八爪鱼绿色环保科技有限公司门户网站样式
 * 仿小米风格设计
 */

/* 重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

/* 清除浮动 */
.clearfix:after {
    content: "";
    display: table;
    clear: both;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 头部导航 */
.header {
    background: #fff;
    border-bottom: 1px solid #e6e6e6;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: #2ECC71;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.logo:hover {
    color: #27AE60;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu li a {
    color: #333;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.nav-menu li a:hover,
.nav-menu li a.active {
    color: #2ECC71;
    text-decoration: none;
}

/* 轮播图 */
.hero-banner {
    position: relative;
    height: 885px;
    overflow: hidden;
    background: linear-gradient(135deg, #2ECC71, #27AE60);
}

.banner-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
}

.banner-slide.active {
    display: flex;
}

.banner-content h1 {
    font-size: 48px;
    font-weight: 300;
    margin-bottom: 20px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.banner-content p {
    font-size: 20px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    background: #fff;
    color: #2ECC71;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: #f8f8f8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    text-decoration: none;
    color: #27AE60;
}

.btn-primary {
    background: #2ECC71;
    color: white;
}

.btn-primary:hover {
    background: #27AE60;
    color: white;
}

/* 产品展示 */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 36px;
    font-weight: 300;
    color: #333;
    margin-bottom: 15px;
}

.section-title p {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.product-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    text-decoration: none;
    color: inherit;
}

.product-image {
    width: 100%;
    height: 200px;
    background: #f8f8f8;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-info {
    padding: 25px;
}

.product-info h3 {
    font-size: 20px;
    font-weight: 500;
    margin-bottom: 10px;
    color: #333;
}

.product-info p {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* 新闻资讯 */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.news-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.news-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    text-decoration: none;
    color: inherit;
}

.news-image {
    width: 100%;
    height: 180px;
    background: #f8f8f8;
    overflow: hidden;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-info {
    padding: 20px;
}

.news-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.news-info h3 {
    font-size: 16px;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-summary {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* 页脚 */
.footer {
    background: #2c3e50;
    color: white;
    padding: 60px 0 30px;
    margin-top: 80px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 18px;
    margin-bottom: 20px;
    color: #2ECC71;
}

.footer-section p,
.footer-section li {
    color: #bdc3c7;
    line-height: 1.8;
    margin-bottom: 8px;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #2ECC71;
    text-decoration: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .header-nav {
        flex-direction: column;
        height: auto;
        padding: 20px 0;
    }
    
    .nav-menu {
        gap: 15px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .banner-content h1 {
        font-size: 32px;
    }
    
    .banner-content p {
        font-size: 16px;
    }
    
    .section {
        padding: 50px 0;
    }
    
    .section-title h2 {
        font-size: 28px;
    }
    
    .product-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
}

/* 加载动画 */
.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.2s ease; /* 缩短过渡时间 */
}

.loading {
    text-align: center;
    padding: 20px; /* 减少padding */
    color: #999;
}

.loading:after {
    content: "";
    display: inline-block;
    width: 30px; /* 缩小尺寸 */
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2ECC71;
    border-radius: 50%;
    animation: spin 0.8s linear infinite; /* 加快旋转速度 */
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 面包屑导航 */
.breadcrumb {
    background: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #e6e6e6;
}

.breadcrumb-nav {
    font-size: 14px;
    color: #666;
}

.breadcrumb-nav a {
    color: #2ECC71;
    text-decoration: none;
}

.breadcrumb-nav a:hover {
    text-decoration: underline;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    gap: 10px;
}

.pagination a,
.pagination span {
    padding: 8px 16px;
    text-decoration: none;
    border: 1px solid #ddd;
    color: #333;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.pagination a:hover {
    background: #2ECC71;
    color: white;
    text-decoration: none;
}

.pagination .current {
    background: #2ECC71;
    color: white;
    border-color: #2ECC71;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 15px;
}

.close:hover {
    color: #333;
}