/* about.css */

/* General Styles (遵循全局字体，避免导航字体差异) */
body {
    /* 使用 header.php 定义的全站字体，避免覆盖造成导航不一致 */
    color: #333;
}

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

/* Hero Section */
.about-hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0; /* 交给全局统一规则控制高度 */
    padding: 0; /* 由 header 的统一样式接管 */
    text-align: center;
    background: linear-gradient(45deg, #1a237e, #283593);
    color: white;
}

.about-hero .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transform: translateY(0); /* 与产品页保持一致，不再额外下移 */
}

.about-hero h1 {
    font-size: 3.5rem;
    font-weight: 900;
    margin: 0 0 10px; /* 去掉顶部额外间距 */
    line-height: 1.1;
}

.about-hero p {
    font-size: 1.2rem;
}

/* Company Section */
.company-section {
    padding: 20px 0;
}

/* 内容卡片：统一容器承载文字+图片 */
.section-card {
    display: flex;
    align-items: center;
    gap: 32px;
    padding: 24px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255,255,255,0.86));
    box-shadow: 0 8px 24px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
}

.company-section.reverse .section-card {
    flex-direction: row-reverse;
}

.company-content {
    flex: 1.2;
}

.company-content h2 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1a237e;
}

.company-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    color: #555;
    text-align: justify !important;
    text-justify: inter-word;
    letter-spacing: normal;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    word-break: normal;
    overflow-wrap: anywhere;
    text-align-last: left;
    margin: 0 0 .75rem;
}

.section-card .company-content {
    max-width: min(72ch, 100%);
}

.company-image {
    flex: .8;
}

.company-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.company-image img:hover {
    transform: scale(1.05);
}

/* Stats Section */
.stats-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    padding: 20px 0;
    text-align: center;
}

.stat {
    background: #f4f4f9;
    padding: 30px;
    border-radius: 10px;
    transition: background 0.3s ease;
}

.stat:hover {
    background: #e0e0f0;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: #283593;
}

.stat-label {
    font-size: 1rem;
    color: #555;
}

/* Team Section */
.team-section {
    text-align: center;
    padding: 20px 0;
}

.team-section h2 {
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 40px;
    color: #1a237e;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.team-member {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(26, 35, 126, 0.18);
    background: linear-gradient(180deg, rgba(255,255,255,0.65), rgba(255,255,255,0.55));
    transition: transform 0.25s ease, box-shadow 0.3s ease;
    /* 默认可见，避免 JS 失败时出现空白 */
    transform: translateY(0);
    opacity: 1;
}

/* 入场动画，仅在添加 in-view 时播放 */
@keyframes cardFadeIn {
    from { transform: translateY(8px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.team-member.in-view { animation: cardFadeIn 0.6s ease both; }

.team-member::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, rgba(26,35,126,0.35), rgba(58,106,255,0.35));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
            mask-composite: exclude;
    pointer-events: none;
}

.team-member::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.35) 20%, rgba(255,255,255,0) 40%);
    transform: translateX(-120%);
    transition: transform 0.6s ease;
    pointer-events: none;
}

.team-member:hover::after {
    transform: translateX(120%);
}

.team-member img {
    width: 100%;
    display: block;
    transition: transform 0.4s ease, filter 0.3s ease;
    filter: saturate(1.05) contrast(1.05);
}

.team-member:hover img {
    transform: scale(1.08);
}

.team-member-info {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.78), rgba(0,0,0,0.45));
    color: white;
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
}

.team-member:hover .team-member-info {
    transform: translateY(0);
}

.team-member-info h3 {
    font-size: 1.5rem;
    margin: 0 0 5px;
}

.team-member-info p {
    font-size: 1rem;
    margin: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .about-hero {
        min-height: 0;
        padding: 48px 0 16px !important; /* 与站点统一的移动端间距保持一致 */
    }
    .about-hero .container {
        transform: translateY(0);
    }
    .section-card {
        flex-direction: column;
        align-items: stretch; /* 子项在竖向占满宽度 */
        gap: 20px;
        padding: 18px;
    }
    /* 强制所有公司区块在移动端上下排列，覆盖反转样式 */
    .company-section .section-card,
    .company-section.reverse .section-card {
        flex-direction: column !important;
    }
    /* 文本与图片在移动端独占一行、满宽显示 */
    .company-content,
    .company-image {
        width: 100%;
    }
    /* 在移动端将图片置于文字上方 */
    .company-image {
        order: -1;
    }
    .image-card {
        width: 100%;
        max-width: 100%;
    }
    .section-card .company-content { max-width: 100%; }
    .company-content p {
        font-size: 1rem;
        line-height: 1.55;
        margin-bottom: .6rem;
        word-spacing: 0;
        letter-spacing: 0.01em;
    }
}

/* 在小于992px的设备上进一步保证不被固定导航遮挡 */
@media (max-width: 991.98px) {
    .hero-section {
        scroll-margin-top: 130px; /* 跳转时避免被顶栏覆盖 */
    }
}

@media (max-width: 480px) {
    .hero-section {
        padding-top: 48px !important; /* 与统一移动端间距保持一致 */
    }
    .company-content p {
        font-size: .98rem;
        line-height: 1.52;
        margin-bottom: .55rem;
        letter-spacing: 0.01em;
    }
}