/* ============================================================
   政企宿舍管理方案 · 前台专属样式
   ------------------------------------------------------------
   ⚠️ 只属于本方案：不要写进公共 site.css。
   引入方式（前台页已声明，不要手写 <link>）：
       $pageCss = ['solutions/enterprise_dormitory/enterprise_dormitory.css'];

   类名前缀约定：
     .solution-*  ← 与模板/其它方案同名的基础件（宽度、Banner、子导航、标题、终端卡）
     .dorm-*   ← 本方案自有板块

   图位裁切比例（与后台 $cropRatios 一一对应，改比例要两处一起改）：
     顶部 Banner 1920:400 ｜ 概述 2:1 ｜ 三端 16:10 ｜ 核心功能 16:9 ｜ 客户 logo 4:3
   ============================================================ */

/* ---------------- 基础件 ---------------- */
.solution-content-width {
    width: min(1440px, calc(100% - 48px));
    margin-right: auto;
    margin-left: auto;
}

/* 顶部 Banner：单张整幅，不轮播 */
.solution-banner {
    width: calc(100% - 48px);
    max-width: 1920px;
    margin: 0 auto;
    overflow: hidden;
    background: #e7eef3;
}

.solution-banner img {
    display: block;
    width: 100%;
    aspect-ratio: 1920 / 400;
    object-fit: cover;
}

/* 子导航 */
.solution-subnav {
    position: sticky;
    top: var(--site-header-height);
    z-index: 900;
    width: min(1440px, calc(100% - 48px));
    min-height: 64px;
    margin: 0 auto 34px;
    padding: 0 30px;
    border: 1px solid #d2d2d2;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 26px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .15);
    font-size: 15px;
    transition: top .2s ease;
}

.solution-subnav.is-pinned-to-top {
    top: 0;
    z-index: 1100;
}

.solution-subnav.is-overlap {
    margin-top: -28px;
}

.solution-subnav a {
    white-space: nowrap;
}

.solution-subnav a[data-subnav-link] {
    position: relative;
    padding: 6px 0;
    color: #444;
}

.solution-subnav a[data-subnav-link]:hover,
.solution-subnav a[data-subnav-link].is-current {
    color: #224b97;
}

.solution-subnav a[data-subnav-link].is-current::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -2px;
    height: 2px;
    background: #224b97;
}

.solution-subnav__consult {
    min-width: 108px;
    margin-left: auto;
    padding: 9px 18px;
    border-radius: 18px;
    color: #fff !important;
    background: #224b97;
    text-align: center;
}

.solution-subnav__consult:hover {
    background: #1a3c7c;
}

/* 板块标题：居中 + 随文字宽度的短横线 */
.solution-section-title {
    position: relative;
    width: max-content;
    max-width: 100%;
    margin: 0 auto 42px;
    color: #444;
    font-size: 34px;
    font-weight: 400;
    text-align: center;
}

.solution-section-title::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -10px;
    height: 3px;
    background: #224b97;
}

/* ---------------- 本方案板块骨架 ---------------- */
.dorm-section {
    padding: 62px 0 68px;
    scroll-margin-top: 84px;
}

/* 带底色的板块：用全站固定的方案页衬底图（写死，不走后台）。
   路径相对本文件（比网站根深两层），所以是 ../../common/img/… */
.dorm-section--tint {
    background-color: #f5f8fc;
    background-image: url("../../common/img/pageFixedImage/SchemeIntroductionPage_AssociatedTerminalsBackgroundImage.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

.dorm-lead {
    margin: 0 0 14px;
    color: #224b97;
    font-size: 15px;
    line-height: 1.75;
}

.dorm-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.dorm-list li {
    position: relative;
    margin-bottom: 9px;
    padding-left: 13px;
    color: #555;
    font-size: 14px;
    line-height: 1.75;
}

.dorm-list li:last-child {
    margin-bottom: 0;
}

.dorm-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: .78em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: #9fb0cc;
}

.dorm-list--tight li {
    margin-bottom: 7px;
    font-size: 13.5px;
}

/* ---------------- 概述 ---------------- */
.solution-overview {
    padding: 20px 0 64px;
    scroll-margin-top: 84px;
}

.solution-overview__content {
    display: grid;
    grid-template-columns: 720px minmax(0, 1fr);
    gap: 56px;
    align-items: start;
}

.solution-overview__content > img {
    width: 720px;
    height: 405px;
    object-fit: cover;
    display: block;
    align-self: start;
}

.solution-overview__media {
    position: relative;
    width: 720px;
    height: 405px;
    overflow: hidden;
    background: #000;
}

.solution-overview__media video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #000;
}

