/* ============================================
   enhancements.css — Visual Polish Layer
   Full-site aesthetic upgrade (non-breaking)
   ============================================ */

/* ============================================
   1. ENHANCED DESIGN TOKENS
   ============================================ */

:root {
    /* Extended color palette */
    --accent-gold: #d4a843;
    --accent-teal: #0ea5a0;
    --accent-rose: #e11d48;
    --accent-green: #059669;
    --accent-purple: #7c3aed;
    --accent-orange: #ea580c;

    /* Blue gradient variations */
    --gradient-primary: linear-gradient(135deg, #0066cc 0%, #2d8cf0 50%, #5cadff 100%);
    --gradient-secondary: linear-gradient(135deg, #4a90e2 0%, #67b1ff 100%);
    --gradient-dark: linear-gradient(135deg, #0f1923 0%, #1a1a2e 40%, #0d1b3e 100%);
    --gradient-card: linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(0,102,204,0.03) 100%);

    /* Enhanced shadows */
    --shadow-card-hover: 0 20px 50px rgba(0, 0, 0, 0.12);
    --shadow-button: 0 8px 25px rgba(0, 102, 204, 0.35);
    --shadow-glow: 0 0 40px rgba(0, 102, 204, 0.15);

    /* Refined spacing */
    --section-padding: 100px 40px;
    --section-gap: 80px;

    /* Typography */
    --font-display: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', sans-serif;
}

/* ============================================
   2. SECTION BACKGROUND ENHANCEMENTS
   ============================================ */

/* Alternating section backgrounds with subtle gradients */
.products-section {
    background: linear-gradient(180deg, #f8fafc 0%, #f0f4f8 50%, #f8fafc 100%);
}

.cases-section {
    background: linear-gradient(180deg, #ffffff 0%, #fafbfc 100%);
    position: relative;
}

.cases-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0,102,204,0.15), transparent);
}

.industries-section {
    background: var(--white);
    position: relative;
}

.service-section {
    background: linear-gradient(180deg, #f5f7fa 0%, #eef1f6 100%);
}

/* ============================================
   3. ENHANCED SECTION HEADERS
   ============================================ */

.section-header {
    position: relative;
    margin-bottom: 70px;
}

/* Badge/pill above title */
.section-badge {
    display: inline-block;
    background: rgba(0, 102, 204, 0.08);
    color: var(--primary-blue);
    padding: 6px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 16px;
    border: 1px solid rgba(0, 102, 204, 0.12);
}

.section-title {
    font-size: 42px;
    letter-spacing: -0.5px;
    line-height: 1.2;
    position: relative;
    display: inline-block;
}

/* Decorative accent line under title */
.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    margin: 16px auto 0;
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue), var(--primary-blue));
    border-radius: 2px;
}

.section-subtitle {
    margin-top: 8px;
    line-height: 1.8;
}

/* ============================================
   4. CARD VISUAL UPGRADES
   ============================================ */

/* Product cards */
.product-module {
    border: 1px solid transparent;
    transition: all 0.4s cubic-bezier(0.22, 0.86, 0.39, 0.97);
}

.product-module:hover {
    border-color: rgba(0, 102, 204, 0.1);
    box-shadow: var(--shadow-card-hover);
}

/* Case cards */
.case-card {
    border: 1px solid transparent;
    transition: all 0.4s cubic-bezier(0.22, 0.86, 0.39, 0.97);
}

.case-card:hover {
    border-color: rgba(0, 102, 204, 0.1);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-10px);
}

.case-card:hover .case-image {
    transform: scale(1.05);
}

.case-image {
    transition: transform 0.5s ease;
}

/* Service cards - glass morphism */
.service-card {
    border: 1px solid rgba(0, 102, 204, 0.06);
    transition: all 0.4s cubic-bezier(0.22, 0.86, 0.39, 0.97);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--gradient-primary);
    transition: height 0.4s ease;
}

.service-card:hover::before {
    height: 100%;
}

.service-card:hover {
    border-color: rgba(0, 102, 204, 0.15);
}

.service-card.main::before {
    background: linear-gradient(to bottom, rgba(255,255,255,0.6), rgba(255,255,255,0.2));
}

/* Advantage cards */
.advantage-card {
    border: 1px solid transparent;
    transition: all 0.4s cubic-bezier(0.22, 0.86, 0.39, 0.97);
    position: relative;
    overflow: hidden;
}

