﻿/* ============================================================
   北京宏铭志 · 全局样式
   ============================================================ */

/* ---- CSS 变量 ---- */
:root {
    --primary:       #0066cc;
    --primary-dark:  #0052a3;
    --primary-light: #3399ff;
    --primary-bg:    #e8f0fe;
    --accent:        #ff6b35;
    --success:       #27ae60;
    --text:          #1a1a2e;
    --text-muted:    #6b7280;
    --border:        #e5e7eb;
    --bg-page:       #f8fafc;
    --bg-white:      #ffffff;
    --shadow-sm:     0 1px 3px rgba(0,0,0,.08);
    --shadow-md:     0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:     0 12px 40px rgba(0,0,0,.14);
    --radius-sm:     6px;
    --radius-md:     10px;
    --radius-lg:     16px;
    --radius-xl:     24px;
    --transition:    0.28s cubic-bezier(.4,0,.2,1);
}

/* ---- Reset ---- */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.65;
    color: var(--text);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
}

/* ---- 滚动条美化 ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #b0bec5; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary); }

/* ---- 容器 ---- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ============================================================
   按钮
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 12px 28px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: .3px;
    transition: all var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    white-space: nowrap;
}
.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}
.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,102,204,.35);
}
.btn-secondary {
    background: var(--success);
    color: #fff;
    border-color: var(--success);
}
.btn-secondary:hover {
    background: #218838;
    border-color: #218838;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(40,167,69,.3);
}
.btn-outline {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
}
.btn-outline:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-2px);
}
.btn-ghost {
    background: rgba(255,255,255,.15);
    color: #fff;
    border-color: rgba(255,255,255,.5);
    backdrop-filter: blur(6px);
}
.btn-ghost:hover {
    background: rgba(255,255,255,.28);
    border-color: white;
    transform: translateY(-2px);
}

.text-center { text-align: center; }

/* 章节通用标题 */
.section-title {
    font-size: 34px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 12px;
}
.section-sub {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 52px;
    max-width: 560px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    line-height: 1.7;
}

/* ============================================================
   导航栏
   ============================================================ */
.navbar {
    background: rgba(255,255,255,.96);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0,0,0,.08);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow var(--transition);
}
.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0,0,0,.10);
}
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 24px;
    height: 64px;
}

/* Logo */
.logo a {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--primary);
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.3px;
    gap: 10px;
}
.logo i { font-size: 26px; }
.logo .logo-sub {
    display: block;
    font-size: 11px;
    font-weight: 400;
    color: var(--text-muted);
    letter-spacing: .5px;
    line-height: 1;
}

/* 导航菜单 */
.nav-menu {
    display: flex;
    list-style: none;
    gap: 4px;
}
.nav-menu a {
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 15px;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-menu a:hover, .nav-menu a.active {
    color: var(--primary);
    background: var(--primary-bg);
}
.nav-menu a.active { font-weight: 700; }

/* 顶栏右侧操作 */
.nav-cta {
    display: flex;
    align-items: center;
    gap: 12px;
}
.nav-phone {
    font-size: 14px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav-phone i { color: var(--primary); }

/* 移动端汉堡 */
.mobile-menu-btn {
    display: none;
    font-size: 22px;
    cursor: pointer;
    color: var(--text);
    padding: 8px;
    border-radius: var(--radius-sm);
    transition: background var(--transition);
}
.mobile-menu-btn:hover { background: var(--primary-bg); }

/* ============================================================
   特色服务 (features)
   ============================================================ */
.features {
    padding: 90px 0;
    background: var(--bg-white);
}
.features h2 {
    text-align: center;
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}
.features .section-sub { margin-bottom: 56px; }
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
}
.feature-card {
    text-align: center;
    padding: 40px 28px;
    background: var(--bg-page);
    border-radius: var(--radius-lg);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
    border: 1.5px solid var(--border);
}
.feature-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--primary-bg), transparent);
    opacity: 0;
    transition: opacity var(--transition);
}
.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}
.feature-card:hover::before { opacity: 1; }
.feature-icon {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 22px;
    font-size: 30px;
    color: white;
    position: relative;
    box-shadow: 0 8px 20px rgba(0,102,204,.3);
}
.feature-card h3 { font-size: 19px; font-weight: 700; margin-bottom: 12px; color: var(--text); position: relative; }
.feature-card p { color: var(--text-muted); font-size: 14px; line-height: 1.7; position: relative; }

/* ============================================================
   产品预览 (首页)
   ============================================================ */
