/* ------------------------------------------------------------------
   NanoFCM References Block 前台样式。数值全部来自 js.design 稿实测（桌面 185-415，移动 232-107 / 232-366），
   改样式只动本文件；结构在 includes/class-frontend.php。

   按钮在奶油色卡片之外（卡片下方，桌面右对齐 / 移动居中），所以 .nanofcm-ref__action 与 .nanofcm-ref 同级。

   文件末尾那段 !important：主题 Custom/css/cproj-global-vars.css 对 body .container .pageContent 下的
   p|span|li|a 给 font-size / line-height / font-weight 下了 !important，只有 !important 能顶 !important。
   能收的都已收掉（letter-spacing 那边本就是 0；按钮外层改用 div 避开 p 选择器；li 的 font-weight 靠 inherit
   就是 400），剩下的逐条注明原因。

   另一个坑：NanoStyle.css 里 .pageContent a{color:rgb(98 98 98)} 与 :hover{color:rgb(2 133 250)}
   特异度 (0,1,1)，所以按钮颜色挂在 .nanofcm-ref__btn 上并在 hover/focus 显式压回白色。
   ------------------------------------------------------------------ */

.nanofcm-ref {
    position: relative;
    margin: 40px 0 0;
    padding: 75px 48px 50px 42px;
    background: #FFF7ED;
    border-radius: 24px;
}

/* 页签：标题「References」由模板固定输出，作者不能改也不能去掉 */
.nanofcm-ref__tab {
    position: absolute;
    top: 0;
    left: 0;
    display: inline-flex;
    align-items: center;
    box-sizing: border-box;
    min-width: 175px;
    height: 44px;
    padding: 0 20px 0 15px;
    background: #FDD5A4;
    border-radius: 0 0 24px 0;
}

.nanofcm-ref__dot {
    flex: none;
    width: 10px;
    height: 10px;
    margin-right: 13px;
    border-radius: 50%;
    background: #F57300;
}

.nanofcm-ref__title {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    line-height: 21px;
    font-weight: 500;
    color: #F57300;
}

/* 编号由 CSS 计数器生成，作者填的时候不写序号，也不会断号 */
.nanofcm-ref__list {
    list-style: none;
    margin: 0;
    padding: 0;
    counter-reset: nanofcm-ref;
}

.nanofcm-ref__list > li {
    position: relative;
    padding-left: 12px;
    margin: 0 0 10px;
    counter-increment: nanofcm-ref;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    line-height: 24px;
    color: #404040;
}

.nanofcm-ref__list > li:last-child {
    margin-bottom: 0;
}

/* 编号列固定 10px 右对齐：Poppins 数字不等宽，不这么做每条文字前的空隙就会一条宽一条窄 */
.nanofcm-ref__list > li::before {
    content: counter(nanofcm-ref) ".";
    position: absolute;
    top: 0;
    left: 0;
    width: 10px;
    text-align: right;
    white-space: nowrap; /* 不加这句，比 10px 宽的编号会在列里换行，小数点跑到第二行行首 */
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

/* 按钮在卡片之外，和卡片同级 */
.nanofcm-ref__action {
    margin: 40px 20px 0 0;
    text-align: right;
}

.nanofcm-ref__action .nanofcm-ref__btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 8px;
    background: #0071C3;
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    line-height: 1;
    font-weight: 500;
    text-transform: uppercase;
    text-decoration: none;
    color: #ffffff;
}

.nanofcm-ref__action .nanofcm-ref__btn:hover,
.nanofcm-ref__action .nanofcm-ref__btn:focus {
    background: #E68B1E;
    text-decoration: none;
    color: #ffffff;
}

.nanofcm-ref__arrow {
    flex: none;
    width: 28px;
    height: 28px;
    color: #ffffff;
}

@media (max-width: 991.98px) {
    .nanofcm-ref {
        margin-top: 24px;
        padding: 68px 27px 65px 10px;
    }

    .nanofcm-ref__title {
        font-size: 18px;
        line-height: 25.2px;
        font-weight: 600;
    }

    .nanofcm-ref__list > li {
        font-size: 14px;
        line-height: 24.5px;
        margin-bottom: 14px;
        text-align: justify;
    }

    /* 稿 232-366：按钮 337 宽 = 卡片 358 左右各再收 10，高 46，靠 padding 撑不出来，直接定高 + 内容居中 */
    .nanofcm-ref__action {
        margin: 24px 10px 0;
        text-align: center;
    }

    .nanofcm-ref__action .nanofcm-ref__btn {
        width: 100%;
        height: 46px;
        padding: 0;
        justify-content: center;
        font-size: 16px;
        line-height: 22.4px;
    }

    .nanofcm-ref__arrow {
        width: 24px;
        height: 24px;
    }
}

/* ==================================================================
   顶主题统一排版层：它对 p|span|li|a 的 font-size / line-height / font-weight 带 !important，
   普通写法（含内联 style）压不住，去掉这几组就会回退成 18px/1.8（≤768px 16px）。
   ================================================================== */
body .container .pageContent .nanofcm-ref__list > li {
    /* li 被那边按 18px/1.8 命中，字号行高只能同规格顶回 */
    font-size: 15px !important;
    line-height: 24px !important;
}

body .container .pageContent .nanofcm-ref__title {
    /* 页签标题是个 span，同样被命中；font-weight 那边是 inherit!important，不顶就丢 Medium */
    font-size: 18px !important;
    line-height: 21px !important;
    font-weight: 600 !important;
}

body .container .pageContent .nanofcm-ref__btn,
body .container .pageContent .nanofcm-ref__btn-text {
    /* a 和里面的 span 都被命中；line-height 顶成 1 才撑得出稿里的 52px 高 */
    font-size: 18px !important;
    line-height: 1 !important;
    font-weight: 500 !important;
}

@media (max-width: 991.98px) {
    /* 同上三组：那边在 ≤768px 只把 font-size 改成 16px，line-height / font-weight 全宽都带 !important，所以移动端的稿内数值也只能顶 */
    body .container .pageContent .nanofcm-ref__list > li {
        font-size: 14px !important;
        line-height: 24.5px !important;
    }

    body .container .pageContent .nanofcm-ref__title {
        font-size: 18px !important;
        line-height: 25.2px !important;
        font-weight: 600 !important;
    }

    body .container .pageContent .nanofcm-ref__btn,
    body .container .pageContent .nanofcm-ref__btn-text {
        font-size: 16px !important;
        line-height: 22.4px !important;
    }
}
