/* 首页布局样式 */

/* 重置main容器样式 */
main {
    width: 100%;
    overflow: hidden;
}

main > .container {
    padding: 0;
    width: 100%;
    max-width: none;
}

/* 轮播图部分 */
.hero {
    width: 100%;
    margin-bottom: 2rem;
}

/* 页面区块 */
.section {
    padding: 4rem 1rem;
    text-align: center;
    width: 100%;
    max-width: 1140px;
    margin: 0 auto;
    box-sizing: border-box;
}

/* 产品中心特殊间距 */
.section:nth-of-type(2) {  /* 第二个section是产品中心 */
    padding-top: 6rem;
    padding-bottom: 4rem;
}

/* 网格布局 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem auto;
    max-width: 1140px;
    padding: 0;
}

/* 卡片样式优化 */
.card {
    background: var(--bg-card, #fff);
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s, box-shadow 0.3s;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* 产品介绍区域 */
.section-intro {
    text-align: center;
    margin-bottom: 2rem;
}

.intro-text {
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 1.5rem;
}

.intro-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: var(--accent);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s;
}

.intro-btn:hover {
    background-color: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 新闻列表样式 */
.news-list {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    flex-direction: column;
    margin-bottom: 2rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.news-image {
    width: 100%;
    max-height: 300px;
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #f5f5f5;
}

.news-image img {
    width: auto;
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

.news-content {
    padding: 1.5rem;
}

.news-title {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: #333;
}

.news-meta {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.news-excerpt {
    color: #444;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* 公司简介卡片 - 优化排版 */
.intro-card {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    text-align: left;
    line-height: 1.8;
    font-size: 1.1rem;
    color: #444;
}

.intro-card p {
    margin-bottom: 1.2rem;
    text-indent: 2em; /* 首行缩进 */
}

/* 响应式调整 */
@media (max-width: 768px) {
    .intro-card {
        padding: 1.5rem;
        font-size: 1rem;
    }
    
    .intro-card p {
        text-indent: 1.5em;
    }
}

/* 公司简介专业排版 */
section.section .intro-card {
    max-width: 780px;
    margin: 0 auto;
    padding: 2.8rem 3rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    font-family: "Source Han Serif CN", "Noto Serif SC", serif;
    line-height: 1.9;
    font-size: 1.15rem;
    color: #333;
    text-align: justify;
}

section.section .intro-card p {
    text-indent: 2.2em;
    margin-bottom: 1.5rem;
    letter-spacing: 0.05em;
    word-spacing: 0.1em;
}

section.section .intro-card p:first-child {
    margin-top: 0.5rem;
}

section.section .intro-card p:last-child {
    margin-bottom: 0;
}

/* 段落视觉分隔 */
section.section .intro-card p:not(:last-child)::after {
    content: "";
    display: block;
    height: 0.8em;
}

/* 响应式优化 */
@media (max-width: 900px) {
    section.section .intro-card {
        padding: 2.2rem 2.5rem;
        font-size: 1.1rem;
    }
}

@media (max-width: 768px) {
    section.section .intro-card {
        padding: 2rem;
        font-size: 1.05rem;
        line-height: 1.85;
    }
    
    section.section .intro-card p {
        text-indent: 2em;
    }
}

@media (max-width: 480px) {
    section.section .intro-card {
        padding: 1.8rem;
        font-size: 1rem;
        line-height: 1.8;
    }
    
    section.section .intro-card p {
        text-indent: 1.8em;
    }
}

.company-logo {
    max-height: 80px;
    margin-bottom: 1rem;
}

.company-meta {
    margin: 1rem 0;
    color: #666;
}

.company-meta span {
    margin: 0 1rem;
}

.company-scope {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

/* 产品卡片 */
.product-card {
    max-width: 350px;
    margin: 0 auto;
    width: 100%;
}

.product-card .img-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.product-card img {
    width: 100%;
    height: 100%;
    object-fit: fill;
    transition: transform 0.3s;
}

/* 新闻卡片 */
.news-card {
    max-width: 350px;
    margin: 0 auto;
    width: 100%;
}

/* 卡片内容区域 */
.card-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 响应式调整 */
@media (max-width: 1200px) {
    .section {
        max-width: 960px;
    }
}

@media (max-width: 992px) {
    .section {
        max-width: 720px;
    }
}

@media (max-width: 768px) {
    .section {
        max-width: 540px;
        padding: 3rem 1rem;
    }
    
    .grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 576px) {
    .section {
        padding: 2rem 1rem;
    }
    
    .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* 区块标题 */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 2rem;
    text-align: center;
}

.section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background: var(--accent);
    margin: 1rem auto;
    border-radius: 2px;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 2rem;
    margin: 1rem;
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

/* 公司简介卡片 */
.intro-card {
    max-width: 800px;
    margin: 0 auto;
}

/* 产品和新闻卡片 */
.product-card, .news-card {
    max-width: 350px;
    margin: 1rem auto;
}

.product-card img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* 网格布局 */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    padding: 0 1rem;
    justify-items: center;
    align-items: start;
}

/* 确保卡片宽度一致 */
.grid .card {
    width: 100%;
    max-width: 350px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 产品卡片图片容器 */
.product-card .img-container {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* 产品卡片图片 */
.product-card img {
    width: 100%;
    height: 100%;
    object-fit: fill; /* 允许图片变形 */
    transition: transform 0.3s ease;
}

/* 卡片内容布局 */
.card-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 1rem;
}

/* 卡片标题 */
.card h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--dark);
}

/* 卡片描述文本 */
.card p {
    color: var(--text);
    line-height: 1.6;
    margin-bottom: 1rem;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    background: var(--accent);
    color: white;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    margin-top: 1rem;
    transition: all 0.3s;
}

.btn:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* 日期样式 */
.text-muted {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0.5rem 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .section {
        padding: 2rem 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .card {
        margin: 0.5rem;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 1.5rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}