/* style.css (最终毕业版 - 修复搜索结果布局) */

/* =========================================================================
   结构:
   1. 全局样式
   2. 共享组件样式 (包含本次搜索结果布局修复)
   3. 首页专属样式
   ========================================================================= */

/* --- 1. 全局样式 --- */
:root {
    --primary-color: #0d47a1;
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --footer-background: #212529;
}
body { margin: 0; font-family: 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif; line-height: 1.7; background-color: var(--background-color); }
.container { max-width: 1280px; margin: 0 auto; padding: 0 2rem; }

/* --- 2. 共享组件样式 --- */

/* a. 【粘性页脚布局】 */
body:not(.homepage-body) { display: flex; flex-direction: column; min-height: 100vh; }
body:not(.homepage-body) main { flex-grow: 1; }

/* b. 【统一的、深色导航栏】 */
.navbar { position: sticky; top: 0; z-index: 1000; background-color: rgba(15, 23, 42, 0.8); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(255, 255, 255, 0.1); padding: 1rem 0; }
.navbar .container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-size: 1.8rem; font-weight: bold; color: white; text-decoration: none; }
.navbar nav a { color: rgba(255, 255, 255, 0.8); text-decoration: none; margin: 0 1rem; font-size: 1rem; font-weight: 500; transition: color 0.2s; }
.navbar nav a:hover { color: white; }
.navbar nav a.active { color: white; font-weight: 700; text-shadow: none; }

/* c. 统一的页脚 */
.footer { background-color: var(--footer-background); color: rgba(255, 255, 255, 0.7); padding: 2rem; text-align: center; }
.footer-content p { margin: 0.5rem 0; font-size: 0.9rem; }
.footer-content a { color: rgba(255, 255, 255, 0.9); text-decoration: none; }
.footer-content a:hover { text-decoration: underline; }

/* d. 默认通用页面元素 */
.page-title { text-align: center; margin: 3rem 0; font-size: 2.5rem; color: var(--primary-color); }
.content-section { background: var(--card-background); padding: 2rem; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.05); }
.button-link { display: inline-block; margin-top: 2rem; padding: 12px 24px; background-color: var(--primary-color); color: white; text-decoration: none; border-radius: 8px; font-weight: bold; }

