/* ========================================
   样式补丁 - 修复各页面与模板的样式差异
   ======================================== */

/* === 基地列表页 - 网格布局 === */
.base-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}
.base-list-grid .base-list-card:nth-child(n+3) {
    /* 第3个起改为3列 */
}
.base-list-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s;
}
.base-list-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.base-list-img {
    height: 220px;
    overflow: hidden;
    position: relative;
}
.base-list-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.base-list-card:hover .base-list-img img {
    transform: scale(1.05);
}
.base-list-img .base-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    background: #8B0000;
    color: #fff;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 3px;
}
.base-list-body {
    padding: 18px;
}
.base-list-body h3 {
    font-size: 17px;
    color: #333;
    margin-bottom: 8px;
}
.base-list-body h3 a {
    color: #333;
}
.base-list-body h3 a:hover {
    color: #8B0000;
}
.base-list-body p {
    font-size: 13px;
    color: #999;
    line-height: 1.6;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.view-detail-btn {
    display: inline-block;
    background: #8B0000;
    color: #fff !important;
    padding: 8px 24px;
    border-radius: 4px;
    font-size: 13px;
    transition: background 0.3s;
}
.view-detail-btn:hover {
    background: #A52A2A;
    color: #fff !important;
}

/* 基地列表页 banner 背景 - 默认渐变背景，可被banner图片覆盖 */
.base-banner {
    background: linear-gradient(135deg, #2d1b1b, #4a0000);
}

/* === 综合动态列表页 - 左图右文布局 === */
.news-list {
    /* 列表容器 */
}
.news-list-item {
    display: flex;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: all 0.3s;
    border: 1px solid #f0f0f0;
}
.news-list-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.12);
    border-color: #e0e0e0;
}
.news-thumb {
    width: 260px;
    min-height: 180px;
    flex-shrink: 0;
    overflow: hidden;
}
.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}
.news-list-item:hover .news-thumb img {
    transform: scale(1.05);
}
.news-content {
    flex: 1;
    padding: 20px 25px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.news-cat-tag {
    display: inline-block;
    background: #8B0000;
    color: #fff;
    font-size: 12px;
    padding: 2px 10px;
    border-radius: 3px;
    margin-bottom: 10px;
    align-self: flex-start;
}
.news-content h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}
.news-content h3 a {
    color: #333;
}
.news-content h3 a:hover {
    color: #8B0000;
}
.news-content > p {
    font-size: 14px;
    color: #888;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 12px;
}
.news-meta {
    font-size: 13px;
    color: #bbb;
    margin-top: auto;
}
.news-meta span {
    margin-right: 15px;
}
.news-meta i {
    margin-right: 4px;
}

/* === 培训方案列表页 - 卡片布局 === */
.plan-list-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}
.plan-list-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    transition: all 0.3s;
}
.plan-list-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}
.plan-list-img {
    height: 240px;
    overflow: hidden;
}
.plan-list-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}
.plan-list-card:hover .plan-list-img img {
    transform: scale(1.05);
}
.plan-list-body {
    padding: 20px;
}
.plan-list-body h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 10px;
}
.plan-list-body h3 a {
    color: #333;
}
.plan-list-body h3 a:hover {
    color: #8B0000;
}
.plan-list-body p {
    font-size: 14px;
    color: #888;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 15px;
}

