/* =========================================================
   LA7788 全站公共样式
   引用顺序：common.css → header.css → float-buttons.css → 页面专属
   ========================================================= */


/* ---------------------------------------------------------
   1. Reset
   --------------------------------------------------------- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue',
    'PingFang SC', 'Microsoft YaHei', sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    line-height: 1.45;
    padding-bottom: 70px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}
.body {padding-bottom: 0}
img,
svg,
video,
canvas {
    display: block;
    max-width: 100%;
}

img {
    border-style: none;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

a {
    text-decoration: none;
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

a:active {
    opacity: 0.85;
}

ul,
ol {
    list-style: none;
}

h1, h2, h3, h4, h5, h6 {
    font-size: inherit;
    font-weight: inherit;
}


/* ---------------------------------------------------------
   2. 变量
   --------------------------------------------------------- */
:root {
    --bg-page: #FBF8F5;
    --bg-card: #FFFFFF;
    --bg-soft: #F5EFEA;

    --primary: #FE5353;
    --primary-light: #FFF2F0;
    --primary-soft: #FFD9D4;

    --text-main: #1F1F1F;
    --text-secondary: #6B6B6B;
    --text-muted: #A09C98;

    --border-light: #F0EAE4;

    --radius-card: 12px;
    --radius-sm: 8px;

    --shadow-card: 0 2px 12px rgba(254, 83, 83, 0.06);
    --shadow-float: 0 6px 18px rgba(254, 83, 83, 0.28);

    --container-max: 640px;
    --nav-height: 60px;
}


/* ---------------------------------------------------------
   3. 页面主容器
   --------------------------------------------------------- */
.app {
    max-width: var(--container-max);
    margin: 0 auto;
    background-color: var(--bg-page);
    position: relative;
    min-height: 100vh;   /* 回退 */
    min-height: 100dvh;  /* 动态视口高度，专门解决移动端/微信半屏问题 */
    padding: 0px;
    overflow-x: hidden;
}

.content-wrapper {
    padding: 0 14px;
}

@media (min-width: 600px) {
    .app {
        padding: 0;
    }
    .content-wrapper {
        padding: 0;
    }
}


/* ---------------------------------------------------------
   4. 通用卡片 & 图片
   --------------------------------------------------------- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-card);
}

.img-box {
    background: var(--bg-soft);
    overflow: hidden;
}

.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}


/* ---------------------------------------------------------
   5. 区块标题
   --------------------------------------------------------- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 14px 0 12px;
}

.section-title {
    font-size: 17px;
    font-weight: 700;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 6px;
}

.section-title i {
    font-size: 18px;
    color: var(--primary);
}

.more-link {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 3px;
    transition: color 0.2s;
}

.more-link:active {
    color: var(--primary);
}


/* ---------------------------------------------------------
   6. 标签（全站统一）
   --------------------------------------------------------- */
/* 胶囊型 */
.tag {
    display: inline-block;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 20px;
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 500;
    line-height: 1.5;
}

.tag.blue,
.tag-blue {
    background: #EAF1FB;
    color: #3A6DB5;
}

.tag.green,
.tag-green {
    background: #EAF7EF;
    color: #27ae60;
}

.tag.orange,
.tag-orange {
    background: #FDF1E3;
    color: #e67e22;
}

/* 方形实心 / 描边 */
.tag-solid {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.4;
}

.tag-outline {
    display: inline-block;
    background: #F5F5F5;
    color: var(--text-secondary);
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.4;
}

/* 列表页标签 */
.tag-red {
    display: inline-block;
    background: var(--primary);
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.4;
}

.tag-light {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    line-height: 1.4;
}


/* ---------------------------------------------------------
   7. 弹窗遮罩（全站公共）
   说明：内容框（.qr-dialog / .system-dialog / .poster-dialog）
        由各自模块定义，这里只管遮罩
   --------------------------------------------------------- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}


/* ---------------------------------------------------------
   8. 底部固定导航
   --------------------------------------------------------- */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: var(--container-max);
    margin: 0 auto;
    background: var(--bg-card);
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: var(--nav-height);
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.04);
    z-index: 200;
    border-top: 1px solid var(--border-light);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    font-size: 10px;
    color: var(--text-muted);
    background: none;
    border: none;
    cursor: pointer;
    flex: 1;
    height: 100%;
    transition: color 0.2s;
    position: relative;
}

