@charset "utf-8";
/* ==========================================================================
   包头律师网 · 全站基础主题  theme.css
   --------------------------------------------------------------------------
   01 设计变量      02 重置与排版    03 容器与工具类   04 顶部工具条
   05 站头横幅      06 主导航        07 站内搜索       08 区块面板
   09 新闻列表      10 图片轮播      11 通用网格       12 页脚
   13 回到顶部      14 动效偏好
   注：本文件不含任何帝国 CMS 标签，栏目页/内容页可直接复用。
   ========================================================================== */

/* 01 设计变量 ============================================================== */
:root {
    /* 主色：律所常用深红 + 金 */
    --brand: #a4231f;
    --brand-600: #8a1c19;
    --brand-50: #fdf5f4;
    --gold: #c8a45c;

    --ink: #1f2328;
    --ink-2: #4a525c;
    --muted: #8a929c;
    --line: #e7eaee;
    --bg: #f4f5f7;
    --card: #ffffff;

    --radius: 12px;
    --radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
    --shadow: 0 12px 30px -18px rgba(16, 24, 40, .45);

    --gap: 16px;
    --wrap: 1180px;

    --font-sans: system-ui, -apple-system, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

/* 02 重置与排版 ============================================================ */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.7;
    color: var(--ink);
    background: var(--bg);
}

h1, h2, h3, h4, p, figure { margin: 0; }

img, video {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color .18s ease, background-color .18s ease;
}

a:hover { color: var(--brand); }

:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
    border-radius: 4px;
}

/* 03 容器与工具类 ========================================================== */
.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: 16px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 999;
    padding: 10px 18px;
    background: #fff;
    box-shadow: var(--shadow);
    border-radius: 0 0 var(--radius-sm) 0;
}

.skip-link:focus { left: 0; }

/* 04 顶部工具条 ============================================================ */
.site-util {
    /* 不再独立黑色，改为压在页头渐变上的淡淡一层，让工具条与大栏目连成一体 */
    background: rgba(0, 0, 0, .16);
    color: rgba(255, 255, 255, .78);
    font-size: 13px;
}

.site-util__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 18px;
    min-height: 38px;
    padding-block: 6px;
}

