/* Global Resets & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; /* Modern system fonts */
    line-height: 1.7; /* Increased for better readability */
    color: #34495E; /* Darker, slightly desaturated blue for text */
    background-color: #F8F9FA; /* Very light grey, almost white */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.container {
    width: 90%;
    max-width: 1400px;
    margin: auto;
    overflow: hidden;
    padding: 0 25px; /* Slightly more padding */
    /* 确保容器不会限制内容 */
    box-sizing: border-box;
}

h1, h2, h3, h4, h5, h6 {
    color: #2C3E50; /* Very dark, desaturated blue for headings */
    margin-bottom: 0.8em;
    font-weight: 600; /* Bolder headings */
}

h1 { font-size: 2.6em; }
h2 { font-size: 2.1em; }
h3 { font-size: 1.6em; } /* Adjusted for better hierarchy */

/* Responsive font sizes for headings */
@media (max-width: 1024px) {
    h1 { font-size: 2.3em; }
    h2 { font-size: 1.9em; }
    h3 { font-size: 1.4em; }
}

@media (max-width: 768px) {
    h1 { font-size: 2em; }
    h2 { font-size: 1.7em; }
    h3 { font-size: 1.3em; }
}

p {
    margin-bottom: 1.2em; /* More spacing */
    color: #5D6D7E; /* Softer grey for paragraph text */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Responsive paragraph text */
@media (max-width: 1024px) {
    p {
        font-size: 0.98em;
        line-height: 1.6;
    }
}

@media (max-width: 768px) {
    p {
        font-size: 0.95em;
        line-height: 1.6;
    }
}

a {
    color: #3498DB; /* Brighter, clear blue for links */
    text-decoration: none;
    transition: color 0.2s ease-in-out; /* Smoother transition */
}

a:hover {
    color: #2980B9; /* Darker shade of blue for hover */
    text-decoration: underline;
}

ul {
    list-style: none;
    padding-left: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block; /* Removes extra space below images */
}

/* Header */
header {
    background: #FFFFFF;
    color: #333;
    padding: 1rem 0;
    border-bottom: 1px solid #E0E6ED; /* Softer border color */
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); /* Softer shadow */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* Needed for blur overlay */
}

header #logo {
    height: 50px; /* Maintain logo size */
    width: auto;
    margin-right: 15px; /* Space between logo and text */
}

header .company-name {
    font-size: 1.4em; /* Adjust size as needed */
    font-weight: 700; /* Bold */
    /* Blue-purple gradient for text */
    background: linear-gradient(90deg, #3498DB, #8E44AD);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    margin-right: auto; /* Pushes nav to the right */
}

/* Gaussian blur overlay for header */
header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.85); /* Slightly transparent white */
    backdrop-filter: blur(8px); /* Gaussian blur effect */
    -webkit-backdrop-filter: blur(8px); /* Safari compatibility */
    z-index: -1; /* Behind content but above header's own background */
    border-bottom: 1px solid rgba(224, 230, 237, 0.7); /* Soft border for the blur layer */
}

header nav ul {
    display: flex;
}

header nav ul li {
    margin-left: 25px; /* Increased spacing */
}

header nav ul li a {
    color: #2C3E50; /* Dark blue for nav links */
    font-weight: 500; /* Medium weight */
    padding: 8px 12px;
    border-radius: 4px; /* Slight rounding */
    transition: color 0.2s ease, background-color 0.2s ease;
}

header nav ul li a:hover,
header nav ul li a.active {
    color: #3498DB; /* Active link bright blue */
    background-color: #EAF2F8; /* Very light blue background on hover/active */
    text-decoration: none;
}

/* Mobile Menu Toggle */
#mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: #2C3E50; /* Dark blue for toggle */
    font-size: 1.9em;
    cursor: pointer;
}

/* Main Content Area */
main {
    padding: 2.5rem 0; /* Increased padding */
    flex-grow: 1;
}

.section {
    padding: 50px 0; /* Increased section padding */
    border-bottom: 1px solid #EAECEE;
}
.section:last-child {
    border-bottom: none;
}
.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.4em; /* Slightly larger section titles */
    color: #2C3E50;
    font-weight: 600;
}

/* Cards for solutions, cases, etc. */
.card-container {
    display: grid; /* Using grid for more control */
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive columns */
    gap: 25px; /* Spacing between cards */
}

.card {
    background: #FFFFFF;
    border: 1px solid #D5DBDB; /* Softer border for cards */
    border-radius: 6px; /* Slightly more rounded cards */
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06); /* Refined shadow */
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-6px); /* More pronounced hover effect */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.card h3 {
    color: #3498DB; /* Bright blue for card titles */
    margin-top: 0;
    border-bottom: 2px solid #EAF2F8; /* Light blue subtle underline */
    padding-bottom: 0.6em;
    font-size: 1.4em; /* Adjusted card title size */
    font-weight: 600;
}

