@font-face {
    font-family: 'HarmonySans';
    src: url('../assets/HarmonyOS_Sans_SC_Bold.ttf') format('truetype');
    font-weight: medium;
    font-style: normal;
}


body {
    font-family: 'HarmonySans', Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    color: #333;
}

header {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    padding: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

p {
    font-family: 'HarmonySans';
    font-weight: normal;
}

.second-text{
    font-family: "RobotoRegular";
}

.header-icon {
    width: 200px; /* 图标的宽度，根据需要调整 */
    height: 32px; /* 图标的高度，根据需要调整 */
}

header h1 {
    margin: 0;
    font-size: 24px;
}

main {
    padding: 20px;
}

.intro, .news, .contact {
    background-color: #fff;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.departments{
    background-color: #f5f5f5;
    margin-bottom: 20px;
    padding: 20px;
    border-radius: 10px;
}

.intro img {
    width: 100%;
    border-radius: 10px;
}

.intro-text {
    text-align: center;
}

.intro-text h2 {
    font-size: 20px;
    margin: 10px 0;
}

.intro-text p {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
}

.news h3, .departments h3, .contact h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.news-item {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 10px;
}

.news-item h4 {
    margin: 0;
    font-size: 14px;
    color: #007bff;
}

.news-item p {
    margin: 5px 0 0 0;
    font-size: 14px;
}

.department-icons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.department {
    flex: 1 1 calc(33.333% - 20px);
    font-family: 'HarmonySans';
    font-weight: bold;
    background-color: #ffffff;
    text-align: center;
    padding: 20px;
    border-radius: 5px;
    font-size: 14px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.department-text{
    margin-bottom: 10px
}

.department img {
    width: 40px;
    height: 40px;
    margin-bottom: 5px;
}

.contact-methods {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-methods div {
    background-color: #f8f9fa;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
    font-size: 14px;
    display: flex;

    padding: 10px;
}

.department-button {
    display: flex;
    flex: 1 1 calc(25% - 10px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 10px;
    margin: 0;
    font-family: 'HarmonySans';
    font-weight: bold;
    font-size: 14px;
    background-color: #ffffff;
    border: none;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: background-color 0.3s ease;
    text-decoration: none; /* 去掉下划线 */
    color: #333; /* 设置字体颜色为黑色 */
}

.department-button img {
    width: 30px;
    height: 30px;
    margin-bottom: 15px;
}

.department-button div {
    font-size: 14px;
}

.department-button:hover {
    background-color: #f0f0f0;
    color: #333; /* 确保在悬停时字体颜色仍为黑色 */
}

.contact-common {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.contact-icon {
    width:20px;
    height:20px;
    margin-right: 20px;
}

footer {
    text-align: center;
    padding: 10px;
    background-color: #fff;
    box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
}

footer p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

.past-leaders {
    background-color: #fff;
    margin-bottom: 10px;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.past-leaders h3 {
    font-size: 18px;
    margin-bottom: 10px;
}

.leaders {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.leader-item {
    background-color: #f8f9fa;
    flex-basis: calc(40% - 10px);
    display: flex;
    align-items: center;
    padding: 10px;
    margin:0 auto;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.leader-item img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-right: 10px;
}

.leader-info {
    text-align: left;
}

.leader-name {
    font-size: 14px;
    font-weight: bold;
}

.leader-year {
    font-size: 12px;
    color: #666;
}


/* 凉尘新增的样式 */

.history-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 每行四列 */
    gap: 10px; /* 列之间的间距 */
}

.leader-row {
    display: contents; /* 保持每一行的内容自适应布局 */
}

.generation {
    font-weight: bold;
    font-size: clamp(12px, 4vw, 16px);
    display: flex;
    justify-content: center;
    align-items: center;
}

.leader-title {
    font-weight: bold;
    font-size: clamp(12px, 4vw, 16px); /* 根据屏幕大小调整字体 */
    display: flex;
    justify-content: center;
    align-items: center;
}

.leader-person {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* 向左对齐 */
    font-size: clamp(12px, 4vw, 16px);
}

.history-grid .leader-person img {
    width: clamp(20px, 5vw, 30px); /* 头像宽度从 20px 到 40px 自适应 */
    height: clamp(20px, 5vw, 30px); /* 头像高度与宽度一致，确保头像为正方形 */
    vertical-align: middle;
    margin-right: 10px;
}

/* 控制社长和副社长的排列对齐 */
.history-grid .leader-row:nth-child(odd) {
    grid-column: span 2; /* 奇数行（社长）对齐 */
}

.history-grid .leader-row:nth-child(even) {
    grid-column: span 4; /* 偶数行显示副社长和其他成员 */
}

.blank-space {
    /* 留空格的样式 */
    width: 1px; /* 可以控制宽度，确保为空格列 */
}

