/* Base Styles */
:root {
    --primary: #0A192F;
    --secondary: #112240;
    --accent: #64FFDA;
    --text: #E6F1FF;
    --text-secondary: #8892B0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--primary);
    color: var(--text);
    line-height: 1.7;
    overflow-x: hidden;
}

.container {
    max-width: 1400px; /* Increased from 1200px to 1400px for more space */
    margin: 0 auto;
    padding: 0 20px;
}

/* Special container for header to provide extra space */
header .container {
    max-width: 1500px; /* Even wider for header navigation */
    padding: 0 30px; /* Increased horizontal padding */
}

/* Header */
header {
    padding: 20px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    background-color: rgba(10, 25, 47, 0.9);
    backdrop-filter: blur(10px);
}

/* Updated nav layout to accommodate language switcher */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    position: relative;
}

.logo {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
    text-decoration: none;
}

.logo span {
    color: var(--text);
}

/* Updated nav-links for better spacing and no wrapping */
.nav-links {
    display: flex;
    gap: 18px; /* Further reduced from 25px for more items */
    flex: 1;
    justify-content: center;
    margin-left: 1rem;
    white-space: nowrap;
}

.nav-links a {
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
	font-size: 14px; /* Reduced from 16px for more space */
    transition: color 0.3s;
    padding: 8px 0;
    position: relative;
    white-space: nowrap;
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent);
    transition: width 0.3s;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Language Switcher Styles - Optimized for 3 languages */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 4px; /* 从6px减少到4px */
    margin-left: 12px; /* 从15px减少到12px */
    margin-right: 20px; /* 从150px大幅减少到20px以腾出空间 */
    flex-shrink: 0;
}

.lang-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.8);
    padding: 4px 8px; /* 从5px 10px减少 */
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem; /* 从0.85rem减少 */
    transition: all 0.3s ease;
    font-family: inherit;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-1px);
}

.lang-btn.active {
    background: var(--accent);
    color: var(--primary);
    border-color: var(--accent);
    box-shadow: 0 2px 8px rgba(100, 255, 218, 0.3);
}

.lang-separator {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem; /* 从0.9rem减少 */
    margin: 0 2px; /* 从4px减少到2px */
}

/* Enhanced language button animation */
.lang-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.lang-btn:hover::before {
    left: 100%;
}

/* Active language indicator */
.lang-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background: var(--primary);
    border-radius: 50%;
}

.cta-button {
    background-color: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
	font-size: 14px;
    transition: all 0.3s;
    text-decoration: none;
    white-space: nowrap;
    flex-shrink: 0;
}

.cta-button:hover {
    background-color: rgba(100, 255, 218, 0.1);
}

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    background: linear-gradient(to right, var(--primary), var(--secondary));
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><rect width="100" height="100" fill="none" stroke="%238892B0" stroke-width="0.5" opacity="0.1"/></svg>');
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
}

.subtitle {
    color: var(--accent);
    font-size: 16px;
    margin-bottom: 20px;
    font-weight: 500;
}

.hero h1 {
    font-size: 60px;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
    color: var(--text);
}

.hero h2 {
    font-size: 40px;
    font-weight: 600;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.hero-description {
    max-width: 700px;
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.cta-group {
    display: flex;
    gap: 20px;
}

.primary-button {
    background-color: var(--accent);
    border: none;
    color: var(--primary);
    padding: 15px 30px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
}

.primary-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(100, 255, 218, 0.2);
}

/* Services Section */
.services {
    padding: 100px 0;
    background-color: var(--secondary);
}

.section-title {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    padding-bottom: 20px;
}

.section-title::after {
    content: '';
    position: absolute;
    width: 60px;
    height: 3px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--accent);
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--primary);
    padding: 30px;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(100, 255, 218, 0.1);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 3px;
    height: 0;
    background-color: var(--accent);
    transition: height 0.3s;
}

.service-card:hover::before {
    height: 100%;
}

.service-icon {
    font-size: 40px;
    color: var(--accent);
    margin-bottom: 20px;
}

.service-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
}

.service-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
    flex-grow: 1;
}

.learn-more {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: gap 0.3s;
}

.learn-more:hover {
    gap: 10px;
}

/* Engineering Section */
.engineering {
    padding: 100px 0;
    background-color: var(--primary);
}

.engineering-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 50px;
}

.engineering-card {
    background-color: var(--secondary);
    padding: 30px;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(100, 255, 218, 0.1);
}

.engineering-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--accent);
}

.engineering-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--accent);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.engineering-card:hover::before {
    transform: scaleX(1);
}

.engineering-icon {
    font-size: 40px;
    color: var(--accent);
    margin-bottom: 20px;
}

.engineering-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 15px;
}

.engineering-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

