/* 首页特定样式 */

/* 轮播图样式 */
.slideshow-container {
    max-width: 100%;
    position: relative;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(26, 35, 126, 0.15);
    border-radius: 10px;
    overflow: hidden;
    height: 400px;
    background: #f0f2f5;
}

.mySlides {
    display: none;
    height: 100%;
    width: 100%;
}

.active-slide {
    display: block;
}

.mySlides img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.dot-container {
    text-align: center;
    padding: 10px 0;
    background: rgba(255, 255, 255, 0.8);
    position: absolute;
    bottom: 0;
    width: 100%;
    border-radius: 0 0 10px 10px;
}

.dot {
    cursor: pointer;
    height: 15px;
    width: 15px;
    margin: 0 2px;
    background-color: #c5cae9;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.active, .dot:hover {
    background-color: #3949ab;
}

.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4}
    to {opacity: 1}
}

/* 网格布局 */
.grid-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-gap: 20px;
    padding: 20px;
    margin: 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(26, 35, 126, 0.1);
    border-radius: 10px;
    max-width: 100%;
    box-sizing: border-box;
}

.grid-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 4px 6px rgba(26, 35, 126, 0.05), 0 1px 3px rgba(26, 35, 126, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-sizing: border-box;
    height: auto;
    min-height: 340px;
}

.grid-item > div:first-child {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grid-item:hover {
    transform: translateY(-5px);
    box-shadow:
        0 8px 12px rgba(26, 35, 126, 0.08),
        0 3px 6px rgba(26, 35, 126, 0.12);
}

/* 标题样式 */
.section-title {
    color: #1a237e;
    margin: 0 0 10px 0;
    font-size: 1.4em;
    position: relative;
    padding-left: 10px;
    display: inline-block;
}

.section-title::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: #3949ab;
    border-radius: 3px;
}

.title-underline {
    height: 1px;
    background: linear-gradient(90deg, #3949ab 0%, rgba(57, 73, 171, 0.1) 100%);
    margin-bottom: 15px;
    width: 100%;
}

/* 新闻列表 */
.news-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
}

.news-list li {
    margin-bottom: 8px;
    width: 100%;
}

.news-list a {
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 4px;
    border-bottom: 1px solid #eee;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.news-list a:hover {
    color: #3949ab;
    background-color: rgba(57, 73, 171, 0.05);
    transform: translateX(5px);
}

.news-title {
    flex: 1;
    margin-right: 15px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 14px;
}

.news-date {
    color: #666;
    font-size: 0.9em;
    min-width: 80px;
    text-align: right;
}

.news-list a:hover .news-date {
    color: #3949ab;
}

/* 二维码部分 */
.qr-section {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 30px;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 0;
}

.qr-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease;
    margin: 0;
    padding: 0;
}

.qr-item:hover {
    transform: translateY(-5px);
}

.qr-code {
    width: 130px;
    height: 130px;
    padding: 8px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(26, 35, 126, 0.1);
    margin-bottom: 10px;
    transition: box-shadow 0.3s ease;
    box-sizing: border-box;
}

.qr-item:hover .qr-code {
    box-shadow: 0 8px 15px rgba(26, 35, 126, 0.2);
}

.qr-item p {
    margin: 0;
    font-size: 0.9em;
    color: #333;
    font-weight: 500;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    /* 网格布局改为单列 */
    .grid-layout {
        grid-template-columns: 1fr;
        grid-gap: 12px;
        padding: 12px;
        margin: 10px 0;
        display: flex;
        flex-direction: column;
    }

    /* 调整网格项目 */
    .grid-item {
        min-height: auto;
        padding: 12px;
        margin-bottom: 5px;
    }

    /* 调整移动端显示顺序 */
    .news-section {
        order: 1;
    }

    .notice-section {
        order: 2;
    }

    .follow-section {
        order: 3;
    }

    .join-section {
        order: 4;
    }

    /* 调整标题大小 */
    .section-title {
        font-size: 1.1em;
        padding-left: 8px;
    }

    .title-underline {
        margin-bottom: 10px;
    }

    /* 调整新闻列表 */
    .news-list li {
        margin-bottom: 5px;
    }

    .news-list a {
        padding: 6px 8px;
    }

    .news-title {
        font-size: 0.85em;
        margin-right: 10px;
    }

    .news-date {
        font-size: 0.75em;
        min-width: 65px;
    }

    /* 轮播图适配 */
    .slideshow-container {
        height: 160px;
        margin: 8px auto;
        border-radius: 8px;
    }

    .dot {
        height: 10px;
        width: 10px;
        margin: 0 2px;
    }

    .dot-container {
        padding: 6px 0;
    }

    /* 二维码区域适配 */
    .qr-section {
        gap: 15px;
        padding: 5px 0;
    }

    .qr-code {
        width: 100px;
        height: 100px;
        padding: 5px;
        margin-bottom: 5px;
    }

    .qr-item p {
        font-size: 0.8em;
    }

    section#home {
        margin-bottom: 10px;
    }
}
