/* General Styles */
html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: 'Garamond', 'Times New Roman', serif, '仿宋', 'FangSong';
    padding: 0;
    box-sizing: border-box;
    line-height: 1.6;
    color: #333;
    overflow-x: hidden;
    font-size: 15px;
}

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

a {
    text-decoration: none;
    color: inherit;
}

/* Language-specific font application */
.lang-en-content {
    font-family: 'Garamond', serif;
}

.lang-zh-content {
    font-family: '仿宋', 'FangSong', serif;
}

/* Header */
header {
    padding: 18px 0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

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

.logo {
    font-size: 1.7em;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
}

.logo .symbol {
    width: 28px;
    height: 28px;
    border-radius: 5px;
    margin-right: 8px;
    display: flex;
    justify-content: center;
    align-items: center;
    color: #fff;
    font-size: 1.1em;
    font-weight: bold;
}

nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
}

nav ul li {
    margin-left: 25px;
}

nav ul li a {
    font-weight: 500;
    color: #555;
    transition: color 0.3s ease;
    font-size: 0.95em;
}

nav ul li a:hover {
    color: #5aa49f;
}

.lang-toggle-button {
    margin-left: 25px;
    padding: 7px 14px;
    border: 1px solid #ddd;
    border-radius: 5px;
    cursor: pointer;

    font-weight: 500;
    color: #333;
    font-size: 0.9em;
}

.lang-toggle-button:hover {
}

/* Hero Section */
.hero {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    padding: 0;
    text-align: center;
    color: #2c3e50;
    position: relative;
    overflow: hidden;
}

.hero-bg-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    z-index: 1;
}

.hero .container {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    bottom: 100px;
    left: 0;
    right: 0;
    padding: 0 20px;
}

.hero h1 {
    font-size: 2.8em;
    margin-bottom: 18px;
    font-weight: 700;
    margin-top: auto;
}

.hero p {
    font-size: 1.1em;
    max-width: 800px;
    margin: 0 auto 35px auto;
}

.hero-info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2x2 grid layout */
    gap: 35px;
    margin-top: 50px;
    text-align: left;
}

.hero-info-item {
    padding: 28px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.hero-info-item:hover {
    transform: translateY(-5px);
}

.hero-info-item h3 {
    font-size: 1.4em;
    margin-bottom: 12px;
    color: #5aa49f;
}

.hero-info-item p {
    font-size: 0.95em;
    line-height: 1.7;
    color: #555;
    margin-top: 0;
    margin-bottom: 0;
    position: relative;
    padding-left: 20px;
}

.hero-info-item p::before {
    content: "●";
    position: absolute;
    left: 0;
    color: black;
    font-size: 8px;
    top: 6px;
}

.hero-info-item ol {
    font-size: 0.95em;
    line-height: 1.7;
    color: #555;
    margin-top: 0;
    margin-bottom: 0;
    list-style: none;
    padding-left: 20px;
}

.hero-info-item ol li {
    position: relative;
    padding-left: 20px;
}

.hero-info-item ol li::before {
    content: "●";
    position: absolute;
    left: 0;
    color: black;
    font-size: 8px;
    top: 6px;
}
.hero-info-item ol {
    padding-left: 20px;
}
.hero-info-item li {
    margin-bottom: 4px;
}

/* Sections */
section {
    padding: 70px 0;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}




h2 {
    font-size: 2.3em;
    text-align: center;
    margin-bottom: 50px;
    color: #2c3e50;
    font-weight: 700;
}

/* About Us Section */
.about-content {
    display: flex;
    flex-wrap: wrap;
    gap: 35px;
    justify-content: center;
    text-align: center;
}

.about-content p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.05em;
    color: #555;
}

/* Portfolio Section */
.portfolio-grid {
    display: grid; /* Changed from flex to grid */
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); /* Adjusted for responsiveness */
    gap: 25px; /* Added gap between items */
    padding: 0;
    max-width: 100%;
    margin: 0 auto; /* Centered the grid */
}

.portfolio-item {
    text-align: center;
    padding: 18px;
    border-radius: 8px;
    transition: transform 0.3s ease; /* Removed background-color transition */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Added subtle shadow */
}

