/* General Styles */
:root {
    --primary-color: #003366; /* 深蓝色 */
    --secondary-color: #f5a623; /* 金色 */
    --background-color: #ffffff; /* 白色 */
    --text-color: #333333;
    --link-color: var(--primary-color);
    --hover-color: var(--secondary-color);
}

body {
    margin: 0;
    font-family: '微软雅黑', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: #f6f9fc;
    color: #222;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
.main-header {
    background: #1976d2;
    color: #fff;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    height: 64px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.logo-title {
    display: flex;
    align-items: center;
}
.logo {
    height: 40px;
    margin-right: 16px;
}
.site-title {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}
.main-nav {
    display: flex;
    margin-left: auto;
}
.main-nav a {
    color: #fff;
    text-decoration: none;
    margin-left: 32px;
    font-size: 1rem;
    transition: color 0.2s;
    font-weight: 500;
    position: relative;
}
.main-nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: #fff;
    transition: width 0.3s;
}
.main-nav a:hover {
    color: #90caf9;
}
.main-nav a:hover::after {
    width: 100%;
}
.hero-section {
    background: linear-gradient(90deg, #e3f0fc 0%, #f6f9fc 100%);
    text-align: center;
    padding: 56px 16px 40px 16px;
    margin-bottom: 24px;
}
.hero-section h1 {
    font-size: 2.4rem;
    color: #1976d2;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(25,118,210,0.08);
}
.hero-subtitle {
    font-size: 1.2rem;
    color: #333;
    margin: 0 auto;
    max-width: 600px;
    opacity: 0.85;
}
.main-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(25, 118, 210, 0.08);
    padding: 32px 24px;
    margin-bottom: 0;
    transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover {
    box-shadow: 0 8px 32px rgba(25, 118, 210, 0.18);
    transform: translateY(-4px) scale(1.01);
}
.card h2 {
    margin-top: 0;
    color: #1976d2;
    font-size: 1.3rem;
    font-weight: 600;
}
.card ul {
    padding-left: 20px;
}
/* 文章列表页美化 */
.articles-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
    gap: 28px;
}
.article-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(25, 118, 210, 0.10);
    overflow: hidden;
    transition: box-shadow 0.2s, transform 0.2s;
    display: flex;
    flex-direction: column;
}
.article-card:hover {
    box-shadow: 0 8px 32px rgba(25, 118, 210, 0.18);
    transform: translateY(-4px) scale(1.02);
}
.article-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
    box-shadow: 0 2px 8px rgba(25,118,210,0.07);
}
.article-info {
    padding: 18px 16px 16px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.article-info h2 {
    font-size: 1.15rem;
    color: #1976d2;
    margin: 0 0 8px 0;
    font-weight: 600;
}
.article-info p {
    color: #444;
    font-size: 1rem;
    margin: 0;
    opacity: 0.92;
}
.article-card a {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}
/* 文章详情页美化 */
.article-detail article {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 2px 16px rgba(25, 118, 210, 0.10);
    padding: 32px 24px;
    margin-bottom: 0;
    max-width: 800px;
    margin: 0 auto;
}
.article-detail h2 {
    color: #1976d2;
    font-size: 1.2rem;
    margin-top: 32px;
    margin-bottom: 12px;
    font-weight: 600;
}
.article-detail p {
    font-size: 1.08rem;
    color: #333;
    line-height: 1.8;
    margin-bottom: 18px;
}
.article-detail img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 24px auto;
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(25,118,210,0.10);
}
.article-cover {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 18px;
}
/* 按钮样式 */
.btn {
    display: inline-block;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 28px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(25,118,210,0.08);
    transition: background 0.2s, box-shadow 0.2s;
    text-decoration: none;
}
.btn:hover {
    background: #1256a6;
    box-shadow: 0 4px 16px rgba(25,118,210,0.13);
}
.main-footer {
    background: #f1f3f6;
    color: #666;
    text-align: center;
    padding: 24px 0 12px 0;
    margin-top: 40px;
    font-size: 0.95rem;
    border-top: 1px solid #e0e0e0;
}
.footer-content a {
    color: #1976d2;
    text-decoration: none;
}
.footer-content a:hover {
    text-decoration: underline;
}
@media (max-width: 900px) {
    .main-content {
        max-width: 100%;
    }
    .article-detail article {
        padding: 18px 4px;
    }
}
@media (max-width: 600px) {
    .main-header {
        flex-direction: column;
        height: auto;
        padding: 12px 8px;
    }
    .main-nav a {
        margin-left: 12px;
        font-size: 0.95rem;
    }
    .main-content {
        padding: 0 4px;
    }
    .card {
        padding: 18px 8px;
    }
    .site-title {
        font-size: 1.1rem;
    }
    .hero-section {
        padding: 32px 4px 24px 4px;
    }
    .hero-section h1 {
        font-size: 1.5rem;
    }
    .hero-subtitle {
        font-size: 1rem;
    }
    .articles-list {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    .article-card img {
        height: 140px;
    }
}

/* Media Queries for Responsive Design */
@media (max-width: 768px) {
    .content {
        grid-template-columns: 1fr;
    }
}

/* Additional Styling */
footer {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    background-color: var(--primary-color);
    color: var(--background-color);
}

footer p {
    margin: 5px 0;
}

footer a {
    color: var(--background-color);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* 新增样式 */
.icon {
    font-size: 1.2em;
    margin-right: 10px;
}

.animate-fade-in {
    animation: fadeIn 1s ease-out forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.carousel-section {
    width: 100%;
    background: #e3f0fc;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    margin-top: 0;
}
.carousel {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 220px;
    overflow: hidden;
    border-radius: 14px;
    box-shadow: 0 4px 24px rgba(25, 118, 210, 0.10);
    margin: 18px auto 0 auto;
}
.carousel-img {
    position: absolute;
    left: 0; top: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 1s;
    z-index: 1;
}
.carousel-img.active {
    opacity: 1;
    z-index: 2;
}
.carousel-dots {
    position: absolute;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    opacity: 0.6;
    border: 2px solid #1976d2;
    transition: background 0.2s, opacity 0.2s;
    cursor: pointer;
}
.dot.active {
    background: #1976d2;
    opacity: 1;
}
@media (max-width: 900px) {
    .carousel {
        height: 120px;
        max-width: 98vw;
    }
}
@media (max-width: 600px) {
    .carousel {
        height: 70px;
        max-width: 100vw;
        border-radius: 6px;
    }
    .carousel-dots {
        bottom: 4px;
    }
    .dot {
        width: 8px;
        height: 8px;
    }
}

/* 砂石行业主题色块与分割线 */
.section-divider {
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #f5a623 0%, #1976d2 100%);
    border-radius: 2px;
    margin: 32px 0 24px 0;
    opacity: 0.18;
}

/* 行业icon样式 */
.industry-icon {
    display: inline-block;
    width: 28px;
    height: 28px;
    background: #f5a623;
    border-radius: 50%;
    color: #fff;
    text-align: center;
    line-height: 28px;
    font-size: 1.2rem;
    margin-right: 10px;
    box-shadow: 0 2px 8px rgba(245,166,35,0.12);
}

/* 行情、知识栏目美化 */
#market, #knowledge {
    background: linear-gradient(90deg, #fdf6e3 0%, #e3f0fc 100%);
    border-left: 6px solid #f5a623;
    box-shadow: 0 2px 12px rgba(245,166,35,0.08);
    margin-top: 0;
}
#market h2, #knowledge h2 {
    color: #f5a623;
    font-size: 1.18rem;
    font-weight: 700;
}
#market ul, #knowledge ul {
    font-size: 1.05rem;
    color: #444;
    margin: 0;
    padding-left: 22px;
}
#market li, #knowledge li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 8px;
}
#market li::before, #knowledge li::before {
    content: '•';
    color: #f5a623;
    position: absolute;
    left: 0;
    font-size: 1.1em;
    top: 0;
}

