/* 响应式样式 */

/* 大型设备（桌面，992px 及以上） */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    .slide-content h2 {
        font-size: 42px;
    }
    
    .slide-content p {
        font-size: 20px;
    }
}

/* 中型设备（平板电脑，768px 及以上） */
@media (max-width: 992px) {
    .container {
        max-width: 720px;
    }
    
    .nav-item {
        margin-left: 20px;
    }
    
    .nav-item a {
        font-size: 14px;
    }
    
    .slide-content h2 {
        font-size: 36px;
    }
    
    .slide-content p {
        font-size: 18px;
    }
    
    .slider-btn {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }
}

/* 小型设备（手机，768px 以下） */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
    }
    
    /* 移动端头部布局 */
    .header .container {
        flex-wrap: wrap;
        padding: 0 10px;
    }
    
    .header-left {
        width: 86%;
        order: 1;
    }
    
    .site-title h1 {
        font-size: 14px;
    }
    
    .header-right {
        width: 20%;
        order: 2;
        justify-content: flex-end;
    }
    
    .login-btn, .register-btn {
        display: none;
    }
    
    .header.scrolled .header-right::after {
        color: #333;
    }
    
    .main-nav {
        order: 1;
        margin: 0;
        justify-content: flex-end;
    }
    
    /* 移动端菜单样式 */
    .menu-toggle {
        display: block;
        z-index: 1001;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background-color: #fff;
        flex-direction: column;
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        justify-content: flex-start;
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .nav-item {
        margin: 0 0 20px 0;
    }
    
    .nav-item a {
        color: #333;
        font-size: 16px;
        display: block;
        padding: 10px 0;
    }
    
    .nav-item.active a::after {
        display: none;
    }
    
    .nav-item.active a {
        color: #333;
        /* border-left: 3px solid #0066cc; */
        padding-left: 10px;
    }
    .nav-item:hover>a{
        color: #0066cc;
    }
    
    /* 移动端下拉菜单样式 */
    .nav-item.has-dropdown .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        /* background-color: rgba(0, 0, 0, 0.1); */
        margin: 0;
        width: 100%;
        border-radius: 0;
    }
    
    .nav-item.has-dropdown.active .dropdown-menu {
        max-height: 500px;
        padding: 5px 0;
    }
    .nav-item.has-dropdown:hover .dropdown-menu{
        transform: none;
    }
    
    .dropdown-menu li {
        margin: 0;
        padding: 0;
        
    }
    
    .dropdown-menu li a {
        padding: 10px 0 10px 20px;
        font-size: 15px;
        color: #333;
        margin-left: 20px;
        background-color: transparent;
        border-bottom: 1px dashed #ccc;
    }
    
    /* 移动端隐藏下拉箭头 */
    .nav-menu .nav-item.has-dropdown > a::after {
        display: none;
    }
    
    /* 移动端添加+号代替下拉箭头 */
    .nav-menu .nav-item.has-dropdown > a {
        position: relative;
        padding-right: 40px;
    }
    
    .nav-menu .nav-item.has-dropdown > a::before {
        content: '+';
        position: absolute;
        right: 15px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 20px;
        font-weight: 300;
        transition: transform 0.3s ease;
    }
    
    .nav-menu .nav-item.has-dropdown.active > a::before {
        content: '-';
    }
    
    /* 确保移动端下拉菜单不受PC端样式影响 */
    .dropdown-menu::before {
        display: none;
    }
    
    /* 移动端菜单滚动后的样式 */
    .header.scrolled .dropdown-menu li a {
        color: #333;
    }
    
    /* 汉堡菜单动画 */
    .menu-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* 移动端轮播图样式调整 */
    .index-banner-section {
        height: 60vh;
    }

        .index-banner-section .slide-content h2 {
            font-size: 28px;
            margin-bottom: 10px;
        }

        .index-banner-section .slide-content p {
            font-size: 16px;
        }

        .index-banner-section .slider-btn {
            width: 36px;
            height: 36px;
            font-size: 18px;
        }

            .index-banner-section .slider-btn.prev {
                left: 10px;
            }

            .index-banner-section .slider-btn.next {
                right: 10px;
            }

        .index-banner-section .slider-dots {
            bottom: 20px;
        }

        .index-banner-section .dot {
            width: 10px;
            height: 10px;
            margin: 0 6px;
        }
}

