/* ============================================================
   common.css — 所有页面共享的基础样式
   包含：reset、通用容器、顶部导航栏、页脚、移动端适配
   页面专属的 banner / 卡片 / 轮播 等请放到各页面自己的 <style> 或独立 CSS
   ============================================================ */

/* ---------- Reset ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
}

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

/* ---------- 顶部导航栏 ---------- */
header {
    background: linear-gradient(to right, #1a4580, #2a5da0);
    color: white;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    position: relative;           /* 让移动端的下拉菜单以此为定位基准 */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
}

.logo-section {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.logo {
    background: white;
    color: #2a5da0;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-right: 12px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.logo-text h1 {
    font-size: 22px;
    font-weight: 700;
}

.logo-text h2 {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 300;
    letter-spacing: 1px;
}

nav {
    display: flex;
    align-items: center;
}

nav ul {
    display: flex;
    list-style: none;
    margin-bottom: 0;
}

nav li {
    margin: 0 6px;
}

nav a {
    text-decoration: none;
    color: white;
    font-weight: 500;
    padding: 8px 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

nav a:hover,
nav a.active {
    background: rgba(255, 255, 255, 0.15);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 8px 10px;
    line-height: 1;
    transition: transform 0.25s ease;
}

.mobile-menu-btn.is-open {
    transform: rotate(90deg);
}

/* ---------- 页脚 ---------- */
footer {
    background: linear-gradient(to right, #1a4580, #19376d);
    color: rgba(255, 255, 255, 0.9);
    padding: 20px;
}

.footer-bottom {
    text-align: center;
    font-size: 14px;
    opacity: 0.7;
}

/* ---------- 移动端导航适配（≤768px） ---------- */
@media (max-width: 768px) {
    .nav-container {
        padding: 10px 0;
    }

    .logo {
        width: 48px;
        height: 48px;
        margin-right: 10px;
    }

    .logo-text h1 {
        font-size: 16px;
    }

    .logo-text h2 {
        font-size: 10px;
        letter-spacing: 0.5px;
    }

    .mobile-menu-btn {
        display: block;
    }

    /* 抽屉式菜单：从 header 正下方弹出，不挤压正文 */
    nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        display: block;
    }

    nav ul {
        display: flex;
        flex-direction: column;
        background: linear-gradient(to right, #1a4580, #2a5da0);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        transition: max-height 0.35s ease, opacity 0.25s ease;
    }

    nav ul.is-open {
        max-height: 600px;
        opacity: 1;
    }

    nav li {
        margin: 0;
        border-top: 1px solid rgba(255, 255, 255, 0.12);
    }

    nav a {
        display: block;
        padding: 14px 20px;
        font-size: 16px;
    }

    nav a:hover,
    nav a.active {
        background: rgba(255, 255, 255, 0.1);
    }
}



/* ============================================================
 * 卡片组件 (Card Components)
 * 追加到 css/common.css 末尾
 *
 * 包含两个独立组件：
 *   1. news-card   —— 水平长条卡片，用于新闻/招聘列表
 *                     (cooperation.html / newslist.html / recruit.html)
 *   2. honor-card  —— 网格方形卡片，用于奖项荣誉列表
 *                     (honor.html)
 *
 * 注意：所有子元素选择器都用父级类作用域，避免冲突。
 * ============================================================ */


/* ============================================================
 * 1. 新闻卡片组件 (News Card)
 * 结构：
 *   <div class="news-container">
 *     <a href="...">
 *       <div class="news-card">
 *         <div class="icon-container"><img ...></div>
 *         <div class="news-details">
 *           <div class="award-title">...</div>
 *           <div class="award-org">...</div>
 *           <div class="authors">...</div>
 *         </div>
 *       </div>
 *     </a>
 *   </div>
 * ============================================================ */

.news-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
}

.news-container > a {
    display: block;
    width: 90%;
    text-decoration: none;
    color: inherit;
}

.news-card {
    background: #ffffff;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: row;
    align-items: center;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.news-card .icon-container {
    width: 80%;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f4ff, #e4e8fa);
    overflow: hidden;
}

.news-card .icon-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card .news-icon {
    font-size: 46px;
    color: #6a5acd;
}

.news-card .news-details {
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.news-card .award-title {
    font-size: 20px;
    font-weight: 700;
    color: #1a4580;
    line-height: 1.5;
    margin-bottom: 12px;
    width: 100%;
}

.news-card .award-org {
    font-size: 18px;
    color: #444;
    margin-bottom: 20px;
    font-weight: 500;
}

.news-card .authors {
    font-size: 15px;
    color: #666;
    line-height: 1.8;
}

/* 新闻卡片 —— 移动端：图文上下排列 */
@media (max-width: 768px) {
    .news-container {
        padding: 20px 15px;
        gap: 20px;
    }

    .news-container > a {
        width: 100%;
    }

    .news-card {
        flex-direction: column;
        max-width: 100%;
    }

    .news-card .icon-container {
        width: 100%;
        height: 200px;
    }

    .news-card .news-details {
        padding: 18px 16px;
        text-align: left;
        align-items: flex-start;
    }

    .news-card .award-title {
        font-size: 17px;
        line-height: 1.4;
        margin-bottom: 8px;
    }

    .news-card .award-org {
        font-size: 15px;
        margin-bottom: 12px;
    }

    .news-card .authors {
        font-size: 13px;
        line-height: 1.6;
    }
}


/* ============================================================
 * 2. 荣誉卡片组件 (Honor Card)
 * 结构：
 *   <div class="honors-container">
 *     <div class="honor-card">
 *       <div class="icon-container"><img class="icon" src="..."></div>
 *       <div class="honor-details">
 *         <div class="award-title">...</div>
 *         <div class="authors">...</div>
 *       </div>
 *     </div>
 *     ...（更多卡片）
 *   </div>
 * ============================================================ */

.honors-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 50px;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
}

.honor-card {
    background: #ffffff;
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 22px 18px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.honor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.12);
}

.honor-card .icon-container {
    width: 100%;
    max-width: 300px;
    aspect-ratio: 3 / 2;
    margin: 0 auto 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f0f4ff, #e4e8fa);
    overflow: hidden;
}

.honor-card .icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.honor-card .honor-details {
    width: 100%;
    padding: 0;
}

.honor-card .award-title {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
    color: #1a4580;
    padding-bottom: 10px;
}

.honor-card .authors {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    word-break: break-word;
}

.honor-card .highlight-author {
    font-weight: 700;
    color: #1a4580;
}

/* 荣誉卡片 —— 中等屏幕：单元格变窄 */
@media (max-width: 768px) {
    .honors-container {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
        gap: 22px;
    }

    .honor-card .award-title {
        font-size: 17px;
    }
}

/* 荣誉卡片 —— 小屏：单列 */
@media (max-width: 480px) {
    .honors-container {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 15px;
    }

    .honor-card {
        padding: 16px 14px;
    }

    .honor-card .icon-container {
        max-width: 260px;
    }

    .honor-card .award-title {
        font-size: 16px;
    }

    .honor-card .authors {
        font-size: 13px;
    }
}