/* 浩铭机械 - 官网样式 */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700;900&display=swap');

:root {
    --primary: #1E40AF;
    --primary-dark: #1E3A8A;
    --secondary: #3B82F6;
    --accent: #60A5FA;
    --industrial: #1F2937;
    --industrial-mid: #374151;
    --gray-light: #F3F4F6;
    --gray-medium: #9CA3AF;
    --white: #FFFFFF;
    --success: #10B981;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--industrial);
    line-height: 1.6;
    overflow-x: hidden;
    zoom: 1.0;
}

/* ===== 导航 ===== */
.navbar {
    position: fixed; width: 100%; top: 0; z-index: 100;
    background: rgba(255,255,255,0.97); backdrop-filter: blur(12px);
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}
.navbar.scrolled { box-shadow: 0 2px 12px rgba(0,0,0,0.12); }

.nav-container {
    max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
    display: flex; justify-content: space-between; align-items: center; height: 64px;
}

.nav-logo {
    display: flex; align-items: center; gap: 0.6rem;
    text-decoration: none; transition: opacity 0.3s;
}
.nav-logo:hover { opacity: 0.85; }
.nav-logo img { height: 36px; width: auto; }
.nav-logo-text { font-size: 1rem; font-weight: 700; color: var(--primary); letter-spacing: 0.02em; }

.nav-menu { display: flex; gap: 2rem; list-style: none; }
.nav-menu a {
    color: var(--industrial-mid); text-decoration: none; font-weight: 500;
    font-size: 0.9375rem; transition: color 0.3s; position: relative; padding: 0.25rem 0;
}
.nav-menu a::after {
    content: ''; position: absolute; bottom: -2px; left: 0; width: 0; height: 2px;
    background: var(--primary); transition: width 0.3s;
}
.nav-menu a:hover { color: var(--primary); }
.nav-menu a:hover::after { width: 100%; }
.nav-menu a.active { color: var(--primary); }
.nav-menu a.active::after { width: 100%; }

.menu-toggle {
    display: none; background: none; border: none; font-size: 1.5rem;
    color: var(--industrial); cursor: pointer;
}

.mobile-menu {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: white; box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
}
.mobile-menu.active { display: block; }
.mobile-menu a {
    display: block; padding: 0.75rem 1.5rem; color: var(--industrial-mid);
    text-decoration: none; font-weight: 500; transition: all 0.3s;
}
.mobile-menu a:hover, .mobile-menu a.active { background: var(--gray-light); color: var(--primary); }

/* ===== Hero ===== */
.hero {
    min-height: 100vh; display: flex; align-items: center; justify-content: center;
    position: relative; background-size: cover; background-position: center;
}
.hero-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(30,64,175,0.9) 0%, rgba(30,64,175,0.7) 50%, rgba(59,130,246,0.6) 100%);
}
.hero-content {
    position: relative; z-index: 10; text-align: center; color: white;
    padding: 2rem; max-width: 800px;
}
.hero-title { font-size: 2.75rem; font-weight: 900; margin-bottom: 0.75rem; letter-spacing: 0.03em; }
.hero-subtitle { font-size: 1.25rem; margin-bottom: 2.5rem; opacity: 0.9; font-weight: 300; line-height: 1.8; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ===== 按钮 ===== */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.75rem 1.75rem; border-radius: 6px; font-weight: 600;
    text-decoration: none; transition: all 0.3s; cursor: pointer; border: none;
    font-size: 0.9375rem;
}
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(30,64,175,0.35); }
.btn-outline { background: transparent; color: white; border: 2px solid rgba(255,255,255,0.7); }
.btn-outline:hover { background: white; color: var(--primary); }
.btn-white { background: white; color: var(--primary); }
.btn-white:hover { background: var(--gray-light); transform: translateY(-2px); }

/* ===== 通用区块 ===== */
.section { padding: 5rem 0; }
.section-alt { background: var(--gray-light); }
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