/* 超小型设备（小型手机，576px 以下） */
@media (max-width: 576px) {
    .index-banner-section {
        height: auto;
        aspect-ratio: 16/9;
        position: relative;
    }

        .index-banner-section .slide {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            opacity: 0;
            transition: opacity 1s ease;
        }

            .index-banner-section .slide.active {
                opacity: 1;
                z-index: 1;
            }

            .index-banner-section .slide img {
                width: 100%;
                height: 100%;
                object-fit: cover;
            }

        .index-banner-section .slide-content {
            padding: 0 15px;
            max-width: 100%;
        }

            .index-banner-section .slide-content h2 {
                font-size: 24px;
                margin-bottom: 15px;
            }

            .index-banner-section .slide-content p {
                font-size: 14px;
                line-height: 1.4;
            }

        .index-banner-section .slider-dots {
            bottom: 40px;
        }

        .index-banner-section .dot {
            width: 20px;
            height: 6px;
            margin: 0 5px;
        }

        .index-banner-section .slider-btn {
            width: 40px;
            height: 40px;
            font-size: 20px;
        }

            .index-banner-section .slider-btn.prev {
                left: 10px;
            }

            .index-banner-section .slider-btn.next {
                right: 10px;
            }
    
    .header {
        padding: 15px 0;
    }
    
    .logo {
        height: 40px;
    }
}

/* 重要通知模块响应式样式 */
@media (max-width: 768px) {
    .notice-section {
        top: -20px;
        padding-bottom: 0;
        background-size: 100%;
    }
    
    .notice-section .container {
        flex-direction: row;
        height: auto;
        padding: 15px;
        align-items: center;
    }
    
    .notice-section .section-header {
        margin-bottom: 0;
        justify-content: flex-start;
        width: auto;
        padding: 0;
    }
    
    .notice-section .icon-wrapper {
        margin-right: 15px;
        width: 24px;
        height: 24px;
    }
    
    .notice-section .icon-wrapper::after {
        display: none;
    }
    
    .notice-section .left-title {
        display: none; /* 隐藏"重要通知"按钮 */
    }
    
    .notice-wrapper {
        width: calc(100% - 39px); /* 图标宽度(24px) + 右边距(15px) */
        height: 40px;
        overflow: hidden;
    }
    
    .notice-list {
        position: relative;
    }
    
    .notice-item {
        height: 40px;
        flex-wrap: nowrap;
        align-items: center;
        box-sizing: border-box;
        padding: 0 5px;
    }
    
    .notice-date {
        min-width: 80px;
        font-size: 12px;
    }
    
    .notice-title {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        width: calc(100% - 90px);
    }
    
    .notice-section .more-link {
        display: none; /* 隐藏"更多"链接 */
    }
}

