/* ========================================
   桂林理工大学外国语学院 - 全站通用样式
   ======================================== */

/* ── 全局重置 ── */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
    color: #222;
    background: #f0f4f8;
}

a {
    text-decoration: none;
    color: inherit;
}


/* ========================================
   页头样式 (site-header)
   ======================================== */
.site-header {
    background: linear-gradient(120deg, #0a2540 0%, #018fdb 100%);
    padding: 0;
}

.header-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-logo-wrapper{  
    flex: 1;
    margin: -10px 0;
}

.header-brand-link {
}

.header-logo {
    display: block;
    height: 110px;
    width: auto;
}

.header-title {
    flex: 1;
}

.header-title h1 {
    font-size: 28px;
    font-weight: 900;
    color: #fff;
    letter-spacing: 2px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, .2);
}

.header-title .en {
    font-size: 11px;
    color: rgba(255, 255, 255, .65);
    letter-spacing: 1px;
    margin-top: 5px;
}

.header-links {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.header-links .search form{
    display: flex;
}

.header-links input {
    border: none;
    border-radius: 20px 0 0 20px;
    padding: 7px 14px;
    font-size: 13px;
    width: 180px;
    outline: none;
}

.header-links button {
    background: rgba(255, 255, 255, .2);
    border: none;
    border-radius: 0 20px 20px 0;
    padding: 7px 14px;
    color: #fff;
    cursor: pointer;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, .3);
    border-left: none;
}

.header-links button:hover {
    background: rgba(255, 255, 255, .35);
}

.header-links .links {
    display: flex;
    gap: 12px;
    font-size: 12px;
}

.header-links .links a {
    color: rgba(255, 255, 255, .75);
    border: 1px solid rgba(255, 255, 255, .3);
    border-radius: 3px;
    padding: 2px 10px;
}

.header-links .links a:hover {
    background: rgba(255, 255, 255, .15);
    color: #fff;
}

/* ========================================
   导航栏样式 (nav-bar)
   ======================================== */
.nav-bar {
    background: rgba(10, 37, 64, .95);
    backdrop-filter: blur(4px);
    position: relative;
    z-index: 100;
    border-bottom: 2px solid #018fdb;
}

.nav-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
}

.nav-list {
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-list-inner {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.nav-item {
    list-style: none;
    font-size: 18px;
    font-weight: 500;
}

.nav-item > a {
    display: flex;
    align-items: center;
    height: 60px;
    padding: 0 15px;
    color: rgba(255, 255, 255, .85);
    transition: .2s;
    letter-spacing: 1px;
    white-space: nowrap;
}

.nav-item > a:hover {
    color: #fff;
    background: rgba(1, 143, 219, .3);
}

.nav-item.has-sub {
    position: relative;
}

.sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #055c90;
    min-width: 140px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .3);
    z-index: 200;
    border-top: 2px solid #018fdb;
    white-space: nowrap;
}

.sub-menu li {
    list-style: none;
}

