/* 全局变量定义 */
:root {
    --primary-color: #1e4d43;
    --secondary-color: #2a7264;
    --text-color: #333333;
    --background-color: #ffffff;
    --dark-bg: #1e2d3b;
    --font-size-xl: 2.5rem;    /* 40px */
    --font-size-lg: 1.75rem;   /* 28px */
    --font-size-md: 1.125rem;  /* 18px */
    --font-size-base: 1rem;    /* 16px */
    --font-size-sm: 0.875rem;  /* 14px */
}

/* 基础样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
    position: relative;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", "Noto Sans", "Noto Sans CJK SC", sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    font-size: var(--font-size-md);
    min-width: 100%;
    max-width: 100%;
}

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

/* 通用文本样式 */
p {
    word-wrap: break-word;
    word-break: normal;
    line-height: 1.6;
}

h1, h2, h3, h4 {
    word-wrap: break-word;
    line-height: 1.4;
}

/* 动画定义 */
@keyframes slogan-appear {
    0% {
        opacity: 0;
        transform: translate(-20px, 2px);
    }
    100% {
        opacity: 0.9;
        transform: translate(0, 2px);
    }
}

/* 通用媒体查询 */
@media (max-width: 1024px) {
    :root {
        --font-size-xl: 2.25rem;
        --font-size-lg: 1.5rem;
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-xl: 2rem;
        --font-size-lg: 1.375rem;
        --font-size-md: 1rem;
    }
    
    body {
        font-size: var(--font-size-md);
        line-height: 1.5;
    }
    
    .container {
        padding: 0 16px;
    }
}

@media (max-width: 480px) {
    :root {
        --font-size-xl: 1.75rem;
        --font-size-lg: 1.25rem;
    }
    
    body {
        font-size: 14px;
    }
}

/* 特殊媒体查询 */
@media (hover: none) {
    .nav-link {
        padding: 8px 12px;
    }
    
    .nav-link:hover {
        opacity: 0.85;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #f5f5f5;
        --background-color: #121212;
    }
}

@media print {
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* H5元素样式定义 */

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #4E6EF1;
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.navbar.scrolled {
    background-color: #4E6EF1;
}

.navbar:not(.scrolled) {
    background-color: #4E6EF1;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.navbar-brand {
    position: relative;
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo {
    height: 35px;
    width: auto;
}

.logo-white {
    display: block;
}

.logo-blue {
    display: none;
}

.brand-slogan {
    color: #fff;
    font-size: 15px;
    font-weight: 300;
    letter-spacing: 0.5px;
    opacity: 0;
    transform: translate(-20px, 2px);
    animation: slogan-appear 0.8s ease forwards;
    white-space: nowrap;
    position: relative;
    padding-left: 15px;
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.3);
}

.brand-slogan::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 1px;
    height: 16px;
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%);
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: 35px;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-size: var(--font-size-base);
    font-weight: 500;
    opacity: 0.85;
    transition: opacity 0.3s ease;
}

.nav-link:hover,
.nav-link:visited,
.nav-link:active {
    color: #fff;
}

.nav-link:hover {
    opacity: 1;
}

.nav-button {
    background: #fff;
    color: #4E6EF1;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.nav-button:hover {
    background: #f5f5f5;
    transform: translateY(-1px);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
}

.mobile-menu-toggle span {
    display: block;
    width: 25px;
    height: 2px;
    background-color: #fff;
    transition: all 0.3s ease;
}

