/* 木语文化 - 企业官网样式 */

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background: #fff;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    height: auto;
}

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

/* 按钮 */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background: #8B4513;
    color: #fff;
    border-radius: 4px;
    transition: all 0.3s;
}

.btn:hover {
    background: #6b3410;
}

.btn-outline {
    background: transparent;
    border: 2px solid #8B4513;
    color: #8B4513;
}

.btn-outline:hover {
    background: #8B4513;
    color: #fff;
}

/* 顶部导航 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255,255,255,0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    color: #8B4513;
}

.logo img {
    height: 40px;
    margin-right: 10px;
}

.nav {
    display: flex;
    gap: 40px;
}

.nav a {
    font-size: 16px;
    color: #333;
    transition: color 0.3s;
    position: relative;
}

.nav a:hover,
.nav a.active {
    color: #8B4513;
}

.nav a.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: #8B4513;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    background: none;
    border: none;
    cursor: pointer;
}

/* 轮播图 */
.banner {
    height: 600px;
    margin-top: 80px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 15px 30px -5px rgba(0,0,0,0.4);
}

.page-banner {
    box-shadow: 0 10px 25px -3px rgba(0,0,0,0.5);
}

.banner-slider {
    width: 100%;
    height: 100%;
    position: relative;
}

.banner-item {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s;
}

.banner-item.active {
    opacity: 1;
}

.banner-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.1);
}

.banner-content {
    position: relative;
    text-align: center;
    color: #fff;
    z-index: 1;
}

.banner-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    letter-spacing: 5px;
}

.banner-content p {
    font-size: 20px;
    letter-spacing: 3px;
}

/* 首页轮播图内容定位支持 */
.banner-item .banner-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 40px;
    box-sizing: border-box;
}

/* 位置类 - 用于JS动态设置 */
.banner-item .banner-content.pos-center {
    align-items: center;
    justify-content: center;
    text-align: center;
}

.banner-item .banner-content.pos-left {
    align-items: flex-start;
    justify-content: center;
    text-align: left;
}

.banner-item .banner-content.pos-right {
    align-items: flex-end;
    justify-content: center;
    text-align: right;
}

.banner-item .banner-content.pos-top-left {
    align-items: flex-start;
    justify-content: flex-start;
    text-align: left;
}

.banner-item .banner-content.pos-top-center {
    align-items: center;
    justify-content: flex-start;
    text-align: center;
}

.banner-item .banner-content.pos-top-right {
    align-items: flex-end;
    justify-content: flex-start;
    text-align: right;
}

.banner-item .banner-content.pos-bottom-left {
    align-items: flex-start;
    justify-content: flex-end;
    text-align: left;
}

.banner-item .banner-content.pos-bottom-center {
    align-items: center;
    justify-content: flex-end;
    text-align: center;
}

.banner-item .banner-content.pos-bottom-right {
    align-items: flex-end;
    justify-content: flex-end;
    text-align: right;
}

/* 轮播指示器 */
.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 10;
}

.banner-dot, .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    cursor: pointer;
    transition: all 0.3s;
    border: none;
}

.banner-dot.active, .dot.active {
    background: #fff;
}

.banner-dot:hover, .dot:hover {
    background: rgba(255,255,255,0.8);
}

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

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 36px;
    color: #333;
    margin-bottom: 10px;
}

.section-title p {
    font-size: 14px;
    color: #999;
    letter-spacing: 3px;
}

/* 关于我们 */
.about {
    background: #f9f9f9;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h3 {
    font-size: 28px;
    color: #8B4513;
    margin-bottom: 20px;
}

.about-text p {
    margin-bottom: 20px;
    color: #666;
    line-height: 1.8;
}

.about-image {
    min-height: 400px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-radius: 8px;
}

/* 产品展示 */
.products {
    background: #fff;
}

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

.product-item {
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border-radius: 8px;
    padding: 15px;
}

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

/* 分类卡片悬停效果 */
.category-card {
    cursor: pointer;
    background: #fff;
    border: 1px solid #eee;
}

.category-card:hover {
    box-shadow: 0 20px 50px rgba(0,0,0,0.2);
    border-color: #8B4513;
}

.product-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 15px;
}

.product-item h3 {
    font-size: 18px;
    color: #333;
}

/* 新闻中心 */
.news {
    background: #f9f9f9;
}

.news-list {
    max-width: 800px;
    margin: 0 auto;
}

.news-item {
    display: flex;
    gap: 30px;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: box-shadow 0.3s;
    justify-content: space-between;
}

.news-item:hover {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.news-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    padding: 15px;
    background: #8B4513;
    color: #fff;
    border-radius: 4px;
}

.news-date .day {
    font-size: 32px;
    font-weight: bold;
    line-height: 1;
}

.news-date .month {
    font-size: 14px;
    margin-top: 5px;
}

.news-content {
    flex: 1;
}

.news-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.news-content h3 a:hover {
    color: #8B4513;
}

.news-content p {
    color: #666;
    line-height: 1.6;
}

.news-image {
    flex-shrink: 0;
    width: 200px;
    height: 150px;
    overflow: hidden;
    border-radius: 8px;
}

.news-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-meta {
    margin-bottom: 10px;
}

.news-date-text {
    color: #999;
    font-size: 14px;
}

.text-center {
    text-align: center;
    margin-top: 40px;
}

/* 页脚 */
.footer {
    background: #333;
    color: #fff;
    padding: 60px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 60px;
    margin-bottom: 40px;
}

.footer-info h3 {
    font-size: 24px;
    margin-bottom: 20px;
}

.footer-info p {
    margin-bottom: 10px;
    color: #ccc;
}

.footer-nav h4 {
    font-size: 18px;
    margin-bottom: 20px;
}

.footer-nav a {
    display: block;
    margin-bottom: 10px;
    color: #ccc;
    transition: color 0.3s;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #444;
    color: #999;
}

/* 响应式 */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    }
    
    .nav.active {
        display: flex;
    }
    
    .menu-toggle {
        display: block;
    }
    
    .banner {
        height: 400px;
    }
    
    .banner-content h2 {
        font-size: 32px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
}
