:root {
    --primary-color: #e62948;
    --secondary-color: #181610;
    --accent-color: #e67e22;
    --text-color: #333;
    --light-text: #666;
    --bg-light: #f9f9f9;
    --white: #ffffff;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    /* padding-bottom: 60px; moved to mobile query */
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s;
}

ul {
    list-style: none;
}

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

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

.section {
    padding: 60px 0;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
}

.btn {
    display: inline-block;
    padding: 10px 25px;
    background-color: var(--accent-color);
    color: var(--white);
    border-radius: 25px;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn:hover {
    background-color: #d35400;
}

/* Header */
.header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

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

.logo a {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    max-width: 120px;
    max-height: 50px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
}

.logo-placeholder {
    font-size: 26px;
    font-weight: bold;
    color: var(--primary-color);
    /* border: 2px solid var(--primary-color); */
    /* padding: 5px 15px; */
    /* border-radius: 5px; */
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    color: var(--secondary-color);
}

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

.mobile-menu-btn {
    display: none;
    font-size: 24px;
    cursor: pointer;
}

/* Banner Slider */
.banner-slider {
    position: relative;
    height: 500px;
    overflow: hidden;
}

.slider-container {
    height: 100%;
    position: relative;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide.active {
    opacity: 1;
}

.slide-content {
    text-align: center;
    color: var(--white);
    max-width: 800px;
    padding: 20px;
    background-color: rgba(0, 0, 0, 0.4); /* Add overlay for readability */
    border-radius: 10px;
}

.slide-content h2 {
    font-size: 48px;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.slide-content p {
    font-size: 20px;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.prev-btn, .next-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,0.3);
    color: var(--white);
    border: none;
    width: 50px;
    height: 50px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 20px;
    border-radius: 50%;
    transition: background 0.3s;
}

.prev-btn:hover, .next-btn:hover {
    background: rgba(0,0,0,0.6);
}

.prev-btn { left: 20px; }
.next-btn { right: 20px; }

.dots-container {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

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

.dot.active {
    background-color: var(--white);
}

/* Services */
.services {
    background-color: var(--bg-light);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.service-card {
    background: var(--white);
    /* padding: 30px 20px;  Removed padding to allow image to flush with edges or customize spacing */
    padding: 10px;
    padding-bottom: 20px;
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s;
    overflow: hidden; /* Ensure image stays within border radius */
}

.service-card:hover {
    transform: translateY(-5px);
}

.service-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    margin-bottom: 15px;
    display: block; /* Ensure no bottom space issues */
}

.service-card h3 {
    margin-bottom: 10px;
    color: var(--secondary-color);
    padding: 0 15px; /* Add horizontal padding for text */
}

.service-card p {
    color: var(--light-text);
    font-size: 14px;
    padding: 0 15px; /* Add horizontal padding for text */
}

/* Process */
.process-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.step {
    text-align: center;
    flex: 1;
    min-width: 120px;
}

.step-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto 15px;
}

.step h4 {
    margin-bottom: 5px;
}

.step p {
    font-size: 13px;
    color: var(--light-text);
}

.step-arrow {
    color: var(--primary-color);
    font-size: 24px;
}

/* Advantages */
.advantages {
    background-color: var(--bg-light);
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.advantage-item {
    display: flex;
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
}

.adv-icon {
    font-size: 40px;
    color: var(--accent-color);
    margin-right: 20px;
    display: flex;
    align-items: center;
}

.adv-text h3 {
    margin-bottom: 10px;
}

.adv-text p {
    color: var(--light-text);
}

/* News */
.news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.news-item {
    display: flex;
    background: var(--white);
    border: 1px solid #eee;
    padding: 20px;
    border-radius: var(--border-radius);
}

.news-date {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    margin-right: 15px;
    min-width: 60px;
    height: fit-content;
}

.news-date .day {
    display: block;
    font-size: 20px;
    font-weight: bold;
}

.news-date .month {
    display: block;
    font-size: 12px;
}

.news-content h3 {
    font-size: 16px;
    margin-bottom: 10px;
    line-height: 1.4;
}

.news-content h3 a:hover {
    color: var(--primary-color);
}

.news-content p {
    font-size: 13px;
    color: var(--light-text);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Cases */
.cases {
    background-color: var(--bg-light);
}

.cases-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.case-item {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
}

.case-img-placeholder {
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #666;
    font-weight: bold;
}

.case-info {
    padding: 15px;
    text-align: center;
}

.case-info h3 {
    font-size: 16px;
}

/* Reviews */
.reviews-slider {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
}

.review-card {
    min-width: 300px;
    background: var(--white);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border: 1px solid #eee;
    flex: 1;
}

.stars {
    margin-bottom: 15px;
    font-size: 14px;
}

.review-card p {
    font-style: italic;
    color: var(--light-text);
    margin-bottom: 15px;
}

.customer {
    text-align: right;
    font-weight: bold;
    color: var(--primary-color);
}

/* Partners */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 20px;
}

.partner-logo {
    height: 80px;
    background: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #999;
    border: 1px solid #ddd;
}

/* Footer */
.footer {
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 60px 0 20px;
    /* margin-bottom: 60px; moved to mobile query */
}

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

.footer-col h3 {
    font-size: 18px;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background-color: var(--primary-color);
}

.footer-col p {
    color: #bdc3c7;
    margin-bottom: 10px;
    font-size: 14px;
}

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

.footer-col ul li a {
    color: #bdc3c7;
}

.footer-col ul li a:hover {
    color: var(--white);
    padding-left: 5px;
}

.qr-code-placeholder {
    width: 120px;
    height: 120px;
    background-color: var(--white);
    color: #333;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 10px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    text-align: center;
    font-size: 13px;
    color: #7f8c8d;
}

/* Mobile Bottom Menu */
.mobile-bottom-menu {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: var(--white);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    z-index: 1001;
    justify-content: space-around;
    padding: 8px 0;
}

.menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
    color: var(--secondary-color);
}

.menu-item i {
    font-size: 20px;
    margin-bottom: 4px;
    color: var(--primary-color);
}

/* WeChat Popup */
.wechat-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background: var(--white);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    position: relative;
    width: 90%;
    max-width: 350px;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    cursor: pointer;
    color: #999;
}

.qr-code-placeholder-large {
    width: 200px;
    height: 200px;
    background-color: #f5f5f5;
    margin: 20px auto;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid #ddd;
}

.copy-btn {
    background: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin-top: 10px;
}

/* Friendly Links */
.friendly-links {
    padding: 20px 0;
    background-color: #f0f0f0;
    font-size: 14px;
}
.friendly-links .links a {
    margin-right: 15px;
    color: #666;
}

/* Inner Page Styles */
.page-banner {
    height: 300px;
    background-color: var(--secondary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--white);
    text-align: center;
}

.page-banner h1 {
    font-size: 36px;
    margin-bottom: 10px;
}

.breadcrumb {
    background-color: #eee;
    padding: 15px 0;
    font-size: 14px;
    color: var(--light-text);
}

.breadcrumb a {
    color: var(--secondary-color);
}

.breadcrumb a:hover {
    color: var(--primary-color);
}

.breadcrumb span {
    margin: 0 5px;
}

.page-content {
    padding: 60px 0;
}

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

/* Sidebar */
.sidebar-widget {
    background: var(--white);
    padding: 20px;
    border: 1px solid #eee;
    border-radius: var(--border-radius);
    margin-bottom: 30px;
}

.sidebar-widget h3 {
    font-size: 18px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-color);
}