.section-title {
    font-size: 1.875rem; font-weight: 700; color: var(--industrial);
    text-align: center; margin-bottom: 3rem; position: relative;
}
.section-title::after {
    content: ''; position: absolute; bottom: -10px; left: 50%;
    transform: translateX(-50%); width: 48px; height: 3px;
    background: var(--primary); border-radius: 2px;
}

/* ===== 卡片 ===== */
.card {
    background: white; border-radius: 12px; overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08); transition: all 0.3s;
}
.card:hover { transform: translateY(-6px); box-shadow: 0 12px 32px rgba(0,0,0,0.12); }
.card-image { width: 100%; height: 220px; object-fit: cover; display: block; }
.card-body { padding: 1.5rem; }
.card-title { font-size: 1.125rem; font-weight: 700; color: var(--industrial); margin-bottom: 0.5rem; }
.card-text { color: var(--gray-medium); line-height: 1.7; font-size: 0.9375rem; }

/* ===== 网格 ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.grid-6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.25rem; }

/* ===== 特性列表 ===== */
.feature-list { list-style: none; }
.feature-list li {
    padding: 0.4rem 0; display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.9375rem;
}
.feature-list li i { color: var(--success); margin-top: 0.2rem; flex-shrink: 0; }

/* ===== 标签 ===== */
.tag {
    display: inline-block; padding: 0.3rem 0.75rem;
    background: rgba(30,64,175,0.08); color: var(--primary);
    border-radius: 999px; font-size: 0.8125rem; font-weight: 500;
}

/* ===== 页面横幅 ===== */
.page-banner {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white; padding: 7rem 0 3.5rem; text-align: center;
}
.page-banner h1 { font-size: 2.25rem; font-weight: 700; margin-bottom: 0.75rem; }
.page-banner p { font-size: 1.0625rem; opacity: 0.9; max-width: 600px; margin: 0 auto; }

/* ===== 产品页全屏横幅 ===== */
.page-banner--products {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}
.page-banner--products .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 3rem;
}
.page-banner--products h1 {
    font-size: 2.25rem;
    font-weight: 900;
    margin-bottom: 0.75rem;
}
.page-banner--products > .container > p {
    font-size: 1.0625rem;
    margin-bottom: 4.5rem;
}
.banner-stats {
    display: flex;
    gap: 3rem;
    margin-bottom: 3rem;
}
.banner-stat {
    text-align: center;
}
.banner-stat-num {
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
}
.banner-stat-label {
    font-size: 0.75rem;
    opacity: 0.75;
    margin-top: 0.25rem;
}
.product-tabs {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.product-tab {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1.0625rem;
    font-weight: 700;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 12px;
    background: rgba(255,255,255,0.12);
    transition: all 0.3s ease;
    white-space: nowrap;
    text-align: center;
}
.product-tab i {
    font-size: 1.25rem;
    transition: color 0.3s;
}
.product-tab:hover {
    color: white;
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}
.product-tab.active {
    color: var(--primary);
    border-color: white;
    background: white;
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.product-tab.active i {
    color: var(--primary);
}
.product-tab:last-child.active {
    color: #374151;
    background: white;
    border-color: white;
}
.product-tab:last-child.active i {
    color: #374151;
}
.product-tab:last-child:hover {
    color: white;
    border-color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.2);
    transform: translateY(-1px);
}

/* ===== 联系卡片 ===== */
.contact-card {
    text-align: center; padding: 1.75rem; background: white;
    border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    transition: all 0.3s; border: 1px solid transparent;
}
.contact-card:hover { transform: translateY(-4px); box-shadow: 0 8px 24px rgba(0,0,0,0.1); border-color: var(--accent); }
.contact-card i { font-size: 2rem; color: var(--primary); margin-bottom: 0.75rem; }
.contact-card h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 0.375rem; }

/* ===== 可复制联系方式 ===== */
.copy-contact {
    display: inline-flex; align-items: center; gap: 0.4rem; cursor: pointer;
    color: var(--primary); font-weight: 600; position: relative;
    transition: opacity 0.3s;
}
.copy-contact:hover { opacity: 0.8; }
.copy-contact .copy-icon { font-size: 0.75rem; color: var(--gray-medium); transition: color 0.3s; }
.copy-contact:hover .copy-icon { color: var(--primary); }

