/* =========================================================
   海陆嘉餐饮设计 · 杂志社排版系统 (Editorial Layout System)
   统一应用于首页 / 案例列表 / 案例详情
   ========================================================= */

/* --- 响应式修复：解除旧的 1200px 锁死，笔记本/移动端正常显示 --- */
html, body, header, .fixed-header, .wapper, .head-logo {
    min-width: 0 !important;
}

.magazine-scope {
    font-family: "SourceHanSansCN-Light", "Microsoft YaHei", -apple-system, sans-serif;
}

.mag-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* 眉标 / 栏目标签 */
.mag-kicker {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.3em;
    color: #b08d4e;
    text-transform: uppercase;
}
.mag-kicker::before {
    content: "";
    display: inline-block;
    width: 30px;
    height: 2px;
    background: #b08d4e;
}

/* 大编号 */
.mag-num {
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    line-height: 1;
    color: #d9d2c4;
}

/* 章节标题：编号 + 中文 + 英文副标 */
.mag-sec {
    margin: 46px 0 22px;
}
.mag-sec h2 {
    position: relative;
    padding-left: 60px;
    font-size: 26px;
    line-height: 1.4;
    color: #1c1c1c;
    font-weight: 600;
}
.mag-sec h2 .mag-sec-num {
    position: absolute;
    left: 0;
    top: -8px;
    font-family: Georgia, serif;
    font-style: italic;
    font-size: 46px;
    color: #b08d4e;
    font-weight: normal;
}
.mag-sec > p {
    margin: 6px 0 0 60px;
    font-size: 12px;
    letter-spacing: 0.24em;
    color: #aaa;
    text-transform: uppercase;
}

/* 导语 / 提要 */
.mag-dek {
    font-size: 16px;
    line-height: 1.95;
    color: #5a5a5a;
    border-left: 3px solid #b08d4e;
    padding: 4px 0 4px 20px;
    margin: 18px 0 30px;
}