.portfolio-item:hover {
    transform: translateY(-5px);
}

.portfolio-item img {
    width: 100px; /* Increased image size */
    height: 100px; /* Set fixed height for uniformity */
    object-fit: contain; /* Ensures the entire image is visible without cropping */
    border-radius: 50%; /* Changed to 50% for a circular shape, if desired for logos */
    margin: 0 auto 15px auto; /* Centered image and added margin below it */
    display: block;
    border: 1px solid #eee; /* Added a light border */
    transition: filter 0.3s ease;
}

.portfolio-item:hover img {
    filter: grayscale(0%);
}

.portfolio-item p {
    font-weight: 500;
    color: #444;
    margin: 0;
    font-size: 1em; /* Adjusted font size for readability */
}

/* Team Section */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 35px;
    justify-content: center;
}

.team-member {
    text-align: center;
    padding: 28px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.team-member:hover {
    transform: translateY(-5px);
}

.team-member img {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 18px;
    border: 3px solid #5aa49f;
}

.team-member h3 {
    margin-bottom: 4px;
    color: #2c3e50;
    font-size: 1.1em;
}

.team-member p {
    color: #777;
    font-size: 0.88em;
    margin: 0;
}

/* News and Insights Section */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.news-item {
    padding: 22px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
}

.news-item:hover {
    transform: translateY(-5px);
}

.news-item h3 {
    margin-top: 0;
    font-size: 1.2em;
    color: #2c3e50;
    margin-bottom: 8px;
}

.news-item p {
    font-size: 0.9em;
    color: #555;
    margin-bottom: 12px;
}

.news-item .read-more {
    color: #5aa49f;
    font-weight: 600;
    font-size: 0.9em;
    transition: color 0.3s ease;
}

.news-item .read-more:hover {
    text-decoration: underline;
}

/* Contact Us Section */
.contact-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.contact-content p {
    font-size: 1em;
    color: #555;
    margin-bottom: 15px;
}
.contact-content .contact-info {
    margin-top: 30px;
    font-size: 1.1em;
    line-height: 1.8;
    color: #333;
    font-weight: 500;
}
.contact-content .contact-info a {
    color: #5aa49f;
    text-decoration: none;
    transition: text-decoration 0.3s ease;
}
.contact-content .contact-info a:hover {
    text-decoration: underline;
}


/* Footer */
footer {
    color: #333;
    text-align: center;
    padding: 35px 0;
    font-size: 0.85em;
}

footer p {
    margin: 0;
}

/* Language Toggle - Hide/Show Logic */
/* Initially, English content is visible, Chinese is hidden */
.lang-en { display: block; }
.lang-zh { display: none; }

/* When body has 'chinese' class, toggle visibility */
body.chinese .lang-en { display: none; }
body.chinese .lang-zh { display: block; }

/* Handle inline elements with language classes */
.lang-en.inline { display: inline; }
.lang-zh.inline { display: none; }
body.chinese .lang-en.inline { display: none; }
body.chinese .lang-zh.inline { display: inline; }

/* Responsive Design */
@media (max-width: 768px) {
    header .container {
        flex-direction: column;
    }

    nav ul {
        flex-direction: column;
        margin-top: 15px;
    }

    nav ul li {
        margin: 8px 0;
    }

    .lang-toggle-button {
        margin: 15px 0 0 0;
    }

    .hero {
        padding: 50px 0;
    }

    .hero h1 {
        font-size: 2em;
    }

    .hero p {
        font-size: 0.95em;
    }

    .hero-info-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    h2 {
        font-size: 1.8em;
        margin-bottom: 30px;
    }

    section {
        padding: 50px 0;
    }

    .portfolio-grid {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* Adjusted for smaller screens */
        gap: 15px; /* Reduced gap for smaller screens */
    }

    .portfolio-item img {
        width: 80px; /* Smaller images on mobile */
        height: 80px;
        margin-bottom: 10px;
    }

    .portfolio-item p {
        font-size: 0.85em; /* Smaller text on mobile */
    }

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

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

    .contact-content {
        padding: 0 15px;
    }
    .contact-content .contact-info {
        font-size: 1em;
    }
}