.card p {
    font-size: 0.98em; /* Slightly larger card text */
    margin-bottom: 0.8em;
    flex-grow: 1;
    color: #5D6D7E;
}

.card ul {
    margin-top: 12px;
    padding-left: 20px;
    list-style: disc; /* Standard disc for lists */
    color: #5D6D7E;
}
.card ul li {
    margin-bottom: 6px;
    font-size: 0.92em;
}
.card .btn {
    margin-top: auto;
    align-self: flex-start;
    font-size: 0.9em; /* Smaller button text in cards */
    padding: 10px 20px; /* Adjusted button padding */
}


/* Hero Section (Homepage) */
.hero {
    /* Background for hero section will be set by user with an image */
    background-color: #2980B9; /* Fallback light blue */
    background-size: cover;
    background-position: center;
    color: #fff; /* Keep text white for potential dark background image */
    padding: 90px 0; /* Increased padding */
    text-align: center;
    border-bottom: 5px solid #2980B9; /* Accent border */
}
.hero h1 {
    font-size: 3.2em; /* Larger hero title */
    margin-bottom: 0.4em;
    color: #fff; /* Keep text white for potential dark background image */
    font-weight: 700; /* Bolder hero title */
    text-shadow: 0 2px 4px rgba(0,0,0,0.25); /* Softer text shadow */
}
.hero p {
    font-size: 1.25em; /* Slightly larger hero text */
    margin-bottom: 1.8em;
    color: #E0F7FA; /* Lighter text for better contrast on dark image */
    max-width: 700px; /* Constrain width for readability */
    margin-left: auto;
    margin-right: auto;
}
.btn {
    display: inline-block;
    background: #3498DB; /* Main action blue */
    color: #fff !important;
    padding: 14px 28px; /* Larger buttons */
    border-radius: 5px;
    text-decoration: none !important;
    font-weight: 500; /* Medium weight for buttons */
    transition: background-color 0.2s ease, transform 0.2s ease;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); /* Subtle shadow for buttons */
}
.btn:hover {
    background: #2980B9; /* Darker blue on hover */
    color: #fff !important;
    text-decoration: none !important;
    transform: translateY(-2px); /* Slight lift on hover */
}
.btn-secondary {
    background: #EAF2F8; /* Light blue for secondary button */
    color: #2980B9 !important; /* Dark blue text for secondary */
    border: 1px solid #A9CCE3; /* Border for secondary */
}
.btn-secondary:hover {
    background: #D4E6F1; /* Slightly darker light blue */
    color: #2980B9 !important;
    border-color: #A9CCE3;
}

/* About Us Page Specifics */
.about-section .content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Adjusted minmax */
    gap: 35px;
    align-items: center;
}
.about-section img.inline-image {
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(44, 62, 80, 0.1); /* Refined shadow for images */
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Contact Page Specifics */
.contact-grid {
    /* 首选：使用 CSS 网格布局，响应式更好 */
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
}

/* 回退方案：如果网格不支持，使用 flex */
@supports not (display: grid) {
    .contact-grid {
        display: flex;
        flex-wrap: wrap;
        gap: 35px;
        min-width: 0;
    }
}
.contact-info, .contact-form-container {
    flex: 1 1 auto;
    min-width: 0; /* 关键：允许 flex 项目收缩到小于内容宽度 */
    max-width: 100%;
    background: #FFFFFF; /* Add background to form/info sections */
    padding: 25px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    /* 确保内容不会溢出 */
    overflow-wrap: break-word;
    word-wrap: break-word;
}
.contact-info h3, .contact-form-container h3 { /* Style titles within contact sections */
    color: #2C3E50;
    margin-top:0;
    margin-bottom: 1em;
}
.contact-info p {
    margin-bottom: 0.6rem;
    /* 中文文本优化：保持词语完整，允许在标点处换行 */
    word-break: keep-all;
    overflow-wrap: break-word;
    word-wrap: break-word;
    /* 确保长文本能够正确换行 */
    hyphens: auto;
}

/* 特别针对地址文本的优化 */
.contact-info p:first-of-type {
    word-break: break-all;
    word-wrap: break-word;
    overflow-wrap: anywhere;
}
.contact-info strong { color: #2C3E50; font-weight: 500;}
.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 12px; /* Increased padding for form fields */
    margin-bottom: 18px;
    border: 1px solid #BDC3C7; /* Softer border for form fields */
    border-radius: 4px;
    font-family: inherit;
    font-size: 0.95em;
}
.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: #3498DB; /* Highlight focus with main blue */
    box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}
.contact-form button {
    display: block;
    width: auto;
}

