/* Reset & Base */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    background: #f8f9fa;
    color: #333;
    line-height: 1.8;
    transition: background 0.3s, color 0.3s;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.dark {
    background: #1a1a2e;
    color: #e0e0e0;
}

/* Typography & Links */
a {
    color: #1a3c6e;
    text-decoration: none;
    transition: color 0.2s;
}
body.dark a {
    color: #7aa8d8;
}
a:hover {
    color: #ffc107;
}

ul, ol {
    list-style: none;
}

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

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

/* Header / Navigation */
.header {
    background: linear-gradient(135deg, #1a3c6e, #2a5a8a);
    color: #fff;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: background 0.3s, box-shadow 0.3s;
}
body.dark .header {
    background: linear-gradient(135deg, #0f1f3a, #1a3c6e);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo {
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
}
.logo svg {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
}

.nav {
    display: flex;
    gap: 25px;
    font-size: 16px;
}
.nav a {
    color: #fff;
    padding: 5px 0;
    border-bottom: 2px solid transparent;
    transition: border-color 0.3s, color 0.3s;
}
.nav a:hover {
    border-bottom-color: #ffc107;
    color: #ffc107;
}

.menu-toggle {
    display: none;
    background: none;
    border: 2px solid #fff;
    color: #fff;
    font-size: 24px;
    padding: 5px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s;
}
.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Search box */
.search-box {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 30px;
    padding: 6px 15px;
    max-width: 280px;
    transition: background 0.3s;
}
.search-box:focus-within {
    background: rgba(255, 255, 255, 0.25);
}
.search-box input {
    background: transparent;
    border: none;
    color: #fff;
    padding: 8px 5px;
    outline: none;
    width: 100%;
    font-size: 0.95rem;
}
.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}
.search-box button {
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 4px;
    transition: transform 0.2s;
}
.search-box button:hover {
    transform: scale(1.1);
}

/* Dark mode toggle */
.dark-toggle {
    background: none;
    border: 2px solid #fff;
    color: #fff;
    padding: 6px 14px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.3s, border-color 0.3s;
}
.dark-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Mobile nav */
.mobile-nav {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: #1a3c6e;
    padding: 20px;
    z-index: 999;
    flex-direction: column;
    gap: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s, opacity 0.3s;
}
body.dark .mobile-nav {
    background: #0f1f3a;
}
.mobile-nav a {
    color: #fff;
    font-size: 1.1rem;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: color 0.2s;
}
.mobile-nav a:hover {
    color: #ffc107;
}
.mobile-nav.open {
    display: flex;
}

/* Back to top */
.back-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #1a3c6e;
    color: #fff;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 999;
    opacity: 0;
    transition: opacity 0.4s, transform 0.3s, background 0.3s;
    border: none;
    pointer-events: none;
}
.back-top.show {
    opacity: 1;
    pointer-events: auto;
}
.back-top:hover {
    background: #2a5a8a;
    transform: translateY(-3px);
}

/* Breadcrumb */
.breadcrumb {
    padding: 15px 0;
    font-size: 0.9rem;
    color: #888;
    background: #f8f9fa;
    transition: background 0.3s, color 0.3s;
}
body.dark .breadcrumb {
    background: #1e1e32;
    color: #aaa;
}
.breadcrumb a {
    color: #1a3c6e;
    transition: color 0.2s;
}
body.dark .breadcrumb a {
    color: #7aa8d8;
}
.breadcrumb a:hover {
    color: #ffc107;
}
.breadcrumb span {
    margin: 0 5px;
}

/* Banner */
.banner {
    background: linear-gradient(135deg, #1a3c6e 0%, #2a5a8a 50%, #3a7aaa 100%);
    color: #fff;
    padding: 80px 0 60px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.banner::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 40%, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
    pointer-events: none;
    animation: bannerGlow 15s infinite alternate;
}
@keyframes bannerGlow {
    0% { transform: translate(0, 0); }
    100% { transform: translate(20px, -20px); }
}

.banner h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1;
}

