/* 香香漫画 - 企业官网样式表 */
/* 版本: 1.0 | 日期: 2025-01-15 */
/* 设计风格: 现代圆润, 明快活泼, 渐变与毛玻璃结合 */

/* ---------- 基础重置与全局样式 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: #fafafa;
    color: #333;
    line-height: 1.8;
    font-size: 16px;
    transition: background 0.3s, color 0.3s;
}

a {
    color: #FF6B6B;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    text-decoration: underline;
    color: #e05555;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ---------- 容器 ---------- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- 辅助类 ---------- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* ---------- 渐变Banner / Hero ---------- */
.hero {
    background: linear-gradient(135deg, #ffe0e0 0%, #fff5f5 50%, #ffe8e8 100%);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(255, 107, 107, 0.08) 0%, transparent 60%),
                radial-gradient(circle at 70% 60%, rgba(255, 107, 107, 0.05) 0%, transparent 50%);
    animation: heroGlow 8s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes heroGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-5%, -5%) scale(1.1); }
}

.hero h1 {
    font-size: 48px;
    color: #FF6B6B;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    text-shadow: 0 2px 10px rgba(255, 107, 107, 0.15);
}

.hero p {
    font-size: 20px;
    color: #666;
    max-width: 600px;
    margin: 0 auto 30px;
    position: relative;
    z-index: 1;
}

.hero .btn {
    display: inline-block;
    background: linear-gradient(135deg, #FF6B6B, #e05555);
    color: #fff;
    padding: 14px 44px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    position: relative;
    z-index: 1;
}

.hero .btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.4);
    text-decoration: none;
}

/* ---------- 标题样式 ---------- */
h2 {
    font-size: 32px;
    text-align: center;
    margin-bottom: 40px;
    color: #222;
    position: relative;
}

h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #FF6B6B, #ff8a8a);
    margin: 10px auto 0;
    border-radius: 2px;
}

h3 {
    font-size: 24px;
    margin: 30px 0 15px;
    color: #333;
}

h4 {
    font-size: 20px;
    margin: 20px 0 10px;
    color: #555;
}

/* ---------- 网格系统 ---------- */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.grid-3 {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ---------- 圆角卡片 ---------- */
.card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 25px;
    border-radius: 16px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.08);
}

.card h3 {
    font-size: 20px;
    margin-top: 0;
}

.card p {
    color: #666;
    font-size: 15px;
}

/* ---------- 毛玻璃效果通用 ---------- */
.glass {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 16px;
}

/* ---------- 关于部分 ---------- */
.about-content p {
    margin-bottom: 15px;
    text-indent: 2em;
}

.brand-history {
    background: rgba(248, 248, 248, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 30px;
    margin-top: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.brand-history ul {
    list-style: none;
    padding: 0;
}

.brand-history li {
    padding: 10px 0;
    border-bottom: 1px solid rgba(224, 224, 224, 0.5);
    display: flex;
    gap: 15px;
}

.brand-history li:last-child {
    border-bottom: none;
}

.brand-history .year {
    font-weight: bold;
    color: #FF6B6B;
    min-width: 80px;
}

/* ---------- 产品部分 ---------- */
.products .product-item {
    border: 1px solid rgba(238, 238, 238, 0.6);
    border-radius: 16px;
    padding: 25px 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s;
}

.products .product-item:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.06);
    border-color: #FF6B6B;
}

.products .product-item svg {
    margin: 0 auto 15px;
}

.products .product-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.products .product-item p {
    color: #666;
    font-size: 14px;
}

/* ---------- 解决方案部分 ---------- */
.solutions .solution-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(238, 238, 238, 0.5);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.3s;
}

.solutions .solution-card:hover {
    border-color: #FF6B6B;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.1);
}

.solutions .solution-card h3 {
    font-size: 20px;
    margin-top: 0;
}

.solutions .solution-card p {
    color: #666;
}

/* ---------- 案例部分 ---------- */
.cases .case-item {
    background: rgba(249, 249, 249, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s;
}

.cases .case-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
}

.cases .case-item h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.cases .case-item p {
    color: #666;
    font-size: 14px;
}

/* ---------- 客户评价 ---------- */
.testimonials .testimonial {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(238, 238, 238, 0.4);
    border-radius: 16px;
    padding: 25px;
    position: relative;
    transition: all 0.3s;
}

.testimonials .testimonial:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
}

.testimonials .testimonial::before {
    content: "\201C";
    font-size: 60px;
    color: #FF6B6B;
    position: absolute;
    top: 10px;
    left: 15px;
    opacity: 0.3;
}

.testimonials .testimonial p {
    margin-bottom: 10px;
    padding-left: 30px;
}

