/* 全局重置与变量 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #e94560;
    --primary-dark: #c0392b;
    --secondary: #0f3460;
    --accent: #16213e;
    --bg: #1a1a2e;
    --text: #f0f0f0;
    --card-bg: rgba(255, 255, 255, 0.05);
    --glass: rgba(255, 255, 255, 0.1);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    --radius: 16px;
    --max-w: 1200px;
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="light"] {
    --primary: #c0392b;
    --secondary: #2980b9;
    --accent: #2c3e50;
    --bg: #f5f6fa;
    --text: #2c3e50;
    --card-bg: rgba(0, 0, 0, 0.03);
    --glass: rgba(255, 255, 255, 0.7);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

body {
    font-family: var(--font-family);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.3s, color 0.3s;
}

a {
    color: var(--primary);
    text-decoration: none;
}

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

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: var(--glass);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: background 0.3s;
}

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

.logo a {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), #ff6b6b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 30px;
}

nav a {
    color: var(--text);
    font-weight: 500;
    padding: 8px 0;
    position: relative;
    transition: color 0.3s;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s;
}

nav a:hover,
nav a.active {
    color: var(--primary);
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--text);
    border-radius: 3px;
    transition: 0.3s;
}

.dark-toggle {
    background: none;
    border: 2px solid var(--text);
    color: var(--text);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.dark-toggle:hover {
    border-color: var(--primary);
    color: var(--primary);
}

/* Hero */
.hero {
    padding: 140px 0 80px;
    text-align: center;
    background: linear-gradient(135deg, var(--accent), var(--secondary));
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 50%, rgba(233, 69, 96, 0.2), transparent 50%);
    animation: heroGlow 10s ease-in-out infinite;
}

@keyframes heroGlow {
    0%,
    100% {
        transform: translate(0, 0);
    }
    50% {
        transform: translate(20px, -20px);
    }
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #fff, var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 14px 40px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.5);
}

.btn-outline {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
}

.btn-outline:hover {
    background: #fff;
    color: var(--secondary);
}

/* Sections */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 15px auto 0;
    border-radius: 2px;
}

.grid-2,
.grid-3,
.grid-4 {
    display: grid;
    gap: 30px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

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

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

.card {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}

.card-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

.card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.card p {
    opacity: 0.85;
}

/* Brand Story */
.brand-story {
    background: var(--glass);
}

.brand-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.brand-text h2 {
    font-size: 2rem;
    margin-bottom: 20px;
}

.brand-text p {
    margin-bottom: 15px;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--primary);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    justify-content: flex-end;
    padding: 20px 0;
    position: relative;
    width: 50%;
}

.timeline-item:nth-child(odd) {
    align-self: flex-end;
    justify-content: flex-start;
    left: 50%;
}

.timeline-content {
    background: var(--card-bg);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 80%;
}

.timeline-item::before {
    content: '';
    position: absolute;
    top: 30px;
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    border: 3px solid var(--bg);
}

.timeline-item:nth-child(odd)::before {
    left: -8px;
}

.timeline-item:nth-child(even)::before {
    right: -8px;
}

/* Team */
.team-member {
    text-align: center;
}

.team-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: #fff;
}

.team-member h4 {
    font-size: 1.2rem;
}

.team-member p {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Products */
.product-card {
    text-align: center;
}

.product-card .card-icon {
    margin: 0 auto 20px;
}

/* Advantages */
.advantage-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    margin-bottom: 25px;
}