.banner p {
    font-size: 1.3rem;
    max-width: 800px;
    margin: 0 auto 30px;
    opacity: 0.9;
    position: relative;
    z-index: 1;
}

.banner .cta {
    display: inline-block;
    background: #ffc107;
    color: #1a3c6e;
    padding: 14px 40px;
    border-radius: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.4);
    position: relative;
    z-index: 1;
}
.banner .cta:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 193, 7, 0.5);
    background: #ffca2c;
}

/* Banner slider */
.banner-slider {
    display: flex;
    overflow: hidden;
    max-width: 1000px;
    margin: 40px auto 0;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}
.banner-slide {
    min-width: 100%;
    padding: 50px 30px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: center;
    transition: transform 0.5s ease;
}
.banner-slide h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    font-weight: 600;
}
.banner-slide p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Sections */
.section {
    padding: 70px 0;
    transition: background 0.3s;
}

.section-title {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 50px;
    position: relative;
    font-weight: 700;
    color: inherit;
}
.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #ffc107;
    margin: 15px auto 0;
    border-radius: 2px;
}

/* Grid layouts */
.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

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

/* Cards */
.card {
    background: #fff;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}
body.dark .card {
    background: #2a2a3e;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}
.card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    color: #1a3c6e;
}
body.dark .card h3 {
    color: #7aa8d8;
}
.card p {
    color: #666;
    font-size: 1rem;
}
body.dark .card p {
    color: #b0b0c0;
}
.card .icon {
    margin-bottom: 15px;
}

/* About section */
.about-section {
    background: #fff;
}
body.dark .about-section {
    background: #22223a;
}

.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
    flex-wrap: wrap;
}
.about-text {
    flex: 1;
    min-width: 300px;
}
.about-text p {
    margin-bottom: 20px;
    font-size: 1.05rem;
    text-align: justify;
}

.about-stats {
    display: flex;
    gap: 40px;
    justify-content: center;
    margin-top: 30px;
    flex-wrap: wrap;
}
.stat-item {
    text-align: center;
}
.stat-number {
    font-size: 2.8rem;
    font-weight: 700;
    color: #1a3c6e;
    transition: color 0.3s;
}
body.dark .stat-number {
    color: #7aa8d8;
}
.stat-label {
    font-size: 1rem;
    color: #888;
}
body.dark .stat-label {
    color: #aaa;
}

/* Products section */
.products-section {
    background: #f1f4f9;
}
body.dark .products-section {
    background: #1e1e32;
}

.product-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}
.product-item {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}
body.dark .product-item {
    background: #2a2a3e;
}
.product-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}
.product-item h4 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: #1a3c6e;
}
body.dark .product-item h4 {
    color: #7aa8d8;
}
.product-item p {
    color: #666;
    font-size: 0.95rem;
}
body.dark .product-item p {
    color: #b0b0c0;
}
.product-item .icon {
    margin-bottom: 12px;
}

/* Solution section */
.solution-section {
    background: #fff;
}
body.dark .solution-section {
    background: #22223a;
}

.solution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}
.solution-card {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 30px;
    border-left: 5px solid #1a3c6e;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}
body.dark .solution-card {
    background: #2a2a3e;
    border-left-color: #7aa8d8;
}
.solution-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}
.solution-card h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    color: #1a3c6e;
}
body.dark .solution-card h3 {
    color: #7aa8d8;
}
.solution-card p {
    color: #666;
    font-size: 0.95rem;
}
body.dark .solution-card p {
    color: #b0b0c0;
}

/* Case section */
.case-section {
    background: #f1f4f9;
}
body.dark .case-section {
    background: #1e1e32;
}

.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}
.case-card {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}
body.dark .case-card {
    background: #2a2a3e;
}
.case-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}
.case-card h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #1a3c6e;
}
body.dark .case-card h4 {
    color: #7aa8d8;
}
.case-card .meta {
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 10px;
}
.case-card p {
    color: #666;
    font-size: 0.95rem;
}
body.dark .case-card p {
    color: #b0b0c0;
}