.nav-item.active {
    color: var(--primary);
}

.nav-item i {
    font-size: 20px;
    line-height: 1;
}

.nav-item.publish {
    position: relative;
    flex: 0 0 auto;
    min-width: 64px;
    justify-content: flex-end;
    padding-bottom: 6px;
}

.publish-btn {
    background: var(--primary);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 22px;
    box-shadow: var(--shadow-float);
    border: 3px solid #ffffff;
    position: absolute;
    top: -16px;
    text-decoration: none;
}

.free-badge {
    position: absolute;
    top: -4px;
    right: -12px;
    background: #FFFFFF;
    color: var(--primary);
    font-size: 9px;
    font-weight: 700;
    padding: 1px 6px;
    border-radius: 20px;
    white-space: nowrap;
    border: 1px solid var(--primary);
    box-shadow: 0 2px 6px rgba(254, 83, 83, 0.25);
    letter-spacing: 0.3px;
    z-index: 10;
}
/* 服务图标：圆角底 + 4方块 */
.icon-grid-wrap {
    width: 20px;
    height: 20px;
    margin: 0 auto;
    /* 核心：跟随文字颜色。未选中是灰，选中变 var(--primary) 红 */
    background-color: currentColor;
    border-radius: 6px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    padding: 4px; /* 外框到小方块的距离 */
    gap: 2px;     /* 小方块之间的间距 */
    box-sizing: border-box;
    /* 微调：让这个图标在底栏的垂直居中更协调 */
    transform: translateY(-1px);
}

/* 内部4个白色小方块 */
.grid-dot {
    background-color: #ffffff;
    /* 稍微加一点透明度，透出底色的红，更有质感 */
    opacity: 0.9;
    border-radius: 1.5px;
}

/* ---------------------------------------------------------
   9. 工具类
   --------------------------------------------------------- */
.divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 0;
}

.text-ellipsis {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.text-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.no-scrollbar {
    scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.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;
}

/* =========================================================
   全站通用分页样式 (Pagination)
   ========================================================= */
.pagination-wrap {
    padding: 20px 0;
    display: flex;
    justify-content: center;
}

.pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 6px;
    align-items: center;
}

.pagination li {
    display: inline-block;
}

.pagination li a,
.pagination li span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 6px;
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-main);
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    text-decoration: none;
    transition: all 0.2s;
}

.pagination li a:active {
    background: var(--bg-soft);
}

/* 当前选中页码 */
.pagination li.active span {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 6px rgba(254,83,83,0.3);
}

/* 禁用状态 (如第一页的上一页) */
.pagination li.disabled span {
    color: var(--text-muted);
    background: var(--bg-page);
    border-color: var(--border-light);
    cursor: not-allowed;
    opacity: 0.6;
}
.layui-layer-btn a{height: auto!important;font-size: 14px}

/* =========================================================
   全站公共底部操作栏 (Bottom Action Bar)
   ========================================================= */
.bottom-action-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: var(--container-max);
    margin: 0 auto;
    background: var(--bg-card);
    display: flex;
    align-items: center;
    height: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.05);
    z-index: 200;
    padding: 0 12px env(safe-area-inset-bottom, 0px);
}

.action-icons {
    display: flex;
    flex: 1;
    height: 100%;
    align-items: center;
}

/* 当没有主操作按钮（如新闻页没有“联系对方”）时，让图标均分全宽 */
.action-icons.space-around {
    justify-content: space-around;
    padding: 0 10px;
}

.action-icon-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    padding: 0;
    margin: 0;
    border: none;
    background: none;
    font: inherit;
    font-size: 10px;
    line-height: 1.2;
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.action-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
}

.action-icon .icon-svg {
    width: 24px;
    height: 24px;
    display: block;
    color: var(--text-main);
}

.action-icon-btn:active .icon-svg {
    color: var(--primary);
}

/* 主操作按钮（红色圆角） */
.action-call-btn {
    flex: 1;
    height: 42px;
    background: var(--primary);
    color: #fff;
    border-radius: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: opacity 0.2s;
    box-shadow: 0 2px 8px rgba(254, 83, 83, 0.25);
    margin-left: 10px;
}

