/* ==================== Reset & Base ==================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: transparent;
    color: #1e293b;
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* ==================== Layout ==================== */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.page-content {
    flex: 1 0 auto;
}

/* ==================== Navbar ==================== */
.navbar {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(8px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0 auto;
    padding: 0 32px;
    flex-wrap: wrap;
    height: 64px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #0f2b4d, #1e4a76);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    line-height: 64px;
}

.logo span {
    background: none;
    color: #2563eb;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-links a {
    font-weight: 500;
    color: #334155;
    transition: color 0.2s;
    font-size: 0.95rem;
    line-height: 64px;
}

.nav-links a:hover,
.nav-links a.active {
    color: #2563eb;
}

.nav-auth {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-user {
    color: #475569;
    font-size: 0.9rem;
    line-height: 64px;
}

.btn-login {
    display: inline-flex;
    align-items: center;
    padding: 0 24px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid #cbd5e1;
    color: #1e293b;
    transition: all 0.2s ease;
    line-height: 36px;
}

.btn-login:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #f8fafc;
}

.btn-logout {
    padding: 0 16px;
    border-radius: 20px;
    font-size: 0.85rem;
    border: 1px solid #e2e8f0;
    background: transparent;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 36px;
}

.btn-logout:hover {
    border-color: #ef4444;
    color: #ef4444;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.8rem;
    background: none;
    border: none;
    cursor: pointer;
    color: #1e293b;
    padding: 8px;
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 1.2rem;
        padding: 1.5rem 0 0.5rem;
    }
    .nav-links.show {
        display: flex;
    }
    .mobile-menu-btn {
        display: block;
    }
    .nav-auth {
        width: 100%;
        justify-content: center;
        margin-top: 12px;
    }
}

/* ==================== Buttons ==================== */
.btn-custom {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 40px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary-custom {
    background: #2563eb;
    color: white;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.2);
}

.btn-primary-custom:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
    color: white;
}

.btn-outline-custom {
    background: transparent;
    border: 1px solid #cbd5e1;
    color: #1e293b;
}

.btn-outline-custom:hover {
    border-color: #2563eb;
    color: #2563eb;
    background: #f8fafc;
}

/* ==================== Hero ==================== */
.hero-section {
    padding: 200px 0 64px;
    background: transparent;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.hero-section h1 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    max-width: 900px;
    background: linear-gradient(135deg, #0f2b4d, #2563eb);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 16px;
}

.hero-section h2 {
    font-size: 3.2rem;
    font-weight: 800;
    line-height: 1.2;
    max-width: 900px;
    background: linear-gradient(135deg, #0f2b4d, #2563eb);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    margin-bottom: 24px;
}

.hero-section p {
    font-size: 1.25rem;
    color: #475569;
    max-width: 700px;
    margin-bottom: 32px;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

@media (max-width: 640px) {
    .hero-section h1 { font-size: 2.2rem; }
    .hero-section p { font-size: 1rem; }
}

/* ==================== Sections ==================== */
.section {
    padding: 80px 0;
    scroll-margin-top: 80px;
}

.section-title {
    font-size: 2.2rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
    color: #0f2b4d;
}

.section-sub {
    text-align: center;
    color: #5b6e8c;
    max-width: 700px;
    margin: 0 auto 56px auto;
    font-size: 1.1rem;
}

.section.alt-bg {
    background: transparent;
}

/* ==================== Service Cards ==================== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 32px;
}

.service-card {
    background: white;
    border-radius: 28px;
    padding: 32px 24px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    border: 1px solid #eef2f6;
    display: block;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.08);
    border-color: #cbdff5;
}

.card-icon {
    font-size: 2.8rem;
    color: #2563eb;
    margin-bottom: 24px;
}

.service-card h3 {
    font-size: 1.6rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0f2b4d;
}

.service-card p {
    color: #475569;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.feature-list {
    margin: 20px 0 24px;
    padding: 0;
}

.feature-list li {
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: #475569;
}

.feature-list i {
    color: #2563eb;
    font-size: 0.8rem;
    width: 18px;
}

.card-link {
    font-weight: 600;
    color: #2563eb;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.95rem;
}

.card-link:hover {
    gap: 10px;
}

/* ==================== Case Cards ==================== */
.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 32px;
}

.case-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.04);
    border: 1px solid #e9edf2;
    transition: all 0.25s;
    display: block;
}