/* 首页卡片行业高亮 */
.card {
    border-left: 4px solid #1976d2;
}
.card.latest-articles {
    border-left: 4px solid #f5a623;
}

/* 首页卡片hover动效增强 */
.card:hover {
    box-shadow: 0 12px 36px rgba(25, 118, 210, 0.22);
    transform: translateY(-6px) scale(1.015);
    border-left: 8px solid #f5a623;
}

/* 首页按钮高亮 */
.btn {
    background: linear-gradient(90deg, #f5a623 0%, #1976d2 100%);
    color: #fff;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(245,166,35,0.13);
}
.btn:hover {
    background: linear-gradient(90deg, #1976d2 0%, #f5a623 100%);
    color: #fff;
    box-shadow: 0 8px 32px rgba(25,118,210,0.18);
}

/* 首页行业背景元素 */
body::before {
    content: '';
    position: fixed;
    left: 0; top: 0;
    width: 100vw; height: 100vh;
    background: url('images/bg-sandstone.png') repeat-x bottom left;
    opacity: 0.04;
    z-index: 0;
    pointer-events: none;
}

/* 首页栏目标题icon */
.card h2::before {
    content: '\26CF'; /* ⛏️ 矿工铲 */
    color: #f5a623;
    margin-right: 8px;
    font-size: 1.1em;
    vertical-align: middle;
    opacity: 0.85;
}
#market h2::before {
    content: '\1F4C8'; /* 📈 行情 */
}
#knowledge h2::before {
    content: '\1F4DA'; /* 📚 知识 */
}

