/* Color Palette & Global Styles */
:root {
    --primary-color: #00529B; /* A corporate blue, similar to edsglo */
    --dark-background: #213466; /* Dark gray for footer */
    --light-background: #f8f9fa; /* Light gray for backgrounds */
    --border-color: #dee2e6; /* For borders and lines */
    --dark-text: #212529; /* Main text color */
    --secondary-text: #6c757d; /* Lighter text for subtitles */
    --light-text: #ffffff; /* Pure white text */
    --default-href: #b6babe;
    --logo-sub-text: #adb5bd; /* Light grey for logo subtitle */
}

/* Global Styles */
body {
    margin: 0;
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--light-text);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

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

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

.container {
    width: 100%;
    max-width: 1170px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1em;
    padding-right: 1em;
}

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

/* Header Styles */
header {
    background-color: var(--dark-background); /* Match footer background */
    padding-top: 1em;
    padding-bottom: 1em;
    border-bottom: 1px solid var(--border-color); /* 示例边框 */
    position: fixed; /* 固定头部 */
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
}

.logo a {
    display: flex;
    align-items: baseline; /* Aligns the text to the bottom */
    gap: 0.5em; /* Adds a little space between the two parts */
}

.logo .logo-main {
    font-family: 'Lobster', cursive;
    font-size: 2em; /* Larger font size for AJ */
    color: var(--light-text);
    font-weight: normal;
}

.logo .logo-sub {
    font-size: 0.8em; /* Smaller font size */
    color: var(--logo-sub-text);
    font-weight: normal;
    text-transform: uppercase; /* Looks more like a logo */
    letter-spacing: 0.5px;
    position: relative;
    top: -2px; /* Fine-tune alignment */
}

/* Navigation Styles - Mobile First */
.main-nav ul {
    display: none; /* Hidden by default on mobile */
    position: absolute;
    top: 100%; /* 位于header下方 */
    left: 0;
    width: 100%;
    background-color: var(--dark-background); /* Match header background */
    padding: 1em 0;
    box-shadow: none; /* No shadow for dark menu on dark header */
}

.main-nav.active ul { /* 当.main-nav有active类时显示菜单 */
    display: block;
}

.main-nav li {
    text-align: center;
}

.main-nav li a {
    display: block;
    padding: 0.8em 1em;
    color: var(--light-text); /* Light color for dark background */
    transition: background-color 0.3s ease;
}

.main-nav li a:hover,
.main-nav li a:focus {
    background-color: #343a40; /* Lighter dark for hover on mobile menu */
}

/* Hamburger Menu Icon */
.nav-toggle {
    display: block; /* 在移动端显示汉堡包按钮 */
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0.5em;
}

.hamburger {
    display: block;
    position: relative;
    width: 2em;
    height: 3px;
    background: var(--light-text); /* Light color for dark background */
    transition: transform 0.3s ease-in-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--light-text); /* Light color for dark background */
    transition: transform 0.3s ease-in-out, top 0.3s ease-in-out;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

/* Hamburger animation for active state (X icon) */
.main-nav.active .hamburger {
    transform: rotate(135deg);
}

.main-nav.active .hamburger::before {
    top: 0;
    transform: rotate(90deg);
}

.main-nav.active .hamburger::after {
    top: 0;
    opacity: 0; /*隐藏中间那条线，使其变成X*/
}

/* Hero Section Styles */
#hero {
    /* background-color: var(--light-background); */ /* Replaced with image */
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/digital-transformation.png');
    background-size: cover;
    background-position: center;
    color: var(--light-text); /* Set default text color to white for the section */
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding-top: 4em;
    padding-bottom: 4em;
    padding-top: 100px; /* 确保内容在固定头部下方 */
}

.hero-content h2 {
    font-size: 2.5em; /* 移动端标题大小 */
    margin-bottom: 0.5em;
    font-weight: 300;
    color: var(--light-text); /* White text for contrast */
}

.hero-content .sub-heading {
    font-size: 1.2em;
    margin-bottom: 0.8em;
    color: var(--light-text); /* Light grey/off-white for contrast */
}