/* e. 团队页面 & 搜索 (这是本次优化的核心！) */
.search-container { margin: 0 auto 3rem auto; max-width: 600px; }
.search-container form { display: flex; width: 100%; }
.search-container input[type="search"] { flex-grow: 1; border: 2px solid #ddd; padding: 0.8rem 1rem; font-size: 1rem; border-radius: 8px 0 0 8px; outline: none; }
.search-container button { border: none; background-color: var(--primary-color); color: white; padding: 0 1.5rem; font-size: 1rem; cursor: pointer; border-radius: 0 8px 8px 0; }

/* 【核心优化】使用Grid布局，并通过媒体查询明确定义列数，保证4列和左对齐 */
.team-grid {
    display: grid;
    grid-template-columns: 1fr; /* 手机上默认1列 */
    gap: 2rem;
    padding-bottom: 4rem;
}
/* 平板 */
@media (min-width: 768px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
/* 桌面 - 明确显示4列 */
@media (min-width: 1200px) {
    .team-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.team-card-link {
    text-decoration: none;
    color: inherit;
}
.team-card {
    background: var(--card-background);
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
}
.team-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.team-card img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    object-position: top;
}
.card-body {
    padding: 1.5rem;
    text-align: left;
    color: #333;
}
.card-body h3 {
    margin-top: 0;
    margin-bottom: 0.25rem;
    font-size: 1.5rem;
    color: var(--primary-color);
}
.card-body .position {
    font-style: italic;
    color: #666;
    font-size: 1rem;
}
.card-body hr {
    border: 0;
    height: 1px;
    background-color: #eee;
    margin: 1rem 0;
}
.card-body .read-more {
    margin-top: 1rem;
    color: var(--primary-color);
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.3s;
}
.team-card-link:hover .read-more { opacity: 1; }

.no-results {
    grid-column: 1 / -1; /* 确保“无结果”提示能横跨所有列 */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 450px;
    padding: 3rem;
    background-color: #fdfdfd;
    border: 2px dashed #e0e0e0;
    border-radius: 16px;
    text-align: center;
}
.no-results p {
    margin-top: 0;
    margin-bottom: 2rem;
    font-size: 1.2rem;
    color: #666;
}

/* f. 个人详情页 */
.profile-container { display: flex; flex-wrap: wrap; margin-top: 4rem; gap: 4rem; background: #fff; padding: 3rem; border-radius: 16px; align-items: flex-start; box-shadow: 0 8px 30px rgba(0,0,0,0.07); }
.profile-image-wrapper { flex-shrink: 0; width: 320px; }
.profile-image { width: 100%; height: auto; object-fit: contain; border-radius: 12px; display: block; }
.profile-details { flex-grow: 1; min-width: 300px; text-align: left; color: #333; }
.profile-details h1 { font-size: 2.8rem; margin-top: 0; margin-bottom: 0.5rem; color: var(--primary-color); }
.profile-details p { font-size: 1.1rem; line-height: 1.8; }
.profile-details .position { font-size: 1.5rem !important; margin-bottom: 2rem; font-style: italic; color: #555; }
.back-link { display: inline-block; margin-top: 3rem; text-decoration: none; color: var(--primary-color); font-weight: bold; font-size: 1.1rem; }

/* g. “加入我们”等其他页面 */
.job-posting { border: 1px solid #eee; padding: 1.5rem; border-radius: 8px; margin-bottom: 1.5rem; text-align: left; }
.job-posting h3 { margin-top: 0; color: var(--primary-color); }


/* --- 3. 首页专属的“手术刀”覆盖样式 --- */

.homepage-body { height: 100vh; overflow: hidden; color: white; }
.homepage-body .site-background { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; }
.homepage-body .background-video { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); min-width: 100%; min-height: 100%; object-fit: cover; }
.homepage-body .video-overlay { position: absolute; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.6); }
.homepage-body .scroll-wrapper { height: 100%; overflow-y: auto; overflow-x: hidden; -webkit-overflow-scrolling: touch; }
.homepage-body .fixed-scroll-indicator { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 1000; color: white; text-align: center; font-size: 0.9rem; animation: bounce 2s infinite; }
.homepage-body .fixed-scroll-indicator .arrow { width: 10px; height: 10px; border: 2px solid white; border-top: none; border-left: none; transform: rotate(45deg); margin: 5px auto 0; }
@keyframes bounce { 0%, 20%, 50%, 80%, 100% {transform: translateY(0) translateX(-50%);} 40% {transform: translateY(-10px) translateX(-50%);} 60% {transform: translateY(-5px) translateX(-50%);} }
.homepage-body .navbar nav a.active { text-shadow: none; }
.homepage-body .hero-placeholder { height: 100vh; display: flex; justify-content: center; align-items: center; text-align: center; }
.homepage-body .hero-content h1 { font-size: 4.5rem; font-weight: 700; text-shadow: 0 2px 10px rgba(0,0,0,0.7); }
.homepage-body .hero-content p { font-size: 1.5rem; text-shadow: 0 1px 5px rgba(0,0,0,0.7); }
.homepage-body .page-content-wrapper { background: transparent; padding: 12rem 0; }
.homepage-body .page-content-wrapper .container { text-align: center; }
.homepage-body .page-content-wrapper .content-section { background: transparent; box-shadow: none; padding: 0; }
.homepage-body .section-title { font-size: 3rem; font-weight: 600; color: white; margin-top: 0; margin-bottom: 2.5rem; text-shadow: 0 2px 12px rgba(0,0,0,0.75); letter-spacing: 1px; }
.homepage-body .section-text { font-size: 1.25rem; line-height: 2; max-width: 800px; margin: 0 auto; color: rgba(255, 255, 255, 0.95); text-shadow: 0 1px 6px rgba(0,0,0,0.8); }
.homepage-body .footer { background-color: rgba(4, 9, 15, 0.6); backdrop-filter: blur(10px); }
.homepage-body .button-link { border: 2px solid white; background: transparent; padding: 14px 32px; margin-top: 3rem; font-size: 1rem; font-weight: 600; letter-spacing: 0.5px; }
.homepage-body .button-link:hover { background-color: white; color: var(--primary-color); }
/* --- 4. “联系我们”页面的二维码专属样式 (最终线条版) --- */

.follow-us-section {
    text-align: center;
    margin-top: 2rem;
}

.wechat-icon-wrapper {
    position: relative;
    display: inline-block;
    margin-top: 1rem;
}

/* 【核心优化】使用纯CSS绘制一个你想要的、简约的、线条化的微信图标 */
.css-wechat-icon {
    width: 60px;
    height: 60px;
    border: 3px solid #333; /* 图标轮廓颜色 */
    border-radius: 12px;
    cursor: pointer;
    position: relative;
    transition: transform 0.2s, border-color 0.2s;
}
.css-wechat-icon:hover {
    transform: scale(1.1);
    border-color: var(--primary-color); /* 悬停时边框变为主题色 */
}

/* 用伪元素绘制图标里面的“眼睛” */
.css-wechat-icon::before,
.css-wechat-icon::after {
    content: '';
    position: absolute;
    background: #333; /* 眼睛颜色 */
    border-radius: 50%;
    width: 8px;
    height: 8px;
    top: 20px;
    transition: background-color 0.2s;
}
.css-wechat-icon::before {
    left: 16px;
    box-shadow: 18px 0 0 #333; /* 用阴影复制出右边的“眼睛” */
}
/* 悬停时，眼睛也变为主题色 */
.css-wechat-icon:hover::before,
.css-wechat-icon:hover::after {
    background: var(--primary-color);
}
.css-wechat-icon:hover::before {
    box-shadow: 18px 0 0 var(--primary-color);
}


.qr-code-popup {
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: white;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, transform 0.3s;
    width: 200px;
    text-align: center;
    z-index: 10;
}

.wechat-icon-wrapper:hover .qr-code-popup {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -10px);
}

.qr-code-popup img {
    width: 100%;
    height: auto;
    display: block;
}

.qr-code-popup span {
    display: block;
    margin-top: 10px;
    font-size: 0.9rem;
    color: #555;
}

/* 小三角 */
.qr-code-popup::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: white transparent transparent transparent;
}
/* --- 5. “联系我们”页面的专属美化样式 (新增) --- */

/* 核心！使用Grid布局，创建优雅的两栏结构 */
.contact-page-wrapper {
    display: grid;
    grid-template-columns: 1fr; /* 手机上默认为1列 */
    gap: 4rem; /* 增大上下间距 */
    padding: 2rem;
    background-color: var(--card-background);
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.07);
}
/* 在大屏幕上变为2列 */
@media (min-width: 992px) {
    .contact-page-wrapper {
        grid-template-columns: 2fr 1fr; /* 左边宽一点，右边窄一点 */
    }
}

.contact-details-section h3,
.follow-us-section h3 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.contact-details-section p,
.follow-us-section p {
    color: #666;
    margin-top: 0;
    margin-bottom: 2.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}
.contact-item img {
    width: 24px;
    height: 24px;
    margin-right: 1.5rem;
    margin-top: 5px;
    opacity: 0.6;
}
.contact-item strong {
    font-size: 1.1rem;
    color: #333;
}
.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
}
.contact-item a:hover {
    text-decoration: underline;
}

.follow-us-section {
    text-align: center;
    background-color: #f9f9fb; /* 给右栏一个淡淡的背景色以作区分 */
    padding: 2rem;
    border-radius: 12px;
}