.case-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 30px -12px rgba(0, 0, 0, 0.1);
}

.case-content {
    padding: 28px;
}

.case-tag {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    background: #eef2ff;
    color: #2563eb;
    display: inline-block;
    padding: 4px 12px;
    border-radius: 30px;
    margin-bottom: 16px;
}

.case-card h4 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0f2b4d;
}

.case-card p {
    color: #475569;
    font-size: 0.95rem;
}

.case-stats {
    margin-top: 20px;
    font-weight: 600;
    color: #0f2b4d;
    border-top: 1px solid #eef2f6;
    padding-top: 16px;
    font-size: 0.9rem;
}

/* ==================== Advantages ==================== */
.adv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.adv-item i {
    font-size: 2.2rem;
    color: #2563eb;
    margin-bottom: 16px;
    display: block;
}

.adv-item h4 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: #0f2b4d;
}

.adv-item p {
    color: #4a5a7a;
    font-size: 0.95rem;
}

/* ==================== News Grid ==================== */
.news-grid {
    display: grid;
    gap: 24px;
}

.news-card {
    display: flex;
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
    border: 1px solid #e9edf2;
    transition: all 0.25s;
}

.news-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.news-card-body {
    padding: 24px;
    flex: 1;
}

.news-card-body h5 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: #0f2b4d;
}

.news-card-body p {
    color: #475569;
    font-size: 0.95rem;
    margin-bottom: 12px;
}

.news-meta {
    color: #94a3b8;
    font-size: 0.85rem;
}

@media (max-width: 640px) {
    .news-card {
        flex-direction: column;
    }
}

/* ==================== CTA ==================== */
.cta-section {
    background: linear-gradient(110deg, #0f2b4d 0%, #1a4a7a 100%);
    color: white;
    text-align: center;
    border-radius: 24px;
    margin: 0 auto;
    padding: 56px 32px;
    max-width: 1100px;
}

.cta-section h2 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.cta-section p {
    margin-bottom: 32px;
    opacity: 0.9;
}

.cta-form {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.cta-form input,
.cta-form textarea {
    padding: 14px 20px;
    border-radius: 60px;
    border: none;
    font-size: 0.95rem;
    width: 100%;
    background: white;
    font-family: inherit;
}

.cta-form textarea {
    border-radius: 24px;
    resize: vertical;
}

.cta-form .btn-submit {
    background: #facc15;
    color: #0f2b4d;
    font-weight: 700;
    padding: 14px 32px;
    border-radius: 40px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s;
}

.cta-form .btn-submit:hover {
    background: #ffdd44;
    transform: translateY(-2px);
}

/* ==================== Contact Page ==================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: start;
}

.contact-info h3,
.contact-form h3 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: #0f2b4d;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 24px;
}

.contact-item i {
    font-size: 1.5rem;
    color: #2563eb;
    width: 24px;
    margin-top: 4px;
}

.contact-item h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: #0f2b4d;
}

.contact-item p {
    color: #475569;
    font-size: 0.95rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #334155;
    font-size: 0.95rem;
}

.form-group label .required {
    color: #ef4444;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-form-submit {
    background: #2563eb;
    color: white;
    padding: 14px 32px;
    border-radius: 40px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-form-submit:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.alert-success-custom {
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #166534;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

.alert-danger-custom {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* ==================== About Page ==================== */
.about-content {
    max-width: 800px;
    margin: 0 auto;
}

.about-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #0f2b4d;
}

.about-content p {
    color: #475569;
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    margin: 32px 0 16px;
    color: #0f2b4d;
}

.culture-list {
    list-style: none;
    padding: 0;
}

.culture-list li {
    padding: 16px 20px;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: 12px;
    border-left: 4px solid #2563eb;
    color: #475569;
    font-size: 1rem;
}

.culture-list li strong {
    color: #0f2b4d;
}

/* ==================== News Detail ==================== */
.news-detail {
    max-width: 800px;
    margin: 0 auto;
}

.news-detail h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #0f2b4d;
}

