/* CSS Variables */
:root {
    --primary-dark: #1150d8ea;      /* 深蓝 - 用于头部、导航、页脚 */
    --primary-medium: #0079c1;    /* 中蓝 - 用于渐变 */
    --accent: #009f4d;            /* 浅绿色 - 用于强调、悬停效果 */
    --accentnew: #1dc951;            /* 绿色 - 用于强调、悬停效果 */
    --light-bg: #f8f9fa;          /* 浅灰 - 用于背景 */
    --content-bg: #fdfbfb;        /* 白色 - 内容区域背景 */
    --text-dark: #333333;          /* 深灰 - 主要文本 */
    --text-medium: #555555;       /* 中灰 - 次要文本 */
    --text-light: #ffffff;         /* 白色 - 深色背景上的文本 */
    --border: #e0e0e0;            /* 浅灰色边框 */
    --visited: #34af1c;            /* 浅灰色已经点击的链接 */
    --footercb: #1a3a5f;            /* 页脚背景颜色 */
}


/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #fff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header样式 - 深蓝渐变 */
header {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-medium));
    color: var(--text-light);
    padding: 25px 0;
    text-align: center;
    background-image: url(rc_images/product.webp);
    background-position: center center;
    background-size: cover;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0);
    position: relative;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.25);
}

header .container {
    position: relative;
    z-index: 2;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-shadow: 2px 2px 2px rgba(0,0,0,0.7);
}

header p {
    font-size: 1.2rem;
    max-width: 900px;
    margin: 0 auto;
    text-shadow: 1px 1px 1px rgba(0,0,0,0.7);
}


/* 导航菜单 - 深蓝色 */
nav {
    background-color: var(--primary-dark);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
    white-space: nowrap;
    overflow-x: auto;
}

.nav-item {
    font-size: clamp(0.75rem, 2vw, 1rem); /* 自适应字体大小 */
    padding: 12px clamp(8px, 2vw, 55px); /* 自适应内边距 */
    text-decoration: none;
    color: var(--text-light);
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item:hover, 
.nav-item.active {
    color: var(--accentnew);
    background-color: rgba(255,255,255,0.08);
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--accent);
    transition: width 0.3s;
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    background-image: url(rc_images/briquetting_machine_10.webp);
    background-position: center center;
    background-size: cover;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0);
    position: relative;
    color: var(--text-light);
    text-align: center;
    padding: 100px 20px;
    margin-bottom: 60px;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    max-width: 800px;
    margin: 0 auto 30px;
}

.btn-primary {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 15px 30px;
    border-radius: 5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary:hover {
    background: var(--accentnew);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

/* Section Titles */
.section-title {
    text-align: center;
    margin-bottom: 50px;
    color: var(--primary-dark);
    font-size: 2.2rem;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent);
    border-radius: 2px;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.feature-card {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-10px);
}

.feature-icon {
    font-size: 2.5rem;
    color: var(--primary-medium);
    margin-bottom: 20px;
}

.feature-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--primary-dark);
}

/* Product Showcase */
.product-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    margin: 60px 0;
}

.product-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.product-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.product-content {
    padding: 25px;
}

.product-title {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: var(--primary-dark);
}

.product-description {
    color: var(--text-medium);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* News Section */
.news-section {
    background: var(--light-bg);
    padding: 80px 0;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.news-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.news-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 25px;
}

.news-title {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: var(--primary-dark);
}

.news-excerpt {
    color: var(--text-medium);
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Call to Action Section */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-medium));
    color: var(--text-light);
    text-align: center;
    padding: 80px 20px;
    margin: 80px 0;
}

.cta-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.cta-text {
    max-width: 800px;
    margin: 0 auto 30px;
    font-size: 1.2rem;
}

/* 页脚样式 */
footer {
    background: var(--footercb);
    color: var(--text-light);
    padding: 3rem 0 1.5rem;
    margin-top: auto;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin-bottom: 2rem;
}

.footer-column h3 {
    font-size: 1.25rem;
    margin-bottom: 1.2rem;
    color: white;
    position: relative;
    padding-bottom: 8px;
    font-family: 'Roboto', sans-serif;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--accent-color);
}

.footer-column p {
    margin-bottom: 1rem;
    opacity: 0.9;
    font-size: 0.9rem;
}

.footer-column ul {
    list-style: none;
}

.footer-column ul li {
    margin-bottom: 8px;
    line-height: 1.5;
}

.footer-column ul li a {
    color: #cbd5e0;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
    font-size: 0.9rem;
}

.footer-column ul li a:hover {
    color: var(--accent-color);
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    transition: var(--transition);
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: bold;
}

.social-links a:hover {
    background: var(--accent-color);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    opacity: 0.7;
}

/* Responsive Design */
@media (max-width: 470px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    .nav-container {
         flex-direction: row !important; /* 覆盖原有的column设置 */
    }
    
    .nav-item {
        width: auto !important; /* 覆盖原有的100%宽度 */
        text-align: center;
    }
    
    .product-showcase, .features-grid, .news-grid {
        grid-template-columns: 1fr;
    }
}