/* Mobile Responsive Styles */

/* For screens smaller than 768px */
@media (max-width: 767px) {
    .container {
        width  : 100%;
        padding: 0 15px;
    }

    /* 移动端研究成果一列 */
    .results-grid {
        grid-template-columns: 1fr !important;
        gap: 0 !important;
    }

    .result-list li {
        display      : flex !important;
        align-items  : center !important;
        gap          : 10px !important;
        padding      : 10px 0 !important;
        border-bottom: 1px solid rgba(255, 255, 255, .25) !important;
    }

    .date-chip {
        min-width: 82px !important;
        flex     : none !important;
    }

    .result-list a {
        flex       : 1 !important;
        white-space: normal !important;
        color      : #333 !important;
    }

    .top-inner {
        height: auto;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 12px;
        gap: 10px;
        background-image: url(./img/pbg.png);
    }

    .logo img {
        height: auto;
        width: auto;
        max-height: 80px;
        max-width: 100%;
        object-fit: contain;
    }

    .top-tools {
        display: flex;
        width: 54%;
        min-height: 80px;
        padding: 10px;
        flex-direction: column;
        justify-content: center;
        align-items: flex-end;
background-color: rgba(255, 255, 255, 0);
        opacity: 0;
        border-radius: 8px;
    }
    .top-tools .search-box,
    .top-tools .lang-links {
        display: none !important;
    }
    .team-section {
        display: none;
    }

    .top-tools .search-box,
    .top-tools .lang-links {
        padding-left : 6px;
        padding-right: 6px;
    }

    .search-box {
        width : 200px;
        height: 36px;
    }

    .lang-links {
        font-size: 14px;
    }

    /* Navigation adjustments */
    .nav-container {
        position: relative;
    }

    .nav-toggle {
        position       : absolute;
        top            : -30px;
        right          : 10px;
        width          : 34px;
        height         : 30px;
        border         : 0;
        background     : transparent;
        display        : flex;
        flex-direction : column;
        justify-content: space-between;
        padding        : 5px;
        cursor         : pointer;
        z-index        : 30;
    }

    .nav-toggle span {
        display      : block;
        height       : 2px;
        width        : 100%;
        background   : #000;
        border-radius: 2px;
    }

    .nav-list {
        flex-direction: column;
        height        : auto;
        display       : none;
        position      : fixed;
        top           : 50px;
        right         : 15px;
        width         : 40%;
        max-width     : 200px;
        max-height    : calc(100vh - 70px);
        overflow-y    : auto;
        background    : #0081d6;
        border-radius : 8px;
        box-shadow    : 0 6px 18px rgba(0, 0, 0, .25);
        z-index       : 25;
    }

    .nav-list.open {
        display: flex;
    }

    .nav-list>li {
        flex : none;
        width: 100%;
    }

    /* 新闻与学术模块竖排 */
    .news-grid {
        flex-direction: column;
        gap           : 20px;
    }

    .news-block {
        width: 100%;
    }
}

.nav-list>li>a {
    justify-content: flex-start;
    padding        : 0 20px;
    height         : 50px;
}

.nav-list>li.has-sub>a::after {
    margin-left : auto;
    margin-right: 20px;
}

@media (max-width: 767px) {
    .sub-menu {
        position     : static;
        display      : none;
        background   : var(--blue-deep);
        border-radius: 0 0 8px 8px;
        overflow     : hidden;
        opacity      : 1;
        visibility   : visible;
        transform    : none;
    }

    .sub-menu li {
        width: 100%;
    }

    .sub-menu li a {
        display: flex;
        align-items: center;
        color: #fff !important;
        background: #0e7ddf;
        font-size: 14px;
        line-height: 1.4;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
    }

    .sub-menu li a:hover {
        background: #0767bc;
    }

    /* Show sub-menu on mobile when parent is active/open */
    .nav-list>li.open .sub-menu {
        display: block !important;
    }
}

.nav-list>li.has-sub>a {
    position: relative;
}

.nav-list>li.has-sub.open>a::after {
    transform: rotate(-135deg);
}


/* For screens between 768px and 1024px */
@media (max-width: 1023px) and (min-width: 768px) {
    .container {
        width  : 100%;
        padding: 0 20px;
    }

    .top-tools {
        width: 300px;
    }

    .search-box {
        width: 220px;
    }
}

/* 针对 jianjie.html 的移动端适配 */
@media (max-width: 767px) {
    .main-content {
        flex-direction: column;
        gap: 12px;
        min-height: auto;
        margin: 12px 8px;
    }


    .sidebar {
     //   width: 50% !important;
     //   max-width: 50% !important;
      //  flex-shrink: 0;
    //    border: none;
      //  background: transparent;
display:none;
    }

    .sidebar-title {
        text-align: left;
        padding: 10px 12px;
        font-size: 16px;
    }

    .sidebar-menu a {
        text-align: left;
        padding: 10px 12px;
        font-size: 14px;
    }

    .content-body {
        width: 100% !important;
        padding: 12px !important;
        border: 1px solid #ddd;
        box-sizing:border-box;
    }

    .breadcrumb {
        font-size: 12px;
        padding-bottom: 8px;
        margin-bottom: 10px;
    }

    .article-list li {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        padding: 8px 0;
        margin-bottom: 8px;
        position: relative;
    }

    .article-list li::before {
        content: "●";
        color: #d9534f;
        font-size: 10px;
        line-height: 1;
        margin-top: 4px;
        flex: none;
    }

    .article-list a {
        flex: 1;
        color: #444;
        font-size: 14px;
        line-height: 1.4;
        word-break: break-word;
    }

    .article-list .date {
        flex: none;
        color: #999;
        font-family: Arial;
        font-size: 12px;
        margin-left: auto;
        white-space: nowrap;
    }

    .pagination {
        font-size: 12px;
    }

    .hero-arrow {
        width: 30px;
        height: 30px;
    }
}

@media (min-width: 768px) {
    .sub-menu {
        display: block;
    }

    .nav-list>li:hover>.sub-menu {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }
}