/* 大赛简介模块响应式样式 */
@media (max-width: 768px) {
    .intro-section {
        padding: 30px 0;
    }
    
    .intro-section .container {
        flex-direction: column;
    }
    
    .intro-section .container .section-title {
        width: 100%;
        margin-right: 0;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .intro-section .container .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .intro-content {
        padding: 0 15px;
    }
    
    .intro-content p {
        font-size: 14px;
    }
}

/* 作品要求模块响应式样式 */
@media (max-width: 768px) {
    .works-section {
        padding: 30px 0;
    }
    
    .works-warp {
        flex-direction: column;
        padding: 15px;
    }
    
    .works-warp img {
        width: 100%;
        max-width: 300px;
        margin: 0 auto 20px;
    }
    
    .works-warp .works-content {
        margin-left: 0;
    }
    
    .works-warp .works-content p {
        font-size: 14px;
    }
}

/* 赛程安排模块响应式样式 */
@media (max-width: 992px) {
    .schedule-section {
        padding: 40px 0;
    }
    
    .schedule-timeline {
        grid-template-columns: repeat(3, 1fr);
        grid-template-rows: repeat(4, auto);
        gap: 20px 15px;
    }
}

@media (max-width: 768px) {
    .schedule-timeline {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(5, auto);
    }
    
    .timeline-item {
        padding: 10px;
    }
    
    .timeline-icon {
        width: 60px;
        height: 60px;
    }
    
    .date-circle {
        width: 40px;
        height: 40px;
    }
    
    .date-number {
        font-size: 16px;
    }
    
    .timeline-content {
        min-height: 60px;
        padding: 8px;
    }
    
    .timeline-content p {
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .schedule-timeline {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(5, auto);
        gap: 10px;
        padding: 0 10px;
    }
    
    .timeline-item {
        max-width: none;
        width: auto; /* 移除100%宽度限制 */
        margin: 0;
        padding: 8px;
    }

    .timeline-icon {
        width: 40px;
        height: 40px;
        margin-bottom: 8px;
    }

    .timeline-icon img {
        max-height: 30px;
    }

    .date-circle {
        width: 30px;
        height: 30px;
        border-width: 2px;
    }

    .date-number {
        font-size: 14px;
    }

    .timeline-content {
        min-height: 45px;
        padding: 6px;
    }

    .timeline-content p {
        font-size: 12px;
        line-height: 1.3;
        margin: 0;
    }
}

/* 赛事资讯模块响应式样式 */
@media (max-width: 768px) {
    .news-section {
        padding: 40px 10px;
    }
    
    .news-tabs-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .tabs-left {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 18px;
        margin-bottom: 15px;
    }
    
    .tab-btn {
        font-size: 16px;
        padding: 6px 12px;
        white-space: nowrap;
    }
    
    .view-more {
        margin-left: auto;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .news-item {
        padding: 15px;
    }
    
    .news-section .news-date {
        min-width: 60px;
        padding-right: 15px;
        margin-right: 15px;
    }
    
    .news-section .date-month {
        font-size: 20px;
    }
    
    .news-title a {
        font-size: 16px;
        -webkit-line-clamp: 1;
    }
    
    .news-desc {
        -webkit-line-clamp: 1;
    }
    
    .download-grid {
        grid-template-columns: 1fr;
    }
}

/* 大赛风采模块响应式样式 */
@media (max-width: 992px) {
    .showcase-section {
        padding: 40px 10px;
    }
    
    .showcase-wrapper {
        gap: 20px;
    }
    
    .showcase-item {
        flex: 0 0 calc(50% - 10px);
    }
    
    .showcase-image img {
        height: 200px;
    }
}

@media (max-width: 768px) {
    .showcase-controls {
        margin: 20px 0;
    }
    
    .showcase-item {
        flex: 0 0 calc(50% - 10px); /* 改为两列布局 */
        min-width: calc(50% - 10px); /* 确保最小宽度 */
    }
    
    .showcase-image img {
        height: 160px;
    }
    
    .showcase-title {
        font-size: 14px;
        margin: 8px 0;
    }

    .showcase-wrapper {
        gap: 15px; /* 减小间距 */
    }
}

@media (max-width: 576px) {
    .showcase-controls {
        margin: 15px 0;
    }
    
    .showcase-item {
        flex: 0 0 calc(50% - 8px); /* 保持两列，但减小间距 */
        min-width: calc(50% - 8px);
    }
    
    .showcase-image img {
        height: 140px;
    }
    
    .showcase-title {
        font-size: 13px;
        margin: 6px 0;
    }

    .showcase-wrapper {
        gap: 12px;
    }
}

/* 大赛新闻模块响应式样式 */
@media (max-width: 992px) {
    .competition-news-section {
        padding: 40px 10px;
    }
    
    .competition-news-container {
        gap: 20px;
    }
    
    .news-image {
        height: 220px;
    }
    
    .news-info {
        margin: -40px 15px 0;
        padding: 15px;
        height: 200px;
    }
}

@media (max-width: 768px) {
    .competition-news-container {
        flex-direction: column;
    }
    
    .competition-news-item {
        margin-bottom: 30px;
    }
    
    .news-image {
        height: 200px;
    }
    
    .news-info {
        height: auto;
        min-height: 180px;
    }
    
    .news-title {
        font-size: 16px;
        height: auto;
        margin-bottom: 10px;
    }
    
    .news-summary {
        font-size: 13px;
        margin-bottom: 15px;
    }
    
    .view-more-container {
        margin-top: 20px;
    }
}

/* Footer响应式样式 */
@media (max-width: 768px) {
    .footer {
        height: auto;
        padding: 15px 0;
    }
    
    .footer-content {
        font-size: 12px;
        line-height: 1.4;
        padding: 0 15px;
    }
}