/* =============================================
   JMS Sub / Stream Pages
   ============================================= */

/* ---- Hero ---- */
.jms-page-hero {
    position: relative;
    overflow: hidden;
    background: #1c0519;
    min-height: 260px;
    display: flex;
    align-items: center;
}

.jms-page-hero-bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 0;
}

.jms-page-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(28,5,25,0.88) 0%, rgba(61,17,56,0.75) 50%, rgba(118,35,109,0.60) 100%);
    z-index: 1;
}

.jms-page-hero .container {
    position: relative;
    z-index: 2;
    padding-top: 56px;
    padding-bottom: 56px;
}

.jms-page-hero-eyebrow {
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,0.6);
    margin-bottom: 0.75rem;
}

.jms-page-hero h1 {
    font-size: 2.4rem;
    font-weight: 800;
    color: #fff !important;
    line-height: 1.2;
    margin-bottom: 0;
}

/* Optional hero copy and actions -- only rendered when the page has them,
   so pages with just a title keep the compact band. Styles mirror the
   homepage hero so the two read as one system. */
.jms-page-hero-lead {
    font-size: clamp(1.05rem, 1.5vw, 1.25rem);
    color: rgba(255,255,255,0.88);
    line-height: 1.65;
    max-width: 620px;
    margin: 1rem 0 0;
    text-shadow: 0 1px 16px rgba(0,0,0,0.35);
}

.jms-page-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 1.75rem;
}

.btn-jms-hero-primary,
.btn-jms-hero-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 50px;
    padding: 13px 28px;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s;
}

.btn-jms-hero-primary {
    background: #fff;
    color: #76236d !important;
    border: 2px solid #fff;
}
.btn-jms-hero-primary:hover {
    background: #f3e9f2;
    border-color: #f3e9f2;
    transform: translateY(-1px);
}

.btn-jms-hero-secondary {
    background: transparent;
    color: rgba(255,255,255,0.9) !important;
    border: 2px solid rgba(255,255,255,0.45);
}
.btn-jms-hero-secondary:hover {
    border-color: #fff;
    color: #fff !important;
    background: rgba(255,255,255,0.08);
}

/* ---- Intro: the paragraphs that open the body ----
   Editors write these as bold run-in lines ("Save Time") followed by a
   sentence or two. Each such paragraph becomes a card in a responsive row,
   with the bold line lifted into a purple heading -- so the section has real
   structure and enough weight to sit between the hero and a full-bleed
   video block instead of reading as a thin white stripe. */
.jms-page-intro {
    padding: 1.25rem 0 0.75rem;
}
.jms-page-intro > * {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.jms-page-intro p { flex: 1 1 300px; }
.jms-page-intro p {
    background: #f8f5f8;
    border-radius: 12px;
    border-top: 4px solid #77216c;
    padding: 1.25rem 1.5rem 1.4rem;
    font-size: 0.95rem;
    line-height: 1.65;
    color: #3d3d3d;
    margin: 0;
}
.jms-page-intro p > b:first-child,
.jms-page-intro p > strong:first-child {
    display: block;
    color: #77216c;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 0.4rem;
}
.jms-page-intro p > b:first-child + br,
.jms-page-intro p > strong:first-child + br,
.jms-page-intro p > b:first-child > br,
.jms-page-intro p > strong:first-child > br {
    display: none;
}
/* editors' blank lines: an empty <p> would otherwise become an empty card
   (or, spanning the row, break the grid) */
.jms-page-intro p:empty {
    display: none;
}
/* a paragraph without a bold lead-in is plain prose, not a card */
.jms-page-intro p:not(:empty):not(:has(> b:first-child)):not(:has(> strong:first-child)) {
    background: none;
    border: 0;
    padding: 0;
    flex-basis: 100%;
    font-size: 1rem;
}

/* ---- Module cards ---- */
.jms-module-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.jms-module-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(119,33,108,0.13);
}

.jms-module-card-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.jms-module-card-header {
    background: #77216c;
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 10px 14px;
}

.jms-module-card-footer {
    padding: 12px 14px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
}

.jms-module-card-footer .btn {
    width: 100%;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 6px;
    text-decoration: none;
    text-align: center;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: background 0.2s;
}

.jms-module-card-footer .btn-read {
    background: #e87722;
    color: #fff;
}

.jms-module-card-footer .btn-read:hover {
    background: #c9651a;
    color: #fff;
}

.jms-module-card-footer .btn-video {
    background: #77216c;
    color: #fff;
}

.jms-module-card-footer .btn-video:hover {
    background: #5a1952;
    color: #fff;
}

.jms-module-card-footer .btn.disabled {
    background: #ddd;
    color: #999;
    cursor: not-allowed;
    pointer-events: none;
}

/* ---- Modules band: a run of 3+ card blocks (e.g. the six JMS 2D modules) ----
   Full-bleed tinted band in the homepage's "Find your fit" language: eyebrow,
   heading and lead centred, then tiles with the drawing on a soft panel, the
   first three features as a tick-list and a quiet arrow link. */