.site-util__slogan {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.site-util__clock {
    flex: 0 0 auto;
    color: rgba(255, 255, 255, .6);
    font-variant-numeric: tabular-nums;
}

/* 05 站头大栏目（纯 HTML + CSS 绘制，取代原来的 top_img.jpg 大图） ========== */
/* 渐变铺在整个页头（.site-header）上，大栏目只做内容容器：
   原来是"白底上浮着一张红卡片"，那圈白底跟红色一点不搭，上下还夹着深色工具条和红导航，
   三种颜色互相打架；现在工具条 + 大栏目共用一道通栏渐变，直接与下面的红导航接上 */
.site-header {
    position: relative;
    z-index: 0;
    background:
        radial-gradient(120% 96% at 84% 0%, rgba(200, 164, 92, .26) 0%, rgba(200, 164, 92, 0) 58%),
        linear-gradient(158deg, #6d1512 0%, #8f1c19 52%, #a4231f 100%);
}

.site-hero {
    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 18px 32px;
    padding: 26px 0 30px;
    overflow: hidden;
    color: #fff;
}

/* 底部山峦剪影：呼应原图的长城意象，纯 CSS、零图片。
   左右用 mask 淡出，避免在宽屏上出现生硬的截断 */
.site-hero::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 54px;
    background: linear-gradient(to top, rgba(255, 255, 255, .13), rgba(255, 255, 255, 0));
    clip-path: polygon(0 100%, 0 66%, 7% 50%, 15% 68%, 24% 42%, 33% 64%, 43% 36%,
        53% 62%, 63% 44%, 72% 66%, 82% 46%, 91% 62%, 100% 52%, 100% 100%);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 18%, #000 82%, transparent);
    pointer-events: none;
}

.site-hero__main {
    position: relative;
    z-index: 1;
    flex: 1 1 320px;
    min-width: 0;
}

/* 品牌口号：楷体 + 金色，不用图片也有"字"的分量 */
.site-hero__slogan {
    font-family: "STKaiti", "KaiTi", "Kaiti SC", "Songti SC", "STSong", serif;
    font-size: 30px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .16em;
    color: #f0d79a;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .3);
}

.site-hero__firm {
    margin-top: 10px;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: .06em;
}

.site-hero__firm a { color: #fff; }

.site-hero__lawyer {
    margin-top: 8px;
    font-size: 14px;
    color: rgba(255, 255, 255, .82);
}

.site-hero__lawyer span { margin-left: 10px; }

.site-hero__lawyer span::before {
    content: "·";
    margin-right: 10px;
    color: rgba(255, 255, 255, .45);
}

.site-hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.site-hero__tags span {
    padding: 4px 12px;
    font-size: 13px;
    color: #f4e3bd;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(240, 215, 154, .36);
    border-radius: 999px;
}

/* 右侧咨询卡 */
.site-hero__cta {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    padding: 16px 24px;
    text-align: center;
    background: rgba(0, 0, 0, .2);
    border: 1px solid rgba(240, 215, 154, .34);
    border-radius: var(--radius-sm);
}

.site-hero__cta-label {
    font-size: 13px;
    color: rgba(255, 255, 255, .72);
}

.site-hero__tel {
    display: block;
    margin-top: 4px;
    font-size: 26px;
    font-weight: 700;
    color: #f0d79a;
    letter-spacing: .02em;
    font-variant-numeric: tabular-nums;
}

.site-hero__tel:hover { color: #fff; }

.site-hero__cta-sub {
    margin-top: 4px;
    font-size: 12px;
    color: rgba(255, 255, 255, .62);
}

@media (max-width: 640px) {
    .site-hero { padding: 22px 20px; }

    .site-hero__slogan { font-size: 23px; }

    .site-hero__firm { font-size: 17px; }

    .site-hero__lawyer span { display: block; margin: 3px 0 0; }

    .site-hero__lawyer span::before { display: none; }

    /* 窄屏：咨询卡整行铺开，电话更好按 */
    .site-hero__cta {
        flex: 1 1 100%;
        padding: 12px 18px;
    }

    .site-hero__tel { font-size: 23px; }
}

/* 06 主导航 ================================================================ */
.site-nav {
    position: sticky;
    top: 0;
    z-index: 60;
    /* 与上面的大栏目直接相接，不留白缝 */
    margin-top: 0;
    background: var(--brand);
    background-image: linear-gradient(90deg, var(--brand) 0%, var(--brand-600) 100%);
    box-shadow: var(--shadow-sm);
}

.site-nav__inner {
    display: flex;
    align-items: center;
    /* 内容不足一行时整体居中，避免"首页"与菜单之间出现大段空白 */
    justify-content: center;
}

.site-nav__home {
    flex: 0 0 auto;
    padding-inline: 18px;
    line-height: 48px;
    font-weight: 700;
    color: #fff;
    background: rgba(0, 0, 0, .16);
}

.site-nav__links {
    /* 关键：用 0 1 auto。原来写 1 1 auto 会让菜单撑满整行，
       再叠加宽屏端的 text-align:right，菜单被推到最右侧，
       与"首页"之间拉开一大段空白（全屏时尤其明显） */
    flex: 0 1 auto;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    /* 灵动标签 [!--class.menu--] 以 &nbsp;|&nbsp; 分隔各项，这里把分隔符渲染成浅色竖线 */
    color: rgba(255, 255, 255, .26);
}

.site-nav__links::-webkit-scrollbar { display: none; }

.site-nav__links a {
    display: inline-block;
    padding-inline: 12px;
    line-height: 48px;
    font-size: 15px;
    color: rgba(255, 255, 255, .92);
    white-space: nowrap;
}

.site-nav__links a:hover,
.site-nav__links a:focus-visible,
.site-nav__home:hover {
    background: rgba(0, 0, 0, .18);
    color: #fff;
}

@media (min-width: 1000px) {
    .site-nav__links {
        overflow: visible;
        white-space: normal;
    }

    .site-nav__links a { padding-inline: 13px; }
}

/* 07 站内搜索 ============================================================== */
/* 搜索行改用页面底色，与下方内容区连成一片，不再是页头下面又一条纯白带 */
.site-search { background: var(--bg); }

.search-form {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    /* 限宽居中：原来输入框是 flex:1，会一路撑到 1180px 容器边缘，太长 */
    max-width: 560px;
    margin-inline: auto;
    padding-block: 12px;
}

.search-form__input,
.search-form__select,
.search-form__btn {
    height: 40px;
    font: inherit;
    font-size: 15px;
    border-radius: var(--radius-sm);
}

.search-form__input {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0 16px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    background: #fbfbfc;
}

.search-form__input::placeholder { color: var(--muted); }

.search-form__input:focus {
    outline: none;
    border-color: var(--brand);
    background: #fff;
    box-shadow: 0 0 0 3px var(--brand-50);
}

.search-form__select {
    flex: 0 0 auto;
    padding-inline: 10px;
    border: 1px solid var(--line);
    color: var(--ink-2);
    background: #fbfbfc;
    cursor: pointer;
}

.search-form__btn {
    flex: 0 0 auto;
    padding-inline: 24px;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-weight: 600;
    background: var(--brand);
    cursor: pointer;
}

.search-form__btn:hover { background: var(--brand-600); }

/* 08 区块面板 ============================================================== */
.page-main { padding-bottom: 8px; }

.page-main__inner {
    display: grid;
    gap: var(--gap);
    padding-block: var(--gap);
}

.panel {
    display: flex;
    flex-direction: column;
    padding: 16px;
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

@media (min-width: 700px) {
    .panel { padding: 18px 20px; }
}

.panel__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: 12px;
    margin-bottom: 4px;
    border-bottom: 1px solid var(--line);
}

.panel__title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
}

.panel__title::before {
    content: "";
    flex: 0 0 auto;
    width: 4px;
    height: 17px;
    border-radius: 2px;
    background: var(--brand);
}

.panel__title a:hover { color: var(--brand); }

.panel__more {
    flex: 0 0 auto;
    font-size: 13px;
    color: var(--muted);
}

.panel__more::after {
    content: "›";
    margin-left: 4px;
    font-size: 15px;
    line-height: 1;
}

/* 09 新闻列表 ============================================================== */
.news-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.news-list__item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 0;
    border-bottom: 1px dashed var(--line);
}

.news-list__item:last-child { border-bottom: 0; }

.news-list__item::before {
    content: "";
    flex: 0 0 auto;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gold);
}