.hero-content .tagline {
    font-size: 1.5em;
    font-weight: 600; /* Bolder */
    color: var(--light-text); /* White text for contrast */
    margin-bottom: 1.5em;
}

.expo-info {
    background-color: rgba(0, 0, 0, 0.4);
    padding: 1em;
    border-radius: 8px;
    font-size: 0.9em;
    color: var(--light-text);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.expo-info p {
    margin: 0;
    line-height: 1.5;
}

/* Stats Section Styles */
#stats {
    background-color: var(--light-background); /* 示例浅灰色背景 */
    padding-top: 2em;
    padding-bottom: 2em;
    text-align: center;
}

.stats-container {
    display: flex;
    flex-direction: column; /* 移动端垂直排列 */
    gap: 1.5em; /* 项目之间的间隙 */
}

.stat-item {
    background-color: var(--light-text);
    padding: 1.5em;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stat-item h4 {
    font-size: 0.9em;
    color: var(--primary-color); /* 示例蓝色 */
    margin-bottom: 0.2em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-item h3 {
    font-size: 1.4em;
    color: var(--dark-text);
    margin-bottom: 0.3em;
}

.stat-item h6 {
    font-size: 1em; /* 保持与h3的视觉层级 */
    color: var(--secondary-text);
    margin-bottom: 0.3em;
    font-weight: normal; /* edsglo.com 的 h6 看起来不粗体 */
}

.stat-item .stat-number {
    font-size: 2em; /* 突出数字 */
    font-weight: bold;
    color: #1a73e8; /* 示例深蓝色 */
    margin-top: 0.2em;
}

/* Technology Section Styles */
#technology {
    padding-top: 2em;
    padding-bottom: 2em;
    background-color: var(--light-text); /* 白色背景 */
}

#technology .section-intro p {
    font-size: 1em;
    color: var(--secondary-text);
    text-align: center;
    margin-bottom: 2em;
    line-height: 1.7;
}

