/* ============================================
   印刷厂官网样式文件
   如需修改网站配色，只需修改下方"主题颜色"区域的数值
   主色调：深蓝色 #1a3a6b，辅助色：橙红色 #e8542e
   ============================================ */

/* ---------- 主题颜色（改这里即可换全站配色） ---------- */
:root {
    --main-color: #1a3a6b;      /* 主色调：导航栏、标题、按钮 */
    --accent-color: #e8542e;    /* 强调色：按钮悬停、价格等 */
    --text-color: #333333;      /* 正文文字颜色 */
    --light-bg: #f5f7fa;        /* 浅灰色背景（交替板块） */
    --white: #ffffff;
}

/* ---------- 基础设置 ---------- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Microsoft YaHei", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
    line-height: 1.7;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ---------- 顶部导航 ---------- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-img {
    width: 36px;
    height: 36px;
    object-fit: contain;
}

.logo-text {
    font-size: 22px;
    font-weight: bold;
    color: var(--main-color);
}

.nav {
    display: flex;
    gap: 36px;
}

.nav a {
    text-decoration: none;
    color: var(--text-color);
    font-size: 16px;
    padding: 6px 0;
    border-bottom: 2px solid transparent;
    transition: all 0.25s;
}

.nav a:hover {
    color: var(--main-color);
    border-bottom-color: var(--accent-color);
}

/* 手机端菜单按钮（三条横线） */
.menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.menu-btn span {
    width: 24px;
    height: 3px;
    background: var(--main-color);
    border-radius: 2px;
    transition: all 0.3s;
}

/* 菜单按钮打开时的动画（变叉号） */
.menu-btn.open span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.menu-btn.open span:nth-child(2) {
    opacity: 0;
}
.menu-btn.open span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ---------- 首屏大图 ---------- */
.hero {
    position: relative;
    min-height: 480px;
    display: flex;
    align-items: center;
    color: var(--white);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    filter: brightness(0.55);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding-top: 40px;
    padding-bottom: 40px;
}

.hero-content h1 {
    font-size: 44px;
    letter-spacing: 6px;
    margin-bottom: 16px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-content p {
    font-size: 18px;
    margin-bottom: 32px;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.4);
}

.btn {
    display: inline-block;
    background: var(--accent-color);
    color: var(--white);
    text-decoration: none;
    padding: 13px 42px;
    border-radius: 30px;
    font-size: 16px;
    transition: all 0.25s;
}

.btn:hover {
    background: #c73f1e;
    transform: translateY(-2px);
}

/* ---------- 通用板块样式 ---------- */
.section {
    padding: 70px 0;
}

.section-gray {
    background: var(--light-bg);
}

.section-title {
    text-align: center;
    font-size: 30px;
    color: var(--main-color);
    margin-bottom: 14px;
    position: relative;
}

/* 标题下方的装饰线 */
.section-title::after {
    content: "";
    display: block;
    width: 50px;
    height: 4px;
    background: var(--accent-color);
    margin: 12px auto 0;
    border-radius: 2px;
}

.section-desc {
    text-align: center;
    color: #777;
    max-width: 640px;
    margin: 18px auto 40px;
    font-size: 15px;
}

/* ---------- 产品中心 ---------- */
.products {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 22px;
}

.product-card {
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(26, 58, 107, 0.08);
    text-align: center;
    transition: transform 0.25s, box-shadow 0.25s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(26, 58, 107, 0.15);
}

.product-card img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
    background: #f0f2f5;
}

.product-card p {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-color);
    padding: 10px 8px 12px;
    margin: 0;
}

/* ---------- 公司介绍 ---------- */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 44px;
    align-items: center;
}

.about-text p {
    margin-bottom: 14px;
    text-align: justify;
}

.about-img img {
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-top: 28px;
}

.stat {
    text-align: center;
    background: var(--light-bg);
    border-radius: 8px;
    padding: 16px 6px;
}

.stat strong {
    display: block;
    font-size: 26px;
    color: var(--accent-color);
}

.stat strong span {
    font-size: 14px;
}

.stat em {
    font-style: normal;
    font-size: 13px;
    color: #777;
}

/* ---------- 产品报价表 ---------- */
.table-wrap {
    overflow-x: auto;           /* 手机上表格可以左右滑动 */
    -webkit-overflow-scrolling: touch;
    background: var(--white);
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.price-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.price-table th,
.price-table td {
    padding: 14px 16px;
    text-align: left;
    font-size: 15px;
    border-bottom: 1px solid #eee;
    white-space: nowrap;
}

.price-table th {
    background: var(--main-color);
    color: var(--white);
    font-weight: bold;
}

.price-table tr:hover td {
    background: #f0f4fa;
}

.price-table td:nth-child(4) {
    color: var(--accent-color);
    font-weight: bold;
}

.price-note {
    margin-top: 16px;
    font-size: 13px;
    color: #999;
    text-align: center;
}

/* ---------- 在线报价按钮区 ---------- */
.quote-btns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 18px;
    margin-top: 36px;
}

