/* ========================================
   勤思考研 - 优化后的样式文件
   ======================================== */

/* 基础重置与变量 */
:root {
    --primary-color: #65c3bb;
    --secondary-color: #4ca9e7;
    --accent-color: #fe5151;
    --text-color: #333;
    --text-light: #666;
    --border-color: #b7b7b7;
    --bg-light: #f5f5f5;
    --white: #ffffff;
    --spacing-sm: 10px;
    --spacing-md: 20px;
    --spacing-lg: 30px;
    --container-width: 1200px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-color);
    background: var(--bg-light);
}

a {
    color: var(--text-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* 通用工具类 */
.w1200 {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    position: relative;
}

.clr::after,
.clear::after {
    content: "";
    display: table;
    clear: both;
}

.fl {
    float: left;
}

.fr {
    float: right;
}

.pos_r {
    position: relative;
    max-width: 100%;
}

.mt10 {
    margin-top: 10px;
}

.mb10 {
    margin-bottom: 10px;
}

/* ========================================
   顶部导航栏
   ======================================== */
.qs_top {
    background: var(--bg-light);
    border-bottom: 1px solid #e0e0e0;
    padding: 8px 0;
}

.qs_topL ul {
    display: flex;
    align-items: center;
    gap: 20px;
}

.qs_topL ul li {
    font-size: 12px;
}

.qs_topL ul li a {
    color: var(--text-light);
}

.qs_topL ul li a:hover {
    color: var(--secondary-color);
}

.qs_topL ul li.jionUS a {
    color: var(--accent-color);
    font-weight: bold;
}

/* ========================================
   头部区域
   ======================================== */
.qs_head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 0;
    background: var(--white);
}

.qs_hdL h1 {
    margin: 0;
}

.qs_hdL h1 a {
    display: block;
}

.qs_headM {
    flex: 1;
    max-width: 500px;
    margin: 0 30px;
}

.qs_headM form {
    display: flex;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    overflow: hidden;
}

.qs_headM input[type="text"] {
    flex: 1;
    padding: 10px 15px;
    border: none;
    outline: none;
    font-size: 13px;
}

.qs_headM .search_btn {
    width: 50px;
    background: var(--primary-color);
    border: none;
    cursor: pointer;
    background-image: url(//www.qsiedu.com/skin/default/images/qspds/search.png);
    background-repeat: no-repeat;
    background-position: center;
}

.qs_headR img {
    height: 50px;
}

/* ========================================
   主导航
   ======================================== */
.ky_nav {
    background: var(--white);
    border-bottom: 2px solid var(--primary-color);
}

.ky_nav ul {
    display: flex;
    align-items: center;
}

.ky_nav ul li {
    padding: 15px 25px;
}

.ky_nav ul li a {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
}

.ky_nav ul li a:hover {
    color: var(--primary-color);
}

/* ========================================
   焦点图区域
   ======================================== */
.ky_banner {
    position: relative;
    margin-bottom: 20px;
}

.posiAdd {
    position: relative;
}

.posiAdd .btns {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 60px;
    background: rgba(0, 0, 0, 0.3);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
}

.posiAdd .prev {
    left: 10px;
}

.posiAdd .next {
    right: 10px;
}

/* ========================================
   侧边导航 + 焦点图 + 右侧资讯
   ======================================== */
.twoSide {
    margin-bottom: 30px;
    width: 100%;
    max-width: var(--container-width);
    margin-left: auto;
    margin-right: auto;
}

.twoSide .w1200 {
    display: flex;
    gap: 10px;
    width: 100%;
    box-sizing: border-box;
}

/* 左侧导航 */
.leftSide {
    width: 180px;
    flex-shrink: 0;
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    float: none !important;
}

.leftSide ul li {
    border-bottom: 1px solid #f0f0f0;
}

.leftSide ul li.menu_tit {
    background: var(--primary-color);
    padding: 15px;
    text-align: center;
}

.leftSide ul li.menu_tit .qs_dh {
    color: var(--white);
    font-size: 16px;
    font-weight: bold;
}

.leftSide ul li.act {
    padding: 12px 15px;
}

.leftSide ul li.act .qs_x a {
    color: var(--text-color);
    font-size: 14px;
}

.leftSide ul li.act:hover {
    background: #f9f9f9;
}

.leftSide ul li.act .qs_x a:hover {
    color: var(--primary-color);
}

/* 焦点图 */
.focus {
    flex: 1;
    min-width: 0;
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
}

.focus ul {
    width: 100%;
    height: 0;
    padding-bottom: 42%; /* 宽高比约 100:42，适应banner图片 */
    margin: 0;
    position: relative;
}

.focus ul li {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover !important;
    background-position: center center !important;
    background-repeat: no-repeat !important;
}

.focus ul li a {
    display: block;
    width: 100%;
    height: 100%;
}

.focus .addBtn {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.focus .addBtn .btn {
    display: flex;
    gap: 10px;
}

.focus .addBtn .btn span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.focus .addBtn .btn span:hover,
.focus .addBtn .btn span.active {
    background: var(--white);
    transform: scale(1.2);
}

/* 右侧资讯 */
.ky_navr {
    width: 260px;
    flex-shrink: 0;
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    float: none !important;
}

.ky_navr .aaa h2 {
    padding: 15px;
    margin: 0;
    font-size: 16px;
    border-bottom: 2px solid var(--primary-color);
    background: #f9f9f9;
}

.ky_navr .aaa h2.tab-active {
    color: var(--primary-color);
}

.ky_navr .bbb ul {
    padding: 10px 15px;
}

.ky_navr .bbb ul li {
    padding: 10px 0;
    border-bottom: 1px dashed #e0e0e0;
}

.ky_navr .bbb ul li:last-child {
    border-bottom: none;
}

.ky_navr .bbb ul li a {
    font-size: 13px;
    color: var(--text-color);
    line-height: 1.5;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ky_navr .bbb ul li a:hover {
    color: var(--primary-color);
}

.ky_navr .bbb ul li a[style*="#fe5151"] {
    color: var(--accent-color) !important;
}

/* ========================================
   主要内容区域
   ======================================== */
.ky_main {
    padding: 20px 0;
}

/* 五个小图 */
.ky_img {
    margin-bottom: 30px;
}

.ky_img ul {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
}

.ky_img ul li a {
    display: block;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.ky_img ul li a:hover {
    transform: translateY(-5px);
}

.ky_img ul li a img {
    display: block;
    width: 100%;
    height: 140px;
    object-fit: cover;
}

/* 头条新闻 */
.ky_news {
    margin-bottom: 30px;
}

.ky_news > ul {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.ky_news > ul > li {
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.news_zx {
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-width: 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.news_tab {
    padding: 15px;
    margin: 0;
    border-bottom: 2px solid var(--primary-color);
    background: #f9f9f9;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.news_tab .s {
    display: block;
    width: 100%;
    box-sizing: border-box;
}

.news_tab .s a {
    font-size: 16px;
    font-weight: bold;
    color: var(--text-color);
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.news_con {
    padding: 15px;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.news_con .mt10.mb10 img {
    width: 100%;
    height: auto;
}

.news_con ul li {
    padding: 8px 0;
    border-bottom: 1px dashed #e0e0e0;
    width: 100%;
    box-sizing: border-box;
}

.news_con ul li:last-child {
    border-bottom: none;
}

.news_con ul li a {
    font-size: 13px;
    color: var(--text-color);
    line-height: 1.5;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
}

.news_con ul li a:hover {
    color: var(--primary-color);
}

/* ========================================
   课程展示
   ======================================== */
.kecheng {
    margin: 20px 0;
    padding: 30px;
    background: var(--white);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.kecheng h2 {
    margin: 0 0 20px 0;
    border-left: 4px solid var(--primary-color);
    padding-left: 15px;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.kecheng h2 a {
    font-weight: normal;
    font-size: 14px;
    color: var(--secondary-color);
}

.kecheng ul {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.kecheng ul li {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}

.kecheng ul li:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.kecheng ul li a {
    display: block;
    padding: 15px;
}

.kecheng ul li img {
    display: block;
    width: 100%;
    height: auto;
    margin-bottom: 15px;
}

.kecheng ul li h3 {
    font-size: 16px;
    line-height: 1.4;
    color: var(--text-color);
    margin: 0 0 10px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kecheng ul li p {
    font-size: 13px;
    color: var(--text-light);
    margin: 0 0 10px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kecheng ul li b {
    font-size: 18px;
    color: var(--accent-color);
    font-weight: bold;
    display: block;
}

/* ========================================
   关于勤思
   ======================================== */
.ky_qinsi {
    margin-bottom: 30px;
    display: flex;
    gap: 20px;
}

.qs_tit {
    font-size: 18px;
    font-weight: bold;
    padding: 15px;
    background: var(--white);
    border-left: 4px solid var(--primary-color);
    margin-bottom: 15px;
}

.qinsi_l {
    width: 400px;
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.qinsi .news_con {
    padding: 0;
}

.qinsi .news_con a img {
    display: block;
    width: 100%;
    height: 260px;
    object-fit: cover;
}

.qinsi .news_tab {
    border-bottom: none;
    background: var(--white);
}

.qinsi .news_tab span {
    display: block;
    padding: 10px 15px;
    border-bottom: 1px solid #f0f0f0;
}

.qinsi .news_tab span.s a {
    color: var(--primary-color);
    font-weight: bold;
}

.qinsi .news_tab span a {
    font-size: 13px;
    color: var(--text-color);
}

.qinsi .news_tab span a:hover {
    color: var(--primary-color);
}

.qinsi2 {
    flex: 1;
    background: var(--white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* ========================================
   联系我们
   ======================================== */
.ky_contact {
    background: var(--white);
    border-radius: 4px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.contact_m {
    display: flex;
    gap: 30px;
}

.contact_l {
    flex: 1;
}

.contact_l img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 4px;
}

.contact_r {
    width: 400px;
}

.contact_r strong {
    display: block;
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 10px;
}

.contact_r br {
    margin-bottom: 10px;
}

/* ========================================
   页脚
   ======================================== */
.qs_footer {
    margin-bottom: 20px;
    font-size: 12px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    background: var(--white);
}

.qs_footer .w1200 {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

.qs_footer .footerL,
.qs_footer .footerR,
.qs_footer .footerM {
    float: none;
}

.qs_footer .footerL {
    width: 200px;
    flex-shrink: 0;
}

.qs_footer .footerR {
    width: 200px;
    flex-shrink: 0;
}

.qs_footer .footerM {
    flex: 1;
    min-width: 0;
    padding: 0 20px;
    border-left: 1px solid var(--border-color);
    border-right: 1px solid var(--border-color);
}

.qs_footer .footerL ul {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.qs_footer .footerL ul li {
    font-size: 12px;
    line-height: 1.6;
    text-align: center;
}

.qs_footer .footerL ul li img {
    width: 90px;
    height: 90px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.qs_footer .footerL ul li img:hover {
    transform: scale(1.05);
}

.qs_footer .footerM a {
    color: var(--text-color);
    transition: color 0.3s ease;
}

.qs_footer .footerM a:hover {
    color: var(--primary-color);
}

.qs_footer .footerM ul {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
    margin-bottom: 20px;
}

.qs_footer .footerM ul li {
    padding: 0;
    border-left: none;
    line-height: 1.6;
}

.qs_footer .footerM ul li::before {
    content: "•";
    color: var(--primary-color);
    margin-right: 5px;
}

.qs_footer .footerM p {
    line-height: 1.8;
    color: var(--text-light);
}

.qs_footer .footerM p a {
    color: var(--text-light);
}

.qs_footer .footerM p a:hover {
    color: var(--primary-color);
}

.qs_footer .footerM p img {
    vertical-align: middle;
    margin: 0 3px;
}

.qs_footer .footerR {
    text-align: center;
}

.qs_footer .footerR h2 {
    display: block;
    color: var(--accent-color);
    font-size: 24px;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.qs_footer .footerR p {
    line-height: 1.6;
    margin: 0 0 15px 0;
    color: var(--text-light);
}

.qs_footer .footerR a.chat {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 150px;
    margin: 5px auto;
    padding: 10px 15px;
    border: 2px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.qs_footer .footerR a.chat:hover {
    background: var(--accent-color);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(254, 81, 81, 0.3);
}

.qs_footer .footerR a.chat img {
    width: 18px;
    height: 18px;
}

/* ========================================
   响应式设计
   ======================================== */
@media only screen and (max-width: 1024px) {
    .twoSide .w1200 {
        flex-direction: column;
        width: 100%;
    }

    .leftSide,
    .ky_navr {
        width: 100%;
    }

    .focus {
        width: 100%;
    }

    .focus ul {
        padding-bottom: 50%;
    }

    .ky_news > ul {
        grid-template-columns: repeat(2, 1fr);
    }

    .ky_img ul {
        grid-template-columns: repeat(3, 1fr);
    }

    .kecheng ul {
        grid-template-columns: repeat(2, 1fr);
    }

    .ky_qinsi {
        flex-direction: column;
    }

    .qinsi_l,
    .contact_r {
        width: 100%;
    }

    .contact_m {
        flex-direction: column;
    }
}

@media only screen and (max-width: 768px) {
    .qs_head {
        flex-direction: column;
        text-align: center;
    }

    .qs_headM {
        margin: 15px 0;
        width: 100%;
    }

    .qs_headR img {
        display: none;
    }

    .ky_nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .ky_nav ul li {
        padding: 10px 15px;
    }

    .ky_news > ul {
        grid-template-columns: 1fr;
    }

    .ky_img ul {
        grid-template-columns: repeat(2, 1fr);
    }

    .kecheng ul {
        grid-template-columns: 1fr;
    }

    .qs_footer .w1200 {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .qs_footer .footerL,
    .qs_footer .footerM,
    .qs_footer .footerR {
        width: 100%;
        float: none;
    }

    .qs_footer .footerM {
        border-left: none;
        border-right: none;
        border-top: 1px solid var(--border-color);
        border-bottom: 1px solid var(--border-color);
        margin: 20px 0;
        padding: 20px 0;
    }

    .qs_footer .footerL ul {
        flex-direction: column;
        align-items: center;
    }

    .qs_footer .footerL ul li {
        width: auto;
    }

    .qs_footer .footerM ul {
        justify-content: center;
    }
}

@media only screen and (max-width: 480px) {
    .qs_topL ul {
        flex-wrap: wrap;
        gap: 10px;
    }

    .ky_img ul {
        grid-template-columns: 1fr;
    }

    .focus ul {
        padding-bottom: 56.25%;
    }
}
