/* 全局样式 */
:root {
    --primary-color: #00519b;
    --secondary-color: #ffd700;
    --text-color: #333;
    --light-bg: #f5f5f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Sans SC', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    margin-bottom: 20px;
}

/* 导航栏样式 */
header {
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    width: 100%;
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    width: 40px;
    height: 40px;
    margin-right: 10px;
}

.logo span {
    font-size: 1.2rem;
    font-weight: bold;
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* 英雄区样式 */
.hero {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('https://via.placeholder.com/1920x1080');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: #fff;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--primary-color);
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    transition: background-color 0.3s ease;
    font-weight: bold;
}

.btn:hover {
    background-color: #e6c200;
}

/* 图片轮播样式 */
.slideshow {
    padding: 50px 0;
    background-color: var(--light-bg);
}

.slideshow-container {
    max-width: 1000px;
    position: relative;
    margin: auto;
}

.mySlides {
    display: none;
}

.mySlides img {
    width: 100%;
    border-radius: 10px;
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    margin-top: -22px;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    border-radius: 0 3px 3px 0;
    user-select: none;
    background-color: rgba(0,0,0,0.3);
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
}

.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 2px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.active, .dot:hover {
    background-color: #717171;
}

.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4} 
    to {opacity: 1}
}

/* 关于我们样式 */
.about {
    padding: 100px 0;
    background-color: #fff;
}

.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-image {
    flex: 1;
}

.about-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* 学生会干部样式 */
.leadership {
    padding: 100px 0;
    background-color: var(--light-bg);
}

.leadership-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
}

.leader-card {
    flex: 0 1 calc(33.333% - 20px);
    text-align: center;
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.leader-card:hover {
    transform: translateY(-10px);
}

.leader-card img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin-bottom: 15px;
    object-fit: cover;
}

.leader-card h3 {
    color: var(--primary-color);
    margin-bottom: 5px;
}

.leader-card p {
    color: var(--text-color);
    font-weight: 500;
}

.leader-card.main-chairman {
    flex-basis: 100%;
    border: 2px solid var(--primary-color);
}

.leader-card.main-chairman img {
    width: 180px;
    height: 180px;
}

.leader-card.main-chairman h3 {
    font-size: 1.5em;
}

.department-heads-title {
    text-align: center;
    margin-top: 50px;
    color: var(--primary-color);
    width: 100%;
}

.department-heads-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.department-heads-grid .leader-card {
    flex: 0 1 calc(25% - 22.5px);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .leader-card,
    .department-heads-grid .leader-card {
        flex: 0 1 calc(50% - 15px);
    }
}

@media (max-width: 480px) {
    .leader-card,
    .department-heads-grid .leader-card {
        flex: 0 1 100%;
    }
}

/* 部门介绍样式 */
.departments {
    padding: 100px 0;
    background-color: #fff;
}

.department-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.department-card {
    background-color: var(--light-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.department-card:hover {
    transform: translateY(-10px);
}

.department-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

/* 活动样式 */
.activities {
    padding: 100px 0;
    background-color: var(--light-bg);
}

.activity-slider {
    display: flex;
    overflow-x: auto;
    gap: 30px;
    padding: 20px 0;
}

.activity-card {
    flex: 0 0 300px;
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.activity-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.activity-card h3, .activity-card p {
    padding: 15px;
}

/* 成就展示样式 */
.achievements {
    padding: 100px 0;
    background-color: #fff;
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.achievement-card {
    background-color: var(--light-bg);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease;
}

.achievement-card:hover {
    transform: translateY(-10px);
}

.achievement-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.achievement-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* 新闻动态样式 */
.news {
    padding: 100px 0;
    background-color: var(--light-bg);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.news-card {
    background-color: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.news-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-card h3, .news-card p {
    padding: 15px;
}

/* 联系我们样式 */
.contact {
    padding: 100px 0;
    background-color: #fff;
}

.contact-content {
    display: flex;
    justify-content: center;
}

.contact-info {
    text-align: center;
}

.contact-info p {
    margin-bottom: 15px;
}

.contact-info i {
    color: var(--primary-color);
    margin-right: 10px;
}

/* 页脚样式 */
footer {
    background-color: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 20px 0;
}

/* 粘性导航栏 */
.sticky {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    transition: all 0.3s ease-in-out;
}

/* 返回顶部按钮 */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    text-align: center;
    line-height: 50px;
    cursor: pointer;
    z-index: 1000;
}

.back-to-top:hover {
    background-color: var(--secondary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0px;
        height: 92vh;
        top: 8vh;
        background-color: #fff;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
    }

    .nav-links li {
        opacity: 0;
    }

    .burger {
        display: block;
    }

    .about-content, .contact-content {
        flex-direction: column;
    }

    .leadership-grid, .department-heads-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-chairman {
        grid-column: span 2;
    }
}

@media (max-width: 480px) {
    .leadership-grid, .department-heads-grid {
        grid-template-columns: 1fr;
    }

    .main-chairman {
        grid-column: span 1;
    }
}

.nav-active {
    transform: translateX(0%);
}

@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0px);
    }
}

/* 申请表单样式 */
.application-form {
    padding: 100px 0;
    background-color: var(--light-bg);
}

.application-form h2 {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: 30px;
}

#studentForm {
    max-width: 600px;
    margin: 0 auto;
    background-color: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

#studentForm input,
#studentForm select,
#studentForm textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 16px;
}

#studentForm textarea {
    height: 150px;
    resize: vertical;
}

#studentForm button {
    display: block;
    width: 100%;
    padding: 12px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#studentForm button:hover {
    background-color: #003c72;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0px;
        height: 92vh;
        top: 8vh;
        background-color: #fff;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
    }

    .nav-links li {
        opacity: 0;
    }

    .burger {
        display: block;
    }

    .about-content, .contact-content {
        flex-direction: column;
    }

    .leadership-grid, .department-heads-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .main-chairman {
        grid-column: span 2;
    }

    #studentForm {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .leadership-grid, .department-heads-grid {
        grid-template-columns: 1fr;
    }

    .main-chairman {
        grid-column: span 1;
    }
}

.nav-active {
    transform: translateX(0%);
}

@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0px);
    }
}
/* 部门介绍弹窗样式 */
.department-popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.4);
}

.popup-content {
    background-color: #fefefe;
    margin: 15% auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px;
    border-radius: 10px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
    cursor: pointer;
}