.advantage-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
                rgba(0, 102, 204, 0.04) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.advantage-card:hover {
    border-color: rgba(0, 102, 204, 0.15);
    box-shadow: var(--shadow-card-hover);
    transform: translateY(-6px);
}

.advantage-card:hover::after {
    opacity: 1;
}

/* ============================================
   5. BUTTON ENHANCEMENTS
   ============================================ */

/* CTA buttons - shine effect */
.cta-button {
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.cta-button::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}

.cta-button:hover::after {
    left: 100%;
}

.cta-button:active {
    transform: scale(0.97) !important;
}

/* More link - enhanced */
.more-link {
    position: relative;
    overflow: hidden;
    transition: all 0.35s cubic-bezier(0.22, 0.86, 0.39, 0.97);
}

.more-link:hover {
    padding-right: 48px;
}

.more-link::after {
    content: '→';
    position: absolute;
    right: 20px;
    opacity: 0;
    transition: all 0.3s ease;
    transform: translateX(-10px);
}

.more-link:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   6. LINK & NAV ENHANCEMENTS
   ============================================ */

/* Animated underline for nav */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 1px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

/* Footer links */
.footer-column a {
    display: inline-block;
    transition: transform 0.3s ease, color 0.3s ease;
}

.footer-column a:hover {
    transform: translateX(8px);
    color: var(--white);
}

/* ============================================
   7. IMAGE ENHANCEMENTS
   ============================================ */

/* Product images */
.product-image img,
.product-visual img {
    transition: transform 0.5s cubic-bezier(0.22, 0.86, 0.39, 0.97),
                filter 0.3s ease;
}

.product-image:hover img,
.product-visual:hover img {
    transform: scale(1.03);
    filter: brightness(1.05);
}

/* ============================================
   8. FOOTER VISUAL UPGRADE
   ============================================ */

.footer {
    background: linear-gradient(180deg, #141a2e 0%, #0f1923 60%, #0a0f18 100%);
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 102, 204, 0.4), transparent);
}

.footer-column h4 {
    font-weight: 700;
    letter-spacing: 0.5px;
}

.footer-column h4::after {
    width: 40px;
    height: 2px;
    border-radius: 1px;
}

.footer-bottom {
    background: rgba(0, 0, 0, 0.2);
}

/* ============================================
   9. SCROLLBAR STYLING
   ============================================ */

@media (hover: hover) {
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    ::-webkit-scrollbar-track {
        background: var(--gray-light);
    }

    ::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, var(--primary-blue), var(--secondary-blue));
        border-radius: 4px;
    }

    ::-webkit-scrollbar-thumb:hover {
        background: var(--primary-blue);
    }

    /* Firefox */
    html {
        scrollbar-color: var(--primary-blue) var(--gray-light);
        scrollbar-width: thin;
    }
}

/* ============================================
   10. TEXT SELECTION
   ============================================ */

::selection {
    background: rgba(0, 102, 204, 0.15);
    color: var(--primary-blue);
}

::-moz-selection {
    background: rgba(0, 102, 204, 0.15);
    color: var(--primary-blue);
}

/* ============================================
   11. FOCUS STATES (ACCESSIBILITY)
   ============================================ */

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============================================
   12. INDUSTRY MODULE ENHANCEMENTS
   ============================================ */

.industry-module {
    border: 1px solid rgba(0, 0, 0, 0.04);
    background: #0d1b2a;
}

/* 遮罩加深 — 默认深色，hover 蓝调 */
.industry-overlay {
    background: linear-gradient(135deg, rgba(0, 25, 60, 0.55) 0%, rgba(10, 15, 35, 0.82) 100%);
}

.industry-module:hover .industry-overlay {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.9) 0%, rgba(20, 30, 50, 0.85) 100%);
}

.industry-module:hover {
    border-color: rgba(0, 102, 204, 0.2);
}

/* 去掉 industry-module 内部 product-cta a 标签的白底 + 蓝框 */
.industry-module > a {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    display: block;
}

.industry-tag {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s ease;
}