.copy-toast {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    background: var(--industrial); color: white; padding: 0.75rem 1.5rem;
    border-radius: 8px; font-size: 0.9375rem; z-index: 9999;
    opacity: 0; transition: opacity 0.3s; pointer-events: none;
}
.copy-toast.show { opacity: 1; }

/* ===== 地图 ===== */
.map-container {
    width: 100%; height: 360px; border-radius: 12px; overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1); position: relative;
}
.map-container #mapDiv { width: 100%; height: 100%; }

.map-nav-btns {
    display: flex; gap: 0.5rem; margin-top: 0.75rem; flex-wrap: wrap;
}
.map-nav-btn {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.5rem 1rem; border-radius: 6px; font-size: 0.8125rem;
    font-weight: 500; text-decoration: none; transition: all 0.3s;
    border: 1px solid #E5E7EB; color: var(--industrial-mid); background: white;
}
.map-nav-btn:hover { border-color: var(--primary); color: var(--primary); }
.map-nav-btn i { font-size: 0.875rem; }

/* ===== 返回顶部 ===== */
.back-to-top {
    position: fixed; bottom: 2rem; right: 2rem; width: 44px; height: 44px;
    background: var(--primary); color: white; border: none; border-radius: 50%;
    font-size: 1.25rem; cursor: pointer; display: none; align-items: center;
    justify-content: center; z-index: 90; box-shadow: 0 4px 12px rgba(30,64,175,0.3);
    transition: all 0.3s;
}
.back-to-top:hover { background: var(--primary-dark); transform: translateY(-3px); }
.back-to-top.show { display: flex; }

/* ===== 页脚 ===== */
.footer { background: var(--industrial); color: white; padding: 3rem 0 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.5fr; gap: 2rem; margin-bottom: 2rem; }
.footer-title { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; }
.footer-desc { color: #9CA3AF; font-size: 0.8125rem; line-height: 1.8; }
.footer-links { list-style: none; }
.footer-links a { color: #9CA3AF; text-decoration: none; display: block; padding: 0.2rem 0; font-size: 0.875rem; transition: color 0.3s; }
.footer-links a:hover { color: white; }
.footer-contact-item { display: flex; align-items: center; gap: 0.5rem; color: #9CA3AF; font-size: 0.8125rem; margin-bottom: 0.4rem; }
.footer-contact-item i { color: var(--accent); width: 14px; text-align: center; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.08); padding-top: 1.5rem; text-align: center; color: #6B7280; font-size: 0.75rem; }

/* ===== 车间实拍照片统一样式 ===== */
.factory-photo-wrapper {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    cursor: pointer;
    transition: all 0.3s ease;
}
.factory-photo-wrapper:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.factory-photo-wrapper:hover .factory-photo {
    filter: brightness(0.95);
}
.factory-photo-wrapper:hover .factory-photo-zoom {
    opacity: 1;
}
.factory-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
    transition: filter 0.3s ease;
}
.factory-photo-zoom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(30, 64, 175, 0.85);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    font-size: 1rem;
}
.factory-photo-label {
    text-align: center;
    padding: 0.5rem 0.25rem;
    font-size: 0.8125rem;
    color: var(--industrial-mid);
    font-weight: 500;
}

/* ===== 瀑布流网格 ===== */
.masonry-grid {
    columns: 4;
    column-gap: 1rem;
}
.masonry-item {
    break-inside: avoid;
    margin-bottom: 1rem;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    cursor: pointer;
    transition: all 0.3s ease;
}
.masonry-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}
.masonry-item:hover .natural-photo {
    filter: brightness(0.95);
}
.masonry-item:hover .photo-zoom-icon {
    opacity: 1;
}
.natural-photo {
    width: 100%;
    height: auto;
    display: block;
    transition: filter 0.3s ease;
}
.photo-zoom-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: rgba(30, 64, 175, 0.85);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    font-size: 1rem;
}
.masonry-label {
    text-align: center;
    padding: 0.5rem 0.25rem;
    font-size: 0.8125rem;
    color: var(--industrial-mid);
    font-weight: 500;
}
@media (max-width: 1024px) {
    .masonry-grid { columns: 3; }
}
@media (max-width: 768px) {
    .masonry-grid { columns: 2; }
}