.engineering-applications {
    background-color: var(--secondary);
    padding: 40px;
    border-radius: 8px;
    margin-top: 40px;
    border: 1px solid rgba(100, 255, 218, 0.1);
}

.applications-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--accent);
}

.applications-description {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 16px;
}

/* About Section */
.about {
    padding: 100px 0;
    background-color: var(--secondary);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-text {
    position: relative;
}

.about-image {
    position: relative;
}

.about-image img {
    width: 100%;
    border-radius: 8px;
    position: relative;
    z-index: 1;
}

.about-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: 8px;
    top: 20px;
    left: 20px;
    z-index: 0;
}

.about-subtitle {
    color: var(--accent);
    font-size: 16px;
    margin-bottom: 15px;
    font-weight: 500;
}

.about-title {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 25px;
}

.about-description {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

/* Team Section */
.team {
    padding: 100px 0;
    background-color: var(--primary);
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
    justify-items: center;
}

/* Center team members when less than 4 in a row - Modern browsers */
.team-grid:has(.team-card:nth-child(1):last-child) {
    display: flex;
    justify-content: center;
}

.team-grid:has(.team-card:nth-child(2):last-child) {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.team-grid:has(.team-card:nth-child(3):last-child) {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

/* Fallback for browsers that don't support :has() - Manual classes */
.team-grid.single-member {
    display: flex;
    justify-content: center;
}

.team-grid.two-members {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.team-grid.three-members {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

/* Maintain original card size when centered */
.team-grid.single-member .team-card,
.team-grid.two-members .team-card,
.team-grid.three-members .team-card,
.team-grid:has(.team-card:nth-child(1):last-child) .team-card,
.team-grid:has(.team-card:nth-child(2):last-child) .team-card,
.team-grid:has(.team-card:nth-child(3):last-child) .team-card {
    width: 280px;
    flex-shrink: 0;
}

/* Optional: Adjust card max-width slightly to maintain good proportions */
.team-card {
    background-color: var(--secondary);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid rgba(100, 255, 218, 0.1);
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
}

.team-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--accent);
    border-color: var(--accent);
}

.team-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--accent), transparent, var(--accent));
    z-index: -1;
    transform: scale(0.98);
    filter: blur(20px);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 10px;
}

.team-card:hover::before {
    opacity: 0.3;
}

/* Updated Team Image Height - 20% smaller */
.team-image {
    width: 100%;
    height: 264px;
    overflow: hidden;
    position: relative;
    border-bottom: 3px solid var(--accent);
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: all 0.5s ease;
    background-color: var(--primary);
}

.team-card:hover .team-image img {
    transform: scale(1.03);
}

.team-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(0deg, rgba(10, 25, 47, 0.4) 0%, rgba(10, 25, 47, 0) 40%);
    z-index: 1;
    transition: opacity 0.3s ease;
}

.team-card:hover .team-image::after {
    opacity: 0.6;
}

.team-info {
    padding: 20px;
    text-align: center;
    position: relative;
}

.team-name {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
    position: relative;
    display: inline-block;
}

.team-name::after {
    content: '';
    position: absolute;
    width: 40%;
    height: 2px;
    background-color: var(--accent);
    bottom: -8px;
    left: 30%;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.team-card:hover .team-name::after {
    transform: scaleX(1);
}

.team-position {
    color: var(--accent);
    font-size: 14px;
    font-weight: 500;
    margin: 10px 0;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.team-bio {
    color: var(--text-secondary);
    margin-bottom: 15px;
    line-height: 1.6;
    font-size: 14px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, margin 0.5s ease;
}

.team-card.expanded .team-bio {
    max-height: 300px;
    margin-bottom: 15px;
}

.team-socials {
    display: flex;
    justify-content: center;
    gap: 15px;
    position: relative;
    padding-top: 15px;
}

.team-socials::before {
    content: '';
    position: absolute;
    top: 0;
    left: 30%;
    width: 40%;
    height: 1px;
    background-color: rgba(100, 255, 218, 0.2);
}

.team-social {
    color: var(--text-secondary);
    font-size: 18px;
    transition: all 0.3s;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: rgba(100, 255, 218, 0.05);
}

.team-social:hover {
    color: var(--primary);
    background-color: var(--accent);
    transform: translateY(-3px);
}

.bio-toggle {
    background-color: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin: 0 auto 15px;
    display: block;
    transition: all 0.3s;
}

.bio-toggle:hover {
    background-color: rgba(100, 255, 218, 0.1);
}

.team-card.expanded .bio-toggle {
    background-color: var(--accent);
    color: var(--primary);
}

/* Responsive adjustments for team section */
@media (max-width: 1200px) {
    .team-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .team-image {
        height: 220px;
    }
}

@media (max-width: 992px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .team-image {
        height: 240px;
    }
}

@media (max-width: 576px) {
    .team-grid {
        grid-template-columns: 1fr;
    }

    .team-image {
        height: 280px;
    }
}

/* Expertise Section */
.expertise {
    padding: 100px 0;
    background-color: var(--secondary);
}

.expertise-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.expertise-card {
    background-color: var(--primary);
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(100, 255, 218, 0.1);
}

.expertise-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: var(--accent);
}

.expertise-icon {
    font-size: 36px;
    color: var(--accent);
    margin-bottom: 15px;
}

.expertise-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 15px;
}

