/* 图文橱窗 poster_18 (ly_poster_13 复刻)
   结构: 全宽背景大图 + 叠加层 + 居中文案块(标题/副标题/按钮)。
   顶部 <style> 注入变量 --p18-*, 覆盖色/字/按钮/间距等由模块配置驱动。
   背景双轨: .p18-bg-pc / .p18-bg-mobile 各自 absolute 铺满盒子, PC 显示 PC 图、移动端显示移动图。
   图案盒比例: PC padding-top 21.88%(同 420/1920), 移动 72%(同 540/750), 与图片自身比例脱钩。
   object-fit/object-position 由每端 fillMode/position 变量注入(见指南 §9F)。
   视差开启时 .p18-parallax 放大背景; JS 内联脚本随滚动 translateY。
*/

.ly_poster_18 {
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    width: 100%;
    padding: var(--p18-pc-padding-top, 0px) var(--p18-pc-padding-right, 0%)
             var(--p18-pc-padding-bottom, 0px) var(--p18-pc-padding-left, 0%);
}
.ly_poster_18 *,
.ly_poster_18 *::before,
.ly_poster_18 *::after { box-sizing: border-box; }

.ly_poster_18 .p18-container { width: 100%; }
.ly_poster_18 .p18-container.module_width_1440 { max-width: 1440px; margin: 0 auto; }
.ly_poster_18 .p18-container.module_width_full { max-width: none; }

.ly_poster_18 .p18-poster-box {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.ly_poster_18 .p18-bg {
    position: relative;
    width: 100%;
    height: 0;
    padding-top: 21.88%; /* PC 建议图 1920x420 */
    overflow: hidden;
}
.ly_poster_18 .p18-bg img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
    object-fit: var(--p18-pc-img-fit, cover);
    object-position: center var(--p18-pc-img-pos, center);
}
.ly_poster_18 .p18-bg-mobile { display: none !important; }

/* 叠加层: 纯色(hex 自带 alpha, 默认 #000000fa), 铺满且不挡按钮 */
.ly_poster_18 .p18-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background-color: var(--p18-overlay-color, #00000080);
    pointer-events: none;
}

/* 文案块: 垂直居中, 水平位置由 textPosition 控制 */
.ly_poster_18 .p18-info {
    position: absolute;
    top: 50%;
    z-index: 2;
    min-width: 50%;
    transform: translateY(-50%);
    text-align: var(--p18-align, center);
}
.ly_poster_18 .p18-info.pos-left  { left: 6.25%; }
.ly_poster_18 .p18-info.pos-center{ left: 50%; transform: translate(-50%, -50%); }
.ly_poster_18 .p18-info.pos-right { right: 6.25%; }

.ly_poster_18 .p18-title {
    margin: 0;
    padding: 0;
    font-size: var(--p18-pc-title-font-size, 54px);
    font-weight: normal;
    line-height: 1.25;
    color: var(--p18-title-color, #ffffff);
    font-family: inherit;
}

.ly_poster_18 .p18-subtitle {
    margin-top: 20px;
    font-size: var(--p18-pc-subtitle-font-size, 18px);
    line-height: 1.6;
    color: var(--p18-subtitle-color, #ffffff);
    word-break: break-word;
}

/* 按钮 */
.ly_poster_18 .p18-button {
    margin-top: 35px;
    display: inline-block;
    box-sizing: border-box;
    min-width: 0;
    padding: 17px 46px;
    font-family: var(--p18-btn-font, inherit);
    font-size: var(--p18-pc-btn-font-size, 16px);
    line-height: 1.2;
    color: var(--p18-btn-text-color, #ffffff);
    background-color: var(--p18-btn-bg-color, #ff6600);
    border: 1px solid var(--p18-btn-border-color, #fff0);
    border-radius: var(--p18-pc-btn-radius, 0px);
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    transition: color .3s ease, background-color .3s ease, border-color .3s ease;
}
.ly_poster_18 .p18-button:hover {
    color: var(--p18-btn-text-hover-color, #ffffff);
    background-color: var(--p18-btn-bg-hover-color, #66cc33);
    border-color: var(--p18-btn-border-hover-color, #fff0);
}

/* 视差: 开启时背景放大留出位移空间 */
.ly_poster_18 .p18-parallax .p18-bg img { height: 130%; top: -15%; }

/* ==================== 移动端 <=1000px ==================== */
@media screen and (max-width: 1000px) {
    .ly_poster_18 {
        padding: var(--p18-mobile-padding-top, 0px) var(--p18-mobile-padding-right, 0%)
                 var(--p18-mobile-padding-bottom, 0px) var(--p18-mobile-padding-left, 0%);
    }
    .ly_poster_18 .p18-bg { padding-top: 72%; } /* 移动建议图 750x540 */
    .ly_poster_18 .p18-bg-pc { display: none !important; }
    .ly_poster_18 .p18-bg-mobile { display: block !important; object-fit: var(--p18-mobile-img-fit, cover); object-position: center var(--p18-mobile-img-pos, center); }
    .ly_poster_18 .p18-info { min-width: 60%; }
    .ly_poster_18 .p18-title { font-size: var(--p18-mobile-title-font-size, 34px); }
    .ly_poster_18 .p18-subtitle { font-size: var(--p18-mobile-subtitle-font-size, 14px); margin-top: 16px; }
    .ly_poster_18 .p18-button {
        font-size: var(--p18-mobile-btn-font-size, 12px);
        border-radius: var(--p18-mobile-btn-radius, 0px);
        margin-top: 30px;
        padding-top: 12px; padding-bottom: 12px;
    }
    .ly_poster_18 .p18-parallax .p18-bg img { height: 130%; top: -15%; }
}