/* Testimonial section */
.testimonial-section {
    background: #fff;
}
body.dark .testimonial-section {
    background: #22223a;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}
.testimonial-card {
    background: #f8f9fa;
    border-radius: 16px;
    padding: 30px;
    position: relative;
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}
body.dark .testimonial-card {
    background: #2a2a3e;
}
.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}
.testimonial-card::before {
    content: '"';
    font-size: 4rem;
    color: #1a3c6e;
    opacity: 0.2;
    position: absolute;
    top: 10px;
    left: 20px;
    font-family: serif;
    line-height: 1;
}
body.dark .testimonial-card::before {
    color: #7aa8d8;
}
.testimonial-card p {
    font-style: italic;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
    color: #555;
}
body.dark .testimonial-card p {
    color: #ccc;
}
.testimonial-card .author {
    font-weight: 700;
    color: #1a3c6e;
}
body.dark .testimonial-card .author {
    color: #7aa8d8;
}

/* News section */
.news-section {
    background: #f1f4f9;
}
body.dark .news-section {
    background: #1e1e32;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}
.news-card {
    background: #fff;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s, box-shadow 0.3s, background 0.3s;
}
body.dark .news-card {
    background: #2a2a3e;
}
.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}
.news-card .date {
    color: #999;
    font-size: 0.85rem;
    margin-bottom: 8px;
}
.news-card h4 {
    font-size: 1.15rem;
    margin-bottom: 10px;
    color: #1a3c6e;
}
body.dark .news-card h4 {
    color: #7aa8d8;
}
.news-card p {
    color: #666;
    font-size: 0.92rem;
    margin-bottom: 12px;
}
body.dark .news-card p {
    color: #b0b0c0;
}
.news-card .read-more {
    color: #1a3c6e;
    font-weight: 600;
    font-size: 0.9rem;
    transition: color 0.2s;
}
.news-card .read-more:hover {
    color: #ffc107;
}

/* FAQ section */
.faq-section {
    background: #fff;
}
body.dark .faq-section {
    background: #22223a;
}

.faq-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 18px 0;
    transition: border-color 0.3s;
}
body.dark .faq-item {
    border-color: #3a3a4e;
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1a3c6e;
    transition: color 0.2s;
}
body.dark .faq-question {
    color: #7aa8d8;
}
.faq-question:hover {
    color: #ffc107;
}
.faq-question .toggle {
    font-size: 1.5rem;
    transition: transform 0.3s;
    line-height: 1;
}
.faq-question.open .toggle {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
    color: #666;
    padding-top: 0;
}
body.dark .faq-answer {
    color: #b0b0c0;
}
.faq-answer.show {
    max-height: 500px;
    padding-top: 15px;
}

/* How-to section */
.howto-section {
    background: #f1f4f9;
}
body.dark .howto-section {
    background: #1e1e32;
}

.howto-content {
    max-width: 850px;
    margin: 0 auto;
}

.howto-step {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}
.step-num {
    background: #1a3c6e;
    color: #fff;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
    transition: background 0.3s, color 0.3s;
}
body.dark .step-num {
    background: #7aa8d8;
    color: #1a1a2e;
}
.step-content h4 {
    font-size: 1.2rem;
    margin-bottom: 8px;
    color: #1a3c6e;
}
body.dark .step-content h4 {
    color: #7aa8d8;
}
.step-content p {
    color: #666;
    font-size: 0.95rem;
}
body.dark .step-content p {
    color: #b0b0c0;
}

