/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* 导航栏样式 */
.navbar {
    background: #2c5530;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-logo h2 {
    color: #fff;
    font-size: 1.8rem;
    font-weight: bold;
}

.nav-menu {
    display: flex;
    list-style: none;
}

.nav-item {
    margin-left: 2rem;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s;
}

.nav-link:hover {
    color: #90c695;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 3px 0;
    transition: 0.3s;
}

/* 首页英雄区域 */
.hero {
    margin-top: 70px;
    min-height: 80vh;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 背景轮播图 */
.hero-carousel {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-carousel-slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.hero-slide.active {
    opacity: 1;
}

.hero-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.6) blur(0.5px); /* 让背景更柔和，突出文字 */
}

/* 前景内容 */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: #fff;
    padding: 0 20px;
    max-width: 800px;
}

.hero-text {
    background: rgba(0, 0, 0, 0.3); /* 半透明背景增强可读性 */
    padding: 3rem;
    border-radius: 15px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    color: #fff;
}

.hero p {
    font-size: 1.4rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    color: rgba(255, 255, 255, 0.9);
}

.cta-button {
    background: linear-gradient(135deg, #2c5530, #90c695);
    color: #fff;
    padding: 18px 36px;
    border: none;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(44, 85, 48, 0.3);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(44, 85, 48, 0.4);
    background: linear-gradient(135deg, #1a3d1f, #7bb97f);
}

/* 轮播指示器 */
.hero-carousel-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 10;
}

.hero-indicator {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.6);
}

.hero-indicator.active {
    background: #fff;
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.8);
}

.hero-indicator:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

/* 公司介绍区域 */
.company-intro {
    padding: 80px 0;
    background: #fff;
}

.company-intro h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #2c5530;
    margin-bottom: 3rem;
}

.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.intro-text h3 {
    font-size: 1.8rem;
    color: #2c5530;
    margin-bottom: 1rem;
}

.intro-text p {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 1.5rem;
    line-height: 1.8;
}

.features {
    list-style: none;
    margin-top: 2rem;
}

.features li {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 0.5rem;
    padding-left: 1rem;
}

.intro-image img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* 公司介绍轮播图 */
.intro-carousel {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.intro-carousel-container {
    position: relative;
}

.intro-carousel-slides {
    position: relative;
    width: 100%;
    height: 350px;
}

.intro-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}

.intro-slide.active {
    opacity: 1;
}

.intro-slide img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

.slide-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: #fff;
    padding: 20px;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
}

/* 公司介绍轮播按钮 */
.intro-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(44, 85, 48, 0.8);
    color: #fff;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.intro-carousel-btn:hover {
    background: #2c5530;
    transform: translateY(-50%) scale(1.1);
}

.intro-prev-btn {
    left: 15px;
}

.intro-next-btn {
    right: 15px;
}

/* 公司介绍轮播指示器 */
.intro-carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
}

.intro-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.intro-indicator.active {
    background: #fff;
    transform: scale(1.2);
}

.intro-indicator:hover {
    background: #fff;
}

/* 产品展示区域 */
.products {
    padding: 80px 0;
    background: #f8f9fa;
}

.products h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #2c5530;
    margin-bottom: 3rem;
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.product-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background-color: #f8f9fa;
    border-bottom: 1px solid #eee;
}

/* 图片加载失败时的备用样式 */
.product-card img[src=""], .product-card img:not([src]) {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 300 200" fill="%23ddd"><rect width="300" height="200" fill="%23f8f9fa"/><text x="50%" y="50%" text-anchor="middle" dy=".3em" fill="%23999" font-family="Arial, sans-serif" font-size="16">中药材图片</text></svg>');
    background-size: cover;
    background-position: center;
}

.product-card h3 {
    font-size: 1.3rem;
    color: #2c5530;
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.product-card p {
    color: #666;
    padding: 0 1rem;
    margin-bottom: 1rem;
}

.product-price {
    background: #2c5530;
    color: #fff;
    text-align: center;
    padding: 1rem;
    font-weight: bold;
}

/* 关于我们区域 */
.about {
    padding: 80px 0;
    background: #fff;
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #2c5530;
    margin-bottom: 3rem;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.qualifications h3,
.company-info h3 {
    font-size: 1.8rem;
    color: #2c5530;
    margin-bottom: 2rem;
}

.cert-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.cert-item {
    text-align: center;
}

.cert-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    margin-bottom: 1rem;
}

.cert-placeholder {
    width: 100%;
    height: 200px;
    background: #f8f9fa;
    border: 2px dashed #ddd;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

.cert-item p {
    font-weight: bold;
    color: #333;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.info-item {
    background: #f8f9fa;
    padding: 1rem;
    border-radius: 5px;
    border-left: 4px solid #2c5530;
}

.info-item strong {
    color: #2c5530;
}

/* 联系我们区域 */
.contact {
    padding: 80px 0;
    background: #f8f9fa;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    color: #2c5530;
    margin-bottom: 3rem;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.contact-item {
    background: #fff;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.contact-item h3 {
    font-size: 1.5rem;
    color: #2c5530;
    margin-bottom: 1rem;
}

.contact-item p {
    color: #666;
    font-size: 1.1rem;
}

/* 页脚样式 */
.footer {
    background: #2c5530;
    color: #fff;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h3,
.footer-section h4 {
    margin-bottom: 1rem;
    color: #90c695;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section ul li a:hover {
    color: #90c695;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #444;
    color: #ccc;
}

.footer-bottom-content {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.footer-bottom-content p {
    margin: 0;
    font-size: 0.9rem;
}

.icp-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.icp-number {
    color: #90c695;
    font-weight: 500;
}

.separator {
    color: #666;
    font-size: 0.8rem;
}

.gov-beian {
    color: #90c695;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.85rem;
}

.gov-beian:hover {
    color: #fff;
    text-decoration: underline;
}

/* 响应式设计 */
@media screen and (max-width: 480px) {
    .icp-info {
        flex-direction: column;
        gap: 0.3rem;
    }
    
    .separator {
        display: none;
    }
    
    .footer-bottom-content p {
        font-size: 0.8rem;
    }
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: #2c5530;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0,0,0,0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: 1rem 0;
    }
    
    .hero {
        padding: 2rem 1rem;
        min-height: 70vh;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .hero-text {
        padding: 2rem;
    }
    
    .cta-button {
        padding: 15px 30px;
        font-size: 1rem;
    }
    
    .hero-carousel-indicators {
        bottom: 20px;
    }
    
    .hero-indicator {
        width: 12px;
        height: 12px;
    }
    
    .intro-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .cert-grid {
        grid-template-columns: 1fr;
    }
    
    .products-grid {
        grid-template-columns: 1fr;
    }
    
    .container {
        padding: 0 15px;
    }
    
    /* 公司介绍轮播图响应式 */
    .intro-slide img {
        height: 250px;
    }
    
    .intro-carousel-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .intro-prev-btn {
        left: 10px;
    }
    
    .intro-next-btn {
        right: 10px;
    }
    
    .slide-caption {
        padding: 15px;
        font-size: 0.9rem;
    }
}

@media screen and (max-width: 480px) {
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .nav-logo h2 {
        font-size: 1.5rem;
    }
    
    .company-intro h2,
    .products h2,
    .about h2,
    .contact h2 {
        font-size: 2rem;
    }
}