/* ===== 占位卡片 ===== */
.photo-placeholder {
    break-inside: avoid;
    margin-bottom: 1rem;
    border-radius: 8px;
    background: linear-gradient(135deg, #F3F4F6 0%, #E5E7EB 100%);
    border: 2px dashed #D1D5DB;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    color: var(--gray-medium);
    transition: all 0.3s ease;
}
.photo-placeholder i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}
.photo-placeholder span {
    font-size: 0.8125rem;
    font-weight: 500;
}

/* ===== 查看更多按钮 ===== */
.load-more-wrapper {
    text-align: center;
    padding: 2rem 0;
}
.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 2rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9375rem;
    background: white;
    color: var(--primary);
    border: 2px solid var(--primary);
    cursor: pointer;
    transition: all 0.3s;
}
.btn-load-more:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(30,64,175,0.25);
}

/* ===== 灯箱 ===== */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.lightbox-overlay.active {
    display: flex;
}
.lightbox-overlay img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
}
.lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}
.lightbox-close:hover {
    background: rgba(255,255,255,0.3);
}

/* ===== 首页核心业务板块 ===== */
.core-business-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
}
.core-business-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.core-business-card-title {
    text-align: center;
    padding: 1rem;
    font-size: 1.0625rem;
    font-weight: 700;
    color: var(--primary);
    text-decoration: none;
    display: block;
    transition: background 0.3s;
}
.core-business-card-title:hover {
    background: var(--gray-light);
}
.core-business-photo {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    min-height: 240px;
}
.core-business-photo:hover .factory-photo {
    filter: brightness(0.95);
}
.core-business-photo:hover .factory-photo-zoom {
    opacity: 1;
}
.parts-grid-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.5rem;
    flex: 1;
}

/* ===== 首页制造现场6列网格 ===== */
.factory-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}
.factory-showcase-grid > div {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.factory-showcase-grid > div:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0,0,0,0.12);
}
.factory-showcase-grid .factory-photo-wrapper {
    display: block;
    overflow: hidden;
}
.factory-showcase-grid .factory-photo {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.factory-showcase-grid > div:hover .factory-photo {
    transform: scale(1.05);
}
.factory-showcase-grid .factory-photo-label {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    color: var(--industrial-dark);
    font-weight: 600;
    text-align: center;
    background: #fff;
}
@media (max-width: 1024px) {
    .factory-showcase-grid { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
}
@media (max-width: 768px) {
    .factory-showcase-grid { grid-template-columns: repeat(2, 1fr); gap: 1rem; }
}

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-6 { grid-template-columns: repeat(3, 1fr); }
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .nav-menu { display: none; }
    .menu-toggle { display: block; }
    .hero-title { font-size: 1.75rem; }
    .hero-subtitle { font-size: 1rem; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-6 { grid-template-columns: repeat(2, 1fr); }
    .section-title { font-size: 1.5rem; }
    .section { padding: 3.5rem 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .map-container { height: 280px; }
    .product-tab { padding: 0.875rem 1rem; font-size: 0.875rem; }
    .product-tab i { font-size: 1rem; }
    .product-tabs { gap: 0.75rem; }
    .page-banner--products h1 { font-size: 2.25rem; }
    .page-banner--products > .container > p { font-size: 1.0625rem; }
    .banner-stats { gap: 1.75rem; }
    .banner-stat-num { font-size: 1.75rem; }
    .masonry-grid { columns: 2; }
}
@media (max-width: 480px) {
    .hero-buttons { flex-direction: column; align-items: center; }
    .btn { width: 100%; justify-content: center; }
    .grid-4, .grid-6 { grid-template-columns: 1fr 1fr; }
}