@media (max-width: 768px) {
    /* 修改 body 元素的字体大小和行高 */
    body {
        font-size: var(--font-size-md); /* 修改字体大小为 16px */
        line-height: 1.5; /* 修改行高为 1.5 */
    }

    /* 修改标题元素的字体大小和行高 */
    h1, h2, h3, h4, h5, h6 {
        font-size: 1.2em; /* 修改字体大小为 1.2em */
        line-height: 1.2; /* 修改行高为 1.2 */
    }

    /* 修改段落元素的字体大小和行高 */
    p {
        font-size: 1em; /* 修改字体大小为 1em */
        line-height: 1.5; /* 修改行高为 1.5 */
    }

    .navbar .container {
        position: relative;
    }

    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 24px;
        height: 18px;
        cursor: pointer;
        z-index: 1000;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 100%;
        height: 2px;
        background-color: white;
        transition: all 0.3s ease;
    }

    .navbar-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #4E6EF1;
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        gap: 15px;
    }

    .navbar-menu.active {
        display: flex;
    }

    .nav-link {
        width: 100%;
        text-align: center;
    }

    .navbar-brand {
        flex: 1;
        justify-content: flex-start;
    }

    .brand-slogan {
        font-size: 13px;
        padding-left: 10px;
    }

    .brand-slogan::before {
        height: 12px;
    }

    .logo {
        height: 28px;
    }
}

@media (max-width: 480px) {
    .brand-slogan {
        font-size: 12px;
        padding-left: 8px;
    }
}

/* Product Section */
.product-section {
    position: relative;
    min-height: 100vh;
    background-color: var(--dark-bg);
    color: white;
    overflow: hidden;
    padding-top: 68px;
    width: 100%;
    margin: 0;
    left: 0;
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100vh;
    background-color: #4E6EF1;
    overflow: hidden;
    margin: 0;
    left: 0;
    -webkit-transform: translate3d(0,0,0);
    transform: translate3d(0,0,0);
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    will-change: opacity, visibility;
    transform: translate3d(0,0,0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.carousel-slide.active {
    opacity: 1;
    visibility: visible;
}

.carousel-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, 
        rgba(0, 0, 0, 0.8) 0%,
        rgba(0, 0, 0, 0.7) 30%,
        rgba(0, 0, 0, 0.6) 100%
    );
    z-index: 1;
}

.product-content {
    max-width: 800px;
    text-align: left;
    position: relative;
    z-index: 2;
    color: white;
    margin-left: 5%;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out 0.3s;
}

.carousel-slide.active .product-content {
    opacity: 1;
    transform: translateY(0);
}

.product-content h1 {
    font-size: var(--font-size-xl);
    margin-bottom: 1.5rem;
    color: white;
}

.product-content p {
    font-size: var(--font-size-md);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: var(--font-size-base);
    cursor: pointer;
    transition: background-color 0.3s;
}

.cta-button:hover {
    background-color: var(--secondary-color);
}

.carousel-nav {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1rem;
    z-index: 2;
}

.carousel-nav button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.carousel-nav button:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.carousel-controls {
    position: absolute;
    bottom: 30px;
    left: 0;
    right: 0;
    z-index: 10;
    display: flex;
    justify-content: center;
    align-items: center;
}

.carousel-indicators {
    display: flex;
    gap: 12px;
    padding: 10px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    padding: 0;
    transition: all 0.3s ease;
}

.indicator.active {
    background: #ffffff;
    transform: scale(1.2);
}