.sub-menu li a {
    display: block;
    padding: 12px 20px;
    color: rgba(255, 255, 255, .8);
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.sub-menu li a:hover {
    background: #018fdb;
    color: #fff;
}

.nav-item.has-sub:hover .sub-menu {
    display: block;
}

.nav-list-inner .nav-item  a {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.nav-inner .nav-item  a > span:nth-child(2){
  font-size: 0.85em;}

/* 滚动导航品牌标识 */
.scroll-nav-brand {
    display: none;
    align-items: center;
    gap: 10px;
    margin-right: 8px;
    flex-shrink: 0;
}

.scroll-nav-brand img {
    height: 50px;
    width: auto;
    filter: brightness(0) invert(1) opacity(.85);
    vertical-align: middle;
}

.scroll-nav-brand span {
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 1px;
    vertical-align: middle;
}

.nav-bar.scrolled {
    position: fixed;
    width: 100%;
    top: 0;
}

.nav-bar.scrolled .scroll-nav-brand {
    display: flex;
}

.nav-bar.scrolled .nav-inner {
    max-width: none;
}

.nav-bar.scrolled .nav-list {
    margin-left: auto;
}

/* 移动端菜单按钮 */
.mobile-menu-toggle {
    display: none;
}

/* ========================================
   左侧导航栏样式
   ======================================== */
.side-nav {
    background: #055c90;
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    overflow: hidden;
    height: fit-content;
    color: #fff;
    position: -webkit-sticky;
    position: sticky;
    top: 80px;
    z-index: 10;}
.side-nav-head {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: default;}
.side-nav-head::before {
    content: "";
    width: 4px;
    height: 22px;
    background: #018fdb;
    border-radius: 2px;}

.side-nav ul {
    list-style: none;
    padding: 10px 0;
    margin: 0;
    font-size: 18px;}
.side-nav > ul > li > a {
    display: block;
    padding: 0.75em 1.25em;
    transition: all 0.2s;
    border-left: 4px solid transparent;
    position: relative;
    color: rgba(255, 255, 255, .85);}
.side-nav > ul > li > a:hover {
    background: rgba(255, 255, 255, .2);
    color: #fff;
    padding-left: 1.6em;}
.side-nav > ul > li > a.active {
    background: #018fdb;
    color: #fff;
    border-left-color: #fff;
    font-weight: 600;}
.side-nav > ul > li.has-children > a::after {
    content: "\f078";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 12px;
    transition: transform 0.3s;
    color: rgba(255, 255, 255, .6);}
.side-nav > ul > li.has-children.open > a::after {
    transform: translateY(-50%) rotate(180deg);}

.side-nav .sub-nav {
    display: none;
    background: rgba(255,255,255, .25);
    padding: 5px 0;}
.side-nav .sub-nav.open {
    display: block;}

.side-nav .sub-nav li a {
    display: block;
    font-size: 0.9em;
    padding: 0.7em 2.5em;
    border-left: 4px solid transparent;
    transition: all 0.2s;
    color: rgba(255, 255, 255, .7);}
.side-nav .sub-nav li a:hover {
    color: #fff;
    background: rgba(255, 255, 255, .2);
    padding-left: 3em;}
.side-nav .sub-nav li a.active {
    color: #fff;
    font-weight: 600;
    background: #018fdb;
    border-left-color: #fff;}

/* ========================================
   内容区样式
   ======================================== */
/* 分页 */
.pagination {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #f5f5f5;
}
.pagination .p_pages{
    display: flex;
    justify-content: center;
    gap: 5px;
}
.pagination .p_pages span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    font-size: 14px;
    line-height: 34px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: all 0.2s;
}
.pagination .p_pages span a {
    padding: 0 10px;
}
.pagination .p_pages span *{
    line-height: 34px;
}
.pagination .p_pages .p_fun,
.pagination .p_pages .p_no {
    color: #666;
    border-color: #ddd;
}
.pagination .p_pages .p_fun:hover,
.pagination .p_pages .p_no:hover {
    color: #018fdb;
    border-color: #018fdb;
}
.pagination .p_pages .p_no_d {
    color: #fff;
    background: #018fdb;
    border-color: #018fdb;
}
.pagination .p_pages .p_fun_d {
    color: #eee;
    border-color: #eee;
}

/* ========================================
   页脚样式 (footer)
   ======================================== */
footer {
    background: #0a2540;
    color: #6a8aa8;
    padding: 28px 0 0;
}

.footer-inner {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 24px 24px;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 30px;
}

footer h4 {
    color: #b0d0f0;
    margin-bottom: 10px;
    font-size: 13px;
}

footer a,
footer p {
    font-size: 13px;
    line-height: 2;
    color: #6a8aa8;
    display: block;
}

footer a:hover {
    color: #018fdb;
}

.footer-bottom {
    border-top: 1px solid #1a3a5c;
    text-align: center;
    padding: 12px;
    font-size: 12px;
    color: #3a5a78;
}

/* ========================================
   响应式设计
   ======================================== */

/* 1024px 以下 - 移动端导航 */
@media (max-width: 1024px) {
    /* 隐藏原有页头 Banner */
    .site-header {
        display: none;
    }

    /* 导航栏调整 */
    .nav-bar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 60px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-inner {
        max-width: 100%;
        height: 100%;
        justify-content: space-between;
        padding: 0 15px;
    }

    /* 移动端 Logo 区域 (始终显示) */
    .scroll-nav-brand {
        display: flex !important;
        margin-right: 0;
    }

    .scroll-nav-brand img {
        height: 40px;
    }

    .scroll-nav-brand span {
        font-size: 18px;
    }

    /* 汉堡菜单按钮 */
    .mobile-menu-toggle {
        display: block;
        background: transparent;
        border: 1px solid rgba(255, 255, 255, 0.3);
        color: #fff;
        font-size: 20px;
        padding: 5px 10px;
        border-radius: 4px;
        cursor: pointer;
        z-index: 102;
    }

    .mobile-menu-toggle:hover {
        background: rgba(255, 255, 255, 0.1);
    }

    /* 导航菜单容器 (默认隐藏/折叠) */
    .nav-list {
        display: none;
        position: absolute;
        top: 60px;
        right: 0;
        background: #0a2540;
        width: 300px;
        height: calc(100vh - 60px);
        overflow-y: auto;
        flex-direction: column;
        padding: 10px 0;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
        z-index: 101;
    }

    .nav-list.active {
        display: flex;
    }

    .nav-list-inner {
        flex-direction: column;
        width: 100%;
    }

    /* 导航项重置 */
    .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-item > a {
        height: 45px;
        justify-content: space-between;
    }

    .nav-item > a::after {
        content: '\f107';
        font-family: "Font Awesome 5 Free";
        font-weight: 900;
        opacity: 0.7;
    }

    .nav-item.has-sub > a::after {
        display: inline-block;
    }

    /* 子菜单重置为静态块 */
    .sub-menu {
        position: static;
        display: none;
        box-shadow: none;
        border-top: none;
        min-width: 100%;
    }

    .sub-menu.open {
        display: block;
    }

    .sub-menu li a {
        padding-left: 40px;
    }

    /* 搜索框嵌入菜单第一行 */
    .mobile-search-box {
        padding: 10px 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        margin-bottom: 5px;
    }

	.mobile-search-box form{
	    display: flex;
	}

    .mobile-search-box input {
        flex: 1;
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: #fff;
        padding: 6px 10px;
        border-radius: 4px 0 0 4px;
        outline: none;
    }

    .mobile-search-box button {
        background: #018fdb;
        border: none;
        color: #fff;
        padding: 6px 12px;
        border-radius: 0 4px 4px 0;
        cursor: pointer;
    }
    
    /* 平板端：压缩左侧导航栏，给右侧更多内容空间 */
    .list-container {
        grid-template-columns: 180px 1fr;
        gap: 20px;
    }

    .side-nav-head {
        padding: 12px 15px;
        font-size: 17px;
    }

    .side-nav > ul > li > a {
        padding: 0.65em 1em;
        font-size: 16px;
    }

    .side-nav .sub-nav li a {
        padding: 0.6em 1.8em;
        font-size: 0.85em;
    }

    .list-main {
        margin-top: 60px;
    }
}

/* 800px 以下调整 */
@media (max-width: 800px) {
    .nav-list {
        width: 100%;
    }
    
    .list-container {
        grid-template-columns: 1fr;
        padding: 0 15px;
        gap: 0;
    }
    .side-nav {
        display: none;
    }
    .list-main {
        margin-top: 55px;
    }

    /* 页脚重新设计 */
    .footer-inner {
        grid-template-columns: repeat(3, 1fr);
        gap: 15px;
    }

    /* 介绍部分占满整行 */
    .footer-inner > div:first-child {
        grid-column: 1 / 4;
        text-align: center;
    }

    /* 后三列内部链接横向排列 */
    .footer-inner > div:not(:first-child) {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-inner > div:not(:first-child) h4 {
        margin-bottom: 8px;
        font-size: 14px;
    }

    .footer-inner > div:not(:first-child) a {
        display: inline-block;
        margin: 0 5px;
        line-height: 1.8;
        font-size: 12px;
    }
}

/* 小于 360px 时完全纵向排列 */
@media (max-width: 360px) {
    .footer-inner {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer-inner > div:first-child {
        grid-column: auto;
        text-align: left;
    }

    .footer-inner > div:not(:first-child) {
        display: block;
        align-items: flex-start;
    }

    .footer-inner > div:not(:first-child) a {
        display: inline-block;
        margin-right: 1em;
        padding: 2px 0;
    }
}