.products-preview {
    padding: 90px 0;
    background: var(--bg-page);
}
.products-preview h2 {
    text-align: center;
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text);
}
.products-preview .section-sub { margin-bottom: 56px; }
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    margin-bottom: 50px;
}
.product-card {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1.5px solid var(--border);
    transition: all var(--transition);
    display: flex;
    flex-direction: column;
}
.product-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(0,102,204,.3);
}
.product-image {
    height: 210px;
    overflow: hidden;
    background: #f1f5f9;
    position: relative;
}
.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.product-card:hover .product-image img { transform: scale(1.07); }
.product-image .product-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--accent);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: .5px;
}
.product-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.product-card h3 { font-size: 18px; font-weight: 700; color: var(--text); margin-bottom: 8px; }
.product-card p { color: var(--text-muted); font-size: 13px; line-height: 1.6; margin-bottom: 14px; flex: 1; }
.product-price {
    font-size: 26px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 16px;
}
.product-price .unit { font-size: 14px; font-weight: 500; }
.product-card .btn { width: 100%; justify-content: center; }

/* ============================================================
   页脚
   ============================================================ */
.footer {
    background: linear-gradient(160deg, #0f172a 0%, #1e293b 100%);
    color: white;
    padding: 72px 0 28px;
}
.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 48px;
}
.footer-section h3 { font-size: 22px; font-weight: 800; margin-bottom: 16px; }
.footer-section h4 { font-size: 15px; font-weight: 700; margin-bottom: 18px; color: rgba(255,255,255,.85); letter-spacing: .5px; text-transform: uppercase; font-size: 12px; }
.footer-section p { color: rgba(255,255,255,.55); font-size: 14px; line-height: 1.8; margin-bottom: 20px; }
.footer-section ul { list-style: none; }
.footer-section ul li { margin-bottom: 10px; }
.footer-section ul li a { color: rgba(255,255,255,.55); text-decoration: none; font-size: 14px; transition: color var(--transition); display: flex; align-items: center; gap: 6px; }
.footer-section ul li a:hover { color: white; }
.footer-section ul li a::before { content: '›'; color: var(--primary-light); font-size: 16px; }
.contact-info li { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; color: rgba(255,255,255,.55); font-size: 14px; }
.contact-info i { color: var(--primary-light); width: 18px; margin-top: 2px; flex-shrink: 0; }
.social-icons { display: flex; gap: 10px; margin-top: 18px; }
.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: rgba(255,255,255,.08);
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,.6);
    font-size: 16px;
    transition: all var(--transition);
    border: 1px solid rgba(255,255,255,.12);
}
.social-icons a:hover { background: var(--primary); color: white; border-color: var(--primary); transform: translateY(-2px); }
.footer-divider { border: none; border-top: 1px solid rgba(255,255,255,.08); margin-bottom: 24px; }
.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255,255,255,.35);
    font-size: 13px;
    flex-wrap: wrap;
    gap: 12px;
}

/* ============================================================
   回到顶部
   ============================================================ */
#backToTop {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0,102,204,.4);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(16px);
    transition: all var(--transition);
    z-index: 999;
}
#backToTop.visible { opacity: 1; transform: translateY(0); }
#backToTop:hover { background: var(--primary-dark); transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,102,204,.5); }

/* ============================================================
   入场动画工具类
   ============================================================ */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .6s ease, transform .6s ease;
}
.fade-up.in-view { opacity: 1; transform: translateY(0); }

/* ============================================================
   Page Banner（各子页面顶部横幅）
   ============================================================ */
.page-banner {
    background: linear-gradient(135deg, #0052a3 0%, #0099ff 60%, #00c6ff 100%);
    color: white;
    padding: 72px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.page-banner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-banner h1 { font-size: 40px; font-weight: 800; margin-bottom: 14px; position: relative; }
.page-banner p { font-size: 17px; opacity: .88; position: relative; max-width: 560px; margin: 0 auto; line-height: 1.7; }
.page-banner-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-top: 18px;
    font-size: 13px;
    opacity: .7;
    position: relative;
}
.page-banner-breadcrumb a { color: white; text-decoration: none; }
.page-banner-breadcrumb a:hover { opacity: .9; }

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 992px) {
    .footer-content { grid-template-columns: 1fr 1fr; gap: 40px; }
}

@media (max-width: 768px) {
    .nav-menu {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 12px;
        box-shadow: 0 8px 30px rgba(0,0,0,.12);
        border-top: 1px solid var(--border);
        gap: 2px;
    }
    .nav-menu.active { display: flex; }
    .nav-menu a { padding: 11px 16px; }
    .nav-cta { display: none; }
    .mobile-menu-btn { display: flex; }

    .products-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-content { grid-template-columns: 1fr; gap: 32px; }
    .footer-bottom { flex-direction: column; text-align: center; }
    .section-title { font-size: 26px; }
    #backToTop { bottom: 20px; right: 20px; width: 40px; height: 40px; font-size: 16px; }
}

@media (max-width: 480px) {
    .features-grid { grid-template-columns: 1fr; }
    .page-banner h1 { font-size: 28px; }
    .page-banner p { font-size: 14px; }
    .btn { padding: 11px 20px; font-size: 14px; }
}