.testimonials .testimonial .author {
    font-weight: bold;
    color: #FF6B6B;
    text-align: right;
}

/* ---------- 新闻中心 ---------- */
.news .article-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(238, 238, 238, 0.4);
    border-radius: 16px;
    padding: 20px;
    transition: all 0.3s;
}

.news .article-card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.06);
    transform: translateY(-4px);
}

.news .article-card h3 {
    font-size: 18px;
    margin-top: 0;
}

.news .article-card .meta {
    color: #999;
    font-size: 13px;
    margin-bottom: 10px;
}

.news .article-card p {
    color: #666;
    font-size: 14px;
}

.news .article-card .read-more {
    color: #FF6B6B;
    font-weight: bold;
}

/* ---------- FAQ ---------- */
.faq .faq-item {
    border: 1px solid rgba(238, 238, 238, 0.5);
    border-radius: 12px;
    margin-bottom: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
}

.faq .faq-question {
    background: rgba(249, 249, 249, 0.7);
    padding: 15px 20px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.faq .faq-question:hover {
    background: rgba(240, 240, 240, 0.8);
}

.faq .faq-question .arrow {
    transition: transform 0.3s;
}

.faq .faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    background: rgba(255, 255, 255, 0.5);
}

.faq .faq-item.active .faq-answer {
    max-height: 500px;
    padding: 15px 20px;
}

.faq .faq-item.active .faq-question .arrow {
    transform: rotate(180deg);
}

/* ---------- 步骤/HowTo ---------- */
.howto .step {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.howto .step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #FF6B6B, #e05555);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
}

.howto .step-content h4 {
    margin: 0 0 8px;
}

.howto .step-content p {
    color: #666;
}

