.slideshow {
    height: 400px;
    object-fit: cover;
    object-position: center;
}

/* 移动端幻灯片 - 减小高度，图片居中显示文字区域 */
@media (max-width: 768px) {
    .slideshow {
        height: 220px;
    }
}

/* 导航下拉菜单样式 */
.navbar-nav .dropdown-menu {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border-radius: 4px;
    padding: 8px 0;
    min-width: 160px;
    margin-top: 0;
}

.navbar-nav .dropdown-item {
    padding: 8px 20px;
    color: #333;
    font-size: 14px;
    transition: all 0.3s ease;
}

.navbar-nav .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #007bff;
    padding-left: 25px;
}

.navbar-nav .dropdown-item.active {
    background-color: #007bff;
    color: #fff;
}

/* 桌面端hover显示下拉菜单 */
@media (min-width: 992px) {
    .navbar-nav .dropdown:hover .dropdown-menu {
        display: block;
    }
    
    .navbar-nav .dropdown-menu {
        display: none;
        animation: fadeIn 0.3s ease;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 移动端下拉菜单样式 */
@media (max-width: 991px) {
    .navbar-nav .dropdown-menu {
        border: none;
        box-shadow: none;
        background-color: #f8f9fa;
        margin-top: 0;
    }
    
    .navbar-nav .dropdown-item {
        padding: 10px 30px;
    }
    
    .navbar-nav .dropdown-item:hover {
        background-color: #e9ecef;
        padding-left: 35px;
    }
}

/* 内容区域表格样式 - 所有页面通用 */
.content table {
    border-collapse: collapse;
    width: 100% !important;
    margin-bottom: 15px;
}

.content table td,
.content table th {
    border: 1px solid #ddd;
    padding: 8px 12px;
    text-align: left;
    vertical-align: top;
}

.content table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.content table tr:nth-child(even) {
    background-color: #fafafa;
}

.content table tr:hover {
    background-color: #f0f0f0;
}

/* 头部大屏背景图高度 */
.jumbotron {
    min-height: 320px;
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem !important;
}

/* ========== 侧边栏样式 ========== */
.sidebar .card {
    border: 1px solid #e8e8e8;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    margin-bottom: 20px;
    overflow: hidden;
}

.sidebar .card-header {
    background-color: #fff;
    border-bottom: 1px solid #e8e8e8;
    padding: 14px 16px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.sidebar .card-header i {
    color: #17a2b8;
    margin-right: 6px;
}

.sidebar .list-group-item {
    border: none;
    border-bottom: 1px solid #f5f5f5;
    padding: 10px 16px;
    font-size: 14px;
    color: #555;
    transition: all 0.3s ease;
}

.sidebar .list-group-item:last-child {
    border-bottom: none;
}

.sidebar .list-group-item:hover {
    background-color: #f8f9fa;
    color: #17a2b8;
    padding-left: 22px;
}

.sidebar .list-group-item.active {
    background-color: #f0fbfc;
    border-left: 3px solid #17a2b8;
    color: #17a2b8;
    font-weight: 600;
}

.sidebar .list-group-item .badge {
    background-color: #17a2b8;
    color: #fff;
    font-weight: 400;
    font-size: 12px;
}

.sidebar .list-group-item .text-muted {
    font-size: 12px;
    color: #999 !important;
}

/* 标签云样式 */
.sidebar .tag-cloud {
    padding: 16px;
}

.sidebar .tag-cloud a {
    display: inline-block;
    padding: 4px 12px;
    margin: 3px 4px;
    background-color: #f8f9fa;
    color: #666;
    border: 1px solid #eee;
    border-radius: 3px;
    font-size: 13px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.sidebar .tag-cloud a:hover {
    background-color: #17a2b8;
    border-color: #17a2b8;
    color: #fff;
}

/* 联系我们图标 */
.sidebar .contact-info .list-group-item i {
    color: #17a2b8;
    width: 20px;
    margin-right: 6px;
}

/* 热门文章排名数字 */
.sidebar .rank-num {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background-color: #e8e8e8;
    color: #888;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 600;
    margin-right: 8px;
    flex-shrink: 0;
}

.sidebar .rank-num.top-1 {
    background-color: #f56c6c;
    color: #fff;
}

.sidebar .rank-num.top-2 {
    background-color: #e6a23c;
    color: #fff;
}

.sidebar .rank-num.top-3 {
    background-color: #409eff;
    color: #fff;
}

/* 移动端侧边栏隐藏 */
@media (max-width: 767px) {
    .sidebar {
        margin-top: 30px;
    }
}

/* 侧边栏桌面端固定跟随滚动 (仅 lg 及以上) */
@media (min-width: 992px) {
    .pages > .row > .col-lg-3 {
        position: sticky;
        top: 85px;
        align-self: flex-start;
        height: fit-content;
    }
}

/* ========== 主内容区卡片通用美化 ========== */
body {
    background-color: #f5f7fa;
}

/* 内容容器与页面背景区分（内容区白底，页面背景浅灰） */
.container.pages {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    padding-top: 20px;
    padding-bottom: 20px;
    margin-top: 20px;
    margin-bottom: 16px;
}

/* 底部评论框 - 与内容容器统一风格 */
.container.pages-comment {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    padding: 20px 20px 10px;
    margin-top: 0;
    margin-bottom: 20px;
}

.pages > .row > [class*="col-"] > .bg-white {
    border: 1px solid #f0f0f0;
    transition: box-shadow 0.3s ease;
}

.pages > .row > [class*="col-"] > .bg-white:hover {
    box-shadow: 0 2px 12px rgba(0,0,0,0.08) !important;
}

/* ========== 微网站模板 - 白色苹果iPhone手机框架 ========== */

/* 手机框架容器 - 每行4列 */
.phone-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px 30px;
    padding: 30px 0;
}

.phone-item {
    width: calc(25% - 22px);
    min-width: 200px;
    max-width: 240px;
    margin: 0 auto;
    transition: transform 0.3s ease;
}

.phone-item:hover {
    transform: translateY(-8px);
}

/* 白色iPhone手机机身 */
.phone-frame {
    position: relative;
    width: 100%;
    max-width: 220px;
    margin: 0 auto;
    padding-bottom: 170%; /* 接近真实iPhone比例 375:812 ≈ 1:2.16 */
    background: #fff;
    border-radius: 32px;
    border: 4px solid #e0e0e0;
    box-shadow: 
        0 12px 32px rgba(0,0,0,0.15),
        0 4px 12px rgba(0,0,0,0.1);
    cursor: pointer;
    overflow: hidden;
}

/* 手机屏幕区域 */
.phone-screen {
    position: absolute;
    top: 6%;
    left: 5%;
    right: 5%;
    bottom: 10%;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
}

/* 屏幕壁纸/模板截图 */
.phone-wallpaper {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: top center;
    background-repeat: no-repeat;
    transition: transform 0.5s ease;
    position: relative;
}

.phone-item:hover .phone-wallpaper {
    transform: scale(1.03);
}

/* 顶部听筒（经典iPhone样式，无刘海） */
.phone-notch {
    position: absolute;
    top: 2%;
    left: 50%;
    transform: translateX(-50%);
    width: 20%;
    height: 6px;
    background: #d0d0d0;
    border-radius: 3px;
    z-index: 3;
}

/* 底部圆形Home键 */
.phone-home-btn {
    position: absolute;
    bottom: 3%;
    left: 50%;
    transform: translateX(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid #d0d0d0;
    background: #fff;
    z-index: 3;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

/* 悬停遮罩 */
.phone-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0);
    border-radius: 4px;
    transition: background 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-item:hover .phone-overlay {
    background: rgba(0,0,0,0.5);
}

/* 预览按钮 */
.phone-preview-btn {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.3s ease;
    padding: 8px 24px;
    background: #2f82ff;
    color: #fff;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    letter-spacing: 1px;
    box-shadow: 0 4px 15px rgba(47,130,255,0.4);
    z-index: 4;
    position: relative;
    border: none;
    cursor: pointer;
}

.phone-preview-btn:hover {
    background: #1a6ae0;
    color: #fff;
    text-decoration: none;
}

.phone-item:hover .phone-preview-btn {
    opacity: 1;
    transform: scale(1);
}

/* 手机下方标题 */
.phone-title {
    text-align: center;
    padding: 12px 5px 0;
    font-size: 13px;
    color: #333;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 手机下方标签 */
.phone-badge {
    display: inline-block;
    padding: 1px 8px;
    background: #ffc107;
    color: #333;
    border-radius: 3px;
    font-size: 11px;
    margin-right: 3px;
}

/* 响应式 - 小屏幕改为2列 */
@media (max-width: 768px) {
    .phone-item {
        width: calc(50% - 20px);
        min-width: 160px;
        max-width: 180px;
    }
    .phone-frame {
        border-radius: 22px;
        max-width: 160px;
    }
    .phone-home-btn {
        width: 28px;
        height: 28px;
    }
}

/* 响应式 - 极小屏幕保持2列 */
@media (max-width: 480px) {
    .phone-item {
        width: calc(50% - 10px);
        min-width: 140px;
        max-width: 160px;
    }
    .phone-frame {
        border-radius: 18px;
        max-width: 140px;
    }
    .phone-home-btn {
        width: 24px;
        height: 24px;
    }
    .phone-grid {
        justify-content: space-between;
        gap: 10px;
    }
}

/* 首页模板中心 - 固定图片尺寸 */
.bg-light .card-img-150 {
    height: 150px !important;
    overflow: hidden;
}

.bg-light .card-img-150 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

/* 手机端固定卡片高度保持一致 */
@media (max-width: 576px) {
    .bg-light .card-img-150 {
        height: 120px !important;
    }
    .bg-light .card-title {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .bg-light .card-text {
        font-size: 12px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* 模板中心页面 - 标准/自适应模板固定图片尺寸 */
.pages #cardMode .card-img-150 {
    height: 150px !important;
    overflow: hidden;
}

.pages #cardMode .card-img-150 img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

/* 模板中心手机端样式 */
@media (max-width: 576px) {
    .pages #cardMode .card-img-150 {
        height: 120px !important;
    }
    .pages #cardMode .card-title {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .pages #cardMode .card-text {
        font-size: 12px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .pages #cardMode .card-body {
        padding: 8px;
    }
}

/* ========== 新闻详情页 - 微信公众号文章风格样式（只改样式，不改布局） ========== */

/* 文章正文区域 */
.pages .content {
    font-size: 16px;
    color: #3f3f3f;
    line-height: 1.8;
    letter-spacing: 0.5px;
}

/* 段落间距 */
.pages .content p {
    margin: 0 0 16px 0;
    text-align: justify;
}

/* 图片样式 - 圆角 + 阴影 */
.pages .content img {
    display: block;
    max-width: 100% !important;
    height: auto !important;
    margin: 20px auto;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* 标题样式 */
.pages .content h1,
.pages .content h2,
.pages .content h3,
.pages .content h4 {
    font-weight: bold;
    color: #222;
    margin: 24px 0 12px 0;
    line-height: 1.4;
}

.pages .content h2 { font-size: 19px; }
.pages .content h3 { font-size: 18px; }
.pages .content h4 { font-size: 17px; }

/* 引用块 */
.pages .content blockquote {
    margin: 16px 0;
    padding: 12px 16px;
    background: #f7f7f7;
    border-left: 4px solid #07c160;
    color: #666;
    font-size: 15px;
    line-height: 1.7;
    border-radius: 0 4px 4px 0;
}

/* 列表样式 */
.pages .content ul,
.pages .content ol {
    margin: 12px 0;
    padding-left: 24px;
}

.pages .content li {
    margin: 6px 0;
    line-height: 1.7;
    color: #3f3f3f;
}

/* 链接样式 */
.pages .content a {
    color: #407fe1;
    text-decoration: none;
    border-bottom: 1px solid rgba(64,127,225,0.3);
}

.pages .content a:hover {
    border-bottom-color: #407fe1;
}

/* 粗体 */
.pages .content strong,
.pages .content b {
    color: #222;
}

/* 代码样式 */
.pages .content code {
    font-size: 14px;
    background: #f5f5f5;
    padding: 2px 6px;
    border-radius: 3px;
    color: #c7254e;
}

/* 表格样式 */
.pages .content table {
    width: 100% !important;
    margin: 16px 0;
    border-collapse: collapse;
    font-size: 14px;
}

.pages .content table th,
.pages .content table td {
    border: 1px solid #e8e8e8;
    padding: 8px 12px;
    text-align: left;
}

.pages .content table th {
    background: #f8f8f8;
    font-weight: bold;
    color: #333;
}

/* 分隔线 */
.pages .content hr {
    border: none;
    border-top: 1px solid #eee;
    margin: 24px 0;
}

/* 手机端响应式 */
@media (max-width: 576px) {
    .pages .content {
        font-size: 15px;
        line-height: 1.75;
    }
}

/* ========== 首页公司简介 - 业务卡片 ========== */
.about-card {
    background: #fff;
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    height: 100%;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.about-card-icon {
    width: 64px;
    height: 64px;
    line-height: 64px;
    border-radius: 16px;
    background: linear-gradient(135deg, #e8f4ff, #f0f8ff);
    margin: 0 auto 15px;
    font-size: 28px;
}

.about-card-title {
    font-size: 17px;
    font-weight: bold;
    color: #222;
    margin-bottom: 8px;
}

.about-card-desc {
    font-size: 13px;
    color: #888;
    line-height: 1.6;
    margin: 0;
}

/* 手机端响应式 */
@media (max-width: 576px) {
    .about-card {
        padding: 18px 10px;
    }
    .about-card-icon {
        width: 52px;
        height: 52px;
        line-height: 52px;
        font-size: 22px;
    }
    .about-card-title {
        font-size: 15px;
    }
    .about-card-desc {
        font-size: 12px;
    }
}

/* ========== 模板中心 - 手机端分类横向滑动 ========== */
@media (max-width: 768px) {
    .pages .my-3 .col-sm-10 {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        display: flex;
        flex-wrap: nowrap;
        gap: 3px;
        padding-bottom: 8px;
        scrollbar-width: none; /* Firefox隐藏滚动条 */
    }
    .pages .my-3 .col-sm-10::-webkit-scrollbar {
        display: none; /* Chrome/Safari隐藏滚动条 */
    }
    .pages .my-3 .col-sm-10 .btn {
        flex-shrink: 0;
        font-size: 13px;
        padding: 4px 10px;
        white-space: nowrap;
        margin-bottom: 0 !important;
    }
    .pages .my-3 .col-sm-10 .fenlei-group {
        display: flex;
        flex-wrap: nowrap;
        gap: 3px;
    }
    
    /* 类型标签左对齐 */
    .pages .my-3 .col-sm-2,
    .pages .my-3 .col-md-1 {
        font-size: 13px;
        padding-top: 6px;
        flex-shrink: 0;
        width: auto !important;
        padding-right: 8px;
    }
}

/* ========== 文章目录 ========== */
.article-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.article-toc {
    display: none;
    width: 200px;
    flex-shrink: 0;
    position: sticky;
    top: 85px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    padding: 12px 0;
}

.article-toc.has-toc {
    display: block;
}

.article-toc .toc-title {
    font-size: 14px;
    font-weight: bold;
    color: #333;
    padding-bottom: 8px;
    margin-bottom: 8px;
    border-bottom: 2px solid #07c160;
}

.article-toc ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.article-toc li {
    margin: 0;
}

.article-toc a {
    display: block;
    padding: 4px 8px;
    font-size: 13px;
    color: #666;
    text-decoration: none;
    border-left: 3px solid transparent;
    border-radius: 3px;
    transition: all 0.2s;
    line-height: 1.6;
}

.article-toc a:hover,
.article-toc a.active {
    color: #07c160;
    border-left-color: #07c160;
    background: #f0faf4;
}

.article-toc .toc-h2 {
    padding-left: 8px;
}

.article-toc .toc-h3 {
    padding-left: 24px;
    font-size: 12px;
}

.article-main {
    flex: 1;
    min-width: 0;
}

/* 文章标题锚点偏移（避免固定导航遮挡） */
.article-body h2,
.article-body h3 {
    scroll-margin-top: 85px;
}

/* 移动端目录 - 显示在日期分割线下 */
.article-toc-mobile {
    display: none;
}

@media (max-width: 991px) {
    .article-layout {
        flex-direction: column;
    }
    .article-toc {
        display: none !important;
    }
    .article-toc-mobile {
        display: block;
        margin-bottom: 16px;
        background: #f8fafb;
        border: 1px solid #e8edf0;
        border-radius: 8px;
        padding: 12px 16px;
    }
    .article-toc-mobile .toc-title {
        font-size: 15px;
        font-weight: bold;
        color: #333;
        padding-bottom: 8px;
        margin-bottom: 8px;
        border-bottom: 2px solid #07c160;
    }
    .article-toc-mobile ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }
    .article-toc-mobile li {
        margin: 0;
    }
    .article-toc-mobile a {
        display: block;
        padding: 5px 10px;
        font-size: 14px;
        color: #555;
        text-decoration: none;
        border-left: 3px solid transparent;
        border-radius: 3px;
        transition: all 0.2s;
        line-height: 1.6;
    }
    .article-toc-mobile a:hover,
    .article-toc-mobile a.active {
        color: #07c160;
        border-left-color: #07c160;
        background: #f0faf4;
    }
    .article-toc-mobile .toc-h2 {
        padding-left: 10px;
    }
    .article-toc-mobile .toc-h3 {
        padding-left: 26px;
        font-size: 13px;
    }
}