.news-list__item > a {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.news-list__item:hover > a { color: var(--brand); }

.news-list__time {
    flex: 0 0 auto;
    font-size: 12px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}

.news-list--tight .news-list__item {
    padding: 7px 0;
    border-bottom-style: solid;
}

.news-list--tight .news-list__item:last-child { border-bottom-color: transparent; }

/* 09b 信息列表（"标签 + 内容"两列行，联系方式类，首页与列表页共用） ========= */
.info-list {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 15px;
    color: var(--ink-2);
}

.info-list li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px dashed var(--line);
}

.info-list li:last-child { border-bottom: 0; }

.info-list__label {
    flex: 0 0 auto;
    font-size: 13px;
    color: var(--muted);
}

.info-list a {
    color: var(--brand);
    font-weight: 600;
}

/* 09c 当前位置（面包屑，列表页与内容页共用） ============================== */
.crumbs {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 8px;
    padding: 10px 14px;
    font-size: 14px;
    color: var(--ink-2);
    background: var(--card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.crumbs::before {
    content: "";
    width: 4px;
    height: 14px;
    border-radius: 2px;
    background: var(--brand);
}

.crumbs a { color: var(--muted); }

.crumbs a:hover { color: var(--brand); }

/* 10 图片轮播 ============================================================== */
.slider {
    position: relative;
    overflow: hidden;
    /* 相框底色：源图比例不一致时，object-fit:contain 的留白由它兜底 */
    background: #2b2321;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.slider__viewport {
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.slider__viewport::-webkit-scrollbar { display: none; }

.slider__slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
}

.slider__slide img {
    width: 100%;
    aspect-ratio: 4 / 3;
    /* contain：整张图完整显示，绝不裁切。
       源图比例不一（750×450、7163×3575 等），多出的留白由深色相框底补上 */
    object-fit: contain;
}

.slider__btn {
    position: absolute;
    top: 50%;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin-top: -17px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: rgba(0, 0, 0, .38);
    cursor: pointer;
    opacity: .85;
}

.slider__btn::before {
    content: "";
    width: 8px;
    height: 8px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
}

.slider__btn:hover {
    background: rgba(0, 0, 0, .62);
    opacity: 1;
}

.slider__btn--prev { left: 10px; }

.slider__btn--prev::before { transform: rotate(45deg) translate(1px, -1px); }

.slider__btn--next { right: 10px; }

.slider__btn--next::before { transform: rotate(-135deg) translate(1px, -1px); }

.slider__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 10px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.slider__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .5);
    cursor: pointer;
    transition: width .2s ease, background-color .2s ease;
}

.slider__dot.is-active {
    width: 20px;
    border-radius: 999px;
    background: #fff;
}

/* 11 通用网格 ============================================================== */
.grid {
    display: grid;
    gap: var(--gap);
    grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 700px) {
    .grid--2,
    .grid--3,
    .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1000px) {
    .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* 12 页脚 ================================================================== */
.site-footer {
    margin-top: 24px;
    padding-block: 26px 30px;
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
    background: #2b2321;
}

.site-footer a { color: rgba(255, 255, 255, .88); }

.site-footer a:hover { color: #ffd9a0; }

.site-footer__inner {
    display: grid;
    gap: 8px;
    text-align: center;
}

.site-footer__contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 28px;
    color: #fff;
}

.site-footer__addr { color: rgba(255, 255, 255, .6); }

.site-footer__beian {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 6px 18px;
}

.site-footer__beian img {
    display: inline-block;
    vertical-align: -3px;
    margin-right: 5px;
}

.site-footer__copy {
    color: rgba(255, 255, 255, .5);
    font-size: 13px;
}

.site-footer__copy b { color: #fff; }

/* 13 回到顶部 ============================================================== */
.to-top {
    position: fixed;
    right: 16px;
    bottom: 24px;
    z-index: 80;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #fff;
    font-size: 20px;
    line-height: 1;
    background: var(--brand);
    box-shadow: var(--shadow);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .2s ease, transform .2s ease, visibility .2s ease;
}

.to-top::before { content: "↑"; }

.to-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: none;
}

.to-top:hover { background: var(--brand-600); }

/* 14 动效偏好 ============================================================== */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
    }

    .slider__viewport { scroll-behavior: auto; }
}