/* ---------- 联系我们 ---------- */
.contact .contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.contact .contact-info div {
    background: rgba(249, 249, 249, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s;
}

.contact .contact-info div:hover {
    transform: translateY(-4px);
}

.contact .contact-info h4 {
    color: #FF6B6B;
    margin-bottom: 10px;
}

.contact .contact-info p {
    color: #666;
    font-size: 14px;
}

/* ---------- 页脚 ---------- */
.footer {
    background: linear-gradient(135deg, #1a1a2e, #16213e);
    color: #ccc;
    padding: 40px 0 20px;
}

.footer .footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer h4 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 18px;
}

.footer ul {
    list-style: none;
    padding: 0;
}

.footer ul li {
    margin-bottom: 8px;
}

.footer ul li a {
    color: #ccc;
    font-size: 14px;
    transition: color 0.3s;
}

.footer ul li a:hover {
    color: #FF6B6B;
}

.footer .copyright {
    text-align: center;
    border-top: 1px solid rgba(68, 68, 68, 0.5);
    padding-top: 20px;
    font-size: 14px;
    color: #999;
}

/* ---------- 面包屑 ---------- */
.breadcrumb {
    padding: 15px 0;
    background: rgba(248, 248, 248, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    font-size: 14px;
    color: #999;
    border-bottom: 1px solid rgba(238, 238, 238, 0.3);
}

.breadcrumb a {
    color: #FF6B6B;
}

.breadcrumb span {
    margin: 0 8px;
}

/* ---------- 返回顶部 ---------- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #FF6B6B, #e05555);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
    z-index: 999;
    transition: all 0.3s;
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* ---------- 暗黑模式切换按钮 ---------- */
.dark-mode-toggle {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: rgba(51, 51, 51, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 20px;
    cursor: pointer;
    z-index: 999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s;
}

.dark-mode-toggle:hover {
    background: rgba(85, 85, 85, 0.9);
    transform: scale(1.05);
}

/* ---------- 暗黑模式 ---------- */
body.dark-mode {
    background: #1a1a1a;
    color: #ddd;
}

body.dark-mode header {
    background: rgba(34, 34, 34, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom-color: rgba(68, 68, 68, 0.5);
}

body.dark-mode .hero {
    background: linear-gradient(135deg, #2a2a2a 0%, #333 50%, #2a2a2a 100%);
}

body.dark-mode .hero h1 {
    color: #ff8a8a;
}

body.dark-mode .hero p {
    color: #aaa;
}

body.dark-mode .card,
body.dark-mode .brand-history,
body.dark-mode .case-item,
body.dark-mode .testimonial,
body.dark-mode .faq-question,
body.dark-mode .faq-answer,
body.dark-mode .contact-info div {
    background: rgba(42, 42, 42, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #ddd;
    border-color: rgba(68, 68, 68, 0.3);
}

body.dark-mode .product-item,
body.dark-mode .article-card,
body.dark-mode .solution-card {
    background: rgba(42, 42, 42, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-color: rgba(68, 68, 68, 0.4);
}

body.dark-mode .footer {
    background: linear-gradient(135deg, #0a0a1a, #111);
}

body.dark-mode .nav-links a {
    color: #ddd;
}

body.dark-mode .logo span {
    color: #ddd;
}

body.dark-mode h2,
body.dark-mode h3,
body.dark-mode h4 {
    color: #eee;
}

body.dark-mode .breadcrumb {
    background: rgba(30, 30, 30, 0.7);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

body.dark-mode .solutions .solution-card {
    border-color: rgba(68, 68, 68, 0.4);
}

body.dark-mode .about-content p {
    color: #ccc;
}

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        padding: 20px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
        gap: 15px;
        border-bottom: 1px solid rgba(238, 238, 238, 0.3);
    }

    .nav-links.open {
        display: flex;
    }

    .menu-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 32px;
    }

    .hero p {
        font-size: 16px;
    }

    .footer .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .hero {
        padding: 50px 0;
    }

    section {
        padding: 40px 0;
    }

    h2 {
        font-size: 28px;
    }

    .back-to-top,
    .dark-mode-toggle {
        width: 44px;
        height: 44px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .footer .footer-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 26px;
    }

    .hero .btn {
        padding: 12px 30px;
        font-size: 16px;
    }

    .container {
        padding: 0 15px;
    }
}

/* ---------- 搜索框 ---------- */
.search-box {
    display: flex;
    max-width: 400px;
    margin: 20px auto;
    border: 2px solid rgba(255, 107, 107, 0.6);
    border-radius: 50px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: border-color 0.3s;
}

.search-box:focus-within {
    border-color: #FF6B6B;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.1);
}

.search-box input {
    flex: 1;
    padding: 12px 20px;
    border: none;
    outline: none;
    font-size: 16px;
    background: transparent;
}

.search-box button {
    background: linear-gradient(135deg, #FF6B6B, #e05555);
    color: #fff;
    border: none;
    padding: 12px 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: opacity 0.3s;
}

.search-box button:hover {
    opacity: 0.9;
}

/* ---------- SVG 图标 ---------- */
.svg-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    display: block;
}

.svg-icon-sm {
    width: 40px;
    height: 40px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 8px;
}

/* ---------- 滚动动画 ---------- */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Header / 导航 ---------- */
header {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(238, 238, 238, 0.3);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: background 0.3s;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 28px;
    font-weight: bold;
    color: #FF6B6B;
}

.logo span {
    color: #333;
    transition: color 0.3s;
}

.nav-links {
    display: flex;
    gap: 30px;
    list-style: none;
}

.nav-links a {
    color: #333;
    font-weight: 500;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s, color 0.3s;
}

.nav-links a:hover {
    border-bottom-color: #FF6B6B;
    text-decoration: none;
    color: #FF6B6B;
}

.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
    background: none;
    border: none;
    color: #333;
    transition: color 0.3s;
}

/* ---------- 通用section间距 ---------- */
section {
    padding: 60px 0;
}

/* ---------- 特殊背景块 ---------- */
.bg-glass {
    background: rgba(248, 248, 248, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 30px;
    border-radius: 16px;
    margin-top: 30px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ---------- 暗黑模式下的玻璃效果保持 ---------- */
body.dark-mode .bg-glass {
    background: rgba(42, 42, 42, 0.7);
    border-color: rgba(68, 68, 68, 0.3);
}

/* ---------- 按钮通用 ---------- */
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, #FF6B6B, #e05555);
    color: #fff;
    padding: 12px 36px;
    border-radius: 50px;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.25);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(255, 107, 107, 0.35);
    text-decoration: none;
}

/* ---------- 暗黑模式下的搜索框 ---------- */
body.dark-mode .search-box {
    background: rgba(42, 42, 42, 0.7);
    border-color: rgba(255, 107, 107, 0.4);
}

body.dark-mode .search-box input {
    color: #ddd;
}

body.dark-mode .search-box input::placeholder {
    color: #888;
}

/* ---------- 暗黑模式下的菜单按钮 ---------- */
body.dark-mode .menu-toggle {
    color: #ddd;
}

body.dark-mode .nav-links {
    background: rgba(34, 34, 34, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* ---------- 滚动条美化 ---------- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #FF6B6B, #e05555);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #e05555;
}

/* ---------- 暗黑模式滚动条 ---------- */
body.dark-mode ::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

body.dark-mode ::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #ff8a8a, #e05555);
}

/* ---------- 图片懒加载占位 ---------- */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[loading="lazy"].loaded,
img[loading="lazy"]:not([loading]) {
    opacity: 1;
}

/* ---------- 数字动画计数器 ---------- */
.counter {
    font-weight: bold;
    color: #FF6B6B;
}