/* ==================== 全局样式 ==================== */
:root {
    --primary-color: #1E88E5;  /* 科技蓝 */
    --primary-dark: #1565C0;
    --primary-light: #42A5F5;
    --compute-accent: #9C27B0;  /* 浅紫色 - 算力服务辅助色 */
    --text-dark: #333333;  /* 深灰 */
    --text-light: #666666;
    --bg-white: #FFFFFF;
    --bg-light: #F5F5F5;
    --bg-gray: #FAFAFA;
    --border-color: #E0E0E0;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 16px rgba(0, 0, 0, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Microsoft YaHei", "微软雅黑", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    font-size: 14px;
    background-color: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== 头部导航栏 ==================== */
.header {
    background-color: var(--bg-white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    position: relative;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
}

.logo a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
}

.logo img {
    height: 40px;
    width: auto;
}

.main-nav {
    flex: 1;
    display: flex;
    justify-content: center;
    min-width: 0;
    overflow: hidden;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 20px;
    align-items: center;
    flex-wrap: nowrap;
}

.nav-list > li {
    position: relative;
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-list a {
    text-decoration: none;
    color: var(--text-dark);
    font-size: 15px;
    padding: 8px 0;
    display: block;
    transition: color 0.3s;
    white-space: nowrap;
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--primary-color);
}

.nav-list .has-submenu > a .arrow {
    font-size: 10px;
    margin-left: 5px;
    display: inline-block;
}

/* 确保非子菜单项不显示箭头 */
.nav-list > li:not(.has-submenu) .arrow {
    display: none !important;
}

/* 子菜单 */
.submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-white);
    box-shadow: var(--shadow-hover);
    border-radius: 4px;
    min-width: 180px;
    padding: 10px 0;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
}

.has-submenu:hover .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.submenu li {
    padding: 0;
}

.submenu a {
    padding: 10px 20px;
    display: block;
}

.submenu a:hover {
    background-color: var(--bg-light);
}

/* 右侧联系信息 */
.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-shrink: 0;
    min-width: 0;
}

.search-box {
    display: flex;
    align-items: center;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 5px 10px;
    flex-shrink: 1;
    min-width: 0;
}

.search-box input {
    border: none;
    outline: none;
    padding: 5px;
    font-size: 14px;
    width: 180px;
    min-width: 0;
    flex: 1;
}

.search-box .search-btn {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 0 5px;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.phone {
    color: var(--text-dark);
    text-decoration: none;
    font-size: 14px;
}

.btn-consult {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s, transform 0.2s;
}

.btn-consult:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

/* 移动端汉堡菜单 */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-dark);
    transition: all 0.3s;
}

/* ==================== Hero Banner区 ==================== */
.hero-banner {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 120px 0;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
}

.tech-lines {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    opacity: 0.3;
}

/* DDoS攻击拦截动画 */
.ddos-animation {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.ddos-animation::before,
.ddos-animation::after {
    content: '';
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: pulse 3s infinite;
}

.ddos-animation::after {
    animation-delay: 1.5s;
}

@keyframes pulse {
    0% {
        transform: translate(-50%, -50%) scale(0.8);
        opacity: 1;
    }
    100% {
        transform: translate(-50%, -50%) scale(2);
        opacity: 0;
    }
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 20px;
    line-height: 1.3;
}

.hero-subtitle {
    font-size: 18px;
    margin-bottom: 10px;
    line-height: 1.8;
}

.hero-subtitle-addon {
    font-size: 16px;
    margin-bottom: 30px;
    opacity: 0.95;
}

.hero-cta {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 40px;
}

.btn {
    padding: 12px 30px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background-color: var(--primary-dark);
    color: white;
}

.btn-primary:hover {
    background-color: #0D47A1;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.btn-secondary:hover {
    background-color: white;
    color: var(--primary-color);
}

/* ==================== 产品展示区 ==================== */
.products-section {
    padding: 80px 0;
    background-color: var(--bg-gray);
}

.section-title {
    text-align: center;
    font-size: 32px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.product-card {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 30px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    animation: fadeInUp 0.6s ease-out;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.product-card-compute {
    position: relative;
    background: var(--bg-white);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.product-card-compute::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, var(--compute-accent), var(--primary-color));
    border-radius: 8px;
    z-index: -1;
}

.product-card-compute::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--compute-accent), var(--primary-color));
    border-radius: 8px 8px 0 0;
}