.industry-module:hover .industry-tag {
    background: rgba(0, 102, 204, 0.85);
    border-color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   13. STATS SECTION ENHANCEMENT
   ============================================ */

.stats-section {
    background: var(--gradient-dark);
    position: relative;
    overflow: hidden;
}

.stats-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(0, 102, 204, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(74, 144, 226, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.stat-number {
    background: linear-gradient(135deg, #fff 30%, #a0ceff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ============================================
   14. HERO BANNER ENHANCEMENT
   ============================================ */

.hero-title {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--primary-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* 覆盖 styles.css 的 padding: 120px → 让 flexbox justify-content:center 生效 */
.hero-content {
    padding: 0 40px 20px;
}

.banner-slide .hero-badge {
    display: inline-block;
    background: rgba(0, 102, 204, 0.06);
    border: 1px solid rgba(0, 102, 204, 0.12);
    padding: 8px 22px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary-blue);
    letter-spacing: 2px;
    margin-bottom: 20px;
}

/* ============================================
   15. SMOOTH PAGE TRANSITIONS
   ============================================ */

body {
    animation: pageIn 0.5s ease;
}

@keyframes pageIn {
    from {
        opacity: 0.95;
        filter: blur(2px);
    }
    to {
        opacity: 1;
        filter: blur(0);
    }
}

/* ============================================
   16. DECORATIVE DIVIDERS
   ============================================ */

.section-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 102, 204, 0.15) 20%, rgba(0, 102, 204, 0.15) 80%, transparent);
    margin: 0 auto;
}

/* ============================================
   17. RESPONSIVE FINE-TUNING
   ============================================ */

@media (max-width: 768px) {
    .section-title {
        font-size: 32px;
    }

    .section-title::after {
        width: 40px;
        height: 2px;
    }

    .section-header {
        margin-bottom: 40px;
    }

    .hero-title {
        font-size: 36px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 28px;
    }
}

/* ============================================
   新闻轮播 - 覆盖 styles.css 的 conflicting 规则
   (enhancements.css 最后加载，确保生效)
   ============================================ */

/* news-slide 填满父容器 —— 覆盖 styles.css 的 flex:0 0 33.333% */
.news-slide {
    flex: 0 0 100%;
    padding: 0;
    width: 100%;
}

/* news-dot active 精确控制 —— 覆盖 styles.css 的 background + transform */
.news-dot.active {
    background: var(--primary);
    width: 28px;
    border-radius: 5px;
    transform: none;
}

/* ============================================
   加载顺序修复 —— 覆盖 styles.css 对 components.css 的覆盖
   (enhancements.css 全站最后加载)
   ============================================ */

/* hero-title: 恢复 letter-spacing（styles 压成了 -1px 太紧） */
.hero-title {
    letter-spacing: 3px;
}

/* hero-subtitle: 恢复字号/行高/间距/宽度 */
.hero-subtitle {
    font-size: 22px;
    line-height: 1.8;
    margin-bottom: 60px;
    max-width: 900px;
}

/* 行业模块：描述始终可见 + 字体调小 + 宽度对齐 */
.industry-desc {
    opacity: 1;
    transform: translateY(0);
    font-size: 13px;
    line-height: 1.5;
}

.industry-name {
    font-size: 18px;
    margin-bottom: 6px;
}

.industry-content {
    padding: 24px;
    background: linear-gradient(to top, rgba(0,0,0,0.05) 0%, rgba(0,0,0,0.05) 10%, transparent 10%);
}

.industry-name,
.industry-desc {
    text-shadow: 0 1px 4px rgba(0,0,0,0.7);
}

/* case-card: 恢复白底卡片（styles 覆盖成了深色渐变） */
.case-card {
    background: var(--white);
    border-radius: 12px;
}

/* section 标题/副标题颜色：恢复 CSS 变量（styles 写死了硬编码色值） */
.section-title {
    color: var(--text-primary);
}

.section-subtitle {
    color: var(--text-secondary);
}

/* ============================================
   Banner 文字 & CTA 按钮
   关键：hero-content 不用 transform（会被 WOW 动画覆盖），依赖父级 flex 居中
   ============================================ */
.banner-slide.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* hero-content：让父级 flexbox 居中——不用 transform，不被动画冲掉 */
.hero-content {
    position: relative;
    width: 100%;
    max-width: 1000px;
    text-align: center;
    padding: 0 40px;
    box-sizing: border-box;
    z-index: 10;
}

/* CTA 按钮绝对定位在底部 */
.banner-cta {
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}