.solution-overview__play {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 74px;
    height: 74px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, .5);
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate(-50%, -50%);
    transition: background-color .2s ease, transform .2s ease;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}

.solution-overview__play:hover {
    background: rgba(34, 75, 151, .88);
    transform: translate(-50%, -50%) scale(1.05);
}

.solution-overview__play.is-hidden {
    display: none;
}

.solution-overview__text {
    color: #444;
    font-size: 16px;
    line-height: 1.95;
}

.solution-overview__text p:first-child {
    margin-top: 0;
}

.solution-overview__text p:last-child {
    margin-bottom: 0;
}

/* 概述里的价值摘要列表（4 条要点） */
.solution-overview__text ul {
    margin: 2px 0 16px;
    padding: 0;
    list-style: none;
}

.solution-overview__text li {
    position: relative;
    margin-bottom: 9px;
    padding-left: 18px;
    line-height: 1.8;
}

.solution-overview__text li:last-child {
    margin-bottom: 0;
}

.solution-overview__text li::before {
    content: "";
    position: absolute;
    left: 2px;
    top: .78em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #224b97;
}

.solution-overview__text strong {
    color: #224b97;
    font-weight: 600;
}

/* ---------------- 现状问题（四卡） ---------------- */
.dorm-pain {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.dorm-pain__item {
    padding: 30px 26px 28px;
    border: 1px solid #e2e7f0;
    border-radius: 8px;
    background: #fff;
}

.dorm-pain__no {
    display: block;
    margin-bottom: 14px;
    color: #224b97;
    font-size: 26px;
    font-weight: 600;
    line-height: 1;
    opacity: .28;
}

.dorm-pain__item h3 {
    margin: 0 0 12px;
    color: #2b2b2b;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.55;
}

.dorm-pain__item p {
    margin: 0 0 12px;
    color: #666;
    font-size: 13.5px;
    line-height: 1.8;
}

/* ---------------- 应用场景（三列） ---------------- */
.dorm-scene {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.dorm-scene__item {
    padding: 24px 26px 26px;
    border: 1px solid #e8eef7;
    border-radius: 8px;
    background: #f7f9fd;
}

.dorm-scene__item h3 {
    margin: 0 0 10px;
    color: #224b97;
    font-size: 17px;
    font-weight: 600;
}

.dorm-scene__item p {
    margin: 0 0 10px;
    color: #666;
    font-size: 13.5px;
    line-height: 1.75;
}

/* ---------------- 核心功能（四卡，一行四列，上图下文） ---------------- */
.dorm-feature {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.dorm-feature__card {
    overflow: hidden;
    border: 1px solid #e2e7f0;
    border-radius: 10px;
    background: #fff;
}

.dorm-feature__media img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    background: #eef2f8;
}

.dorm-feature__body {
    padding: 24px 26px 26px;
}

.dorm-feature__body h3 {
    margin: 0 0 10px;
    color: #224b97;
    font-size: 20px;
    font-weight: 600;
}

/* ---------------- 方案优势（四卡，客户收益） ---------------- */
.dorm-adv {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 20px;
}

.dorm-adv__item {
    padding: 28px 26px 28px;
    border: 1px solid #e2e7f0;
    border-top: 3px solid #224b97;
    border-radius: 8px;
    background: #fff;
}

.dorm-adv__no {
    display: block;
    margin-bottom: 12px;
    color: #224b97;
    font-size: 24px;
    font-weight: 600;
    line-height: 1;
    opacity: .28;
}

.dorm-adv__item h3 {
    margin: 0 0 10px;
    color: #2b2b2b;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.5;
}

.dorm-adv__item p {
    margin: 0 0 12px;
    color: #224b97;
    font-size: 13.5px;
    line-height: 1.75;
}

/* ---------------- 关联硬件（四卡） ---------------- */
.dorm-hardware {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.dorm-hardware__card {
    display: block;
    overflow: hidden;
    border: 1px solid #d3d3d3;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .13);
    transition: transform .18s ease, box-shadow .18s ease;
}

.dorm-hardware__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, .17);
}

.dorm-hardware__image {
    width: 100%;
    aspect-ratio: 336 / 220;
    overflow: hidden;
    background: #e5e5e5;
}

.dorm-hardware__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dorm-hardware__card h3 {
    margin: 18px 20px 10px;
    color: #333;
    text-align: center;
    font-size: 20px;
}

.dorm-hardware__card p {
    margin: 0 20px 20px;
    color: #555;
    font-size: 14px;
    line-height: 1.7;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* ---------------- 关联终端 ---------------- */

.solution-terminal-note {
    margin: 22px 0 0;
    color: #666;
    text-align: center;
    font-size: 13px;
}

.solution-terminal-note a {
    color: #0d55ff;
    text-decoration: underline;
}

/* ---------------- 最新资讯 ---------------- */
.dorm-news {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 22px;
}

.dorm-news__card {
    overflow: hidden;
    border: 1px solid #dfe4ec;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(0, 0, 0, .08);
    transition: transform .18s ease, box-shadow .18s ease;
}

.dorm-news__card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, .13);
}