/* Contact section */
.contact-section {
    background: #fff;
}
body.dark .contact-section {
    background: #22223a;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}
.contact-info p {
    margin-bottom: 12px;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.contact-info svg {
    width: 22px;
    height: 22px;
    fill: #1a3c6e;
    flex-shrink: 0;
    transition: fill 0.3s;
}
body.dark .contact-info svg {
    fill: #7aa8d8;
}

/* Footer */
.footer {
    background: #1a3c6e;
    color: #ccc;
    padding: 40px 0 20px;
    font-size: 0.9rem;
    transition: background 0.3s;
}
body.dark .footer {
    background: #0f1f3a;
}
.footer .container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
}
.footer h4 {
    color: #fff;
    margin-bottom: 15px;
    font-size: 1.1rem;
}
.footer a {
    color: #bbb;
    display: block;
    margin-bottom: 8px;
    transition: color 0.2s;
}
.footer a:hover {
    color: #ffc107;
}
.footer p {
    color: #bbb;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 30px;
    text-align: center;
    font-size: 0.85rem;
}
.footer-bottom a {
    display: inline;
    margin: 0 10px;
}

/* Animation */
.anim-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s, transform 0.6s;
}
.anim-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .nav {
        display: none;
    }
    .menu-toggle {
        display: block;
    }
    .banner h1 {
        font-size: 2rem;
    }
    .banner p {
        font-size: 1rem;
    }
    .grid-2,
    .grid-3,
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .about-content {
        flex-direction: column;
    }
    .footer .container {
        grid-template-columns: 1fr 1fr;
    }
    .banner-slide {
        padding: 30px 20px;
    }
    .banner-slide h3 {
        font-size: 1.4rem;
    }
    .banner {
        padding: 50px 0 40px;
    }
    .section {
        padding: 50px 0;
    }
    .header .container {
        gap: 10px;
    }
    .search-box {
        max-width: 180px;
    }
    .logo {
        font-size: 20px;
    }
    .about-stats {
        gap: 20px;
    }
    .stat-number {
        font-size: 2rem;
    }
    .product-list {
        grid-template-columns: 1fr 1fr;
    }
    .case-grid {
        grid-template-columns: 1fr;
    }
    .solution-grid {
        grid-template-columns: 1fr;
    }
    .testimonial-grid {
        grid-template-columns: 1fr;
    }
    .news-grid {
        grid-template-columns: 1fr;
    }
    .back-top {
        width: 40px;
        height: 40px;
        font-size: 22px;
        bottom: 20px;
        right: 20px;
    }
}

@media (max-width: 480px) {
    .header .container {
        flex-wrap: wrap;
        justify-content: center;
    }
    .logo {
        font-size: 18px;
    }
    .search-box {
        max-width: 140px;
    }
    .banner h1 {
        font-size: 1.6rem;
    }
    .banner .cta {
        padding: 12px 30px;
        font-size: 1rem;
    }
    .product-list {
        grid-template-columns: 1fr;
    }
    .footer .container {
        grid-template-columns: 1fr;
    }
    .contact-grid {
        gap: 20px;
    }
    .howto-step {
        flex-direction: column;
        gap: 10px;
    }
}

/* Dark mode adjustments for images/icons */
body.dark .card,
body.dark .product-item,
body.dark .case-card,
body.dark .news-card,
body.dark .solution-card,
body.dark .testimonial-card {
    border-color: #3a3a4e;
}

/* Smooth transitions for dark mode */
body.dark .header,
body.dark .footer,
body.dark .breadcrumb,
body.dark .about-section,
body.dark .products-section,
body.dark .solution-section,
body.dark .case-section,
body.dark .testimonial-section,
body.dark .news-section,
body.dark .faq-section,
body.dark .howto-section,
body.dark .contact-section {
    transition: background 0.3s, color 0.3s;
}

/* Hover effects for all interactive cards */
.card,
.product-item,
.solution-card,
.case-card,
.testimonial-card,
.news-card {
    will-change: transform;
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus {
    outline: 2px solid #ffc107;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .header,
    .footer,
    .back-top,
    .mobile-nav,
    .search-box,
    .dark-toggle,
    .menu-toggle {
        display: none;
    }
    body {
        background: #fff;
        color: #000;
    }
    .section {
        padding: 20px 0;
        page-break-inside: avoid;
    }
}