.sidebar-menu li {
    border-bottom: 1px solid #eee;
}

.sidebar-menu li:last-child {
    border-bottom: none;
}

.sidebar-menu a {
    display: block;
    padding: 10px 0;
    color: var(--light-text);
    transition: all 0.3s;
}

.sidebar-menu a:hover, .sidebar-menu a.active {
    color: var(--primary-color);
    padding-left: 5px;
}

.sidebar-contact p {
    margin-bottom: 10px;
    color: var(--light-text);
    font-size: 14px;
}

.sidebar-contact i {
    color: var(--primary-color);
    margin-right: 8px;
    width: 20px;
    text-align: center;
}

/* Service Detail */
.service-detail img {
    width: 100%;
    border-radius: var(--border-radius);
    margin-bottom: 20px;
}

.service-detail h2 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.service-detail p {
    margin-bottom: 15px;
    color: var(--light-text);
    line-height: 1.8;
}

.service-detail ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
    color: var(--light-text);
}

.service-detail li {
    margin-bottom: 8px;
}

/* News List */
.news-list-item {
    display: flex;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.news-list-img {
    width: 240px;
    height: 160px;
    background-color: #ddd; /* Placeholder */
    margin-right: 20px;
    flex-shrink: 0;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.news-list-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-list-content {
    flex: 1;
}

.news-list-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.news-list-content h3 a:hover {
    color: var(--primary-color);
}

.news-meta {
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
}

.news-meta span {
    margin-right: 15px;
}

.news-list-content p {
    color: var(--light-text);
    font-size: 14px;
    margin-bottom: 15px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.read-more {
    color: var(--primary-color);
    font-size: 14px;
    font-weight: bold;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 40px;
}

.pagination a, .pagination span {
    display: inline-block;
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: var(--secondary-color);
}

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

/* News Detail */
.news-article-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.news-article-header h1 {
    font-size: 28px;
    margin-bottom: 15px;
    color: var(--secondary-color);
}

.article-content {
    color: var(--text-color);
    line-height: 1.8;
    margin-bottom: 40px;
}

.article-content p {
    margin-bottom: 20px;
}

.article-content img {
    max-width: 100%;
    margin: 20px 0;
    border-radius: var(--border-radius);
}

.article-nav {
    display: flex;
    justify-content: space-between;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.article-nav a {
    color: var(--light-text);
    font-size: 14px;
}

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

/* Responsive for Inner Pages */
@media (max-width: 992px) {
    .page-grid {
        grid-template-columns: 1fr; /* Stack main content and sidebar */
    }

    .sidebar {
        margin-top: 40px;
    }
}

@media (max-width: 768px) {
    .page-banner {
        height: 200px;
    }
    
    .page-banner h1 {
        font-size: 28px;
    }

    .news-list-item {
        flex-direction: column;
    }

    .news-list-img {
        width: 100%;
        height: 200px;
        margin-right: 0;
        margin-bottom: 15px;
    }
}

/* About Us Page */
.about-intro {
    margin-bottom: 50px;
}

.about-intro h2 {
    font-size: 28px;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.about-intro p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: var(--light-text);
}

.company-values {
    background-color: var(--bg-light);
    padding: 40px;
    border-radius: var(--border-radius);
    margin-bottom: 50px;
}

.company-values h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 24px;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.value-item {
    text-align: center;
}

.value-icon {
    width: 70px;
    height: 70px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto 20px;
    color: var(--primary-color);
    font-size: 28px;
    box-shadow: var(--box-shadow);
}

.value-item h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.value-item p {
    font-size: 14px;
    color: var(--light-text);
}

/* Contact Us Page */
.contact-info-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 50px;
}

.contact-card {
    background: var(--white);
    padding: 30px;
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    border: 1px solid #eee;
}

.contact-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(230, 41, 72, 0.1); /* Primary color with opacity */
    color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    margin: 0 auto 20px;
}

.contact-card h3 {
    margin-bottom: 10px;
    font-size: 18px;
}

.contact-card p {
    color: var(--light-text);
}

.contact-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-form-container {
    background: var(--bg-light);
    padding: 30px;
    border-radius: var(--border-radius);
}

.contact-form-container h2 {
    margin-bottom: 20px;
    font-size: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: var(--primary-color);
    outline: none;
}

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

.submit-btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.submit-btn:hover {
    background-color: #d62542; /* Darker shade of primary */
}

.map-container {
    height: 100%;
    min-height: 400px;
    border-radius: var(--border-radius);
    overflow: hidden;
    background-color: #eee;
}

/* Responsive for About/Contact */
@media (max-width: 768px) {
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-section {
        grid-template-columns: 1fr;
    }
    
    .map-container {
        min-height: 300px;
    }
}

/* Responsive Media Queries */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .news-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .partners-grid {
        grid-template-columns: repeat(3, 1fr);
    }

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

@media (max-width: 768px) {
    body {
        padding-bottom: 60px; /* Ensure content is not hidden by bottom menu */
    }

    .section {
        padding: 40px 0;
    }

    .section-title {
        font-size: 24px;
        margin-bottom: 30px;
    }

    /* Header */
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none; /* Hide default nav */
        position: absolute;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        gap: 15px;
        text-align: center;
    }

    .nav-links.active {
        display: flex;
    }

    /* Banner */
    .banner-slider {
        height: 300px;
    }
    
    .slide-content h2 {
        font-size: 28px;
    }
    
    .slide-content p {
        font-size: 16px;
    }

    /* Process */
    .step-arrow {
        display: none; /* Hide arrows on mobile */
    }
    
    .process-steps {
        flex-direction: column;
        gap: 20px;
    }

    /* Advantages */
    .advantages-grid {
        grid-template-columns: 1fr;
    }

    /* News */
    .news-grid {
        grid-template-columns: 1fr;
    }

    /* Footer */
    .footer {
        padding-bottom: 20px;
        margin-bottom: 60px;
    }

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

    /* Mobile Bottom Menu */
    .mobile-bottom-menu {
        display: flex;
    }
}

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