.product-icon {
    font-size: 48px;
    margin-bottom: 20px;
    text-align: center;
}

.compute-icon {
    background: linear-gradient(135deg, var(--compute-accent), var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.product-title {
    font-size: 22px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.product-features {
    list-style: none;
    margin-bottom: 20px;
}

.product-features li {
    padding: 8px 0;
    color: var(--text-light);
    position: relative;
    padding-left: 20px;
}

.product-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.product-advantages {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.advantage-tag {
    background-color: var(--bg-light);
    color: var(--primary-color);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
}

.compute-types {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.compute-type-tag {
    background: linear-gradient(135deg, var(--compute-accent), var(--primary-color));
    color: white;
    padding: 6px 14px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
}

.product-scenario {
    color: var(--text-light);
    font-size: 13px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.product-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-link:hover {
    color: var(--primary-dark);
    transform: translateX(5px);
}

/* ==================== 行业解决方案区 ==================== */
.solutions-section {
    padding: 80px 0;
    background-color: var(--bg-white);
}

.industry-filters {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 8px 20px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-white);
    color: var(--text-dark);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 14px;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
}

.solution-card {
    background: var(--bg-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    animation: fadeInUp 0.6s ease-out;
}

.solution-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.solution-card.hidden {
    display: none;
}

.solution-image {
    height: 200px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-color));
    display: flex;
    align-items: center;
    justify-content: center;
}

.placeholder-img {
    font-size: 80px;
    opacity: 0.3;
}

.solution-content {
    padding: 25px;
}

.solution-title {
    font-size: 22px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 15px;
}

.solution-pain,
.solution-advantage {
    margin-bottom: 15px;
}

.solution-pain strong,
.solution-advantage strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 8px;
}

.solution-pain p {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
}

.solution-advantage ul {
    list-style: none;
    padding-left: 0;
}

.solution-advantage li {
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
    color: var(--text-light);
    font-size: 14px;
}

.solution-advantage li::before {
    content: '•';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
    font-size: 18px;
}

/* ==================== 安全资讯区 ==================== */
.news-section {
    padding: 80px 0;
    background-color: var(--bg-gray);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--bg-white);
    border-radius: 8px;
    padding: 25px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.news-date {
    color: var(--text-light);
    font-size: 12px;
    margin-bottom: 10px;
}

.news-title {
    font-size: 18px;
    font-weight: bold;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.news-excerpt {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
}

/* ==================== 页脚 ==================== */
.footer {
    background-color: var(--text-dark);
    color: white;
    padding: 50px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-col h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: white;
}

.footer-col p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    line-height: 1.8;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s;
}

.footer-col a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
}

.footer-bottom a:hover {
    color: white;
}

/* 非首页页脚底部统一白色（使用footer-section的页面） */
/* 当footer包含footer-section时，页脚底部文字为纯白色 */
.footer-content:has(.footer-section) + .footer-bottom {
    color: white !important;
}

.footer-content:has(.footer-section) + .footer-bottom a {
    color: white !important;
}

.footer-content:has(.footer-section) + .footer-bottom a:hover {
    color: white !important;
    opacity: 0.9;
}

/* 兼容不支持:has()的浏览器 - 使用通用选择器 */
/* 由于非首页都使用footer-section，我们可以直接覆盖 */
/* 如果浏览器不支持:has()，这个规则仍然有效 */
.footer .footer-section + * + .footer-bottom,
.footer .footer-section ~ .footer-bottom {
    color: white !important;
}

.footer .footer-section + * + .footer-bottom a,
.footer .footer-section ~ .footer-bottom a {
    color: white !important;
}

/* ==================== 非首页页脚样式（统一白色） ==================== */
/* 首页使用 footer-col，其他页面使用 footer-section */
.footer-section h4 {
    font-size: 18px;
    margin-bottom: 15px;
    color: white !important;
}

.footer-section p {
    color: white !important;
    font-size: 14px;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
    color: white !important;
}

.footer-section a {
    color: white !important;
    text-decoration: none;
    font-size: 14px;
    transition: opacity 0.3s;
}

.footer-section a:hover {
    opacity: 0.8;
    color: white !important;
}

/* 非首页页脚底部统一白色 */
/* 由于非首页页面使用footer-section，首页使用footer-col，我们可以通过这个来区分 */
/* 为包含footer-section的页脚底部设置纯白色（覆盖默认的半透明样式） */
.footer-content:has(.footer-section) + .footer-bottom {
    color: white !important;
}

.footer-content:has(.footer-section) + .footer-bottom a {
    color: white !important;
}

.footer-content:has(.footer-section) + .footer-bottom a:hover {
    color: white !important;
    opacity: 0.9;
}

/* 兼容旧浏览器：使用更通用的方法 */
/* 如果浏览器不支持:has()，可以通过添加内联样式或使用JavaScript */
/* 这里提供一个备用方案：直接覆盖，因为非首页都使用footer-section */
.footer .footer-section ~ * + .footer-bottom,
.footer-bottom:not(.footer-col ~ * + .footer-bottom) {
    /* 备用规则 */
}

/* ==================== 在线咨询悬浮窗 ==================== */
.consult-widget {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 999;
}

.consult-toggle {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: var(--shadow-hover);
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
}

.consult-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.4);
}

