/**
 * 爱减肥 - 内容页公共样式（列表页 / 文章页 / 首页新板块 / 导航下拉）
 * 网站: aijianfei.cc  版本: 2.0
 */

/* ==================== 导航栏下拉菜单 ==================== */
.nav-drop { position: relative; }
.nav-drop > a { cursor: pointer; }
.drop-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.14);
    padding: 8px;
    list-style: none;
    min-width: 160px;
    z-index: 1001;
}
.drop-menu::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 28px;
    width: 12px;
    height: 12px;
    background: #fff;
    transform: rotate(45deg);
    border-radius: 2px;
}
.drop-menu a {
    display: block;
    padding: 10px 14px !important;
    border-radius: 10px !important;
    font-size: 14px !important;
    color: #2d3436;
    white-space: nowrap;
}
.drop-menu a:hover { background: #fff5f5; color: #ff6b6b; }
@media (min-width: 769px) {
    .nav-drop:hover .drop-menu, .nav-drop:focus-within .drop-menu { display: block; }
}

/* ==================== 通用宽容器 ==================== */
.container-wide { max-width: 1100px; margin: 0 auto; padding: 20px; }
.container-md { max-width: 900px; margin: 0 auto; padding: 20px; }

/* ==================== 面包屑 ==================== */
.breadcrumb-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 13px;
    color: #999;
    margin-bottom: 18px;
}
.breadcrumb-bar a { color: #888; text-decoration: none; }
.breadcrumb-bar a:hover { color: #667eea; }
.breadcrumb-bar .sep { color: #ccc; }
.breadcrumb-bar .current { color: #555; }

/* ==================== 列表页头 ==================== */
.list-hero {
    background: #fff;
    border-radius: 20px;
    padding: 36px 34px;
    margin-bottom: 28px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}
.list-hero .lh-emoji {
    position: absolute;
    right: 18px;
    top: -14px;
    font-size: 110px;
    opacity: 0.12;
    transform: rotate(12deg);
}
.list-hero h1 { font-size: 30px; color: #2d3436; margin-bottom: 10px; }
.list-hero p { color: #666; font-size: 15px; line-height: 1.8; max-width: 720px; }
.list-hero .lh-meta { margin-top: 14px; display: flex; gap: 10px; flex-wrap: wrap; }
.lh-chip {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 13px;
    padding: 5px 14px;
    border-radius: 20px;
}

/* ==================== 栏目快捷切换 ==================== */
.cat-chip-row {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 28px;
}
.cat-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #fff;
    border: 1px solid #e6e8f0;
    color: #555;
    border-radius: 22px;
    padding: 8px 16px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.25s ease;
}
.cat-chip:hover, .cat-chip.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

/* ==================== 文章卡片（首页/列表页通用） ==================== */
.article-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 22px;
    margin-bottom: 30px;
}
.a-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.07);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.a-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.13);
}
.a-banner {
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 52px;
    position: relative;
}
.a-banner .a-cat-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(255, 255, 255, 0.92);
    color: #555;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 14px;
    font-weight: 600;
}
.a-body { padding: 18px 18px 16px; display: flex; flex-direction: column; flex: 1; }
.a-title {
    font-size: 16px;
    font-weight: 700;
    color: #2d3436;
    line-height: 1.45;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.a-desc {
    font-size: 13px;
    color: #888;
    line-height: 1.6;
    margin-bottom: 14px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}
.a-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #aaa;
    border-top: 1px dashed #eee;
    padding-top: 10px;
}
.a-foot .a-more { color: #667eea; font-weight: 600; }

/* ==================== 列表页置顶大卡 ==================== */
.featured-card {
    display: flex;
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.09);
    text-decoration: none;
    color: inherit;
    margin-bottom: 30px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.featured-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.14);
}
.featured-card .f-banner {
    width: 260px;
    min-height: 190px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 72px;
    flex-shrink: 0;
}
.featured-card .f-body { padding: 24px 26px; display: flex; flex-direction: column; justify-content: center; }
.featured-card .f-flag {
    display: inline-block;
    width: fit-content;
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: #fff;
    font-size: 12px;
    padding: 4px 12px;
    border-radius: 14px;
    margin-bottom: 10px;
}
.featured-card .f-title { font-size: 21px; font-weight: 700; color: #2d3436; margin-bottom: 10px; line-height: 1.4; }
.featured-card .f-desc { font-size: 14px; color: #777; line-height: 1.7; margin-bottom: 12px; }
.featured-card .a-foot { border-top: none; padding-top: 0; }

/* ==================== 分节标题 ==================== */
.block-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 10px 0 20px;
}
.block-title h2 { font-size: 24px; color: #2d3436; }
.block-title h2 .t-emoji { margin-right: 8px; }
.block-title .t-more { font-size: 14px; color: #667eea; text-decoration: none; font-weight: 600; }
.block-title .t-more:hover { text-decoration: underline; }

/* ==================== 文章页 ==================== */
.article-head { margin-bottom: 24px; }
.article-head .ah-cat {
    display: inline-block;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    font-size: 13px;
    padding: 5px 14px;
    border-radius: 16px;
    margin-bottom: 14px;
    text-decoration: none;
}
.article-head .ah-cat:hover { opacity: 0.88; }
.article-head h1 { font-size: 28px; line-height: 1.45; color: #2d3436; margin-bottom: 14px; }
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 13px;
    color: #999;
    align-items: center;
}
.article-meta span { display: inline-flex; align-items: center; gap: 5px; }

/* 文章摘要 */
.article-abstract {
    background: linear-gradient(135deg, #f5f7ff, #fdf5ff);
    border-left: 4px solid #667eea;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 22px;
    color: #555;
    font-size: 15px;
    line-height: 1.8;
}
.article-abstract strong { color: #2d3436; }

/* 目录 */
.toc-box {
    background: #fff;
    border-radius: 14px;
    padding: 20px 22px;
    margin-bottom: 26px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}
.toc-box .toc-title { font-size: 15px; font-weight: 700; color: #2d3436; margin-bottom: 10px; }
.toc-box ol { margin: 0; padding-left: 20px; }
.toc-box li { margin: 6px 0; font-size: 14px; }
.toc-box a { color: #555; text-decoration: none; }
.toc-box a:hover { color: #667eea; }

/* 正文排版 */
.article-body {
    background: #fff;
    border-radius: 18px;
    padding: 34px 36px;
    box-shadow: 0 8px 26px rgba(0, 0, 0, 0.07);
    font-size: 16px;
    color: #444;
    line-height: 1.9;
}
.article-body h2 {
    font-size: 21px;
    color: #2d3436;
    margin: 34px 0 16px;
    padding-left: 14px;
    border-left: 4px solid #667eea;
    line-height: 1.5;
}
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { font-size: 17px; color: #2d3436; margin: 24px 0 12px; }
.article-body p { margin-bottom: 14px; }
.article-body strong { color: #2d3436; }
.article-body ul, .article-body ol { margin: 0 0 16px; padding-left: 24px; }
.article-body li { margin-bottom: 8px; }
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0 22px;
    font-size: 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: hidden;
}
.article-body th {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    padding: 11px 12px;
    text-align: left;
    font-weight: 600;
    white-space: nowrap;
}
.article-body td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; color: #555; }
.article-body tr:nth-child(even) td { background: #fafbfd; }
.article-body tr:last-child td { border-bottom: none; }

/* 提示/警告框 */
.tip-box {
    background: linear-gradient(135deg, #f0fff4, #fff);
    border-left: 4px solid #4ecdc4;
    border-radius: 10px;
    padding: 16px 18px;
    margin: 18px 0;
}
.tip-box p { margin: 0; color: #44634f; }
.tip-box p + p { margin-top: 8px; }
.warning-box {
    background: linear-gradient(135deg, #fff5f5, #fff);
    border-left: 4px solid #ff6b6b;
    border-radius: 10px;
    padding: 16px 18px;
    margin: 18px 0;
}
.warning-box p { margin: 0; color: #6b4a4a; }
.warning-box p + p { margin-top: 8px; }

/* 数据卡片 / 公式 / FAQ */
.data-card {
    background: #f8f9fb;
    border: 1px solid #eef0f5;
    border-radius: 12px;
    padding: 18px 20px;
    margin: 18px 0;
}
.data-card h4 { font-size: 15px; color: #2d3436; margin-bottom: 8px; }
.data-card p { margin: 0 0 8px; font-size: 15px; }
.data-card p:last-child { margin-bottom: 0; }
.data-card ul { margin-bottom: 0; }
.formula {
    background: linear-gradient(135deg, #f5f7ff, #fdf5ff);
    border-radius: 12px;
    text-align: center;
    font-weight: 700;
    color: #4a5580;
    padding: 18px 16px;
    margin: 18px 0;
    font-size: 15px;
    letter-spacing: 0.5px;
}
.faq-item {
    background: #fff;
    border: 1px solid #eef0f5;
    border-radius: 12px;
    padding: 16px 18px;
    margin: 14px 0;
}
.faq-item h4 { font-size: 15px; color: #2d3436; margin-bottom: 8px; }
.faq-item h4::before { content: "Q "; color: #667eea; font-weight: 800; }
.faq-item p { margin: 0; font-size: 15px; }

/* 标签行 */
.tag-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 24px 0; align-items: center; }
.tag-row .tr-label { font-size: 13px; color: #999; }
.tag-row a {
    background: #fff;
    border: 1px solid #e6e8f0;
    color: #777;
    font-size: 13px;
    padding: 5px 14px;
    border-radius: 16px;
    text-decoration: none;
}
.tag-row a:hover { background: #667eea; color: #fff; border-color: #667eea; }

/* 上下篇导航 */
.article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 26px 0; }
.article-nav a {
    background: #fff;
    border-radius: 14px;
    padding: 16px 18px;
    text-decoration: none;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    overflow: hidden;
}
.article-nav a:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1); }
.article-nav .nav-label { font-size: 12px; color: #aaa; margin-bottom: 6px; }
.article-nav .nav-title { font-size: 14px; font-weight: 600; color: #2d3436; line-height: 1.5; }
.article-nav .an-next { text-align: right; }
.article-nav .an-empty { visibility: hidden; }

/* 相关阅读 */
.related-section { margin: 10px 0 30px; }

/* 文末 CTA */
.article-cta {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 18px;
    padding: 34px 28px;
    text-align: center;
    color: #fff;
    margin: 26px 0 30px;
}
.article-cta h3 { font-size: 22px; margin-bottom: 10px; }
.article-cta p { opacity: 0.92; font-size: 15px; margin-bottom: 20px; }
.article-cta a {
    display: inline-block;
    background: #fff;
    color: #667eea;
    padding: 13px 36px;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.2s ease;
}
.article-cta a:hover { transform: translateY(-3px); }

/* ==================== 首页板块 ==================== */
.home-cat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.hc-card {
    background: #fff;
    border-radius: 16px;
    padding: 24px 18px;
    text-align: center;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    position: relative;
}
.hc-card:hover { transform: translateY(-5px); box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12); }
.hc-icon {
    width: 62px;
    height: 62px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin: 0 auto 12px;
}
.hc-name { font-size: 16px; font-weight: 700; color: #2d3436; margin-bottom: 6px; }
.hc-desc { font-size: 12px; color: #999; line-height: 1.55; }
.hc-count {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    color: #b6b9c6;
    background: #f5f6fa;
    border-radius: 12px;
    padding: 2px 9px;
}

/* 手册推广条 */
.handbook-band {
    display: flex;
    align-items: center;
    gap: 26px;
    background: #fff;
    border-radius: 20px;
    padding: 30px 34px;
    margin: 34px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-decoration: none;
    color: inherit;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.handbook-band:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.13); }
.hb-emoji {
    width: 92px;
    height: 92px;
    flex-shrink: 0;
    border-radius: 22px;
    background: linear-gradient(135deg, #e3f2fd, #ede7f6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 46px;
}
.handbook-band h3 { font-size: 21px; color: #2d3436; margin-bottom: 8px; }
.handbook-band p { color: #777; font-size: 14px; line-height: 1.7; }
.hb-chapters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.hb-chapters span {
    font-size: 12px;
    color: #667eea;
    background: #f0f2ff;
    border-radius: 12px;
    padding: 4px 12px;
}

/* ==================== 网站地图页 ==================== */
.map-group { background: #fff; border-radius: 16px; padding: 24px 26px; margin-bottom: 22px; box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06); }
.map-group h2 { font-size: 19px; color: #2d3436; margin-bottom: 14px; }
.map-group h2 a { color: inherit; text-decoration: none; }
.map-group h2 a:hover { color: #667eea; }
.map-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px 18px; }
.map-links a { font-size: 14px; color: #555; text-decoration: none; padding: 5px 0; }
.map-links a:hover { color: #667eea; }

/* ==================== 404 ==================== */
.nf-wrap { text-align: center; padding: 80px 20px; }
.nf-code { font-size: 90px; font-weight: 800; background: linear-gradient(135deg, #667eea, #764ba2); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nf-wrap h1 { font-size: 24px; margin: 14px 0 10px; color: #2d3436; }
.nf-wrap p { color: #888; margin-bottom: 26px; }

/* ==================== 响应式 ==================== */
@media (max-width: 1024px) {
    .article-grid { grid-template-columns: repeat(2, 1fr); }
    .home-cat-grid { grid-template-columns: repeat(3, 1fr); }
    .map-links { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .nav-links.show .drop-menu {
        display: block;
        position: static;
        box-shadow: none;
        padding: 0 0 6px 16px;
        min-width: 0;
    }
    .nav-links.show .drop-menu::before { display: none; }
    .nav-links.show .drop-menu a { padding: 11px 14px !important; color: #666; }
    .nav-links.show .drop-menu li:last-child a { border-bottom: none; }
    .article-grid { grid-template-columns: 1fr; }
    .home-cat-grid { grid-template-columns: repeat(2, 1fr); }
    .featured-card { flex-direction: column; }
    .featured-card .f-banner { width: 100%; min-height: 150px; }
    .list-hero { padding: 26px 22px; }
    .list-hero h1 { font-size: 24px; }
    .article-body { padding: 24px 20px; font-size: 15px; }
    .article-body table { font-size: 13px; display: block; overflow-x: auto; }
    .article-nav { grid-template-columns: 1fr; }
    .article-nav .an-next { text-align: left; }
    .article-head h1 { font-size: 22px; }
    .handbook-band { flex-direction: column; text-align: center; padding: 26px 20px; }
    .map-links { grid-template-columns: 1fr; }
    .block-title h2 { font-size: 20px; }
}