.quote-btn {
    display: block;
    text-decoration: none;
    background: var(--white);
    border: 2px solid #e3e9f2;
    border-radius: 12px;
    padding: 26px 18px;
    text-align: center;
    transition: all 0.25s;
}

.quote-btn:hover {
    border-color: var(--accent-color);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(232, 84, 46, 0.15);
}

.quote-btn-icon {
    display: block;
    font-size: 34px;
    margin-bottom: 10px;
}

.quote-btn-title {
    display: block;
    font-size: 17px;
    font-weight: bold;
    color: var(--main-color);
    margin-bottom: 6px;
}

.quote-btn-desc {
    display: block;
    font-size: 13px;
    color: #999;
}

.quote-btn-wx {
    background: var(--accent-color);
    border-color: var(--accent-color);
}

.quote-btn-wx:hover {
    background: #c73f1e;
    border-color: #c73f1e;
}

.quote-btn-wx .quote-btn-title {
    color: var(--white);
}

.quote-btn-wx .quote-btn-desc {
    color: rgba(255, 255, 255, 0.85);
}

/* ---------- 子页面（报价页 / 微信添加页）通用 ---------- */
.subpage {
    min-height: 70vh;
    padding: 50px 20px 60px;
    background: var(--light-bg);
}

.subpage-card {
    max-width: 680px;
    margin: 0 auto;
    background: var(--white);
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.08);
    padding: 46px 40px;
    text-align: center;
}

.subpage-card h1 {
    font-size: 26px;
    color: var(--main-color);
    margin-bottom: 14px;
}

.subpage-card .sub-tip {
    color: #888;
    font-size: 15px;
    margin-bottom: 28px;
}

.subpage-icon {
    font-size: 52px;
    margin-bottom: 14px;
}

.sub-back {
    display: inline-block;
    margin-top: 30px;
    color: var(--main-color);
    font-size: 15px;
    text-decoration: none;
    border: 1px solid #cfd8e6;
    border-radius: 24px;
    padding: 10px 34px;
    transition: all 0.25s;
}

.sub-back:hover {
    background: var(--main-color);
    color: var(--white);
    border-color: var(--main-color);
}

/* 添加微信页面 */
.wx-page .subpage-card {
    max-width: 520px;
}

.wx-qrcode {
    width: 230px;
    height: 230px;
    margin: 0 auto 16px;
    padding: 10px;
    border: 2px dashed #cfd8e6;
    border-radius: 12px;
    object-fit: contain;
}

.wx-id {
    display: inline-block;
    background: #eef2f8;
    color: var(--main-color);
    font-weight: bold;
    font-size: 17px;
    border-radius: 8px;
    padding: 8px 22px;
    margin: 6px 0 18px;
}

.wx-step {
    font-size: 14px;
    color: #777;
    line-height: 2;
}

/* 手机端适配补充 */
@media (max-width: 768px) {
    .quote-btns {
        grid-template-columns: 1fr;
        gap: 12px;
        margin-top: 26px;
    }

    .quote-btn {
        padding: 20px 16px;
    }

    .subpage {
        padding: 30px 14px 40px;
    }

    .subpage-card {
        padding: 32px 22px;
    }

    .subpage-card h1 {
        font-size: 22px;
    }

    .wx-qrcode {
        width: 200px;
        height: 200px;
    }
}

/* ---------- 商务合作 ---------- */
.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.step {
    background: var(--white);
    border-radius: 10px;
    padding: 26px 18px;
    text-align: center;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
    transition: transform 0.25s;
}

.step:hover {
    transform: translateY(-4px);
}

.step-num {
    display: inline-block;
    font-size: 26px;
    font-weight: bold;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.step h3 {
    font-size: 17px;
    color: var(--main-color);
    margin-bottom: 8px;
}

.step p {
    font-size: 13px;
    color: #777;
}

.contact-card {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px 40px;
    background: var(--main-color);
    border-radius: 12px;
    padding: 22px 28px;
    color: var(--white);
    align-items: center;
}

.contact-card h3 {
    grid-column: 1 / -1;
    font-size: 18px;
    margin-bottom: 2px;
}

.contact-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px 0;
}

.contact-item {
    font-size: 14px;
    white-space: nowrap;
}

.contact-label {
    display: inline-block;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    padding: 1px 10px;
    font-size: 13px;
    margin-right: 10px;
}