.expertise-description {
    color: var(--text-secondary);
}

/* Join Us Section */
.join-us {
    padding: 100px 0;
    background-color: var(--primary);
}

.join-us-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.join-us-text {
    position: relative;
}

.careers-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.career-card {
    background-color: var(--secondary);
    padding: 25px;
    border-radius: 8px;
    transition: transform 0.3s, box-shadow 0.3s;
    border: 1px solid rgba(100, 255, 218, 0.1);
}

.career-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    border-color: var(--accent);
}

.career-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text);
}

.career-type {
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 15px;
}

.career-description {
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.join-us-image {
    position: relative;
}

.join-us-image img {
    width: 100%;
    border-radius: 8px;
    position: relative;
    z-index: 1;
}

.join-us-image::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: 8px;
    top: 20px;
    left: 20px;
    z-index: 0;
}

/* CTA Section */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><circle cx="50" cy="50" r="3" fill="%238892B0" opacity="0.2"/></svg>');
    opacity: 0.5;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.cta-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 20px;
}

.cta-description {
    color: var(--text-secondary);
    margin-bottom: 30px;
    font-size: 18px;
}

/* Footer */
footer {
    background-color: var(--secondary);
    padding: 60px 0 30px;
    border-top: 1px solid rgba(136, 146, 176, 0.2);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-column h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 15px;
}

.footer-column h3::after {
    content: '';
    position: absolute;
    width: 30px;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--accent);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: var(--accent);
}

.contact-info {
    list-style: none;
    color: var(--text-secondary);
}

.contact-info li {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background-color: var(--primary);
    color: var(--text);
    transition: all 0.3s;
}

.social-link:hover {
    background-color: var(--accent);
    color: var(--primary);
    transform: translateY(-5px);
}

.copyright {
    text-align: center;
    color: var(--text-secondary);
    font-size: 14px;
    padding-top: 30px;
    border-top: 1px solid rgba(136, 146, 176, 0.2);
}

.company-number {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
    margin-top: 10px;
}

/* Language Switching Smooth Transitions */
[data-lang] {
    transition: opacity 0.2s ease-in-out;
}

.language-switching [data-lang] {
    opacity: 0.7;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    /* Further reduce spacing on large tablets */
    .nav-links {
        gap: 16px; /* 从18px减少 */
        margin-left: 0.5rem;
    }
    
    .nav-links a {
        font-size: 13px; /* 从14px减少 */
    }
    
    .language-switcher {
        margin-left: 8px; /* 从10px减少 */
        margin-right: 15px; /* 从100px减少 */
        gap: 3px; /* 从4px减少 */
    }
    
    .lang-btn {
        padding: 3px 6px; /* 从4px 8px减少 */
        font-size: 0.75rem; /* 从0.8rem减少 */
    }
    
    .cta-button {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 992px) {
    .hero h1 {
        font-size: 50px;
    }
    
    .hero h2 {
        font-size: 32px;
    }
    
    .about-content, .join-us-content {
        grid-template-columns: 1fr;
    }
    
    /* Adjust navigation for tablets */
    .nav-links a {
        font-size: 13px;
    }
    
    .nav-links {
        gap: 12px;
    }
    
    .language-switcher {
        margin-right: 20px;
    }
    
    .engineering-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 576px) {
    .logo {
        font-size: 24px;
    }
    
    .language-switcher {
        gap: 2px;
    }
    
    .lang-btn {
        padding: 2px 4px;
        font-size: 0.7rem;
    }
    
    .lang-separator {
        font-size: 0.7rem;
        margin: 0 1px;
    }
    
    .hero h1 {
        font-size: 28px;
    }
    
    .hero h2 {
        font-size: 20px;
    }
    
    .cta-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .primary-button,
    .cta-button {
        text-align: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    /* Keep language switcher visible but smaller */
    .language-switcher {
        margin-left: 8px;
        margin-right: 18px;
        gap: 4px;
    }
    
    .lang-btn {
        padding: 3px 6px;
        font-size: 0.75rem;
    }
    
    .cta-button {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    /* Adjust header container for mobile */
    header .container {
        padding
	}
}