/* ========== 初然科技 前台样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

body {
    color: #222;
    background: #f9fafb;
    line-height: 1.5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

img {
    max-width: 100%;
    vertical-align: middle;
}

/* Hero区域 */
.hero {
    background: linear-gradient(135deg, #0066cc, #0099ff);
    color: #fff;
    padding: 80px 0;
    text-align: center;
    background-size: cover;
    background-position: center;
}

.hero h1 {
    font-size: 42px;
    margin-bottom: 16px;
    font-weight: 700;
}

.hero p {
    font-size: 18px;
    max-width: 700px;
    margin: 0 auto 28px;
    opacity: 0.95;
}

.btn {
    display: inline-block;
    background: #fff;
    color: #0066cc;
    padding: 14px 38px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* 轮播图 */
.slider {
    padding: 40px 0 0;
}

.slider-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.slides {
    display: flex;
    transition: transform 0.5s ease;
}

.slide {
    min-width: 100%;
}

.slide img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.prev,
.next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    padding: 12px 18px;
    cursor: pointer;
    border-radius: 50%;
    font-size: 20px;
    transition: 0.2s;
}

.prev { left: 15px; }
.next { right: 15px; }

.prev:hover, .next:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* 通用区块 */
.section {
    padding: 70px 0;
}

.section:nth-child(even) {
    background: #f8fafc;
}

.title {
    text-align: center;
    font-size: 34px;
    margin-bottom: 14px;
    font-weight: 700;
}

.desc {
    text-align: center;
    color: #666;
    margin-bottom: 45px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-size: 16px;
}

/* 产品网格 */
.products-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.product-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.3s;
}

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

.product-card img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.product-card h3 {
    font-size: 20px;
    padding: 18px 18px 8px;
}

.product-card p {
    padding: 0 18px 12px;
    color: #666;
    line-height: 1.5;
}

.product-price {
    color: #e53935;
    font-weight: 700;
    font-size: 20px;
    padding: 0 18px 20px;
}

/* 服务网格 */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
}

.service-card {
    background: #fff;
    padding: 30px 20px;
    border-radius: 20px;
    text-align: center;
    transition: 0.3s;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.service-icon {
    font-size: 44px;
    margin-bottom: 18px;
}

.service-card h4 {
    font-size: 19px;
    margin-bottom: 10px;
}

.service-card p {
    color: #666;
    font-size: 14px;
}

/* 品牌和故障标签 */
.brand-tag {
    text-align: center;
    margin: 0 auto 20px auto;
}

.brand-tag-inner {
    display: inline-block;
    background: #e8f0fe;
    padding: 8px 28px;
    border-radius: 40px;
    font-size: 14px;
    color: #0066cc;
}

.fault-tag {
    text-align: center;
    margin: 0 auto 40px auto;
}

.fault-tag-inner {
    display: inline-block;
    background: #fff3e0;
    padding: 8px 28px;
    border-radius: 40px;
    font-size: 14px;
    color: #e67e22;
}

/* 步骤 */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

.step-item {
    background: #fff;
    padding: 25px 15px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.step-num {
    width: 38px;
    height: 38px;
    background: #0066cc;
    color: #fff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 14px;
    font-weight: 700;
    font-size: 16px;
}

.step-item h4 {
    font-size: 16px;
}

/* 关于 */
.about-box {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    line-height: 1.8;
    font-size: 16px;
    color: #444;
}

/* 联系 */
.contact-bar {
    background: #0066cc;
    color: #fff;
    text-align: center;
    padding: 60px 0;
}

.contact-bar h2 {
    font-size: 32px;
    margin-bottom: 10px;
}

.contact-phone {
    font-size: 30px;
    font-weight: 700;
    margin: 18px 0;
    letter-spacing: 1px;
}

.contact-details {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.contact-details div {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
}

/* 底部 */
.footer {
    background: #0f172a;
    color: #94a3b8;
    text-align: center;
    padding: 35px 0;
    position: relative;
}

.footer p {
    margin: 5px 0;
}

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

.footer a:hover {
    color: #fff;
}

/* 后台入口隐藏 */
.copyright-icon {
    font-size: 14px;
    margin-right: 4px;
    opacity: 0.4;
    transition: opacity 0.2s;
    display: inline-block;
    cursor: pointer;
}

.admin-entry {
    text-decoration: none;
}

.copyright-icon:hover {
    opacity: 0.8;
}

/* 响应式 */
@media (max-width: 900px) {
    .products-grid, .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    .hero h1 {
        font-size: 32px;
    }
    .slide img, .product-card img {
        aspect-ratio: 4 / 3;
    }
}

@media (max-width: 600px) {
    .products-grid, .services-grid, .steps-grid {
        grid-template-columns: 1fr;
    }
    .hero {
        padding: 50px 0;
    }
    .hero h1 {
        font-size: 26px;
    }
    .contact-phone {
        font-size: 22px;
    }
    .section {
        padding: 45px 0;
    }
    .title {
        font-size: 26px;
    }
    .container {
        padding: 0 15px;
    }
    .brand-tag-inner, .fault-tag-inner {
        padding: 6px 16px;
        font-size: 12px;
        display: block;
        text-align: center;
    }
    .contact-details {
        gap: 15px;
        flex-direction: column;
        align-items: center;
    }
    .prev, .next {
        padding: 8px 12px;
        font-size: 16px;
    }
}