.qrcode-box {
    text-align: center;
    background: var(--white);
    border-radius: 8px;
    padding: 10px 10px 8px;
    width: 152px;
    justify-self: end;
}

.qrcode-box img {
    width: 132px;
    height: 132px;
    margin: 0 auto 4px;
    object-fit: contain;
    display: block;
}

.qrcode-box p {
    color: var(--main-color);
    font-size: 13px;
    font-weight: bold;
    white-space: nowrap;
}

/* ---------- 招聘信息 ---------- */
.jobs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.job {
    background: var(--white);
    border-radius: 10px;
    padding: 24px 26px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.07);
    transition: transform 0.25s;
}

.job:hover {
    transform: translateY(-4px);
}

.job-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    gap: 10px;
    flex-wrap: wrap;
}

.job-head h3 {
    font-size: 18px;
    color: var(--main-color);
}

.job-salary {
    color: var(--accent-color);
    font-weight: bold;
    font-size: 15px;
    white-space: nowrap;
}

.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.job-tags span {
    background: #eef2f8;
    color: var(--main-color);
    font-size: 12px;
    border-radius: 4px;
    padding: 2px 10px;
}

.job-desc {
    font-size: 14px;
    color: #666;
}

/* ---------- 页脚 ---------- */
.footer {
    background: #14264a;
    color: #aab6cf;
    text-align: center;
    padding: 34px 20px;
    font-size: 14px;
}

.footer p {
    margin-bottom: 6px;
}

.footer .copyright {
    margin-top: 10px;
    font-size: 12px;
    color: #7484a5;
}

/* ---------- 返回顶部按钮 ---------- */
.back-top {
    position: fixed;
    right: 22px;
    bottom: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--main-color);
    color: var(--white);
    font-size: 20px;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 99;
}

.back-top.show {
    opacity: 1;
    visibility: visible;
}

.back-top:hover {
    background: var(--accent-color);
}

/* ============================================
   手机端适配（屏幕宽度小于 768px 时生效）
   ============================================ */
@media (max-width: 768px) {

    /* 汉堡菜单按钮显示，导航变成下拉面板 */
    .menu-btn {
        display: flex;
    }

    .nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
    }

    .nav.open {
        display: flex;
    }

    .nav a {
        padding: 14px 24px;
        border-bottom: 1px solid #f0f0f0;
    }

    /* 首屏 */
    .hero {
        min-height: 380px;
    }

    .hero-content h1 {
        font-size: 28px;
        letter-spacing: 3px;
    }

    .hero-content p {
        font-size: 15px;
        padding: 0 10px;
    }

    /* 通用板块 */
    .section {
        padding: 46px 0;
    }

    .section-title {
        font-size: 24px;
    }

    /* 公司介绍：上下排列 */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 26px;
    }

    .stats {
        grid-template-columns: repeat(2, 1fr);
    }

    /* 合作流程：改为一列 */
    .steps {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    /* 产品中心：两排每排 2 个 */
    .products {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    /* 联系卡片：左侧联系方式 + 右侧二维码，两列水平对齐 */
    .contact-card {
        grid-template-columns: 1fr auto;
        gap: 12px 12px;
        padding: 18px 16px;
        align-items: center;
    }

    .contact-list {
        grid-template-columns: 1fr;
        gap: 7px 0;
    }

    .contact-item {
        white-space: normal;
        font-size: 13px;
        line-height: 1.45;
    }

    .contact-label {
        padding: 1px 7px;
        font-size: 12px;
        margin-right: 7px;
    }

    .qrcode-box {
        justify-self: end;
        width: 100px;
        padding: 6px 6px 5px;
    }

    .qrcode-box img {
        width: 88px;
        height: 88px;
        margin-bottom: 3px;
    }

    .qrcode-box p {
        font-size: 11px;
        white-space: normal;
        line-height: 1.3;
    }

    /* 职位列表：改为一列 */
    .jobs {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .job {
        padding: 20px;
    }

    .back-top {
        right: 14px;
        bottom: 20px;
    }
}

/* 超小屏幕（大屏手机横屏/小平板） */
@media (max-width: 480px) {
    .steps {
        grid-template-columns: 1fr;
    }

    .logo-text {
        font-size: 19px;
    }
}

/* ============================================================
   管理员 / 访客模式
   默认访客模式：带 adminOnly 标记的元素隐藏（功能仍在，仅不显示）；
   进入管理员模式后（body 加 admin-mode 类）全部显示。
   模式由 js/main.js 控制（左下角入口按钮，密码见 main.js）
   ============================================================ */
body:not(.admin-mode) .adminOnly {
    display: none !important;
}
