/* sdshfmy.com 波尔山羊养殖网 主题样式（Bootstrap 5 补充） */
:root {
  --brand: #1b7a3d;        /* 主色 深绿 */
  --brand-dark: #125a2c;   /* 深绿加深 */
  --brand-light: #e8f5ec;  /* 浅绿底 */
  --brand-soft: #2e9e52;   /* 亮绿 */
  --bg-soft: #f4f7f5;      /* 页面浅底 */
  --text-main: #333;
  --text-sub: #888;
  --line: #e5e9e6;
  --bs-primary: var(--brand);
  --bs-primary-rgb: 27, 122, 61;
  --bs-link-color: var(--brand);
  --bs-link-hover-color: var(--brand-dark);
}
html { scroll-behavior: smooth; }
body { font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif; background: var(--bg-soft); color: var(--text-main); }

/* ===== 顶栏 ===== */
.topbar { background: var(--brand-dark); color: #cfe8d8; font-size: .85rem; }
.topbar a { color: #cfe8d8; text-decoration: none; }
.topbar a:hover { color: #fff; }

/* ===== 头部 ===== */
.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.site-logo img { max-height: 56px; width: auto; }
.site-logo h1, .site-logo { margin: 0; font-size: 1.5rem; font-weight: 700; }
.search-form .form-control { border-radius: .375rem 0 0 .375rem; }
.search-form .btn { border-radius: 0 .375rem .375rem 0; }

/* ===== 导航 ===== */
.main-nav { background: var(--brand); }
.main-nav .navbar-nav .nav-link { color: #fff; padding: .55rem .9rem; font-size: .92rem; }
.main-nav .navbar-nav .nav-link:hover, .main-nav .navbar-nav .nav-link.active { background: var(--brand-dark); }
.main-nav .dropdown-menu { border: 0; box-shadow: 0 .3rem .8rem rgba(0,0,0,.12); border-radius: .375rem; }
.main-nav .dropdown-item { font-size: .88rem; padding: .4rem .9rem; }
.main-nav .dropdown-item:hover { background: var(--brand-light); color: var(--brand-dark); }
/* 桌面 hover 展开下拉（不依赖 JS） */
@media (min-width: 992px) {
  .main-nav .dropdown:hover > .dropdown-menu { display: block; margin-top: 0; }
}

/* ===== 页头横幅（列表/内容页标题区）===== */
.page-head { background: linear-gradient(135deg, var(--brand-light) 0%, #f0faf3 55%, #ffffff 100%); border-bottom: 1px solid var(--line); }
.page-head .page-title { color: var(--brand-dark); font-size: 1.35rem; font-weight: 700; margin: 0; }
.page-head .page-desc { color: var(--text-sub); font-size: .88rem; margin: .25rem 0 0; }

/* ===== 轮播 ===== */
.carousel-item img { object-fit: cover; }
.carousel-indicators [data-bs-target] { background-color: var(--brand); }

/* ===== 首页板块 ===== */
.home-card { background: #fff; border: 1px solid var(--line); border-radius: .65rem; overflow: hidden; box-shadow: 0 .125rem .5rem rgba(0,0,0,.04); transition: box-shadow .2s ease, transform .2s ease; }
.home-card:hover { box-shadow: 0 .5rem 1rem rgba(0,0,0,.08); transform: translateY(-2px); }
.home-card .card-header { background: linear-gradient(135deg, var(--brand), #2fa06a); border: 0; padding: .55rem .9rem; }
.sec-title { font-size: 1rem; font-weight: 700; color: #fff; margin: 0; }
.sec-title .icon { display: inline-block; width: .3rem; height: .95rem; background: rgba(255,255,255,.85); border-radius: .2rem; margin-right: .5rem; vertical-align: -1px; }
.more-link { color: rgba(255,255,255,.85); font-size: .78rem; text-decoration: none; white-space: nowrap; }
.more-link:hover { color: #fff; text-decoration: underline; }
.home-card .card-body { padding: .45rem .9rem .6rem; }
.home-news-list li { padding: .36rem 0; border-bottom: 1px dashed var(--line); }
.home-news-list li:last-child { border-bottom: 0; }
.home-news-list a { color: var(--text-main); text-decoration: none; font-size: .92rem; }
.home-news-list li:hover a { color: var(--brand); }
.home-news-list li::before { content: '\25B8'; color: var(--brand); margin-right: .4rem; font-size: .75rem; }
.home-news-list .date { color: var(--text-sub); font-size: .8rem; }
.feature-item img { width: 100%; height: 150px; object-fit: cover; border-radius: .375rem; }
.feature-item .ft-title { display: block; margin-top: .4rem; font-size: .9rem; color: var(--text-main); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feature-item .ft-title:hover { color: var(--brand); }

/* ===== 面包屑 ===== */
.crumb { background: #fff; border: 1px solid var(--line); border-radius: .375rem; font-size: .85rem; color: var(--text-sub); }
.crumb a { color: var(--text-sub); text-decoration: none; }
.crumb a:hover { color: var(--brand); }

/* ===== 列表页 ===== */
.article-item { background: #fff; border: 1px solid var(--line); border-radius: .375rem; transition: box-shadow .2s; }
.article-item:hover { box-shadow: 0 .25rem .6rem rgba(0,0,0,.06); }
.article-item .ai-thumb { width: 130px; height: 90px; object-fit: cover; border-radius: .25rem; }
.article-item h3 { font-size: 1rem; margin: 0 0 .25rem; }
.article-item h3 a { color: var(--text-main); text-decoration: none; }
.article-item h3 a:hover { color: var(--brand); }
.article-item .ai-desc { color: var(--text-sub); font-size: .85rem; margin: 0; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.article-item .ai-meta { color: var(--text-sub); font-size: .8rem; }

/* ===== 分页 ===== */
.pagination { gap: .25rem; }
.pagination .page-link { color: var(--brand); border: 1px solid var(--line); border-radius: .375rem; padding: .3rem .7rem; font-size: .9rem; background: #fff; }
.pagination .page-link:hover { color: #fff; background: var(--brand); border-color: var(--brand); }
.pagination .page-item.active .page-link { color: #fff; background: var(--brand); border-color: var(--brand); }
.pagebar a, .pagebar span { display: inline-block; min-width: 2.1rem; margin: 0 .15rem; padding: .3rem .7rem; border: 1px solid var(--line); border-radius: .375rem; color: var(--text-main); font-size: .9rem; text-align: center; text-decoration: none; background: #fff; transition: all .15s ease; }
.pagebar a:hover { color: #fff; background: var(--brand); border-color: var(--brand); }
.pagebar .page-num-current, .pagebar .active, .pagebar span { color: #fff; background: var(--brand); border-color: var(--brand); font-weight: 600; }

/* ===== 侧栏 ===== */
.side-card { background: #fff; border: 1px solid var(--line); border-radius: .5rem; overflow: hidden; }
.side-card .sc-head { background: var(--brand-light); padding: .55rem 1rem; }
.side-card .sc-head h3 { font-size: .98rem; font-weight: 700; color: var(--brand-dark); margin: 0; }
.side-card .sc-body { padding: .6rem .9rem; }
.side-list li { padding: .3rem 0; border-bottom: 1px dashed var(--line); font-size: .88rem; }
.side-list a { color: var(--text-main); text-decoration: none; }
.side-list a:hover { color: var(--brand); }

/* ===== 内容页 ===== */
.article-box { background: #fff; border: 1px solid var(--line); border-radius: .5rem; padding: 1.25rem; }
.article-box .article-title { font-size: 1.3rem; font-weight: 700; color: var(--text-main); margin-bottom: .6rem; }
.article-meta { color: var(--text-sub); font-size: .85rem; border-bottom: 1px solid var(--line); padding-bottom: .7rem; }
.article-content { font-size: .95rem; line-height: 1.9; color: #444; padding-top: .8rem; }
.article-content img { max-width: 100%; height: auto; }
.article-content h1, .article-content h2, .article-content h3 { color: var(--text-main); }
.article-content a { color: var(--brand); }
.article-pn { background: var(--brand-light); border-radius: .375rem; padding: .7rem 1rem; font-size: .88rem; }
.article-pn a { color: var(--text-main); text-decoration: none; }
.article-pn a:hover { color: var(--brand); }

/* ===== 相关推荐 ===== */
.relate-item img { width: 100%; height: 110px; object-fit: cover; border-radius: .375rem; }
.relate-item .rl-title { display: block; margin-top: .35rem; font-size: .85rem; color: var(--text-main); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.relate-item .rl-title:hover { color: var(--brand); }

/* ===== 页脚 ===== */
.site-footer { background: #173a24; color: #b9d4c3; font-size: .85rem; }
.site-footer a { color: #b9d4c3; text-decoration: none; }
.site-footer a:hover { color: #fff; }
.site-footer .f-title { color: #fff; font-size: .95rem; font-weight: 700; margin-bottom: .6rem; }
.site-footer .f-links li { margin-bottom: .3rem; }
.site-footer .f-line { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: .9rem; row-gap: .15rem; }
.site-footer .f-line .f-title { margin-bottom: 0; }
.site-footer .f-line span { color: #cfe0d5; font-weight: 600; }
.site-footer .f-copy { border-top: 1px solid rgba(255,255,255,.12); }

/* ===== 返回顶部 ===== */
.scroltop { position: fixed; right: 16px; bottom: 40px; z-index: 999; width: 40px; height: 40px; line-height: 40px; text-align: center; background: var(--brand); color: #fff; border-radius: .375rem; font-size: 1.1rem; text-decoration: none; box-shadow: 0 .2rem .5rem rgba(0,0,0,.25); }
.scroltop:hover { background: var(--brand-dark); color: #fff; }

/* ===== 移动端微调 ===== */
@media (max-width: 767.98px) {
  .site-logo img { max-height: 40px; }
  .article-item .ai-thumb { width: 100px; height: 70px; }
  .article-box { padding: .8rem; }
  .topbar .d-none-m { display: none; }
}

/* ===== 首页主标题 ===== */
.site-main-title { text-align: center; color: var(--brand-dark); font-size: 1.6rem; font-weight: 700; margin: 0; }


/* ===== 子栏目导航 ===== */
.sub-nav { margin: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.sub-nav::-webkit-scrollbar { display: none; }
.sub-nav-link { flex-shrink: 0; display: inline-block; padding: .3rem .95rem; border: 1px solid var(--line); border-radius: 2rem; font-size: .9rem; color: var(--text-main); text-decoration: none; background: #fff; white-space: nowrap; transition: all .15s ease; }
.sub-nav-link:hover { color: #fff; background: var(--brand); border-color: var(--brand); }
.sub-nav-link.active { color: #fff; background: var(--brand); border-color: var(--brand); font-weight: 600; }


/* ===== 版面间隔：网站介绍 ===== */
.home-intro { background: linear-gradient(135deg, var(--brand-light), #f6fbf8); border: 1px solid var(--line); }
.home-intro .icon { display: inline-block; width: .3rem; height: 1rem; background: var(--brand); border-radius: .2rem; margin-right: .5rem; vertical-align: -1px; }
.intro-title { font-size: 1.05rem; font-weight: 700; color: var(--brand-dark); margin: 0 0 .35rem; }
.intro-desc { font-size: .95rem; color: var(--text-sub); line-height: 1.7; }


/* ===== 页脚链接横排 ===== */
.f-link { display: inline-block; padding: .25rem .7rem; border: 1px solid var(--line); border-radius: 2rem; font-size: .85rem; color: var(--text-sub); text-decoration: none; background: #fff; white-space: nowrap; transition: all .15s ease; }
.f-link:hover { color: var(--brand); border-color: var(--brand); }

/* ===== 移动端底部菜单（公众号式：一级等宽 + 上弹二级浮层） ===== */
.fnav-bar { background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -2px 8px rgba(0,0,0,.08); z-index: 1030; }
.fnav-main { display: flex; }
.fnav-item { flex: 1 1 0; display: flex; align-items: center; justify-content: center; gap: .15rem; padding: .85rem .15rem; font-size: .9rem; color: var(--text-main); text-decoration: none; background: none; border: 0; min-width: 0; }
.fnav-item.active { color: var(--brand); font-weight: 700; }
.fnav-arrow { width: .5rem; height: .5rem; border-left: 1px solid currentColor; border-top: 1px solid currentColor; transform: rotate(45deg); display: inline-block; flex-shrink: 0; }
.fnav-btn.active .fnav-arrow { transform: rotate(-135deg); }
.fnav-pop { position: fixed; left: 0; right: 0; bottom: 2.6rem; max-width: 640px; margin: 0 auto; background: #fff; border-radius: .75rem .75rem 0 0; box-shadow: 0 -6px 24px rgba(0,0,0,.12); padding: .4rem 0 .6rem; display: none; z-index: 1031; }
.fnav-pop.show { display: block; }
.fnav-sitem { display: block; padding: .8rem 1.5rem; font-size: .95rem; color: var(--text-main); text-decoration: none; border-bottom: 1px solid #f0f3f2; }
.fnav-sitem:last-child { border-bottom: 0; }
.fnav-sitem-top { color: var(--brand); font-weight: 700; }
.fnav-sitem:hover, .fnav-sitem.active { background: #f6fbf8; }
@media (max-width: 991.98px) {
  body { padding-bottom: 3.4rem; }
  .scroltop { bottom: 4rem; }
}