/* Footer */
footer {
    background: #2C3E50; /* Dark, desaturated blue for footer */
    color: #BDC3C7; /* Lighter grey for footer text */
    text-align: center;
    padding: 2.5rem 0; /* Increased footer padding */
    margin-top: auto;
}

footer p {
    margin-bottom: 0.6em;
    color: #AAB7B8; /* Softer grey for footer text */
    font-size: 0.9em;
}

footer a {
    color: #85C1E9; /* Light blue for footer links */
}
footer a:hover {
    color: #FFFFFF; /* White hover for footer links */
    text-decoration: underline;
}

/* Responsive Styles */

/* Medium screens (tablets) */
@media (max-width: 1024px) {
    .container {
        width: 94%;
        padding: 0 15px;
        max-width: none;
    }

    .contact-info, .contact-form-container {
        min-width: 100%;
        padding: 20px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Extra small screens (phones) */
@media (max-width: 480px) {
    .container {
        width: 100%;
        padding: 0 8px;
    }

    .contact-info, .contact-form-container {
        padding: 12px;
    }

    .contact-info p {
        font-size: 0.9em;
        line-height: 1.4;
    }

    .contact-info h3 {
        font-size: 1.2em;
    }

    /* 在超小屏幕上使用更激进的换行策略 */
    .contact-info p strong {
        display: block;
        margin-bottom: 4px;
        min-width: auto;
    }
}

/* Small screens (mobile) */
@media (max-width: 768px) {
    header .container {
        flex-wrap: wrap;
        justify-content: space-between;
        position: relative;
    }

    header #logo {
        margin-bottom: 0;
        margin-right: 10px; /* Adjust spacing for mobile */
    }

    header .company-name {
        font-size: 1.2em; /* Smaller on mobile */
        margin-right: 0; /* Let toggle handle right spacing */
    }

    header nav {
        width: 100%;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-in-out; /* Smoother transition */
        flex-basis: 100%;
        background-color: #fff; /* Ensure nav background on mobile */
        box-shadow: 0 2px 4px rgba(0,0,0,0.05); /* Shadow for open nav */
        border-top: 1px solid #EAECEE; /* Separator for open nav */
    }
    header nav.active {
       max-height: 500px;
    }

    header nav ul {
        flex-direction: column;
        width: 100%;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    header nav ul li {
        margin: 0; /* Remove horizontal margin */
        text-align: left;
    }
    header nav ul li a {
        display: block; /* Make links full width */
        padding: 12px 20px; /* Adjust padding for mobile nav items */
        border-radius: 0; /* No rounding for full-width items */
    }
    header nav ul li a:hover,
    header nav ul li a.active {
        background-color: #EAF2F8; /* Consistent hover/active background */
    }


    #mobile-menu-toggle {
        display: block;
        padding: 5px; /* Make it easier to tap */
    }

    .hero h1 {
        font-size: 2.3em; /* Adjusted hero title for mobile */
    }
    .hero p {
        font-size: 1.05em; /* Adjusted hero text for mobile */
    }
    .hero .btn {
        margin-bottom: 12px;
        width: calc(100% - 40px); /* Full width buttons on mobile with padding */
        max-width: 300px; /* Max width for very small screens */
        margin-left: auto;
        margin-right: auto;
    }
    .hero .btn:last-child {
        margin-bottom: 0;
    }

    .card-container {
        grid-template-columns: 1fr; /* Stack cards on mobile */
    }
    .card {
        width: 100%; /* Cards take full width on mobile */
        max-width: none;
    }
    .section-title {
        font-size: 1.9em; /* Adjusted section title for mobile */
    }

    /* Contact page optimizations for mobile */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .contact-info, .contact-form-container {
        min-width: 100%;
        padding: 15px;
        margin: 0;
    }

    .container {
        width: 98%;
        padding: 0 10px;
        max-width: none;
    }

    .contact-info p {
        font-size: 0.92em;
        line-height: 1.5;
        word-break: break-word; /* 在移动端允许在任意位置断行 */
    }

    /* 特别优化长地址显示 */
    .contact-info p strong {
        display: inline-block;
        min-width: 3.5em; /* 给标签留出足够空间 */
    }
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.highlight { /* General purpose highlight, less aggressive than primary button */
    color: #2980B9;
    font-weight: 600;
}
.subtle {
    color: #7F8C8D; /* Softer grey */
    font-size: 0.92em;
}

/* Specific Section styling */
.partners-section {
    background-color: #EDF2F7; /* Lighter grey, different from page bg */
    padding: 40px 0;
}
.partners-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 25px;
}
.partner-logo {
    font-size: 1em;
    padding: 10px 15px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07); /* Slightly enhanced shadow */
    color: #5D6D7E; /* Partner logo text color */
    transition: transform 0.2s ease;
}
.partner-logo:hover {
    transform: scale(1.05); /* Slight scale on hover */
}