/* 署名行 */
.mag-byline {
    font-size: 12px;
    color: #a8a8a8;
    letter-spacing: 0.12em;
    margin-top: 12px;
}
.mag-byline span { color: #b08d4e; }

/* --- 案例卡片网格（杂志式） --- */
.mag-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    padding-top: 36px;
}
.mag-card {
    display: block;
    background: #fff;
    border: 1px solid #ececec;
    overflow: hidden;
    transition: box-shadow .3s ease, transform .3s ease;
    color: inherit;
}
.mag-card:hover {
    box-shadow: 0 14px 34px rgba(0, 0, 0, .13);
    transform: translateY(-4px);
    color: inherit;
}
.mag-card .mag-img {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #f2f0ec;
}
.mag-card .mag-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .5s ease;
}
.mag-card:hover .mag-img img { transform: scale(1.05); }
.mag-card .mag-img .mag-num {
    position: absolute;
    left: 14px;
    top: 8px;
    font-size: 42px;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, .55);
}
.mag-card .mag-body {
    padding: 20px 22px 24px;
}
.mag-card .mag-tag {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 0.18em;
    color: #b08d4e;
}
.mag-card h3 {
    font-size: 18px;
    line-height: 1.5;
    color: #1c1c1c;
    font-weight: 600;
    margin: 8px 0 10px;
}
.mag-card .mag-desc {
    font-size: 13px;
    line-height: 1.8;
    color: #888;
    min-height: 46px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.mag-card .mag-more {
    display: inline-block;
    margin-top: 14px;
    font-size: 12px;
    letter-spacing: 0.12em;
    color: #c23b2e;
}
.mag-card:hover .mag-more { color: #a3271d; }

/* --- 项目档案（可检索事实块） --- */
.mag-facts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    column-gap: 40px;
    margin: 26px 0 10px;
}
.mag-facts .mag-fact {
    display: flex;
    border-bottom: 1px solid #eaeaea;
    padding: 14px 0;
}
.mag-facts dt {
    width: 92px;
    flex-shrink: 0;
    color: #9a9a9a;
    font-size: 13px;
}
.mag-facts dd {
    color: #2b2b2b;
    font-size: 14px;
    line-height: 1.6;
}

/* --- 正文杂志化 --- */
.mag-article img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 24px auto;
    border-radius: 2px;
}
.mag-article p {
    font-size: 15px;
    line-height: 2;
    color: #555;
    margin: 18px 0;
}
.mag-article > p:first-child { font-size: 16px; color: #444; }

/* 图注 */
.mag-caption {
    font-size: 12px;
    color: #aaa;
    text-align: center;
    letter-spacing: 0.05em;
    margin: 8px 0 30px;
}

/* 金句 / 引文 */
.mag-quote {
    font-family: Georgia, "Songti SC", "SimSun", serif;
    font-size: 21px;
    line-height: 1.75;
    color: #8f6f37;
    text-align: center;
    border-top: 1px solid #e5e5e5;
    border-bottom: 1px solid #e5e5e5;
    padding: 30px 40px;
    margin: 40px 0;
}

/* 返回列表按钮（杂志风） */
.mag-back {
    display: table;
    margin: 40px auto 0;
    padding: 12px 40px;
    border: 1px solid #b08d4e;
    color: #8f6f37 !important;
    font-size: 13px;
    letter-spacing: 0.14em;
    text-align: center;
    transition: all .3s;
}
.mag-back:hover {
    background: #b08d4e;
    color: #fff !important;
}

/* --- 响应式 --- */
@media (max-width: 1100px) {
    .mag-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
    .mag-container { width: 92%; }
    .mag-cards { grid-template-columns: 1fr; gap: 20px; }
    .mag-facts { grid-template-columns: 1fr; }
    .mag-sec h2 { font-size: 22px; padding-left: 48px; }
    .mag-sec h2 .mag-sec-num { font-size: 36px; }
    .mag-sec > p { margin-left: 48px; }
    .mag-quote { font-size: 18px; padding: 22px 18px; }
}

/* =========================================================
   头部导航修复：14 个栏目在 45% 宽 + padding:30px 下换行成 3 行，
   position:fixed 固定头部盖住 banner 图片顶部（文字遮盖图像）。
   方案：整行 flex 单行不换行 + 紧凑间距 + 白色实底 + logo 负边距归零；
        窄屏隐藏重复的业态栏目（这些栏目在案例区已有筛选入口）。
   ========================================================= */
.fixed-header {
    display: flex !important;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    width: 100% !important;
    height: 72px !important;
    padding: 0 2% !important;
    background: #fff !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
.fixed-header .top-menu {
    float: none !important;
    width: auto !important;
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
}
.fixed-header .top-menu ul {
    float: none !important;
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-end;
    width: 100%;
}
.fixed-header .top-menu ul li {
    display: block !important;
    float: none !important;
    padding: 8px 9px !important;
    white-space: nowrap;
}
.fixed-header .top-menu ul li a { font-size: 14px !important; line-height: 1.5; }
.fixed-header .head-logo {
    float: none !important;
    flex: 0 0 auto;
    margin: 0 24px 0 0 !important;
    padding: 0 !important;
    order: -1;
}
.fixed-header .head-logo .logo-img { display: block; height: 36px; }
.fixed-header .head-logo .logo-img img { height: 36px; width: auto; }
.fixed-header .head-right {
    float: none !important;
    flex: 0 0 auto;
    height: auto !important;
    padding: 0 0 0 16px !important;
    display: table;
}
.fixed-header .head-tel img { height: 36px; width: auto; }
/* banner 图片完整显示，不被裁切/遮盖 */
.banner, .banner .swiper-container, .banner1 { height: auto !important; }
.banner .swiper-slide { height: auto !important; display: block !important; }
.banner .swiper-slide img { width: 100% !important; height: auto !important; display: block !important; }

/* 中等宽度：隐藏业态类栏目（第7项起），保留 6 个主栏目，避免换行 */
@media (max-width: 1500px) {
    .fixed-header .top-menu ul li:nth-child(n+7) { display: none !important; }
}
/* 平板：进一步精简 */
@media (max-width: 900px) {
    .fixed-header .top-menu ul li:nth-child(n+5) { display: none !important; }
}

/* =========================================================
   移动端 / 鸿蒙兜底：桌面模板在窄屏（手机）下的响应式
   HarmonyOS Next 等 UA 被识别为桌面时会加载本模板，须保证不错乱
   ========================================================= */
@media (max-width: 768px) {
    html, body { max-width: 100% !important; overflow-x: hidden; }

    /* 头部：取消浮动/负边距，改为紧凑横滑导航 */
    .fixed-header { position: relative !important; width: 100% !important; height: auto !important; min-height: 60px !important; padding: 8px 3% !important; flex-wrap: wrap !important; }
    .fixed-header .top-menu ul li:nth-child(n+5) { display: none !important; }
    .fixed-header .top-menu {
        float: none !important;
        width: 100% !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        padding: 0 3%;
    }
    .fixed-header .top-menu ul { float: none !important; display: inline-block; }
    .fixed-header .top-menu ul li { display: inline-block; float: none !important; padding: 12px 14px !important; }
    .fixed-header .top-menu ul li a { font-size: 14px !important; }
    .fixed-header .head-logo {
        float: none !important;
        margin: 6px 0 0 !important;
        padding: 8px 0 !important;
        text-align: center;
    }
    .fixed-header .head-logo .logo-img { display: inline-block; height: 34px; }
    .fixed-header .head-right { float: none !important; display: block; text-align: center; padding: 6px 0 12px !important; height: auto !important; }
    .fixed-header > div { height: auto !important; }

    /* 顶部占位（index.html 里的 height:80px）收敛 */
    body > div[style*="height: 80px"], body > div[style*="height:80px"] { height: 20px !important; }

    /* banner 与 swiper 高度自适应 */
    .banner, .swiper-container, .banner1 { height: auto !important; }
    .swiper-slide img { width: 100% !important; height: auto !important; }

    /* 正文栅格：单列 */
    .container, .wapper { width: 94% !important; padding-left: 0 !important; padding-right: 0 !important; }
    [class*="col-md-"], [class*="col-sm-"], [class*="col-lg-"] { width: 100% !important; float: none !important; }

    /* 杂志卡片单列（已有 700px 断点，这里兜底 768px） */
    .mag-cards { grid-template-columns: 1fr !important; gap: 20px; }
    .mag-facts { grid-template-columns: 1fr !important; }
    .mag-container { width: 94% !important; }
    .mag-sec h2 { font-size: 21px !important; padding-left: 48px !important; }
    .mag-sec h2 .mag-sec-num { font-size: 36px !important; }
    .mag-sec > p { margin-left: 48px !important; }
    .mag-article img { max-width: 100% !important; height: auto !important; }

    /* 页脚横排改竖排 */
    .footerBmid, .footerA { width: 94% !important; }
    .footerBleft, .footerBcenter, .footerBright { display: block !important; text-align: center !important; float: none !important; line-height: 2; }
}

/* =========================================================
   首页信息图区块稳健布局（台式机/笔记本/鸿蒙手机通用）
   原实现：固定 1200px 容器 + 大量 position:absolute 固定 px 定位，
   背景图又用 background-size:100% auto 随视口拉伸 —— 宽屏下文字与
   背景图形严重错位；且 3dwt-bg.jpg 实际 301 跳首页（图不存在）。
   新实现：纯 grid 流式布局，不依赖背景图定位，任何宽度都对齐。
   ========================================================= */

/* ---- 三大问题 ---- */
.sdwt {
    background: #fff !important;
    background-image: none !important;
    padding: 50px 0 60px;
}
.sdwt-tit {
    width: 90% !important;
    max-width: 1200px;
    margin: 0 auto 34px !important;
}
.sdwt-tit img {
    float: none !important;
    display: block;
    width: 100% !important;
    max-width: 1129px;
    height: auto;
    margin: 0 auto;
}
.sdwt-box {
    width: 90% !important;
    max-width: 1200px;
    height: auto !important;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
}
.sdwt-list {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    min-width: 0;
}
.wt-num {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    text-align: right;
    min-height: 76px;
}
.sdwt-t1 p { font-size: 58px !important; line-height: 62px !important; }
.wt-num strong { font-size: 18px; }
.wt-tit {
    margin-top: 10px !important;
    padding-left: 74px !important;
    min-height: 70px;
}
.wt-tit::before {
    left: 0 !important;
    top: 0 !important;
    width: 56px !important;
    height: 56px !important;
}
.wt-tit strong { display: block; font-size: 20px; line-height: 1.45; }
.wt-tit p { font-size: 12px; margin-top: 4px; }
.sdwt-list ul {
    margin-top: 20px !important;
    padding-left: 0 !important;
}
.sdwt-list ul li { height: 38px; margin-top: 8px; }
.sdwt-t2 { width: 46px; }
.sdwt-list ul li strong { font-size: 14px; padding-right: 8px; }

/* ---- 六大关键（圆环 + 六块说明）---- */
.mydj { padding: 54px 0 76px; }
.mydj .tit-img,
.mydj .sdwt-tit {
    width: 90% !important;
    max-width: 1200px;
    margin: 0 auto 30px !important;
}
.mydj .tit-img img {
    display: block;
    width: 394px;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}
.mydj-box {
    width: 90% !important;
    max-width: 1200px;
    height: auto !important;
    margin: 0 auto;
    background: none !important;
    background-image: none !important;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 440px) minmax(0, 1fr);
    grid-template-rows: repeat(3, auto);
    gap: 26px 28px;
    align-items: center;
}
.mydj-ring {
    grid-column: 2;
    grid-row: 1 / 4;
    text-align: center;
}
.mydj-ring img {
    width: 100%;
    max-width: 440px;
    height: auto;
    display: block;
    margin: 0 auto;
}
.mydj-box ul { display: contents; }
.mydj-box ul li {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    min-width: 0;
}
.mydj-box ul li:nth-child(1) { grid-column: 1; grid-row: 1; }
.mydj-box ul li:nth-child(2) { grid-column: 3; grid-row: 1; }
.mydj-box ul li:nth-child(3) { grid-column: 1; grid-row: 2; }
.mydj-box ul li:nth-child(4) { grid-column: 3; grid-row: 2; }
.mydj-box ul li:nth-child(5) { grid-column: 1; grid-row: 3; }
.mydj-box ul li:nth-child(6) { grid-column: 3; grid-row: 3; }
.mydj-box ul li strong { font-size: 17px; }
.mydj-box ul li strong b { max-width: 46px; left: auto; right: 0; }
.mydj-box ul li p { font-size: 14px; line-height: 1.7; }

/* ---- 窄屏 / 鸿蒙手机：信息图单列堆叠 ---- */
@media (max-width: 900px) {
    .sdwt-box { grid-template-columns: 1fr !important; gap: 38px; }
    .sdwt-list { border-bottom: 1px dashed #e5e5e5; padding-bottom: 22px; }
    .sdwt-list:last-child { border-bottom: 0; }
    .sdwt-box, .sdwt-tit, .mydj .tit-img, .mydj-box { width: 94% !important; }

    .mydj-box {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        gap: 20px !important;
    }
    .mydj-ring { grid-column: 1 !important; grid-row: 1 !important; }
    .mydj-ring img { max-width: 340px; }
    .mydj-box ul li:nth-child(n) {
        grid-column: 1 !important;
        grid-row: auto !important;
        border-bottom: 1px dashed #e5e5e5;
        padding-bottom: 14px;
    }
}

/* =========================================================
   首页 banner：渐变背景 + HTML 真文字（v3）
   文字为 HTML 元素，随屏幕缩放，任何显示器/手机都不会截断
   ========================================================= */
.banner, .banner .swiper-container, .banner1 { height: auto !important; overflow: hidden; }
.banner .swiper-slide { height: auto !important; display: block !important; }
.banner .swiper-slide img { display: none !important; }

.hj-banner {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1vw;
    padding: 3.2vw 9vw;
    aspect-ratio: 1920 / 480;
    overflow: hidden;
    font-family: "Microsoft YaHei", "PingFang SC", "HarmonyOS Sans SC", sans-serif;
}
.hj-banner .hj-tit {
    margin: 0;
    color: #fff;
    font-weight: 700;
    line-height: 1.3;
    font-size: clamp(24px, 3.2vw, 62px);
    letter-spacing: .06em;
    white-space: nowrap;
}
.hj-tit strong { font-size: 1.5em; font-weight: 800; margin: 0 .15em; }
.hj-banner .hj-sub {
    margin: 0;
    color: #fff;
    opacity: .95;
    font-weight: 300;
    line-height: 1.5;
    font-size: clamp(12px, 1.4vw, 27px);
    letter-spacing: .03em;
}
.hj-brand {
    position: absolute;
    right: 3.2vw;
    bottom: 2.6vw;
    display: flex;
    align-items: center;
    gap: .6vw;
    color: #fff;
}
.hj-brand .hj-seal {
    display: flex;
    align-items: center;
    justify-content: center;
    width: clamp(30px, 3vw, 58px);
    height: clamp(30px, 3vw, 58px);
    border: 2px solid #fff;
    color: #fff;
    font-weight: 700;
    font-size: clamp(17px, 1.8vw, 34px);
    border-radius: 4px;
    box-sizing: border-box;
}
.hj-brand .hj-brand-txt {
    font-size: clamp(11px, 1.02vw, 20px);
    line-height: 1.5;
    letter-spacing: .05em;
    text-align: left;
}
/* 三张 banner 渐变配色（取自原图主色） */
.hj-b1 { background: linear-gradient(105deg, #a83230, #c03e3c 48%, #d96860); }
.hj-b2 { background: linear-gradient(105deg, #e8a500, #ffc000 48%, #ffd257); }
.hj-b3 { background: linear-gradient(105deg, #b5651d, #d37c2d 48%, #e9a04f); }
.hj-b2 .hj-brand { color: #6b4a00; }
.hj-b2 .hj-seal { border-color: #c03e3c; background: #c03e3c; color: #fff; }
.hj-b3 .hj-seal { border-color: #fff; background: rgba(192,62,60,.9); color: #fff; }

/* ---- 案例筛选按钮：单行换行居中，不再掉行错位 ---- */
.caseButton { width: 90% !important; max-width: 1200px; margin: 0 auto; }
.caseButton ul {
    display: flex !important;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 6px;
    width: auto !important;
    margin: 0 auto !important;
    padding: 0;
}
.caseButton ul li { float: none !important; margin: 0 !important; }

/* ---- 新闻杂志卡片图自适应 ---- */
.mag-img img { width: 100%; height: 220px; object-fit: cover; display: block; }

/* ---- 文章页正文杂志排版 ---- */
.mag-article { font-size: 16px; line-height: 1.9; color: #333; }
.mag-article h2 { font-size: 22px; font-weight: 600; margin: 34px 0 14px; color: #1c1c1c; }
.mag-article h3 { font-size: 18px; font-weight: 600; margin: 26px 0 12px; color: #1c1c1c; }
.mag-article p { margin: 12px 0; }
.mag-article img { border-radius: 4px; }
.mag-article .mag-caption, .mag-caption {
    font-size: 13px; color: #999; text-align: center; margin: 6px 0 18px;
}

/* ---- 合作品牌区杂志排版 ---- */
.team-area .mag-container, .team-area .container { width: 90% !important; max-width: 1200px; }
.team-area img { max-width: 100%; height: auto; }

/* ---- banner 窄屏：取消比例锁定，文字自然流式排版，绝不截断 ---- */
@media (max-width: 768px) {
    .banner .swiper-slide img { display: none !important; }
    .hj-banner {
        aspect-ratio: auto;
        min-height: 170px;
        padding: 22px 6vw 64px;
        gap: 8px;
    }
    .hj-banner .hj-tit { font-size: 22px; white-space: normal; }
    .hj-tit strong { font-size: 1.4em; }
    .hj-banner .hj-sub { font-size: 12px; }
    .hj-brand { right: 4vw; bottom: 10px; gap: 6px; }
    .hj-brand .hj-seal { width: 28px; height: 28px; font-size: 15px; border-width: 1.5px; }
    .hj-brand .hj-brand-txt { font-size: 10px; }
    .mag-img img { height: 190px; }
}