.advantage-icon {
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    background: var(--glass);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Solutions */
.solution-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

/* Cases */
.case-card {
    overflow: hidden;
}

.case-image {
    height: 200px;
    background: var(--glass);
    border-radius: 12px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Partners */
.partner-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
    align-items: center;
}

.partner-logo {
    width: 120px;
    height: 60px;
    opacity: 0.6;
    transition: opacity 0.3s;
}

.partner-logo:hover {
    opacity: 1;
}

/* Testimonials */
.testimonial-card {
    text-align: center;
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, var(--primary), #ff6b6b);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #fff;
}

.testimonial-card blockquote {
    font-style: italic;
    margin: 15px 0;
    opacity: 0.9;
}

.testimonial-card cite {
    font-weight: 600;
}

/* News */
.news-card .date {
    font-size: 0.85rem;
    opacity: 0.6;
    margin-bottom: 10px;
    display: block;
}

/* FAQ */
.faq-item {
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    overflow: hidden;
}

.faq-question {
    padding: 18px 25px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    transition: background 0.3s;
}

.faq-question:hover {
    background: var(--glass);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    padding: 0 25px;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 15px 25px;
}

/* HowTo */
.howto-steps {
    counter-reset: step;
}

.howto-step {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    align-items: center;
}

.howto-step::before {
    counter-increment: step;
    content: counter(step);
    width: 45px;
    height: 45px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
    flex-shrink: 0;
}

/* Contact */
.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.contact-item {
    text-align: center;
    padding: 25px;
    background: var(--card-bg);
    border-radius: var(--radius);
}

.contact-item svg {
    margin: 0 auto 15px;
}

/* Related */
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

/* Breadcrumb */
.breadcrumb {
    padding: 100px 0 20px;
    font-size: 0.9rem;
    opacity: 0.7;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 10px;
    opacity: 0.5;
}

/* Search */
.search-bar {
    display: flex;
    max-width: 500px;
    margin: 30px auto;
    gap: 10px;
}

.search-bar input {
    flex: 1;
    padding: 12px 20px;
    border-radius: 50px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: var(--card-bg);
    color: var(--text);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.search-bar input:focus {
    border-color: var(--primary);
}

.search-bar button {
    padding: 12px 25px;
    border-radius: 50px;
    background: var(--primary);
    color: #fff;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
}

.search-bar button:hover {
    background: #d63851;
}

/* Footer */
footer {
    background: var(--accent);
    padding: 60px 0 30px;
    margin-top: 80px;
}

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

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 10px;
}

.footer-col a {
    opacity: 0.7;
    transition: opacity 0.3s;
}

.footer-col a:hover {
    opacity: 1;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.85rem;
    opacity: 0.7;
}

.footer-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* Back to top */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(233, 69, 96, 0.4);
    transition: all 0.3s;
    z-index: 999;
}

.back-to-top.show {
    display: flex;
}

.back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(233, 69, 96, 0.5);
}

/* Banner Slider */
.banner-slider {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius);
    margin: 40px 0;
}

.banner-slide {
    display: none;
    padding: 60px 40px;
    text-align: center;
    background: linear-gradient(135deg, var(--secondary), var(--accent));
}

.banner-slide.active {
    display: block;
    animation: fadeIn 0.6s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.banner-slide h3 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.banner-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.banner-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background 0.3s;
}

.banner-dot.active {
    background: var(--primary);
}

/* Responsive */
@media (max-width: 768px) {
    .header-inner {
        padding: 12px 0;
    }

    nav ul {
        display: none;
        flex-direction: column;
        background: var(--bg);
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        padding: 20px;
        gap: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    nav ul.open {
        display: flex;
    }

    .menu-toggle {
        display: flex;
    }

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

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

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .brand-content {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 20px;
    }

    .timeline-item {
        width: 100%;
        left: 0 !important;
        justify-content: flex-start;
        padding-left: 40px;
    }

    .timeline-item::before {
        left: 12px !important;
        right: auto !important;
    }

    .timeline-content {
        width: 100%;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

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

    .footer-grid {
        grid-template-columns: 1fr;
    }
}

/* Scroll Animation */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Number animation */
.number-animate {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
}

/* Related articles */
.related-article {
    padding: 20px;
    background: var(--card-bg);
    border-radius: var(--radius);
}

.related-article h4 {
    margin-bottom: 10px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 30px;
}

.pagination a {
    padding: 8px 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    transition: 0.3s;
}

.pagination a:hover,
.pagination a.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}