@media (max-width: 768px) {
    .carousel-controls {
        bottom: 20px;
    }
    
    .indicator {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 768px) {
    .product-section {
        padding-top: 60px;
        width: 100%;
        left: 0;
    }
    
    .carousel-slide {
        width: 100%;
        min-height: 100vh;
        height: auto;
        padding: 0;
        left: 0;
        margin: 0;
        -webkit-transform: translate3d(0,0,0);
        transform: translate3d(0,0,0);
    }
    
    .carousel-container {
        width: 100%;
        height: auto;
        min-height: 100vh;
        left: 0;
        -webkit-transform: translate3d(0,0,0);
        transform: translate3d(0,0,0);
    }
    
    .product-content {
        margin: 60px 20px;
        padding: 0;
        width: calc(100% - 40px);
    }
}

/* About Section */
.about-section {
    padding: 100px 5%;
    background-color: var(--background-color);
    text-align: center;
}

.about-section h2 {
    font-size: var(--font-size-lg);
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.about-section p {
    max-width: 800px;
    margin: 0 auto 4rem;
    font-size: var(--font-size-base);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    margin-top: 3rem;
}

.section-intro {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 3rem;
}

.service-card {
    background: #fff;
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    border-color: #0066cc;
}

.service-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.service-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: #f0f7ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon i {
    font-size: 1.8rem;
    color: #0066cc;
}

.service-card h3 {
    color: #1a1a1a;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.service-subtitle {
    color: #666;
    font-size: 1rem;
    margin: 0.5rem 0;
}

.service-content {
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.service-desc {
    color: #444;
    margin-bottom: 1rem;
}

.service-features {
    list-style: none;
    padding-left: 0;
    margin: 1rem 0;
}

.service-features li {
    padding: 0.5rem 0;
    position: relative;
    padding-left: 1.8rem;
    color: #555;
}

.service-features li:before {
    content: "✓";
    color: #0066cc;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.service-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.service-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.tag {
    background: #f0f7ff;
    color: #0066cc;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
}

.contact-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #0066cc;
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.contact-link:hover {
    background: #004d99;
    color: white;
    transform: translateX(5px);
}

.contact-link i {
    transition: transform 0.3s ease;
}

.contact-link:hover i {
    transform: translateX(3px);
}

@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
}

/* Testimonials Section */
.testimonials-section {
    padding: 4rem 5% 2rem;
    background-color: #f8f9fa;
    text-align: center;
}

.testimonials-section h2 {
    font-size: var(--font-size-lg);
    color: var(--primary-color);
    margin-bottom: 3rem;
}

.testimonials-carousel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.testimonial-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin: 0 auto;
}

.testimonial-card {
    background-color: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.avatar {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
}

.avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.testimonial-card h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: var(--font-size-md);
}

