/* ============================================
   科硕官网主题样式 - Keshuo Theme
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    color: #333;
    line-height: 1.6;
    background: #fff;
    -webkit-font-smoothing: antialiased;
    padding-top: 72px;
}
a { color: #007ec8; text-decoration: none; transition: color .2s; }
a:hover { color: #005a94; }
img { max-width: 100%; height: auto; display: block; }
ul, ol { list-style: none; }
h1, h2, h3, h4, h5, h6 { line-height: 1.3; color: #1a1a2e; }

/* --- Layout --- */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section { padding: 80px 0; }
.section-gray { background: #f5f7fa; }
.section-title { text-align: center; margin-bottom: 50px; }
.section-title h2 { font-size: 32px; font-weight: 700; margin-bottom: 10px; }
.section-title p { font-size: 16px; color: #666; }

/* --- Buttons --- */
.btn { display: inline-block; padding: 12px 32px; border-radius: 4px; font-size: 16px; font-weight: 500; transition: all .3s; cursor: pointer; border: none; }
.btn-primary { background: #007ec8; color: #fff; }
.btn-primary:hover { background: #005a94; color: #fff; }
.btn-outline { background: transparent; color: #007ec8; border: 2px solid #007ec8; }
.btn-outline:hover { background: #007ec8; color: #fff; }
.btn-accent { background: #62be2c; color: #fff; }
.btn-accent:hover { background: #4ea822; color: #fff; }

/* --- Header / Navigation --- */
.site-header {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    transition: all .3s;
    height: 72px;
}
.site-header.scrolled {
    border-bottom-color: #e0e0e0;
    box-shadow: 0 2px 20px rgba(0,0,0,0.06);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}
.header-logo a { display: flex; align-items: center; gap: 8px; }
.logo-img { height: 40px; width: auto; }
.logo-text { font-size: 22px; font-weight: 700; color: #1a1a2e; }
.logo-text .en { color: #007ec8; }
.header-nav { display: flex; align-items: center; }
.nav-list { display: flex; gap: 4px; }
.nav-item { position: relative; }
.nav-link {
    display: block; padding: 8px 16px;
    font-size: 15px; font-weight: 500; color: #333;
    border-radius: 4px; transition: all .2s;
}
.nav-link:hover, .nav-item.active > .nav-link { color: #007ec8; background: #f0f8ff; }
.nav-link .caret {
    display: inline-block; margin-left: 4px;
    border: 4px solid transparent; border-top: 5px solid currentColor;
    vertical-align: middle;
}
/* Dropdown */
.dropdown-menu {
    display: none; position: absolute; top: 100%; left: 0;
    min-width: 220px; background: #fff;
    border-radius: 8px; box-shadow: 0 8px 30px rgba(0,0,0,0.12);
    padding: 8px 0; z-index: 100;
}
.nav-item.has-dropdown:hover > .dropdown-menu { display: block; }
.dropdown-menu li a {
    display: block; padding: 10px 20px;
    font-size: 14px; color: #333; transition: all .2s;
}
.dropdown-menu li a:hover { color: #007ec8; background: #f8fbff; }
/* Header actions */
.header-actions { display: flex; align-items: center; gap: 16px; }
.lang-switch { display: flex; align-items: center; gap: 4px; }
.lang-btn {
    background: none; border: none; cursor: pointer;
    font-size: 13px; font-weight: 600; color: #999; padding: 4px 6px;
    border-radius: 3px; transition: all .2s;
}
.lang-btn.active { color: #007ec8; background: #e8f4fd; }
.lang-btn:hover { color: #007ec8; }
.lang-divider { color: #ccc; font-size: 12px; }
/* Mobile toggle */
.mobile-toggle {
    display: none; background: none; border: none; cursor: pointer;
    width: 28px; height: 20px; position: relative;
}
.mobile-toggle span {
    display: block; width: 100%; height: 2px;
    background: #333; border-radius: 2px;
    transition: all .3s; position: absolute; left: 0;
}
.mobile-toggle span:nth-child(1) { top: 0; }
.mobile-toggle span:nth-child(2) { top: 9px; }
.mobile-toggle span:nth-child(3) { bottom: 0; }
.mobile-toggle.active span:nth-child(1) { top: 9px; transform: rotate(45deg); }
.mobile-toggle.active span:nth-child(2) { opacity: 0; }
.mobile-toggle.active span:nth-child(3) { bottom: 9px; transform: rotate(-45deg); }

/* --- Hero Slider --- */
.hero-slider { position: relative; overflow: hidden; }
.hero-slider .swiper-slide { position: relative; height: 500px; overflow: hidden; }
.hero-slider .swiper-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-caption {
    position: absolute; top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    width: 80%;
    max-width: 800px;
    z-index: 2;
}
.hero-caption h2 {
    font-size: 48px; font-weight: 700; color: #fff;
    margin-bottom: 0;
    text-shadow: 0 2px 16px rgba(0,0,0,0.6);
    letter-spacing: 3px;
    white-space: nowrap;
}
.hero-caption p { font-size: 18px; opacity: 0.9; }
.hero-slider .swiper-pagination-bullet { background: #fff; opacity: 0.5; }
.hero-slider .swiper-pagination-bullet-active { opacity: 1; background: #007ec8; }
.hero-slider .swiper-button-next,
.hero-slider .swiper-button-prev { color: #fff; }
.no-slide-placeholder {
    height: 400px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #007ec8, #1ad2ff);
    color: #fff; text-align: center;
}
.no-slide-placeholder h2 { font-size: 36px; color: #fff; }
.no-slide-placeholder p { font-size: 18px; opacity: 0.9; margin-top: 10px; }

/* --- Company Intro Section --- */
.company-intro { display: flex; align-items: center; gap: 60px; }
.company-intro-text { flex: 1; }
.company-intro-text h2 { font-size: 28px; margin-bottom: 16px; }
.company-intro-text p { font-size: 16px; color: #555; line-height: 1.8; margin-bottom: 24px; }
.company-intro-visual { flex: 0 0 400px; }
.company-intro-visual img { border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,0.1); }

/* --- Product Grid --- */
.product-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.product-card {
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform .3s, box-shadow .3s;
}
.product-card:hover { transform: translateY(-5px); box-shadow: 0 12px 40px rgba(0,0,0,0.12); }
.product-card-img { height: 220px; overflow: hidden; background: #f0f4f8; display: flex; align-items: center; justify-content: center; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; }
.product-card-img .no-img { color: #999; font-size: 14px; }
.product-card-body { padding: 20px; }
.product-card-body h3 { font-size: 18px; margin-bottom: 8px; }
.product-card-body h3 a { color: #1a1a2e; }
.product-card-body h3 a:hover { color: #007ec8; }
.product-card-body p { font-size: 14px; color: #666; line-height: 1.6; }
.product-card-body .btn { margin-top: 12px; padding: 8px 20px; font-size: 14px; }

/* --- Features Section --- */
.features-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; }
.feature-item { text-align: center; padding: 30px 20px; }
.feature-icon {
    width: 64px; height: 64px; margin: 0 auto 20px;
    background: linear-gradient(135deg, #007ec8, #1ad2ff);
    border-radius: 16px; display: flex; align-items: center; justify-content: center;
}
.feature-icon svg { width: 30px; height: 30px; fill: #fff; }
.feature-item h3 { font-size: 18px; margin-bottom: 10px; }
.feature-item p { font-size: 14px; color: #666; line-height: 1.6; }

/* --- News Section --- */
.section-news {
    position: relative;
    background: #f0f4f8;
    overflow: hidden;
}
.section-news::before {
    content: '';
    position: absolute; top: -60px; right: -60px;
    width: 300px; height: 300px;
    border-radius: 50%;
    background: rgba(0,126,200,0.06);
    pointer-events: none;
}
.section-news::after {
    content: '';
    position: absolute; bottom: -40px; left: -40px;
    width: 200px; height: 200px;
    border-radius: 50%;
    background: rgba(98,190,44,0.06);
    pointer-events: none;
}
.section-news .section-title h2 {
    position: relative;
    display: inline-block;
}
.section-news .section-title h2::after {
    content: '';
    position: absolute; bottom: -10px; left: 50%;
    transform: translateX(-50%);
    width: 60px; height: 3px;
    background: linear-gradient(90deg, #007ec8, #62be2c);
    border-radius: 2px;
}
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.news-card {
    background: #fff; border-radius: 12px; overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    transition: transform .3s, box-shadow .3s;
    position: relative;
}
.news-card:hover { transform: translateY(-5px); box-shadow: 0 12px 35px rgba(0,0,0,0.12); }
.news-card::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #007ec8, #62be2c);
    opacity: 0;
    transition: opacity .3s;
}
.news-card:hover::after { opacity: 1; }
.news-card-img { height: 180px; overflow: hidden; }
.news-card-img img { width: 100%; height: 100%; object-fit: cover; }
.news-card-img .no-img { height: 100%; display: flex; align-items: center; justify-content: center; background: #f0f4f8; color: #999; }
.news-card-body { padding: 20px; }
.news-card-body .date { font-size: 13px; color: #999; margin-bottom: 8px; }
.news-card-body h3 { font-size: 16px; margin-bottom: 8px; }
.news-card-body h3 a { color: #1a1a2e; }
.news-card-body h3 a:hover { color: #007ec8; }
.news-card-body p { font-size: 14px; color: #666; line-height: 1.6; }

/* --- CTA Banner --- */
.cta-banner {
    background: linear-gradient(135deg, #007ec8, #1ad2ff);
    color: #fff; text-align: center; padding: 60px 0;
}
.cta-banner h2 { font-size: 32px; color: #fff; margin-bottom: 16px; }
.cta-banner p { font-size: 18px; opacity: 0.9; margin-bottom: 24px; }
.cta-banner .btn { background: #fff; color: #007ec8; font-weight: 600; }
.cta-banner .btn:hover { background: #f0f0f0; }

/* --- Breadcrumb --- */
.breadcrumb { padding: 20px 0; font-size: 14px; color: #666; }
.breadcrumb a { color: #007ec8; }
.breadcrumb span { margin: 0 8px; color: #ccc; }

/* --- Page Content --- */
.page-content { padding: 40px 0 80px; min-height: 500px; }
.page-content .content-wrapper { max-width: 900px; margin: 0 auto; }
.page-content h1 { font-size: 28px; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid #007ec8; }
.page-content .post-meta { font-size: 14px; color: #999; margin-bottom: 20px; }
.page-content .post-body { font-size: 16px; line-height: 1.8; color: #444; }
.page-content .post-body p { margin-bottom: 16px; }
.page-content .post-body img { border-radius: 8px; margin: 20px 0; }
.page-content .post-body table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.page-content .post-body table th,
.page-content .post-body table td { padding: 12px 16px; border: 1px solid #e0e0e0; text-align: left; }
.page-content .post-body table th { background: #f5f7fa; font-weight: 600; }

/* --- List Page --- */
.list-layout { display: flex; gap: 40px; padding: 40px 0 80px; }
.list-main { flex: 1; }
.list-sidebar { flex: 0 0 280px; }
.list-header { margin-bottom: 30px; }
.list-header h1 { font-size: 28px; margin-bottom: 8px; }
.article-list-item {
    display: flex; gap: 20px; padding: 24px 0;
    border-bottom: 1px solid #eee;
}
.article-list-item:last-child { border-bottom: none; }
.article-list-thumb { flex: 0 0 200px; height: 140px; border-radius: 8px; overflow: hidden; }
.article-list-thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-list-thumb .no-img { height: 100%; display: flex; align-items: center; justify-content: center; background: #f0f4f8; color: #999; font-size: 13px; }
.article-list-info { flex: 1; }
.article-list-info h3 { font-size: 18px; margin-bottom: 8px; }
.article-list-info h3 a { color: #1a1a2e; }
.article-list-info h3 a:hover { color: #007ec8; }
.article-list-info .meta { font-size: 13px; color: #999; margin-bottom: 8px; }
.article-list-info p { font-size: 14px; color: #666; line-height: 1.6; }

/* --- Product Detail --- */
.product-detail { padding: 40px 0 80px; }
.product-detail-layout { display: flex; gap: 50px; }
.product-gallery { flex: 0 0 450px; }
.product-gallery .main-image { border-radius: 12px; overflow: hidden; margin-bottom: 16px; }
.product-gallery .main-image img { width: 100%; }
.product-info { flex: 1; }
.product-info h1 { font-size: 28px; margin-bottom: 20px; }
.spec-table { width: 100%; border-collapse: collapse; margin: 20px 0; }
.spec-table th, .spec-table td { padding: 12px 16px; border: 1px solid #e0e0e0; text-align: left; font-size: 14px; }
.spec-table th { background: #f5f7fa; font-weight: 600; width: 160px; color: #555; }
.inquiry-btn { margin-top: 30px; }
.inquiry-btn .btn { padding: 14px 40px; font-size: 16px; }

/* --- Sidebar --- */
.sidebar-widget { margin-bottom: 30px; }
.sidebar-widget h3 { font-size: 16px; font-weight: 600; padding-bottom: 12px; border-bottom: 2px solid #007ec8; margin-bottom: 16px; }
.sidebar-widget ul li { padding: 8px 0; }
.sidebar-widget ul li a { font-size: 14px; color: #555; }
.sidebar-widget ul li a:hover { color: #007ec8; }
.sidebar-widget ul li.active a { color: #007ec8; font-weight: 500; }

/* --- Contact Page --- */
.contact-page { padding: 40px 0 80px; }
.contact-layout { display: flex; gap: 50px; }
.contact-info { flex: 0 0 400px; }
.contact-info h2 { font-size: 24px; margin-bottom: 24px; }
.contact-info-item { display: flex; gap: 16px; margin-bottom: 24px; }
.contact-info-item .icon { flex: 0 0 44px; height: 44px; background: #e8f4fd; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.contact-info-item .icon svg { width: 22px; height: 22px; fill: #007ec8; }
.contact-info-item .text h4 { font-size: 14px; color: #999; margin-bottom: 4px; }
.contact-info-item .text p { font-size: 15px; color: #333; }
.contact-map { flex: 1; min-height: 400px; border-radius: 12px; overflow: hidden; }
.contact-map iframe, .contact-map #baidu-map { width: 100%; height: 100%; min-height: 400px; border: none; }
.contact-form-section { margin-top: 50px; }
.contact-form-section h2 { font-size: 24px; margin-bottom: 24px; }
.contact-form { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-form .full-width { grid-column: 1 / -1; }
.contact-form input, .contact-form textarea {
    width: 100%; padding: 12px 16px;
    border: 1px solid #ddd; border-radius: 6px;
    font-size: 15px; font-family: inherit;
    transition: border-color .2s;
}
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: #007ec8; }
.contact-form textarea { resize: vertical; min-height: 120px; }

/* --- Pagination --- */
.pagination { display: flex; justify-content: center; gap: 8px; margin-top: 40px; }
.pagination a, .pagination span {
    display: inline-block; padding: 8px 14px;
    border: 1px solid #ddd; border-radius: 4px;
    font-size: 14px; color: #555;
    transition: all .2s;
}
.pagination a:hover { border-color: #007ec8; color: #007ec8; }
.pagination .active { background: #007ec8; color: #fff; border-color: #007ec8; }
.pagination .disabled { color: #ccc; cursor: not-allowed; }

/* --- Search Page --- */
.search-page { padding: 40px 0 80px; }
.search-form { max-width: 600px; margin: 0 auto 40px; display: flex; gap: 12px; }
.search-form input {
    flex: 1; padding: 12px 16px;
    border: 2px solid #ddd; border-radius: 6px;
    font-size: 16px;
}
.search-form input:focus { outline: none; border-color: #007ec8; }

/* --- Prev/Next Navigation --- */
.prev-next { display: flex; justify-content: space-between; margin-top: 40px; padding-top: 20px; border-top: 1px solid #eee; }
.prev-next a { font-size: 14px; color: #007ec8; max-width: 45%; }
.prev-next a:hover { text-decoration: underline; }

/* --- Footer --- */
.site-footer { background: #1a1a2e; color: #ccc; padding-top: 60px; }
.footer-main { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; padding-bottom: 40px; }
.footer-title { font-size: 16px; font-weight: 600; color: #fff; margin-bottom: 20px; }
.footer-desc { font-size: 14px; line-height: 1.8; color: #aaa; }
.footer-wechat { margin-top: 16px; }
.footer-wechat img { width: 100px; height: 100px; border-radius: 4px; }
.footer-wechat span { display: block; font-size: 12px; margin-top: 6px; color: #888; }
.footer-nav li { margin-bottom: 10px; }
.footer-nav a { font-size: 14px; color: #aaa; transition: color .2s; }
.footer-nav a:hover { color: #fff; }
.footer-contact-list { list-style: none; }
.contact-item { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.contact-item .icon { flex-shrink: 0; color: #007ec8; }
.contact-item span { font-size: 14px; color: #aaa; line-height: 1.5; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 13px; color: #666;
}
.footer-icp a { color: #666; }
.footer-icp a:hover { color: #aaa; }

/* --- Back to Top --- */
.back-to-top {
    position: fixed; bottom: 30px; right: 30px;
    width: 44px; height: 44px;
    background: #007ec8; color: #fff;
    border-radius: 50%; display: none;
    align-items: center; justify-content: center;
    cursor: pointer; z-index: 999;
    box-shadow: 0 4px 15px rgba(0,126,200,0.3);
    transition: all .3s;
}
.back-to-top:hover { background: #005a94; transform: translateY(-3px); }
.back-to-top.visible { display: flex; }

/* --- Language Toggle --- */
body.lang-zh .en { display: none !important; }
body.lang-en .zh { display: none !important; }
body { /* default zh */ }

/* ============================================
   Responsive Design
   ============================================ */

/* Tablet */
@media (max-width: 1024px) {
    .product-grid { grid-template-columns: repeat(2, 1fr); }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .footer-main { grid-template-columns: 1fr 1fr; }
    .product-detail-layout { flex-direction: column; }
    .product-gallery { flex: none; max-width: 500px; }
    .contact-layout { flex-direction: column; }
    .contact-info { flex: none; }
}

/* Mobile */
@media (max-width: 768px) {
    .section { padding: 50px 0; }
    .section-title h2 { font-size: 24px; }
    .hero-slider .swiper-slide { height: 300px; }
    .hero-caption h2 { font-size: 32px; letter-spacing: 1px; }
    .hero-caption p { font-size: 15px; }

    /* Mobile Nav */
    .mobile-toggle { display: block; }
    .header-nav {
        position: fixed; top: 72px; left: 0; right: 0; bottom: 0;
        background: #fff; padding: 20px;
        transform: translateX(100%);
        transition: transform .3s;
        overflow-y: auto;
    }
    .header-nav.open { transform: translateX(0); }
    .nav-list { flex-direction: column; gap: 0; }
    .nav-item .nav-link { padding: 14px 16px; border-bottom: 1px solid #f0f0f0; }
    .dropdown-menu {
        position: static; box-shadow: none;
        padding-left: 20px;
    }
    .nav-item.has-dropdown:hover > .dropdown-menu,
    .nav-item.has-dropdown.open > .dropdown-menu { display: block; }

    /* Content */
    .product-grid { grid-template-columns: 1fr; }
    .features-grid { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: 1fr; }
    .company-intro { flex-direction: column; gap: 30px; }
    .company-intro-visual { flex: none; width: 100%; }
    .list-layout { flex-direction: column; gap: 30px; }
    .list-sidebar { flex: none; }
    .footer-main { grid-template-columns: 1fr; gap: 30px; }
    .footer-bottom { flex-direction: column; gap: 8px; text-align: center; }
    .contact-form { grid-template-columns: 1fr; }
    .article-list-item { flex-direction: column; }
    .article-list-thumb { flex: none; height: 200px; }
}

@media (max-width: 480px) {
    .hero-slider .swiper-slide { height: 250px; }
    .hero-caption { width: 90%; }
    .hero-caption h2 { font-size: 24px; letter-spacing: 1px; }
    .btn { padding: 10px 24px; font-size: 14px; }
    .cta-banner h2 { font-size: 24px; }
    .cta-banner p { font-size: 15px; }
}