.dorm-news__image {
    width: 100%;
    aspect-ratio: 336 / 220;
    overflow: hidden;
    background: #e5e5e5;
}

.dorm-news__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.dorm-news__card h3 {
    min-height: 94px;
    margin: 18px 20px 8px;
    color: #333;
    font-size: 19px;
    font-weight: 500;
    line-height: 1.55;
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.dorm-news__card span {
    margin: 0 20px 20px;
    display: block;
    color: #224b97;
    font-size: 13px;
}

.dorm-news__more {
    margin-top: 22px;
    display: block;
    color: #555;
    text-align: right;
    font-size: 14px;
}

/* ---------------- 相关资源 ---------------- */
.solution-resource-list {
    display: grid;
    gap: 9px;
    max-width: 900px;
}

.solution-resource-list a {
    width: max-content;
    max-width: 100%;
    color: #444;
    font-size: 15px;
}

.solution-resource-list a:hover {
    color: #224b97;
    text-decoration: underline;
}

.solution-resource-list__pending {
    width: max-content;
    max-width: 100%;
    color: #999;
    font-size: 15px;
}

/* ---------------- 方案咨询 ---------------- */
.solution-consultation {
    scroll-margin-top: 84px;
}

@media (max-width: 1280px) {
    .dorm-pain,
    .dorm-adv,
    .dorm-scene,
    .dorm-hardware {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

@media (max-width: 1100px) {
    .solution-subnav {
        gap: 20px;
        overflow-x: auto;
    }

    .solution-overview__content {
        grid-template-columns: minmax(0, 500px) minmax(0, 1fr);
        gap: 34px;
    }

    .solution-overview__content > img {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }

    .solution-overview__media {
        width: 100%;
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .dorm-feature {
        grid-template-columns: 1fr;
    }

    .solution-terminal-grid,
    .dorm-news {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .solution-content-width,
    .solution-subnav {
        width: min(100% - 28px, 1440px);
    }

    .solution-subnav {
        padding: 0 18px;
    }

    .solution-subnav__consult {
        margin-left: 0;
    }

    .solution-section-title {
        font-size: 26px;
        margin-bottom: 34px;
    }

    .dorm-section {
        padding: 46px 0 50px;
    }

    .solution-overview__content {
        grid-template-columns: 1fr;
    }

    .dorm-feature__media img {
        aspect-ratio: 16 / 9;
        height: auto;
    }

    .dorm-pain,
    .dorm-adv,
    .dorm-scene,
    .dorm-hardware {
        grid-template-columns: 1fr;
    }

    .dorm-feature__body {
        padding: 24px 22px 26px;
    }
}

@media (max-width: 480px) {
    .dorm-pain,
    .dorm-adv,
    .dorm-scene,
    .dorm-hardware,
    .solution-terminal-grid,
    .dorm-news {
        grid-template-columns: 1fr;
    }
}