/* === 文章详情页 - 带侧边栏布局 === */
.article-detail .container {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 30px;
}
.article-detail .article-main {
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.article-detail .article-header {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}
.article-detail .article-header h1 {
    font-size: 24px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 10px;
}
.article-detail .article-meta {
    font-size: 13px;
    color: #999;
}
.article-detail .article-meta span {
    margin-right: 20px;
}
.article-detail .article-body {
    font-size: 15px;
    line-height: 1.8;
    color: #555;
}
.article-detail .article-body p {
    margin-bottom: 15px;
}
.article-detail .article-body img {
    max-width: 100%;
    border-radius: 4px;
    margin: 15px 0;
}
.article-detail .article-body h2 {
    font-size: 20px;
    color: #333;
    margin: 25px 0 15px;
    padding-left: 12px;
    border-left: 3px solid #8B0000;
}
.article-detail .article-body h3 {
    font-size: 18px;
    color: #333;
    margin: 20px 0 10px;
}
.article-detail .article-body ul,
.article-detail .article-body ol {
    padding-left: 20px;
    margin-bottom: 15px;
    list-style: disc;
}
.article-detail .article-body li {
    margin-bottom: 5px;
    line-height: 1.8;
}

/* 相关推荐 */
.related-articles {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.related-articles h3 {
    font-size: 18px;
    color: #333;
    margin-bottom: 15px;
    padding-left: 12px;
    border-left: 3px solid #8B0000;
}
.related-articles ul {
    list-style: none !important;
    padding-left: 0 !important;
}
.related-articles li {
    padding: 8px 0;
    border-bottom: 1px dashed #eee;
}
.related-articles li:last-child {
    border-bottom: none;
}
.related-articles li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #666;
}
.related-articles li a:hover {
    color: #8B0000;
}
.related-articles li a span {
    font-size: 12px;
    color: #bbb;
    flex-shrink: 0;
    margin-left: 15px;
}

/* 详情页侧边栏 */
.article-sidebar {
    /* 侧边栏容器 */
}
.sidebar-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}
.sidebar-card h3 {
    font-size: 16px;
    color: #333;
    padding-bottom: 10px;
    margin-bottom: 15px;
    border-bottom: 2px solid #8B0000;
}
.sidebar-card .info-list {
    list-style: none;
    padding: 0;
}
.sidebar-card .info-list li {
    padding: 8px 0;
    font-size: 14px;
    color: #666;
    border-bottom: 1px dashed #eee;
    display: flex;
    align-items: flex-start;
}
.sidebar-card .info-list li:last-child {
    border-bottom: none;
}
.sidebar-card .info-list li i {
    color: #8B0000;
    margin-right: 8px;
    margin-top: 3px;
    flex-shrink: 0;
}
.sidebar-contact-card {
    background: linear-gradient(135deg, #8B0000, #B22222);
    color: #fff;
    border-radius: 8px;
    padding: 25px;
    margin-bottom: 20px;
    text-align: center;
}
.sidebar-contact-card h3 {
    color: #ffd700;
    font-size: 18px;
    margin-bottom: 15px;
    border-bottom: 2px solid rgba(255,255,255,0.3);
    padding-bottom: 10px;
}
.sidebar-contact-card .tel {
    font-size: 22px;
    font-weight: bold;
    color: #ffd700;
    margin-bottom: 10px;
}
.sidebar-contact-card p {
    font-size: 14px;
    color: rgba(255,255,255,0.9);
    line-height: 1.8;
}
.sidebar-contact-card .btn-consult {
    display: inline-block;
    background: #ffd700;
    color: #8B0000;
    padding: 10px 30px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: bold;
    margin-top: 15px;
    transition: all 0.3s;
}
.sidebar-contact-card .btn-consult:hover {
    background: #fff;
    color: #8B0000;
}

/* 侧边栏相关方案 */
.sidebar-plan-item {
    display: flex;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed #eee;
}
.sidebar-plan-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}
.sidebar-plan-item img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
}
.sidebar-plan-item .plan-info {
    flex: 1;
}
.sidebar-plan-item .plan-info h4 {
    font-size: 14px;
    color: #333;
    margin-bottom: 4px;
    line-height: 1.3;
}
.sidebar-plan-item .plan-info p {
    font-size: 12px;
    color: #999;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sidebar-plan-item .plan-info a {
    font-size: 12px;
    color: #8B0000;
}

/* === 联系我们页面增强 === */
.contact-about {
    margin-bottom: 30px;
}
.contact-about h3 {
    font-size: 22px;
    color: #8B0000;
    margin-bottom: 15px;
}
.contact-about p {
    font-size: 14px;
    color: #666;
    line-height: 1.8;
    margin-bottom: 10px;
}
/* 联系我们 - 左右两栏布局：左侧图片+联系方式，右侧留言 */
.contact-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}
.contact-left {
    display: flex;
    flex-direction: column;
}
.contact-left-img {
    margin-bottom: 25px;
    border-radius: 8px;
    overflow: hidden;
}
.contact-left-img img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    border-radius: 8px;
}
.contact-map {
    margin-top: 40px;
    border-radius: 8px;
    overflow: hidden;
    height: 350px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}
.contact-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 留言成功/失败提示 */
.msg-success {
    background: #d4edda;
    color: #155724;
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
}
.msg-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
    border: 1px solid #f5c6cb;
}

/* === 首页Banner图片 === */
.hero-banner .slide img,
.hero-banner .slide .banner-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* === 响应式补丁 === */
@media (max-width: 1024px) {
    .base-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .plan-list-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .article-detail .container {
        grid-template-columns: 1fr;
    }
    .article-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .base-list-grid {
        grid-template-columns: 1fr;
    }
    .plan-list-grid {
        grid-template-columns: 1fr;
    }
    .news-list-item {
        flex-direction: column;
    }
    .news-thumb {
        width: 100%;
        height: 200px;
    }
    .contact-main-grid {
        grid-template-columns: 1fr;
    }
    .contact-left-img img {
        height: 200px;
    }
}


/* === 移动端响应式增强补丁 === */

/* P4: 防止横向滚动条 */
body, html {
    overflow-x: hidden;
}

/* P1+P2+P3: 移动端768px以下修复 */
@media (max-width: 768px) {
    /* P1: logo文字允许换行，防止header溢出 */
    .logo h1 {
        white-space: normal;
        font-size: 16px;
    }
    .logo h1 small {
        font-size: 10px;
        letter-spacing: 0;
    }
    /* P2: top-bar移动端隐藏邮箱，只保留电话 */
    .top-bar .top-email {
        display: none;
    }
    .top-bar .container {
        justify-content: center;
    }
    .top-bar {
        font-size: 12px;
        line-height: 30px;
    }
    /* P3: 导航栏高度适配移动端 */
    .main-header .container {
        height: 60px;
    }
    /* 悬浮按钮在移动端缩小 */
    .floating-contact a {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
    /* 分页在移动端适配 */
    .pagination a,
    .pagination span {
        padding: 6px 10px;
        font-size: 13px;
    }
    /* 页面banner标题在移动端字号 */
    .page-banner h2 {
        font-size: 20px;
    }
}

/* P3: 超小屏(480px以下)额外补丁 */
@media (max-width: 480px) {
    .logo h1 {
        font-size: 14px;
    }
    .logo h1 small {
        display: none;
    }
    .service-targets .grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .service-card {
        padding: 15px 10px;
    }
    .service-card .icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    .pagination a,
    .pagination span {
        padding: 5px 8px;
        font-size: 12px;
    }
}