.technology-cards-container {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

.tech-card {
    background-color: var(--light-background); /* 浅灰色背景卡片 */
    padding: 1.5em;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

.tech-card-icon {
    display: block;
    margin: 0 auto 1em; /* Center the icon and add space below */
    width: 64px; /* Explicitly set width */
    height: 64px; /* Explicitly set height */
}

.tech-card h4 {
    font-size: 1.2em;
    color: var(--primary-color); /* 示例蓝色标题 */
    margin-top: 0;
    margin-bottom: 0.5em;
}

.tech-card p {
    font-size: 0.95em;
    color: var(--secondary-text);
    line-height: 1.6;
    margin-bottom: 0;
}

/* Client Section Styles */

.client-card {
    background-color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.5em; /* Consistent with tech-card and better for mobile */
    text-align: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.client-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.client-card h4 {
    color: var(--primary-color);
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* General Section Title Style (if not already global) */
.section-title {
    text-align: center;
    font-size: 1.8em;
    color: var(--dark-text);
    margin-bottom: 1.5em;
    font-weight: bold;
}

/* Testimonials Section Styles */
#testimonials {
    padding-top: 2em;
    padding-bottom: 2em;
    background-color: var(--light-background); /* 示例浅灰色背景 */
}

.testimonials-container {
    display: flex;
    flex-direction: column;
    gap: 1.5em;
}

.testimonial-item {
    background-color: var(--light-text);
    padding: 1.5em;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 5px solid var(--primary-color); /* 示例蓝色左边框 */
}

.testimonial-quote p {
    font-style: italic;
    color: var(--secondary-text);
    margin-bottom: 1em;
    line-height: 1.7;
}

.testimonial-quote p:last-child {
    margin-bottom: 0;
}

.testimonial-author {
    display: block;
    text-align: right;
    font-size: 0.95em;
    color: var(--dark-text);
    font-weight: bold;
}

.testimonial-author .author-title {
    display: block;
    font-weight: normal;
    font-size: 0.9em;
    color: #777;
}

/* Specific styling for the STMicroelectronics entry which only has a name/title in a p tag */
.testimonial-item .testimonial-quote p:only-child {
    font-style: normal; /* Override italic if it's just a name/title */
    font-weight: bold;
    color: var(--dark-text);
}

.testimonial-item .testimonial-quote p:only-child .author-title {
    display: block; /* Or inline, depending on desired layout */
    font-weight: normal;
    font-size: 0.9em;
    color: #777;
}


/* General Subtitle Style (if not already global) */
.section-subtitle {
    text-align: center;
    font-size: 1.5em; /* Or smaller, to match 'about' style on edsglo */
    color: var(--secondary-text);
    margin-bottom: 1em;
    font-weight: normal; /* edsglo 'about' looks normal weight */
    /* text-transform: lowercase; */
}

/* About Section Styles */
#about {
    padding-top: 2em;
    padding-bottom: 2em;
    background-color: var(--light-text); /* White background */
}

.about-content p {
    font-size: 1em;
    color: var(--secondary-text);
    text-align: center;
    line-height: 1.7;
    margin-bottom: 1em;
}

.about-content p:last-child {
    margin-bottom: 0;
}

/* Footer Styles */
footer {
    background-color: var(--dark-background); /* 深色背景，参考edsglo */
    color: var(--light-text); /*浅色文字*/
    padding-top: 2em;
    padding-bottom: 1em; /* 底部内边距小一些 */
    font-size: 0.9em;
}

.footer-container {
    display: flex;
    flex-direction: column; /* 移动端垂直排列 */
    gap: 2em; /* 各列之间的间隙 */
    margin-bottom: 2em;
}

.footer-column h4 {
    font-size: 1.2em;
    color: #fff;
    margin-bottom: 0.8em;
    border-bottom: 1px solid var(--secondary-text); /* 标题下划线 */
    padding-bottom: 0.4em;
}

.contacts-column address p {
    margin-bottom: 0.5em;
    line-height: 1.6;
}

.contacts-column address p strong {
    color: #fff;
}

.contacts-column address a {
    color: var(--default-href); /* 链接颜色 */
    transition: color 0.3s ease;
}

.contacts-column address a:hover {
    color: #fff;
}

.quick-links-column ul li {
    margin-bottom: 0.5em;
}

.quick-links-column ul li a {
    color: var(--default-href);
    transition: color 0.3s ease;
}

.quick-links-column ul li a:hover {
    color: #fff;
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5em;
    border-top: 1px solid var(--secondary-text); /* 分隔线 */
    font-size: 0.85em;
    color: var(--default-href);
}

.footer-bottom p {
    margin: 0;
}

/* 响应式调整：在桌面端显示完整导航 */
@media (min-width: 768px) { /* 假设768px为桌面断点 */
    .nav-toggle {
        display: none; /* 在桌面端隐藏汉堡包按钮 */
    }

    .main-nav ul {
        display: flex; /* 在桌面端横向排列 */
        position: static;
        width: auto;
        background-color: transparent;
        box-shadow: none;
        padding: 0;
    }

    .main-nav li {
        margin-left: 1.5em;
    }

    .main-nav li a {
        padding: 0.5em 0;
    }

    .main-nav li a:hover,
    .main-nav li a:focus {
        background-color: transparent;
        color: var(--logo-sub-text); /* 示例悬停颜色 */
    }

    /* Hero Section Responsive Styles */
    #hero {
        min-height: 70vh; /* 桌面端可以稍微降低高度 */
        padding: 4em 2em;
        padding-top: 120px; /* 确保内容在固定头部下方 */
    }

    .hero-content h2 {
        font-size: 3.5em; /* 桌面端更大的标题 */
    }

    .hero-content .sub-heading {
        font-size: 1.5em;
    }

    .hero-content .tagline {
        font-size: 1.8em;
    }

    .expo-info {
        padding: 1.5em;
        font-size: 1em;
    }

    /* Stats Section Responsive Styles */
    #stats {
        padding: 3em 2em;
    }

    .stats-container {
        flex-direction: row; /* 桌面端水平排列 */
        flex-wrap: wrap; /* 允许换行，虽然目标是4列不换行 */
        justify-content: space-around; /* 分散对齐 */
        gap: 1.5em; /* 保持项目之间的间隙 */
    }

    .stat-item {
        flex-basis: calc(25% - 1.5em); /* 尝试4列布局，减去gap的影响 */
        max-width: calc(25% - 1.5em);
        /* 对于更精确的控制，可以考虑更大的断点，例如 992px 或 1200px 来确保4列 */
    }

    /* 如果希望严格4列，并且在768px下可能空间不足，可以先做成2列 */
    /* Example for 2 columns at 768px, then 4 columns at a larger breakpoint like 992px */
    /* .stat-item { */
    /* flex-basis: calc(50% - 1em); */ /* 2列布局 */
    /* max-width: calc(50% - 1em); */
    /* } */

    .stat-item h3 {
        font-size: 1.6em;
    }

    .stat-item .stat-number {
        font-size: 2.2em;
    }

    /* Technology Section Responsive Styles */
    #technology {
        padding: 3em 2em;
    }

    .technology-cards-container {
        flex-direction: row; /* 桌面端水平排列 */
        flex-wrap: wrap; /* 允许换行 */
        justify-content: space-between; /* 或 space-around */
        gap: 1.5em; /* 卡片之间的间隙 */
    }

    .tech-card,
    .client-card {
        flex-basis: calc(25% - 1.5em); /* 尝试4列布局，减去gap的影响 */
        max-width: calc(25% - 1.5em);
        display: flex; /* Use flex to ensure consistent height if content varies */
        flex-direction: column; /* Stack content vertically within card */
    }

    .tech-card .card-content {
        flex-grow: 1; /* Allow content to grow and fill space, helping align buttons if any */
    }

    .tech-card h4 {
        font-size: 1.3em;
    }

    .tech-card p {
        font-size: 0.95em;
    }

    /* Testimonials Section Responsive Styles */
    #testimonials {
        padding: 3em 2em;
    }

    .testimonials-container {
        flex-direction: row; /* 桌面端水平排列 */
        flex-wrap: wrap; /* 允许换行 */
        justify-content: space-between; /* 分散对齐 */
        gap: 1.5em; /* 卡片之间的间隙 */
    }

    .testimonial-item {
        flex-basis: calc(33.333% - 1em); /* 尝试3列布局, (1.5em * 2 gaps) / 3 items = 1em per item for gap adjustment */
        max-width: calc(33.333% - 1em);
        display: flex; /* Ensure consistent height if content varies */
        flex-direction: column; /* Stack content vertically within card */
    }

    .testimonial-item blockquote {
        font-size: 1.05em;
        flex-grow: 1; /* Allow quote to take available space */
    }

    .testimonial-item .author {
        font-size: 0.95em;
    }

    /* About Section Responsive Styles */
    #about {
        padding: 3em 2em;
    }

    #about .section-subtitle {
        font-size: 1.8em; /* Slightly larger for desktop if needed */
        margin-bottom: 1.2em;
    }

    .about-content {
        max-width: 800px; /* Limit width for better readability on desktop */
        margin: 0 auto; /* Center the content block */
    }

    .about-content p {
        font-size: 1.05em; /* Slightly larger text for desktop */
        text-align: left; /* Align text to left for paragraphs on desktop */
    }

    /* Footer Responsive Styles */
    footer {
        padding: 3em 2em 2em; /* Adjust padding for desktop */
    }

    .footer-container {
        flex-direction: row; /* Arrange columns horizontally */
        justify-content: space-between; /* Space out the columns */
        align-items: flex-start; /* Align items to the top if heights differ */
        gap: 2em; /* Adjust gap for desktop */
    }

    .footer-column {
        flex-basis: calc(50% - 1em); /* Each column takes roughly half the space, minus gap */
        max-width: calc(50% - 1em);
    }

    .footer-column h4 {
        font-size: 1.3em;
    }

    .contacts-column address p,
    .quick-links-column ul li a {
        font-size: 0.95em;
    }

    .footer-bottom {
        padding-top: 2em;
        font-size: 0.9em;
    }
}
