/* ===== 球友会(QYH) - 完整style.css ===== */
/* 全局重置与基础 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: #f9fafc;
    color: #1a1f2e;
    line-height: 1.5;
    transition: background 0.3s, color 0.3s;
    overflow-x: hidden;
}

body.dark {
    background: #0b1422;
    color: #e3e8f0;
}

a {
    color: #1a5a8c;
    text-decoration: none;
    transition: color 0.2s;
}

body.dark a {
    color: #8ab8e0;
}

a:hover {
    opacity: 0.8;
}

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

/* ===== 布局容器 ===== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== 毛玻璃卡片 ===== */
.glass {
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 28px;
    transition: background 0.3s, border-color 0.3s, box-shadow 0.3s;
}

body.dark .glass {
    background: rgba(20, 30, 45, 0.6);
    border-color: rgba(255, 255, 255, 0.08);
}

.glass:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

body.dark .glass:hover {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

/* ===== 卡片样式 ===== */
.card {
    background: #fff;
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);
    transition: all 0.2s ease;
    padding: 24px;
    border: 1px solid rgba(0, 0, 0, 0.02);
}

body.dark .card {
    background: #1a2638;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.04);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

body.dark .card:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

/* ===== 按钮 ===== */
.btn {
    display: inline-block;
    background: linear-gradient(135deg, #1a3b5c 0%, #0f2a44 100%);
    color: #fff;
    padding: 12px 32px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    letter-spacing: 0.02em;
    box-shadow: 0 4px 12px rgba(26, 59, 92, 0.2);
}

.btn:hover {
    background: linear-gradient(135deg, #0f2a44 0%, #091c30 100%);
    transform: scale(0.97);
    box-shadow: 0 6px 16px rgba(26, 59, 92, 0.3);
}

body.dark .btn {
    background: linear-gradient(135deg, #3a6a90 0%, #2a5070 100%);
    box-shadow: 0 4px 12px rgba(58, 106, 144, 0.3);
}

body.dark .btn:hover {
    background: linear-gradient(135deg, #2a5070 0%, #1a3a55 100%);
}

/* ===== 标题 ===== */
.section-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 2rem;
    letter-spacing: -0.01em;
    line-height: 1.2;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #f0c45a, #1a5a8c);
    border-radius: 4px;
    margin-top: 8px;
}

body.dark .section-title::after {
    background: linear-gradient(90deg, #8ab8e0, #f0c45a);
}

/* ===== 网格系统 ===== */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

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

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

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

@media (max-width: 768px) {
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* ===== 头部导航 ===== */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    transition: background 0.3s, border-color 0.3s;
}

body.dark header {
    background: rgba(10, 18, 30, 0.8);
    border-color: rgba(255, 255, 255, 0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}

.logo svg {
    height: 40px;
    width: auto;
    display: block;
    transition: transform 0.2s;
}

.logo:hover svg {
    transform: scale(1.02);
}

.nav-menu {
    display: flex;
    gap: 28px;
    font-weight: 500;
}

.nav-menu a {
    font-size: 0.95rem;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.15s ease;
    color: inherit;
}

.nav-menu a:hover,
.nav-menu a.active {
    border-bottom-color: #1a5a8c;
    color: #1a5a8c;
}

body.dark .nav-menu a:hover,
body.dark .nav-menu a.active {
    border-bottom-color: #8ab8e0;
    color: #8ab8e0;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 2rem;
    cursor: pointer;
    padding: 4px 8px;
    line-height: 1;
    color: inherit;
    transition: opacity 0.2s;
}

.menu-toggle:hover {
    opacity: 0.7;
}

.dark-toggle {
    background: none;
    border: 1px solid rgba(204, 204, 204, 0.5);
    border-radius: 30px;
    padding: 6px 14px;
    font-size: 0.9rem;
    cursor: pointer;
    margin-left: 12px;
    transition: all 0.2s;
    color: inherit;
}

.dark-toggle:hover {
    border-color: #1a5a8c;
    background: rgba(26, 90, 140, 0.05);
}

body.dark .dark-toggle {
    border-color: rgba(255, 255, 255, 0.2);
}

body.dark .dark-toggle:hover {
    border-color: #8ab8e0;
    background: rgba(138, 184, 224, 0.1);
}

@media (max-width: 900px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        background: rgba(255, 255, 255, 0.98);
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        padding: 20px 24px;
        gap: 12px;
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
        border-bottom: 1px solid rgba(0, 0, 0, 0.03);
        z-index: 99;
    }

    body.dark .nav-menu {
        background: rgba(10, 18, 30, 0.98);
        border-color: rgba(255, 255, 255, 0.05);
    }

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

    .menu-toggle {
        display: block;
    }

    .nav-menu a {
        padding: 10px 0;
        border-bottom: none;
        font-size: 1.1rem;
    }

    .nav-menu a:hover {
        background: rgba(26, 90, 140, 0.05);
        border-radius: 8px;
        padding-left: 8px;
    }
}

/* ===== Hero 区域 ===== */
.hero {
    padding: 60px 0 80px;
    background: linear-gradient(145deg, #e5eff9 0%, #d4e2f0 100%);
    border-radius: 0 0 60px 60px;
    transition: background 0.3s;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(240, 196, 90, 0.08) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

body.dark .hero {
    background: linear-gradient(145deg, #0f1a2b, #1a2a40);
}

body.dark .hero::before {
    background: radial-gradient(circle, rgba(138, 184, 224, 0.05) 0%, transparent 70%);
}

.hero-grid {
    display: flex;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.hero-text {
    flex: 1 1 400px;
}

.hero-text h1 {
    font-size: 3.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #1a3b5c, #0f2a44);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

body.dark .hero-text h1 {
    background: linear-gradient(135deg, #e3e8f0, #8ab8e0);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-text p {
    font-size: 1.2rem;
    opacity: 0.8;
    margin-bottom: 28px;
    max-width: 600px;
    line-height: 1.6;
}

.hero-visual {
    flex: 1 1 300px;
    text-align: center;
}

.hero-visual svg {
    width: 100%;
    max-width: 400px;
    height: auto;
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

/* ===== 统计数据 ===== */
.stats {
    display: flex;
    gap: 32px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.stat-item {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1a3b5c;
}

body.dark .stat-item {
    color: #8ab8e0;
}

.stat-item span {
    font-size: 0.9rem;
    display: block;
    font-weight: 400;
    opacity: 0.6;
    color: inherit;
}

/* ===== 轮播 ===== */
.carousel {
    overflow: hidden;
    border-radius: 28px;
    position: relative;
    background: rgba(255, 255, 255, 0.4);
}

body.dark .carousel {
    background: rgba(20, 30, 45, 0.4);
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
}

.carousel-item {
    min-width: 100%;
    padding: 32px 40px;
    font-size: 1.1rem;
    line-height: 1.6;
    text-align: center;
    font-style: italic;
    color: #2a3a50;
}

body.dark .carousel-item {
    color: #c8d4e0;
}

/* ===== FAQ 折叠 ===== */
.faq-item {
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding: 18px 0;
    cursor: pointer;
    transition: background 0.2s;
}

body.dark .faq-item {
    border-color: rgba(255, 255, 255, 0.08);
}

.faq-item:hover {
    background: rgba(26, 90, 140, 0.02);
}

body.dark .faq-item:hover {
    background: rgba(138, 184, 224, 0.03);
}

.faq-question {
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.05rem;
}

.faq-question span {
    transition: transform 0.3s;
    font-size: 1.2rem;
}

.faq-item.open .faq-question span {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
    opacity: 0;
    color: #4a5a6a;
    line-height: 1.6;
}

body.dark .faq-answer {
    color: #a0b0c0;
}

.faq-item.open .faq-answer {
    max-height: 300px;
    opacity: 1;
    margin-top: 12px;
}

/* ===== 返回顶部 ===== */
.back-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: linear-gradient(135deg, #1a3b5c, #0f2a44);
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    border: none;
    font-size: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 99;
}

.back-top.visible {
    opacity: 0.85;
}

.back-top:hover {
    opacity: 1;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

body.dark .back-top {
    background: linear-gradient(135deg, #3a6a90, #2a5070);
}

/* ===== Footer ===== */
.footer {
    padding: 40px 0 20px;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    margin-top: 60px;
    background: rgba(255, 255, 255, 0.3);
}

body.dark .footer {
    border-top-color: rgba(255, 255, 255, 0.05);
    background: rgba(10, 18, 30, 0.3);
}

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

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

.footer h4 {
    margin-bottom: 12px;
    font-weight: 600;
}

.footer a {
    opacity: 0.7;
    transition: opacity 0.2s;
}

.footer a:hover {
    opacity: 1;
}

.footer small {
    opacity: 0.6;
    display: block;
    line-height: 1.6;
}

/* ===== 滚动动画（基于 IntersectionObserver 的类） ===== */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== 额外响应式微调 ===== */
@media (max-width: 768px) {
    .hero {
        padding: 40px 0 60px;
        border-radius: 0 0 40px 40px;
    }

    .hero-text h1 {
        font-size: 2.2rem;
    }

    .hero-text p {
        font-size: 1rem;
    }

    .section-title {
        font-size: 1.6rem;
    }

    .stats {
        gap: 20px;
    }

    .stat-item {
        font-size: 1.4rem;
    }

    .carousel-item {
        padding: 24px 20px;
    }

    .back-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-text h1 {
        font-size: 1.8rem;
    }

    .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
}

/* ===== 暗黑模式额外适配 ===== */
body.dark .hero-text p {
    opacity: 0.7;
}

body.dark .stat-item span {
    opacity: 0.5;
}

/* ===== 图片懒加载占位效果 ===== */
img[data-src] {
    opacity: 0;
    transition: opacity 0.3s;
}

img[data-src].loaded {
    opacity: 1;
}

/* ===== 选择高亮 ===== */
::selection {
    background: #1a5a8c;
    color: #fff;
}

body.dark ::selection {
    background: #8ab8e0;
    color: #0b1422;
}

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(26, 59, 92, 0.3);
    border-radius: 10px;
}

body.dark ::-webkit-scrollbar-thumb {
    background: rgba(138, 184, 224, 0.3);
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(26, 59, 92, 0.5);
}

body.dark ::-webkit-scrollbar-thumb:hover {
    background: rgba(138, 184, 224, 0.5);
}

/* ===== 联系区域 ===== */
#contact > div {
    background: linear-gradient(135deg, #eef3f9, #e0e8f2);
    border-radius: 60px;
    padding: 40px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    transition: background 0.3s;
}

body.dark #contact > div {
    background: linear-gradient(135deg, #141e30, #1a2a40);
}

#contact h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

#contact p {
    line-height: 1.7;
    opacity: 0.8;
}

/* ===== 产品优势/核心能力区域 ===== */
[style*="background:rgba(26,59,92,0.03)"] {
    border-radius: 40px;
    transition: background 0.3s;
}

body.dark [style*="background:rgba(26,59,92,0.03)"] {
    background: rgba(58, 106, 144, 0.08) !important;
}

/* ===== 案例展示卡片微调 ===== */
#case .grid-3 .card {
    text-align: center;
    font-weight: 500;
    padding: 28px 20px;
}

/* ===== 新闻文章卡片 ===== */
article.card h4 {
    font-size: 1.05rem;
    margin-bottom: 6px;
    line-height: 1.4;
}

article.card time {
    font-size: 0.85rem;
    opacity: 0.6;
    display: block;
    margin-bottom: 8px;
}

article.card p {
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 10px;
}

article.card a {
    font-weight: 500;
    font-size: 0.9rem;
}

/* ===== HowTo 步骤区域 ===== */
#faq + section .card h3 {
    margin-top: 16px;
    font-size: 1.1rem;
}

#faq + section .card h3:first-child {
    margin-top: 0;
}

#faq + section .card p {
    margin-bottom: 8px;
    opacity: 0.8;
}

/* ===== 品牌介绍/企业故事卡片内边距微调 ===== */
#brand .card {
    padding: 32px;
}

#brand .card p {
    margin-bottom: 12px;
}

/* ===== 团队展示列表 ===== */
.card ul {
    list-style: none;
    padding: 0;
}

.card ul li {
    padding: 6px 0;
    position: relative;
    padding-left: 24px;
}

.card ul li::before {
    content: '✔️';
    position: absolute;
    left: 0;
    opacity: 0.7;
}

/* ===== 发展历程列表微调 ===== */
.card ul li {
    font-size: 0.95rem;
}

/* ===== 企业文化卡片 ===== */
.card h3 {
    margin-bottom: 12px;
    font-size: 1.2rem;
}

/* ===== 产品中心卡片 ===== */
#product .card h3 {
    font-size: 1.15rem;
    margin-bottom: 8px;
}

#product .card p {
    font-size: 0.95rem;
    opacity: 0.8;
}

/* ===== 解决方案/行业应用卡片 ===== */
#case .card h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

/* ===== 导航菜单暗黑模式链接颜色 ===== */
body.dark .nav-menu a {
    color: #c8d4e0;
}

body.dark .nav-menu a:hover,
body.dark .nav-menu a.active {
    color: #8ab8e0;
}

/* ===== 移动端菜单按钮颜色 ===== */
body.dark .menu-toggle {
    color: #e3e8f0;
}

/* ===== 确保所有SVG图标在暗黑模式下可见 ===== */
body.dark .hero-visual svg text {
    fill: #e3e8f0;
}

body.dark .hero-visual svg circle {
    stroke: #8ab8e0;
}

body.dark .hero-visual svg path {
    fill: #f0c45a;
}

/* ===== 结尾留白 ===== */