.testimonial-card p {
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

/* More Cases Link Styles */
.more-cases {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.more-cases-link {
    display: inline-flex;
    align-items: center;
    color: #666;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
}

.more-cases-link i {
    margin-left: 0.5rem;
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.more-cases-link:hover {
    color: #0066cc;
}

.more-cases-link:hover i {
    transform: translateX(3px);
}

/* Footer Styles */
#footer {
    background-color: var(--dark-bg);
    padding: 2.5rem 0 1.5rem;
    color: white;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 1rem;
}

.footer-col h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

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

.footer-col ul li {
    margin-bottom: 0.7rem;
    font-size: 0.9rem;
}

.footer-col ul li a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-col ul li a:hover {
    color: white;
}

.email-protection {
    display: inline-block;
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    white-space: nowrap;
}

.contact-info li i {
    color: white;
    font-size: 0.9rem;
}

.company-desc {
    margin: 1rem 0;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.footer-logo {
    max-width: 80px;
    height: auto;
    margin-bottom: 0.8rem;
}

.social-links {
    display: flex;
    gap: 2rem;
    margin-top: 0.3rem;
}

.social-link {
    color: white;
    font-size: 1.1rem;
    transition: opacity 0.3s ease;
    padding: 0.2rem;
}

.social-link:hover {
    opacity: 0.8;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
}

.corpname-legal {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.company-info {
    white-space: nowrap;
}

.legal-links {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.6);
}

.legal-links a {
    color: inherit;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.legal-links a:hover {
    opacity: 1;
    color: white;
}

.legal-links .links-separator {
    color: rgba(255, 255, 255, 0.4);
    margin: 0 0.5rem;
}

.beian {
    margin-top: 0.8rem;
    text-align: center;
}

.beian a {
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.75rem;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.beian a:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .footer-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: auto auto;
        gap: 1.5rem;
    }

    /* Company logo + contact info in first row */
    .footer-col:first-child {
        grid-column: 1;
        grid-row: 1;
    }
    
    .footer-col:last-child {
        grid-column: 2;
        grid-row: 1;
    }
    
    /* Product services + solutions in second row */
    .footer-col:nth-child(2) {
        grid-column: 1;
        grid-row: 2;
    }
    
    .footer-col:nth-child(3) {
        grid-column: 2;
        grid-row: 2;
    }

    .corpname-legal {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }

    .company-info {
        font-size: 0.85rem;
    }

    .legal-links {
        font-size: 0.75rem;
    }
}

@media (max-width: 992px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .footer-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .footer-col {
        margin-bottom: 0;
    }
    
    .footer-col:nth-child(1) {
        grid-column: 1;
        grid-row: 1;
    }
    
    .footer-col:nth-child(2) {
        grid-column: 1;
        grid-row: 2;
    }
    
    .footer-col:nth-child(3) {
        grid-column: 2;
        grid-row: 2;
    }
    
    .footer-col:nth-child(4) {
        grid-column: 2;
        grid-row: 1;
    }
    
    .footer-col {
        text-align: left;
    }
    
    .social-links {
        justify-content: flex-start;
    }
    
    .contact-info li {
        justify-content: flex-start;
    }
    
    .company-desc {
        margin: 0.5rem 0;
        font-size: 0.85rem;
    }

    .corpname-legal {
        font-size: 0.85rem;
    }

    .legal-links {
        font-size: 0.75rem;
        color: rgba(255, 255, 255, 0.4);
    }
    
    .legal-links a {
        color: inherit;
        margin-top: 0.3rem;
        text-decoration: none;
        transition: opacity 0.3s ease;
    }
    
    .legal-links a:hover {
        opacity: 1;
        color: white;
    }
    
    .legal-links .links-separator {
        color: rgba(255, 255, 255, 0.4);
        margin: 0 0.5rem;
    }    
}

/* Responsive Design */
@media (max-width: 1024px) {
    .services-grid,
    .testimonial-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .product-content h1 {
        font-size: var(--font-size-lg);
    }
    
    .services-grid,
    .testimonial-cards {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        display: none;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}

@media screen and (max-width: 1024px) {
    :root {
        --font-size-xl: 2.25rem;    /* 36px */
        --font-size-lg: 1.5rem;     /* 24px */
    }
}

@media screen and (max-width: 768px) {
    :root {
        --font-size-xl: 2rem;       /* 32px */
        --font-size-lg: 1.375rem;   /* 22px */
        --font-size-md: 1rem;       /* 16px */
    }
    
    .container {
        padding: 0 16px;
    }
}

@media screen and (max-width: 480px) {
    :root {
        --font-size-xl: 1.75rem;    /* 28px */
        --font-size-lg: 1.25rem;    /* 20px */
    }
    
    body {
        font-size: 14px;
    }
}

/* 触摸设备优化 */
@media (hover: none) {
    .nav-link {
        padding: 8px 12px; /* 增加点击区域 */
    }
    
    .nav-link:hover {
        opacity: 0.85; /* 移除hover效果 */
    }
}

/* 适配深色模式 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #f5f5f5;
        --background-color: #121212;
    }
}

/* 打印样式优化 */
@media print {
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* 与header高度相同 */
}

/* 移动端特殊处理 */
@media screen and (max-width: 768px) {
    .product-content {
        padding: 1.25rem;
    }

    .product-content p {
        font-size: 1.1rem;
        line-height: 1.6;
        margin: 0.625rem 0;
    }

    .service-card {
        padding: 1rem;
    }

    .service-card p {
        font-size: 1.1rem;
        line-height: 1.6;
    }

    .testimonial-card {
        padding: 1rem;
    }

    .testimonial-card p {
        font-size: 1rem;
        line-height: 1.7;
    }

    /* 标题在移动端的大小调整 */
    h1 {
        font-size: 1.75rem;
        line-height: 1.3;
    }

    h2 {
        font-size: 1.5rem;
        line-height: 1.3;
    }

    h3 {
        font-size: 1.25rem;
        line-height: 1.3;
    }

    /* 段落间距优化 */
    p {
        margin-bottom: 0.75rem;
    }
    
}