/* 首页分割线可用 */
.section-divider {
    margin: 32px 0 24px 0;
}

/* 首页栏目icon美化 */
.section-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2em;
    height: 2.2em;
    font-size: 1.25em;
    border-radius: 50%;
    margin-right: 10px;
    box-shadow: 0 2px 8px rgba(25,118,210,0.10);
    background: #f6f9fc;
    color: #1976d2;
    border: 2px solid #e3f0fc;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.news-icon {
    background: linear-gradient(135deg, #f5a623 60%, #fffbe6 100%);
    color: #fff;
    border-color: #f5a62333;
}
.market-icon {
    background: linear-gradient(135deg, #1976d2 60%, #e3f0fc 100%);
    color: #fff;
    border-color: #1976d233;
}
.knowledge-icon {
    background: linear-gradient(135deg, #43a047 60%, #e8f5e9 100%);
    color: #fff;
    border-color: #43a04733;
}
.about-icon {
    background: linear-gradient(135deg, #7b1fa2 60%, #ede7f6 100%);
    color: #fff;
    border-color: #7b1fa233;
}
.services-icon {
    background: linear-gradient(135deg, #ff7043 60%, #fff3e0 100%);
    color: #fff;
    border-color: #ff704333;
}
.company-icon {
    background: linear-gradient(135deg, #0288d1 60%, #e1f5fe 100%);
    color: #fff;
    border-color: #0288d133;
}
.business-icon {
    background: linear-gradient(135deg, #cddc39 60%, #f9fbe7 100%);
    color: #fff;
    border-color: #cddc3933;
}
.contact-icon {
    background: linear-gradient(135deg, #f06292 60%, #fce4ec 100%);
    color: #fff;
    border-color: #f0629233;
}
.section-icon:hover {
    background: #1976d2;
    color: #fffbe6;
    box-shadow: 0 4px 16px rgba(25,118,210,0.18);
}
.card h2 {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* 微信H5优化样式 */
@media screen and (max-width: 480px) {
    /* 微信浏览器特定优化 */
    body {
        font-size: 16px; /* 防止微信浏览器自动缩放 */
        line-height: 1.6;
    }
    
    .main-header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: rgba(25, 118, 210, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }
    
    .main-nav {
        justify-content: space-around;
        width: 100%;
    }
    
    .main-nav a {
        margin: 0;
        padding: 8px 4px;
        font-size: 14px;
        text-align: center;
        flex: 1;
        white-space: nowrap;
    }
    
    .hero-section {
        margin-top: 64px; /* 为固定导航栏留出空间 */
        padding: 40px 16px 32px;
    }
    
    .hero-section h1 {
        font-size: 1.8rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
    }
    
    .card {
        margin: 0 8px 16px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
        -webkit-box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .card h2 {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .card p, .card li {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .article-card {
        margin-bottom: 12px;
        border-radius: 8px;
        overflow: hidden;
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    .article-info h2 {
        font-size: 1rem;
        line-height: 1.4;
    }
    
    .article-info p {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    /* 触摸优化 */
    .main-nav a,
    .article-card a,
    .btn,
    .contact-link {
        -webkit-tap-highlight-color: rgba(25, 118, 210, 0.2);
        transition: all 0.2s ease;
    }
    
    .main-nav a:active,
    .article-card a:active,
    .btn:active,
    .contact-link:active {
        transform: scale(0.98);
        opacity: 0.8;
    }
    
    /* 联系链接样式 */
    .contact-link {
        color: #1976d2;
        text-decoration: none;
        padding: 4px 8px;
        border-radius: 4px;
        display: inline-block;
        margin: 2px 0;
    }
    
    .contact-link:hover,
    .contact-link:active {
        background-color: rgba(25, 118, 210, 0.1);
    }
    
    /* 轮播图优化 */
    .carousel-section {
        margin-top: 64px;
    }
    
    .carousel {
        height: 200px;
        border-radius: 0;
    }
    
    .carousel-img {
        height: 200px;
        object-fit: cover;
    }
    
    /* 按钮优化 */
    .btn {
        padding: 10px 20px;
        font-size: 14px;
        border-radius: 6px;
        min-height: 44px; /* 确保触摸目标足够大 */
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* 滚动优化 */
    .main-content {
        -webkit-overflow-scrolling: touch;
        overflow-scrolling: touch;
    }
    
    /* 防止页面抖动 */
    html {
        overflow-x: hidden;
    }
    
    /* 微信浏览器字体优化 */
    * {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
    }
}

/* 微信分享按钮样式 */
.wechat-share-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: #07c160;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(7, 193, 96, 0.3);
    z-index: 1000;
    -webkit-tap-highlight-color: transparent;
    transition: all 0.2s ease;
}

.wechat-share-btn:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(7, 193, 96, 0.4);
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(25, 118, 210, 0.3);
    border-radius: 50%;
    border-top-color: #1976d2;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 微信浏览器状态栏适配 */
@supports (padding-top: env(safe-area-inset-top)) {
    .main-header {
        padding-top: calc(env(safe-area-inset-top) + 12px);
    }
    
    .hero-section {
        margin-top: calc(64px + env(safe-area-inset-top));
    }
    
    .carousel-section {
        margin-top: calc(64px + env(safe-area-inset-top));
    }
}

/* 横屏优化 */
@media screen and (orientation: landscape) and (max-width: 900px) {
    .main-header {
        height: 48px;
    }
    
    .hero-section {
        margin-top: 48px;
        padding: 24px 16px;
    }
    
    .carousel-section {
        margin-top: 48px;
    }
    
    .carousel {
        height: 150px;
    }
    
    .carousel-img {
        height: 150px;
    }
}

/* 高分辨率屏幕优化 */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .card {
        border: 0.5px solid rgba(0,0,0,0.1);
    }
    
    .main-nav a::after {
        height: 1px;
    }
}

/* 微信小程序兼容性 */
@media screen and (max-width: 375px) {
    .hero-section h1 {
        font-size: 1.6rem;
    }
    
    .hero-subtitle {
        font-size: 0.9rem;
    }
    
    .card {
        margin: 0 4px 12px;
        padding: 16px 12px;
    }
    
    .main-nav a {
        font-size: 13px;
        padding: 6px 2px;
    }
}