.jms-modules-band {
    background: #f8f5f8;
    padding: 64px 0 72px;
    margin: 2.5rem 0;
    width: 100vw;
    position: relative;
    left: 50%;
    transform: translateX(-50%);
}
.jms-modules-band-intro {
    max-width: 720px;
    margin: 0 auto 40px;
    text-align: center;
}
.jms-modules-band-eyebrow {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #76236d;
    margin-bottom: 10px;
}
.jms-modules-band-intro h2 {
    font-size: 2rem;
    font-weight: 800;
    color: #1a0618;
    margin-bottom: 14px;
}
.jms-modules-band-lead, .jms-modules-band-lead p {
    color: #555;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 0;
}
.jms-modules-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}
@media (max-width: 991px) { .jms-modules-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 575px) { .jms-modules-grid { grid-template-columns: 1fr; } }

.jms-module-tile {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 2px solid #e8dde7;
    border-top: 4px solid #76236d;
    border-radius: 14px;
    padding: 22px 24px 24px;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.jms-module-tile:hover {
    border-color: #76236d;
    box-shadow: 0 8px 32px rgba(118,35,109,0.14);
    transform: translateY(-4px);
}
.jms-module-tile-figure {
    background: linear-gradient(160deg, #f6eef5 0%, #ede0eb 100%);
    border-radius: 10px;
    height: 170px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
    margin-bottom: 18px;
}
.jms-module-tile-figure img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    /* multiply lets opaque white backgrounds (some drawings are not
       transparent PNGs) disappear into the tinted panel */
    mix-blend-mode: multiply;
}
.jms-module-tile h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: #1a0618;
    margin-bottom: 6px;
    line-height: 1.35;
}
.jms-module-tile-body {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 14px;
}
.jms-module-tile-features {
    list-style: none;
    padding: 0;
    margin: 0 0 6px;
    font-size: 0.875rem;
    color: #333;
}
.jms-module-tile-features li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    padding: 4px 0;
    line-height: 1.45;
}
.jms-module-tile-features i {
    color: #76236d;
    font-size: 0.75rem;
    margin-top: 5px;
    flex: 0 0 auto;
}
.jms-module-tile-more {
    font-size: 0.8rem;
    color: #888;
    margin: 0 0 14px 22px;
}
.jms-module-tile-details { font-size: 0.875rem; color: #444; margin-bottom: 14px; }
.jms-module-tile-details summary { cursor: pointer; color: #76236d; font-weight: 600; }
.jms-module-tile-cta {
    margin-top: auto;
    font-size: 0.88rem;
    font-weight: 700;
    color: #76236d;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: gap 0.2s;
}
.jms-module-tile-cta:hover { color: #3d1138; gap: 11px; text-decoration: none; }

/* ---- Section titles ---- */
.jms-section-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #f0e8ef;
}

/* ---- Related news card ---- */
.jms-related-news {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.jms-related-news-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    display: flex;
}

.jms-related-news-card img {
    width: 220px;
    flex-shrink: 0;
    object-fit: cover;
}

.jms-related-news-card-body {
    padding: 20px;
}

.jms-related-news-card-body h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.jms-related-news-card-body h5 a {
    color: #222;
    text-decoration: none;
}

.jms-related-news-card-body h5 a:hover {
    color: #77216c;
}

.jms-related-news-card-body p {
    font-size: 0.875rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 6px;
}

.jms-related-news-card-body .date {
    font-size: 0.8rem;
    color: #999;
}

/* ---- Page video button ---- */
.jms-page-video-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #77216c;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 18px;
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 1.5rem;
    cursor: pointer;
    transition: background 0.2s;
}

.jms-page-video-btn:hover {
    background: #5a1952;
    color: #fff;
}

/* ---- Sidebar sticky ---- */
.jms-sidebar-sticky {
    position: sticky;
    top: 24px;
}

/* ---- Side panels ---- */
.jms-side-panel {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    margin-top: 1.5rem;
}

.jms-side-panel-header {
    background: #12021a;
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    padding: 12px 16px;
}

.jms-side-panel img {
    width: 100%;
    display: block;
}

.jms-side-panel-body {
    padding: 14px 16px;
    font-size: 0.875rem;
    color: #444;
}

.jms-side-panel-footer {
    padding: 0 16px 16px;
}

.jms-side-panel-footer .btn {
    width: 100%;
    background: #e87722;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 9px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    display: block;
    transition: background 0.2s;
}

.jms-side-panel-footer .btn:hover {
    background: #c9651a;
    color: #fff;
}

@media (max-width: 767px) {
    .jms-page-hero { min-height: auto; }
    .jms-page-hero .container { padding-top: 38px; padding-bottom: 34px; }
    .jms-page-hero h1 { font-size: 1.9rem; }
    .jms-related-news-card { flex-direction: column; }
    .jms-related-news-card img { width: 100%; height: 180px; }
}

/* ---- Benefit cards in the body reuse the intro card treatment ---- */
.jms-benefits { padding: 0.5rem 0 1rem; }
.jms-benefits > * { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.jms-benefits p { flex: 1 1 300px; }
.jms-benefits p { background: #f8f5f8; border-radius: 12px; border-top: 4px solid #77216c; padding: 1.25rem 1.5rem 1.4rem; font-size: 0.95rem; line-height: 1.65; color: #3d3d3d; margin: 0; }
.jms-benefits p > b:first-child, .jms-benefits p > strong:first-child { display: block; color: #77216c; font-size: 1.1rem; font-weight: 800; line-height: 1.3; margin-bottom: 0.4rem; }
.jms-benefits p > b:first-child + br, .jms-benefits p > strong:first-child + br, .jms-benefits p > b:first-child > br, .jms-benefits p > strong:first-child > br { display: none; }
.jms-benefits p:empty { display: none; }
.jms-benefits p:not(:empty):not(:has(> b:first-child)):not(:has(> strong:first-child)) { background: none; border: 0; padding: 0; flex-basis: 100%; font-size: 1rem; max-width: 90ch; }

/* ---- Prose measure: body copy should not run the full 1300px container ---- */
.jms-page-body > section > p,
.jms-page-body > section > h2,
.jms-page-body > section > h3,
.jms-page-body > section > h4,
.jms-page-body > section > ul,
.jms-page-body > section > ol { max-width: 90ch; }
.jms-page-body > section > p { font-size: 1rem; line-height: 1.7; }
.jms-page-body > section > h3 { margin-top: 1.5rem; }

/* ---- Testimonial: a panel with the customer set off, instead of floating purple text ---- */
.jms-page-body .quoteboxpurple {
    background: #f8f5f8 !important;
    border-left: 5px solid #77216c;
    border-radius: 12px;
    padding: 1.5rem 2rem 1.35rem 4rem !important;
    margin: 2rem 0;
    max-width: 900px;
    position: relative;
    color: #2b2b2b !important;
}
.jms-page-body .quoteboxpurple::before {
    content: "\201C";
    position: absolute;
    left: 1.4rem; top: 0.6rem;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 4.5rem;
    line-height: 1;
    color: #c9a6c4;
}
.jms-page-body .quoteboxpurple_inner { background: none !important; padding: 0 !important; }
.jms-page-body .quoteboxpurple p { font-size: 1.05rem; line-height: 1.6; color: #2b2b2b !important; margin-bottom: 0.75rem; max-width: none; }
.jms-page-body .quoteboxpurple p.text-right { text-align: left !important; font-size: 0.875rem; color: #77216c !important; font-weight: 600; margin: 0.5rem 0 0; }
.jms-page-body .quoteboxpurple p.text-right i { font-style: normal; }
.jms-page-body .quoteboxpurple p.text-right i::before { content: "\2014  "; }

/* ---- Feature list: a heading followed by bullets becomes a two-column tick grid ---- */
.jms-featurelist { margin: 2.5rem 0 2rem; }
.jms-featurelist h2 {
    font-size: 1.5rem; font-weight: 800; color: #1a0618; margin-bottom: 1.1rem;
    display: flex; align-items: center; gap: 12px;
}
.jms-featurelist h2 i { color: #76236d; font-size: 1.25rem; }
.jms-featurelist ul {
    list-style: none; padding: 0; margin: 0;
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.6rem 2.5rem;
}
@media (max-width: 767px) { .jms-featurelist ul { grid-template-columns: 1fr; } }
.jms-featurelist li { display: flex; align-items: flex-start; gap: 12px; font-size: 0.95rem; line-height: 1.55; color: #333; }
.jms-featurelist li i {
    flex: 0 0 22px; width: 22px; height: 22px; border-radius: 50%; margin-top: 1px;
    background: #f3e8f2; color: #76236d; font-size: 0.7rem; display: inline-flex; align-items: center; justify-content: center;
}

/* ---- Topic panels: a run of heading-led blocks (u-Values, Installation, Support) ---- */
.jms-topics {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem;
    margin: 2rem 0 2.5rem;
}
@media (max-width: 991px) { .jms-topics { grid-template-columns: 1fr; } }
.jms-topic {
    background: #fff; border: 2px solid #e8dde7; border-radius: 14px; padding: 26px 26px 24px;
    display: flex; flex-direction: column;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.jms-topic:hover { border-color: #76236d; box-shadow: 0 8px 32px rgba(118,35,109,0.12); transform: translateY(-3px); }
.jms-topic-icon {
    width: 46px; height: 46px; border-radius: 12px; margin-bottom: 16px;
    background: linear-gradient(135deg, #76236d, #4a1545); color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
}
.jms-topic h3 { font-size: 1.15rem; font-weight: 800; color: #1a0618; margin-bottom: 10px; }
.jms-topic-prose p { font-size: 0.925rem; line-height: 1.65; color: #4a4a4a; margin-bottom: 0.75rem; }
.jms-topic-prose p:last-child { margin-bottom: 0; }
.jms-topic-prose a { color: #76236d; font-weight: 600; }
.jms-topic ul { list-style: none; padding: 0; margin: 0.75rem 0 0; }
.jms-topic li { display: flex; align-items: flex-start; gap: 10px; font-size: 0.9rem; line-height: 1.5; color: #333; padding: 3px 0; }
.jms-topic li i { color: #76236d; font-size: 0.72rem; margin-top: 6px; flex: 0 0 auto; }