.news-detail .meta {
    color: #94a3b8;
    font-size: 0.9rem;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e9edf2;
}

.news-detail .content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #334155;
}

.news-detail .content p {
    margin-bottom: 16px;
}

.news-detail .content img {
    max-width: 100%;
    border-radius: 12px;
    margin: 20px 0;
}

/* ==================== Footer ==================== */
.footer {
    flex-shrink: 0;
    background: #0f172a;
    color: #cbd5e6;
    padding: 28px 0 16px;
    font-size: 0.9rem;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.footer-grid {
    display: flex;
    justify-content: center;
    gap: 60px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .footer-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 40px;
    }
}

.footer-col h4 {
    color: white;
    margin-bottom: 12px;
    font-weight: 600;
}

.footer-col a {
    display: block;
    color: #94a3b8;
    margin-bottom: 12px;
    transition: color 0.2s;
}

.footer-col a:hover {
    color: #facc15;
}

.footer-col p {
    margin-bottom: 12px;
}

.footer-col p i {
    margin-right: 8px;
    color: #2563eb;
}

.copyright {
    text-align: center;
    padding-top: 16px;
    border-top: 1px solid #1e293b;
}

.copyright-info {
    margin: 0;
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.8;
}

.copyright-info a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.copyright-info a:hover {
    color: #facc15;
}

/* ==================== Empty State ==================== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #94a3b8;
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    color: #cbd5e1;
}

.empty-state p {
    font-size: 1.1rem;
}

/* ==================== Responsive ==================== */
@media (max-width: 640px) {
    .section { padding: 56px 0; }
    .section-title { font-size: 1.8rem; }
    .cta-section { padding: 40px 20px; border-radius: 32px; }
    .hero-section { padding: 60px 0 48px; }
}

/* ==================== Back to Top ==================== */
.back-to-top {
    position: fixed;
    bottom: 32px;
    right: 32px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #2563eb;
    color: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(16px);
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

/* ==================== Scroll Reveal Animations ==================== */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.reveal.in {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

/* 触摸设备禁用 hover 上浮效果 */
@media (hover: none) {
    .service-card:hover,
    .case-card:hover,
    .network-card:hover,
    .iot-card:hover { transform: none; box-shadow: 0 8px 20px rgba(0,0,0,0.04); }
}

/* ==================== 全局粒子动画背景 ==================== */
#globalParticleCanvas {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
    background: #f9fafc;
}

html {
    background: #f9fafc;
}

.navbar {
    position: sticky;
    z-index: 1000;
}

.footer {
    position: relative;
    z-index: 1;
}

.back-to-top {
    z-index: 999;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(ellipse at 30% 50%, rgba(37, 99, 235, 0.05) 0%, transparent 50%),
                radial-gradient(ellipse at 70% 50%, rgba(99, 102, 241, 0.04) 0%, transparent 50%);
    animation: heroGradient 12s ease-in-out infinite alternate;
    pointer-events: none;
}

@keyframes heroGradient {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(2%, -2%) rotate(1deg); }
}

/* ==================== Service Nav Bar ==================== */
.service-nav {
    background: white;
    border-bottom: 1px solid #e9edf2;
    padding: 0;
    position: sticky;
    top: 64px;
    z-index: 999;
}

.service-nav-inner {
    display: flex;
    justify-content: center;
    gap: 0;
    max-width: 1280px;
    margin: 0 auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.service-nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    font-size: 0.9rem;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.service-nav-item:hover {
    color: #2563eb;
    background: #f8fafc;
}

.service-nav-item.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 600;
}

.service-nav-item i {
    font-size: 1rem;
}

@media (max-width: 768px) {
    .service-nav-inner {
        justify-content: flex-start;
        padding: 0 16px;
    }
    .service-nav-item {
        padding: 12px 16px;
        font-size: 0.85rem;
    }
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 42px;
        height: 42px;
    }
}
