/* 头部样式 */
header {
    background-color: white;
    box-shadow: var(--box-shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo img {
    height: 40px;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo-text span {
    color: var(--accent);
}

.nav-menu {
    display: flex;
    gap: 25px;
}

.nav-item {
    position: relative;
    cursor: pointer;
    font-weight: 500;
    padding: 8px 0;
    color: var(--dark);
    transition: var(--transition);
}

.nav-item:hover {
    color: var(--primary);
}

.nav-item.active {
    color: var(--primary);
}

.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    border-radius: 3px;
}

.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--dark);
}

/* 轮播图样式 */
.hero {
    margin-top: 20px;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    position: relative;
}

.carousel {
    height: 400px;
    position: relative;
    overflow: hidden;
}

.carousel-slide {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-content {
    max-width: 600px;
    padding: 40px;
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: var(--border-radius);
    margin-left: 60px;
}

.carousel-content h2 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.carousel-content p {
    margin-bottom: 20px;
    color: var(--gray);
}

.carousel-btn {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 10px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.carousel-btn:hover {
    background-color: var(--secondary);
    transform: translateY(-2px);
}

.carousel-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition);
}

.carousel-dot.active {
    background-color: white;
    transform: scale(1.2);
}

/* 公告栏样式 */
.announcement-list {
    list-style: none;
}

.announcement-item {
    padding: 15px 0;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    align-items: center;
    cursor: pointer;
}

.announcement-item:last-child {
    border-bottom: none;
}

.announcement-badge {
    background-color: var(--accent);
    color: white;
    font-size: 0.8rem;
    padding: 3px 8px;
    border-radius: 20px;
    margin-right: 10px;
}

.announcement-title {
    font-weight: 500;
    flex: 1;
}

.announcement-date {
    color: var(--gray);
    font-size: 0.9rem;
}

.read-confirm {
    color: var(--success);
    font-size: 0.9rem;
    margin-left: 10px;
}

/* 侧边栏样式 */
.sidebar-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    padding: 20px;
    margin-bottom: 20px;
}

.sidebar-card h3 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--primary);
    padding-bottom: 10px;
    border-bottom: 1px solid var(--light-gray);
}

.countdown {
    display: flex;
    justify-content: space-around;
    text-align: center;
    margin-bottom: 20px;
}

.countdown-item {
    display: flex;
    flex-direction: column;
}

.countdown-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
}

.countdown-label {
    font-size: 0.8rem;
    color: var(--gray);
    margin-top: 5px;
}

.quick-link {
    display: flex;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid var(--light-gray);
    text-decoration: none;
    color: var(--dark);
    transition: var(--transition);
}

.quick-link:last-child {
    border-bottom: none;
}

.quick-link:hover {
    color: var(--primary);
}

.quick-link i {
    margin-right: 10px;
    width: 20px;
    color: var(--primary);
}

/* 页脚样式 */
footer {
    background-color: var(--dark);
    color: white;
    padding: 40px 0 20px;
    margin-top: 40px;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.footer-column {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
    padding-right: 20px;
}

.footer-column h3 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: white;
}

.footer-column ul {
    list-style: none;
}

.footer-column li {
    margin-bottom: 10px;
}

.footer-column a {
    color: #ccc;
    text-decoration: none;
    transition: var(--transition);
}

.footer-column a:hover {
    color: white;
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--primary);
    transform: translateY(-3px);
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #aaa;
    font-size: 0.9rem;
    width: 100%;
}

/* ========== 资源页面组件 ========== */

/* 模态框基础样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

    .modal-overlay.show {
        display: flex;
        animation: fadeIn 0.3s;
    }

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.modal-content {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    max-width: 90%;
    max-height: 90%;
    overflow: hidden;
}

.modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    margin: 0;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray);
    transition: color 0.2s;
}

    .modal-close:hover {
        color: var(--dark);
    }

.modal-body {
    padding: 20px;
    overflow: auto;
}

/*手风琴*/
/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(44, 111, 187, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin-right: 8px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.pdf-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 500px;
    background-color: var(--light);
}

    .pdf-loading p {
        margin-top: 15px;
        color: var(--gray);
    }

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 4px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 20px;
}

.badge-primary {
    background-color: var(--primary);
    color: white;
}

.badge-warning {
    background-color: var(--warning);
    color: var(--dark);
}

.badge-danger {
    background-color: var(--danger);
    color: white;
}

.badge-success {
    background-color: var(--success);
    color: white;
}

/* 文本颜色 */
.text-gray {
    color: var(--gray) !important;
}

.text-muted {
    color: var(--gray) !important;
    opacity: 0.8;
}

/* 工具类 */
.ml-auto {
    margin-left: auto !important;
}

.mr-1 {
    margin-right: 0.25rem !important;
}

.mr-2 {
    margin-right: 0.5rem !important;
}

.mr-3 {
    margin-right: 1rem !important;
}

.ml-1 {
    margin-left: 0.25rem !important;
}

.ml-2 {
    margin-left: 0.5rem !important;
}

.ml-3 {
    margin-left: 1rem !important;
}