/* ==================== 考试详情页移动端样式 ==================== */

/* PC端默认隐藏移动端内容 */
.m-exam {
    display: none !important;
}

/* ==================== 移动端适配 ==================== */
@media (max-width: 768px) {

    /* 隐藏PC端内容 */
    .header-top,
    .header-main,
    .header-nav-bar,
    .exam-cat-nav,
    .exam-banner-section,
    .latest-news-section,
    .info-content-section,
    .download-section,
    .course-recommend-section,
    .faq-section,
    .exam-footer,
    .info-main-section,
    .exam-tag-section {
        display: none !important;
    }

    /* 显示移动端内容 */
    .m-exam {
        display: block !important;
    }

    /* 全局重置 */
    body {
        background-color: #f5f5f5;
    }

    /* ==================== 移动端顶部导航 ==================== */
    .m-header {
        position: sticky;
        top: 0;
        z-index: 100;
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
        background-color: #fff;
        border-bottom: 1px solid #f0f0f0;
    }

    .m-header-logo {
        display: flex;
        align-items: center;
        gap: 6px;
        flex-shrink: 0;
    }

    .m-logo-icon {
        font-size: 20px;
    }

    .m-logo-text {
        font-size: 14px;
        font-weight: 600;
        color: #333;
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .m-header-search {
        flex: 1;
        display: flex;
        align-items: center;
        gap: 6px;
        height: 32px;
        padding: 0 12px;
        background-color: #f5f5f5;
        border-radius: 16px;
        min-width: 0;
    }

    .m-search-icon {
        font-size: 14px;
        flex-shrink: 0;
    }

    .m-search-placeholder {
        font-size: 13px;
        color: #999;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .m-header-icons {
        display: flex;
        align-items: center;
        gap: 12px;
        flex-shrink: 0;
    }

    .m-header-icon {
        font-size: 20px;
        color: #666;
    }

    /* ==================== 考试分类轮播 ==================== */
    .m-cat-swiper-section {
        background-color: #fff;
        padding: 16px 12px 12px;
    }

    .m-cat-swiper-container {
        background-color: #f8f8f8;
        border-radius: 12px;
        padding: 12px;
    }

    .m-cat-swiper {
        width: 100%;
    }

    .m-cat-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .m-cat-item {
        position: relative;
        display: flex;
        align-items: center;
        justify-content: center;
        height: 44px;
        background-color: #fff;
        border-radius: 8px;
        text-decoration: none;
        font-size: 14px;
        color: #333;
        font-weight: 500;
        transition: all 0.2s;
    }

    .m-cat-item:active {
        background-color: #f0f0f0;
    }

    .m-cat-hot {
        position: absolute;
        top: 0;
        left: 0;
        padding: 2px 8px;
        background: linear-gradient(135deg, #ff6b6b 0%, #ee5a5a 100%);
        color: #fff;
        font-size: 11px;
        font-weight: 600;
        border-radius: 6px 0 6px 0;
        line-height: 1.2;
    }

    .m-cat-pagination {
        margin-top: 12px;
        position: static !important;
    }

    .m-cat-pagination .swiper-pagination-bullet {
        width: 6px;
        height: 6px;
        background-color: #ddd;
        opacity: 1;
    }

    .m-cat-pagination .swiper-pagination-bullet-active {
        width: 16px;
        border-radius: 3px;
        background-color: #2D6CDE;
    }

    /* ==================== 移动端Banner轮播 ==================== */
    .m-banner-section {
        padding: 12px;
        background-color: #fff;
    }

    .m-banner-swiper {
        width: 100%;
        border-radius: 10px;
        overflow: hidden;
    }

    .m-banner-swiper .swiper-slide {
        width: 100%;
    }

    .m-banner-link {
        display: block;
        width: 100%;
    }

    .m-banner-img {
        display: block;
        width: 100%;
        height: auto;
        border-radius: 10px;
    }

    .m-banner-pagination {
        bottom: 8px !important;
    }

    .m-banner-pagination .swiper-pagination-bullet {
        width: 6px;
        height: 6px;
        background-color: rgba(255, 255, 255, 0.5);
        opacity: 1;
    }

    .m-banner-pagination .swiper-pagination-bullet-active {
        width: 16px;
        border-radius: 3px;
        background-color: #fff;
    }

    /* ==================== 通用区块样式 ==================== */
    .m-section {
        background-color: #fff;
        margin: 12px;
        border-radius: 10px;
        padding: 16px;
    }

    .m-section-title {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 16px;
    }

    .m-title-text {
        flex: 1;
        font-size: 16px;
        font-weight: 600;
        color: #101010;
    }

    .m-title-more {
        font-size: 13px;
        color: #949698;
        text-decoration: none;
    }

    /* ==================== 快捷入口 ==================== */
    .m-quick-entry-section {
        padding: 16px 8px;
    }

    .m-quick-entry-grid {
        display: grid;
        grid-template-columns: repeat(4, 1fr);
        gap: 16px 8px;
    }

    .m-quick-entry-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        text-decoration: none;
    }

    .m-quick-entry-icon {
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 22px;
    }

    .m-quick-entry-text {
        font-size: 12px;
        color: #333;
        line-height: 1.2;
    }

    /* ==================== 考试日历 ==================== */
    .m-calendar-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .m-calendar-list li {
        position: relative;
        padding-left: 14px;
        margin-bottom: 10px;
        font-size: 13px;
        line-height: 1.6;
        color: #555;
    }

    .m-calendar-list li:last-child {
        margin-bottom: 0;
    }

    .m-calendar-list li::before {
        content: "";
        position: absolute;
        left: 3px;
        top: 7px;
        width: 6px;
        height: 6px;
        background-color: #ff7f24;
        border-radius: 50%;
        z-index: 2;
    }

    .m-calendar-list li::after {
        content: "";
        position: absolute;
        left: 5px;
        top: 13px;
        bottom: -10px;
        width: 2px;
        background-color: #ffd9b3;
        z-index: 1;
    }

    .m-calendar-list li:last-child::after {
        display: none;
    }

    .m-calendar-label {
        color: #ff7f24;
        font-weight: 500;
    }

    .m-calendar-value {
        color: #333;
    }

    /* ==================== 新闻列表通用样式 ==================== */
    .m-news-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .m-news-list li {
        display: flex;
        align-items: center;
        padding: 8px 0;
        gap: 6px;
    }

    .m-news-cat {
        flex-shrink: 0;
        font-size: 13px;
        color: #2D6CDE;
        font-weight: 500;
    }

    .m-news-divider {
        flex-shrink: 0;
        color: #ccc;
        font-size: 13px;
    }

    .m-news-list li a {
        flex: 1;
        font-size: 13px;
        color: #333;
        text-decoration: none;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        min-width: 0;
    }

    .m-news-list li a.hot-news {
        color: #e4393c;
        font-weight: 500;
    }

    /* ==================== 资讯标签切换 ==================== */
    .m-info-tabs {
        margin-bottom: 12px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .m-info-tabs::-webkit-scrollbar {
        display: none;
    }

    .m-info-tabs-scroll {
        display: flex;
        gap: 10px;
        white-space: nowrap;
    }

    .m-info-tab {
        flex-shrink: 0;
        padding: 6px 16px;
        font-size: 13px;
        color: #666;
        background-color: #f5f5f5;
        border-radius: 4px;
        cursor: pointer;
        transition: all 0.2s;
        line-height: 1.5;
    }

    .m-info-tab.active {
        background-color: #2D6CDE;
        color: #fff;
        font-weight: 500;
    }

    /* ==================== 资讯列表（纯文字） ==================== */
    .m-info-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .m-info-item {
        padding: 14px 0;
        border-bottom: 1px solid #f5f5f5;
    }

    .m-info-item:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .m-info-title {
        display: block;
        font-size: 15px;
        color: #333;
        text-decoration: none;
        line-height: 1.5;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        margin-bottom: 8px;
        font-weight: 500;
    }

    .m-info-meta {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 12px;
        color: #999;
    }

    .m-info-source {
        color: #999;
    }

    .m-info-date {
        color: #999;
    }

    /* ==================== 资料下载 ==================== */
    .m-download-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .m-download-list li {
        padding: 14px 0;
        border-bottom: 1px dotted #eee;
    }

    .m-download-list li:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .m-download-item {
        display: flex;
        align-items: center;
        gap: 10px;
        font-size: 14px;
        color: #555;
        text-decoration: none;
    }

    .m-download-icon {
        flex-shrink: 0;
        width: 28px;
        height: 28px;
        line-height: 28px;
        text-align: center;
        font-size: 10px;
        font-weight: 600;
        color: #fff;
        border-radius: 4px;
    }

    .m-download-icon.pdf {
        background-color: #e74c3c;
    }

    .m-download-icon.doc {
        background-color: #3498db;
    }

    .m-download-icon.xls {
        background-color: #27ae60;
    }

    .m-download-title {
        flex: 1;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .m-download-btn {
        flex-shrink: 0;
        width: 20px;
        height: 20px;
        line-height: 20px;
        text-align: center;
        background-color: #2a7de1;
        color: #fff;
        font-size: 12px;
        border-radius: 50%;
    }

    /* ==================== 精品课程 ==================== */
    .m-course-scroll {
        display: flex;
        gap: 12px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 4px;
        margin: 0 -16px;
        padding-left: 16px;
        padding-right: 16px;
    }

    .m-course-scroll::-webkit-scrollbar {
        display: none;
    }

    .m-course-card {
        flex-shrink: 0;
        width: 60%;
        border-radius: 8px;
        overflow: hidden;
        background-color: #F4F5F8;
        padding-bottom: 12px;
    }

    .m-course-img-link {
        display: block;
    }

    .m-course-img {
        display: block;
        width: 100%;
        height: auto;
    }

    .m-course-info {
        padding: 10px 12px 0;
    }

    .m-course-title {
        font-size: 14px;
        color: #393F4A;
        margin: 0 0 8px 0;
        font-weight: 500;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .m-course-tag {
        display: inline-block;
        padding: 2px 8px;
        color: #C57412;
        border-radius: 4px;
        font-size: 12px;
        margin-bottom: 8px;
        line-height: 1.4;
        background-color: #F9EDE1;
    }

    .m-course-bottom {
        display: flex;
        align-items: center;
        justify-content: space-between;
        font-size: 12px;
    }

    .m-course-subtitle {
        flex: 1;
        min-width: 0;
        font-size: 12px;
        color: #949698;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .m-course-hot {
        flex-shrink: 0;
        font-size: 12px;
        color: #FB7B6D;
        margin-left: 10px;
    }

    /* ==================== 常见问题 ==================== */
    .m-faq-list {
        display: flex;
        flex-direction: column;
        gap: 12px;
    }

    .m-faq-item {
        padding: 12px;
        background-color: #f9f9f9;
        border-radius: 8px;
    }

    .m-faq-row {
        display: flex;
        align-items: flex-start;
        gap: 8px;
    }

    .m-faq-q {
        margin-bottom: 8px;
    }

    .m-faq-q-icon,
    .m-faq-a-icon {
        flex-shrink: 0;
        width: 18px;
        height: 18px;
        line-height: 18px;
        text-align: center;
        border-radius: 4px;
        font-size: 11px;
        font-weight: bold;
        color: #fff;
        margin-top: 1px;
    }

    .m-faq-q-icon {
        background-color: #2D6CDE;
    }

    .m-faq-a-icon {
        background-color: #FF6B00;
    }

    .m-faq-q-text {
        font-size: 14px;
        font-weight: 500;
        color: #101010;
        flex: 1;
        line-height: 1.4;
    }

    .m-faq-a-text {
        font-size: 13px;
        color: #101010;
        flex: 1;
        line-height: 1.5;
        overflow: hidden;
        text-overflow: ellipsis;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }

    /* ==================== 移动端底部 ==================== */
    .m-footer {
        background-color: #fff;
        padding: 24px 16px;
        margin-top: 12px;
        border-top: 1px solid #f0f0f0;
    }

    .m-footer-qrcodes {
        display: flex;
        justify-content: center;
        gap: 40px;
        margin-bottom: 20px;
    }

    .m-footer-qrcode {
        text-align: center;
    }

    .m-footer-qrcode-img {
        width: 80px;
        height: 80px;
        background-color: #f5f5f5;
        border-radius: 4px;
        margin-bottom: 8px;
        overflow: hidden;
    }

    .m-footer-qrcode-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .m-footer-qrcode span {
        font-size: 12px;
        color: #666;
    }

    .m-footer-links {
        display: flex;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: 4px;
        margin-bottom: 12px;
    }

    .m-footer-links a {
        font-size: 12px;
        color: #666;
        text-decoration: none;
    }

    .m-footer-sep {
        color: #ddd;
        margin: 0 8px;
        font-size: 12px;
    }

    .m-footer-copyright {
        text-align: center;
        font-size: 11px;
        color: #999;
    }
}