/* ===== 唐山亨旺粉末冶金有限公司 - style.css ===== */
/* 基础重置与全局变量 */
:root {
    --primary: #1a3a5c;
    --primary-light: #2a5a8c;
    --accent: #e8a838;
    --bg: #f5f7fa;
    --text: #222;
    --text-light: #555;
    --white: #fff;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --radius: 8px;
    --transition: 0.3s ease;
    --glass-bg: rgba(255,255,255,0.25);
    --glass-border: rgba(255,255,255,0.4);
    --glass-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.7;
    scroll-behavior: smooth;
}
a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: var(--accent);
}
img, svg {
    max-width: 100%;
    height: auto;
    display: block;
}
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
/* ===== 毛玻璃通用类 ===== */
.glass {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}
/* ===== 头部导航 ===== */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    flex-wrap: wrap;
}
.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
}
.logo-area svg {
    width: 48px;
    height: 48px;
}
.logo-text {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
}
.nav {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.nav a {
    font-size: 0.95rem;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    color: var(--text);
    position: relative;
}
.nav a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
}
.nav a:hover::after,
.nav a.active::after {
    width: 100%;
}
.nav a:hover,
.nav a.active {
    color: var(--primary);
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--primary);
}
/* ===== 搜索框 ===== */
.search-box {
    display: flex;
    gap: 6px;
    align-items: center;
}
.search-box input {
    padding: 6px 12px;
    border: 1px solid #ccc;
    border-radius: 20px;
    font-size: 0.9rem;
    width: 160px;
    outline: none;
    transition: var(--transition);
}
.search-box input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(42,90,140,0.2);
}
.search-box button {
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 6px 14px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: var(--transition);
}
.search-box button:hover {
    background: var(--primary-light);
    transform: scale(1.02);
}
/* ===== Banner ===== */
.banner {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary) 0%, #0f2b45 50%, var(--primary-light) 100%);
    color: white;
    min-height: 360px;
    display: flex;
    align-items: center;
}
.banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(232,168,56,0.15) 0%, transparent 60%);
    animation: bannerGlow 8s ease-in-out infinite alternate;
}
@keyframes bannerGlow {
    0% { transform: translate(0,0); }
    100% { transform: translate(10%,10%); }
}
.banner-slide {
    display: none;
    width: 100%;
    padding: 50px 20px;
    text-align: center;
    position: relative;
    z-index: 1;
}
.banner-slide.active {
    display: block;
    animation: fadeInUp 0.6s ease forwards;
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.banner h1 {
    font-size: 2.4rem;
    margin-bottom: 16px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.banner p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 0 auto 20px;
    opacity: 0.9;
}
.banner .btn {
    background: var(--accent);
    color: var(--primary);
    padding: 10px 30px;
    border-radius: 30px;
    font-weight: 600;
    display: inline-block;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(232,168,56,0.4);
}
.banner .btn:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(232,168,56,0.6);
}
.banner-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 2;
}
.banner-dots span {
    width: 12px;
    height: 12px;
    background: rgba(255,255,255,0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}
.banner-dots span.active {
    background: var(--accent);
    transform: scale(1.2);
}
/* ===== 面包屑 ===== */
.breadcrumb {
    padding: 12px 0;
    font-size: 0.9rem;
    color: var(--text-light);
}
.breadcrumb a {
    color: var(--primary-light);
}
/* ===== 通用区段 ===== */
section {
    padding: 50px 0;
}
.section-title {
    text-align: center;
    margin-bottom: 36px;
}
.section-title h2 {
    font-size: 2rem;
    color: var(--primary);
    position: relative;
    display: inline-block;
}
.section-title h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin: 10px auto 0;
    border-radius: 2px;
}
/* ===== 网格 ===== */
.grid-2, .grid-3, .grid-4 {
    display: grid;
    gap: 24px;
}
.grid-2 { grid-template-columns: repeat(2,1fr); }
.grid-3 { grid-template-columns: repeat(3,1fr); }
.grid-4 { grid-template-columns: repeat(4,1fr); }
/* ===== 卡片 ===== */
.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    border: 1px solid transparent;
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
    border-color: var(--accent);
}
.card h3, .card h4 {
    color: var(--primary);
    margin-bottom: 12px;
}
.card p, .card li {
    color: var(--text-light);
    font-size: 0.95rem;
}
.card ul {
    padding-left: 20px;
}
.card li {
    margin-bottom: 6px;
}
/* ===== 关于我们 ===== */
.about-content {
    display: flex;
    gap: 40px;
    align-items: center;
    flex-wrap: wrap;
}
.about-text {
    flex: 2;
    min-width: 280px;
}
.about-text p {
    margin-bottom: 14px;
}
.about-svg {
    flex: 1;
    min-width: 200px;
    text-align: center;
}
/* ===== FAQ ===== */
.faq-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 14px 0;
    cursor: pointer;
    transition: background 0.2s;
}
.faq-item:hover {
    background: rgba(232,168,56,0.05);
}
.faq-question {
    font-weight: 600;
    color: var(--primary);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-question::after {
    content: '+';
    font-size: 1.4rem;
    transition: transform 0.3s ease;
}
.faq-item.open .faq-question::after {
    content: '−';
    transform: rotate(180deg);
}
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    color: var(--text-light);
    padding-top: 0;
}
.faq-item.open .faq-answer {
    max-height: 400px;
    padding-top: 12px;
}
/* ===== HowTo ===== */
.howto-steps {
    counter-reset: step;
}
.howto-step {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
    align-items: flex-start;
}
.howto-step::before {
    counter-increment: step;
    content: counter(step);
    background: var(--primary);
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
/* ===== 文章列表 ===== */
.article-list {
    display: grid;
    gap: 20px;
}
.article-item {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
    border-left: 4px solid transparent;
}
.article-item:hover {
    border-left-color: var(--accent);
    transform: translateX(6px);
}
.article-item h4 {
    color: var(--primary);
    margin-bottom: 6px;
}
.article-meta {
    font-size: 0.85rem;
    color: #999;
    margin-bottom: 8px;
}
.article-summary {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 10px;
}
.read-more {
    color: var(--accent);
    font-weight: 600;
    transition: var(--transition);
}
.read-more:hover {
    color: var(--primary);
    padding-left: 4px;
}
/* ===== 联系信息 ===== */
.contact-info {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
}
.contact-info .card {
    flex: 1;
    min-width: 200px;
    text-align: center;
}
.contact-info svg {
    margin: 0 auto 12px;
}
/* ===== 页脚 ===== */
.footer {
    background: var(--primary);
    color: rgba(255,255,255,0.85);
    padding: 40px 0 20px;
}
.footer a {
    color: rgba(255,255,255,0.8);
    transition: var(--transition);
}
.footer a:hover {
    color: var(--accent);
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(4,1fr);
    gap: 30px;
    margin-bottom: 30px;
}
.footer h4 {
    color: white;
    margin-bottom: 14px;
    font-size: 1.05rem;
    position: relative;
    display: inline-block;
}
.footer h4::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background: var(--accent);
    margin-top: 6px;
}
.footer ul {
    list-style: none;
}
.footer li {
    margin-bottom: 6px;
    font-size: 0.9rem;
}
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 16px;
    text-align: center;
    font-size: 0.85rem;
}
/* ===== 返回顶部 ===== */
.back-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary);
    color: white;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.2);
    border: none;
    font-size: 1.2rem;
    z-index: 99;
}
.back-top.show {
    opacity: 1;
    visibility: visible;
}
.back-top:hover {
    background: var(--accent);
    transform: translateY(-4px);
}
/* ===== 暗色模式切换按钮 ===== */
.dark-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--primary);
    padding: 4px;
    transition: var(--transition);
}
.dark-toggle:hover {
    transform: rotate(20deg);
}
/* ===== 滚动动画 ===== */
.scroll-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.scroll-fade.visible {
    opacity: 1;
    transform: translateY(0);
}
/* ===== 暗色模式 ===== */
body.dark {
    --bg: #1a1a2e;
    --text: #eee;
    --text-light: #bbb;
    --white: #16213e;
    --primary: #0f3460;
    --primary-light: #4a9eff;
    --shadow: 0 2px 12px rgba(0,0,0,0.4);
    --glass-bg: rgba(22,33,62,0.6);
    --glass-border: rgba(255,255,255,0.1);
}
body.dark .header {
    background: #0d1b2a;
}
body.dark .card {
    background: #1b2838;
    border-color: #2a3a5a;
}
body.dark .banner {
    background: linear-gradient(135deg, #0d1b2a 0%, #1a2a4a 50%, #0f3460 100%);
}
body.dark .banner::before {
    background: radial-gradient(circle at 30% 40%, rgba(232,168,56,0.1) 0%, transparent 60%);
}
body.dark .footer {
    background: #0a0a1a;
}
body.dark .faq-item {
    border-bottom-color: #2a3a5a;
}
body.dark .article-item {
    background: #1b2838;
}
body.dark .search-box input {
    background: #2a3a5a;
    border-color: #3a4a6a;
    color: #eee;
}
body.dark .search-box input::placeholder {
    color: #888;
}
/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .nav {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 8px;
        padding: 12px 0;
        background: var(--white);
        border-radius: 0 0 var(--radius) var(--radius);
        box-shadow: var(--shadow);
    }
    .nav.open {
        display: flex;
    }
    .menu-toggle {
        display: block;
    }
    .search-box input {
        width: 120px;
    }
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }
    .banner h1 {
        font-size: 1.6rem;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    .about-content {
        flex-direction: column;
    }
    .banner {
        min-height: 280px;
    }
}
@media (max-width: 480px) {
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .header-inner {
        flex-direction: column;
        align-items: stretch;
    }
    .logo-area {
        justify-content: space-between;
    }
    .banner h1 {
        font-size: 1.3rem;
    }
    .banner p {
        font-size: 0.95rem;
    }
    .section-title h2 {
        font-size: 1.5rem;
    }
}