.consult-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 320px;
    background: var(--bg-white);
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    padding: 20px;
    display: none;
}

.consult-panel.show {
    display: block;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.consult-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

.consult-header h4 {
    font-size: 18px;
    color: var(--text-dark);
}

.consult-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
}

.consult-content p {
    color: var(--text-light);
    font-size: 14px;
    margin-bottom: 10px;
    line-height: 1.6;
}

.consult-actions {
    margin-top: 20px;
}

.consult-tip {
    font-size: 12px;
    color: var(--text-light);
    margin-top: 10px;
    text-align: center;
}

/* ==================== 动画效果 ==================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeInUp 0.6s ease-out;
}

/* ==================== 响应式设计 ==================== */
@media (max-width: 1024px) {
    .nav-list {
        gap: 20px;
    }
    
    .search-box input {
        width: 150px;
    }
    
    .hero-title {
        font-size: 32px;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        box-shadow: var(--shadow);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s;
    }
    
    .main-nav.active {
        max-height: 500px;
    }
    
    .nav-list {
        flex-direction: column;
        padding: 20px;
        gap: 0;
    }
    
    .nav-list > li {
        border-bottom: 1px solid var(--border-color);
        padding: 10px 0;
    }
    
    .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 10px 0 0 20px;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s;
    }
    
    .has-submenu.active .submenu {
        max-height: 300px;
    }
    
    .header-right {
        display: none;
    }
    
    .hero-title {
        font-size: 28px;
    }
    
    .hero-subtitle {
        font-size: 16px;
    }
    
    .hero-subtitle-addon {
        font-size: 14px;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    .products-grid,
    .solutions-grid,
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .industry-filters {
        gap: 10px;
    }
    
    .filter-btn {
        padding: 6px 15px;
        font-size: 13px;
    }
    
    .consult-widget {
        right: 15px;
        bottom: 15px;
    }
    
    .consult-panel {
        width: calc(100vw - 30px);
        max-width: 320px;
    }
}

@media (max-width: 375px) {
    .hero-title {
        font-size: 24px;
    }
    
    .hero-subtitle {
        font-size: 14px;
    }
    
    .section-title {
        font-size: 24px;
    }
    
    .product-card,
    .solution-card,
    .news-card {
        padding: 20px;
    }
}

