/* ==========================================================================
   SAMIES Universal Pattern888 Home Runtime — runtime.css  (v0.1.0)
   Applies ONLY to pages carrying body.samies-kpt-runtime-page (enrolled pages).
   Every client value arrives as a CSS variable printed from the client profile.
   Nothing here names a client, domain, page ID or image.
   ========================================================================== */

/* ---------- 0. Page base --------------------------------------------------- */
body.samies-kpt-runtime-page {
    background: #000;
    color: var(--samies-text, #f2f2f2);
}
body.samies-kpt-runtime-page .entry-content,
body.samies-kpt-runtime-page .content-container,
body.samies-kpt-runtime-page .site-main,
body.samies-kpt-runtime-page .content-bg,
body.samies-kpt-runtime-page .entry.single-entry {
    background: transparent !important;
    box-shadow: none !important;
}
/* Kadence boxed content frame -> full width black stage (fixes the white side bars) */
body.samies-kpt-runtime-page .content-area,
body.samies-kpt-runtime-page .entry-content-wrap {
    margin: 0 !important;
    padding: 0 !important;
}
body.samies-kpt-runtime-page .entry-hero,
body.samies-kpt-runtime-page .page-title,
body.samies-kpt-runtime-page .entry-header {
    display: none !important;              /* WordPress page-title banner hidden */
}

/* ---------- 1. HERO layer (under header + under content) ----------------- */
body.samies-kpt-runtime-page .samies-kpt-row-hero {
    position: relative;
    isolation: isolate;
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    margin-top: calc(-1 * var(--samies-header-pull, var(--samies-header-h, 0px))) !important;
    padding-top: var(--samies-header-h, 0px) !important;
    background: #000 !important;
    overflow: hidden !important;
    z-index: 1;
}
/* hero image: top of page only, fades out at --samies-hero-fade (80%) */
body.samies-kpt-runtime-page .samies-kpt-row-hero::before {
    content: "";
    position: absolute;
    top: 0 !important;
    left: 0;
    right: 0;
    bottom: auto !important;
    height: calc(100vw * var(--samies-hero-ratio, 1.5));   /* whole image, top to bottom */
    pointer-events: none;
    background-image: var(--samies-kpt-hero-image, none) !important;
    background-size: 100% auto !important;
    background-position: var(--samies-hero-position, 50% 0%) !important;
    background-repeat: no-repeat !important;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 var(--samies-hero-fade, 80%), transparent 100%) !important;
            mask-image: linear-gradient(to bottom, #000 0%, #000 var(--samies-hero-fade, 80%), transparent 100%) !important;
    z-index: 0 !important;
}
/* BW layer: fades in where the hero fades out, continues behind ALL content */
body.samies-kpt-runtime-page .samies-kpt-row-hero::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100vw * var(--samies-hero-ratio, 1.5) * var(--samies-hero-fade-ratio, 0.8));
    bottom: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--samies-bw-tint, rgba(0,0,0,.55)), var(--samies-bw-tint, rgba(0,0,0,.55))),
        var(--samies-kpt-bw-image, none);
    background-size: 100% auto;
    background-position: center top;
    background-repeat: repeat-y;
    filter: grayscale(var(--samies-bw-grayscale, 1));
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 20vh);
            mask-image: linear-gradient(to bottom, transparent 0, #000 20vh);
    z-index: -1;
}
/* JS B&W stack (replaces the single-layer ::after fallback) */
body.samies-kpt-runtime-page .samies-kpt-row-hero.has-bw-stack::after { display: none; }
body.samies-kpt-runtime-page .samies-bw-stack {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}
body.samies-kpt-runtime-page .samies-bw-layer {
    position: absolute;
    left: 0;
    right: 0;
    background-size: 100% auto;
    background-position: center top;
    background-repeat: no-repeat;
    filter: grayscale(var(--samies-bw-grayscale, 1));
    -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 80%, transparent 100%);
            mask-image: linear-gradient(to bottom, transparent 0, #000 20%, #000 80%, transparent 100%);
}
body.samies-kpt-runtime-page .samies-bw-layer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: var(--samies-bw-tint, rgba(0,0,0,.55));
}
body.samies-kpt-runtime-page .samies-kpt-row-hero > .kt-row-column-wrap {
    position: relative;
    z-index: 1;
    width: var(--samies-content-w, 85%) !important;
    max-width: var(--samies-content-w, 85%) !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}
/* GOLD's main content row: transparent so the hero shows around the slider */
body.samies-kpt-runtime-page .samies-kpt-row-content {
    background: transparent !important;
}
body.samies-kpt-runtime-page .samies-kpt-row-content > .kt-row-column-wrap,
body.samies-kpt-runtime-page .samies-kpt-row-cta > .kt-row-column-wrap,
body.samies-kpt-runtime-page .samies-kpt-alt-section > .kt-row-column-wrap {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ---------- 2. Welcome band ---------------------------------------------- */
body.samies-kpt-runtime-page .samies-welcome-band {
    background: var(--samies-accent, #b10000);
    background-image: var(--samies-welcome-bg, none);   /* profile welcome_band.background */
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    margin: clamp(16px, 4vh, 48px) 0 12px;
    padding: 10px 16px;
}
body.samies-kpt-runtime-page .samies-welcome-band h1 {
    margin: 0;
    color: #fff !important;
    font-size: clamp(22px, 3.2vw, 40px);
    line-height: 1.15;
    letter-spacing: .02em;
    text-transform: uppercase;
    -webkit-text-stroke: var(--samies-welcome-stroke, 0);   /* profile welcome_band.stroke */
    paint-order: stroke fill;                                /* stroke outside the letters, fill stays full */
    text-shadow: var(--samies-welcome-shadow, none);        /* profile welcome_band.shadow */
}

/* ---------- 3. Slideshow (mimics Element Pack bdt-slideshow: fade) -------- */
body.samies-kpt-runtime-page .samies-slideshow {
    position: relative;
    margin: 0 auto 32px;
    background-image: var(--samies-slide-frame, none);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-color: transparent;
    padding: var(--samies-slide-frame-pad, 3.6%);
    box-sizing: border-box;
}
body.samies-kpt-runtime-page .samies-slideshow__viewport {
    position: relative;
    width: 100%;
    aspect-ratio: var(--samies-slide-ratio, 16 / 4.7);
    overflow: hidden;
    background: #000;
}
body.samies-kpt-runtime-page .samies-slide {
    position: absolute;
    inset: 0;
    margin: 0 !important;
    opacity: 0;
    transition: opacity var(--samies-slide-fade-ms, 1000ms) ease;
    z-index: 0;
}
body.samies-kpt-runtime-page .samies-slide.is-active {
    opacity: 1;
    z-index: 1;
}
body.samies-kpt-runtime-page .samies-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
/* before JS runs: show first slide only (no stacked images) */
body.samies-kpt-runtime-page .samies-slideshow:not([data-ready]) .samies-slide:first-child { opacity: 1; }
body.samies-kpt-runtime-page .samies-slide figcaption {
    position: absolute;
    left: 0; right: 0; top: 6%;
    text-align: center;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0,0,0,.85);
    pointer-events: none;
}
body.samies-kpt-runtime-page .samies-slide__title {
    display: block;
    font-size: clamp(18px, 3vw, 44px);
    font-weight: 700;
    line-height: 1.1;
    text-transform: uppercase;
}
body.samies-kpt-runtime-page .samies-slide__subtitle {
    display: inline-block;
    margin-top: .4em;
    padding: .15em .6em;
    background: var(--samies-accent, #b10000);
    font-size: clamp(12px, 1.5vw, 22px);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}
body.samies-kpt-runtime-page .samies-slideshow__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 42px; height: 42px;
    border: 0;
    border-radius: 50%;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 26px;
    line-height: 42px;
    text-align: center;
    cursor: pointer;
    padding: 0;
}
body.samies-kpt-runtime-page .samies-slideshow__nav:hover,
body.samies-kpt-runtime-page .samies-slideshow__nav:focus-visible { background: var(--samies-accent, #b10000); }
body.samies-kpt-runtime-page .samies-slideshow__nav--prev { left: calc(var(--samies-slide-ctrl-x, 3.6%) + 10px); }
body.samies-kpt-runtime-page .samies-slideshow__nav--next { right: calc(var(--samies-slide-ctrl-x, 3.6%) + 10px); }
body.samies-kpt-runtime-page .samies-slideshow__dots {
    position: absolute;
    left: 0; right: 0;
    bottom: calc(var(--samies-slide-ctrl-y, 3.6%) + 8px);
    z-index: 3;
    display: flex;
    justify-content: center;
    gap: 8px;
}
body.samies-kpt-runtime-page .samies-slideshow__dots button {
    width: 10px; height: 10px;
    border-radius: 50%;
    border: 1px solid #fff;
    background: transparent;
    padding: 0;
    cursor: pointer;
}
body.samies-kpt-runtime-page .samies-slideshow__dots button[aria-current="true"] { background: #fff; }

/* ---------- 4. Pattern888 left/right sections (panels over BW) ----------- */
body.samies-kpt-runtime-page .samies-kpt-alt-section {
    width: 100% !important;
    max-width: none !important;
    margin: 0 0 28px !important;
    padding: clamp(18px, 3vw, 44px) !important;
    box-sizing: border-box;
}
/* an alternating section whose slots are all still empty is not shown */
body.samies-kpt-runtime-page .samies-kpt-alt-section:not(:has(.kt-inside-inner-col > *)) {
    display: none !important;
}
body.samies-kpt-runtime-page .samies-kpt-alt-section > .kt-row-column-wrap {
    align-items: center;
    gap: clamp(16px, 3vw, 40px);
}
body.samies-kpt-runtime-page .samies-kpt-row-hero h1,
body.samies-kpt-runtime-page .samies-kpt-row-hero h2,
body.samies-kpt-runtime-page .samies-kpt-row-hero h3,
body.samies-kpt-runtime-page .samies-kpt-row-hero h4,
body.samies-kpt-runtime-page .samies-kpt-row-hero h5 {
    color: var(--samies-heading, #ffffff) !important;
}
body.samies-kpt-runtime-page .samies-kpt-row-hero p,
body.samies-kpt-runtime-page .samies-kpt-row-hero li,
body.samies-kpt-runtime-page .samies-kpt-row-hero figcaption,
body.samies-kpt-runtime-page .samies-kpt-row-hero blockquote {
    color: var(--samies-text, #f2f2f2) !important;
}
body.samies-kpt-runtime-page .samies-kpt-row-hero a:not(.wp-block-button__link) {
    color: #fff;
    text-decoration-color: var(--samies-accent, #b10000);
}
body.samies-kpt-runtime-page .samies-section-title {
    text-transform: uppercase;
    letter-spacing: .03em;
}
body.samies-kpt-runtime-page .samies-section-title::after {
    content: "";
    display: block;
    width: 64px;
    height: 3px;
    margin-top: .45em;
    background: var(--samies-accent, #b10000);
}
body.samies-kpt-runtime-page .has-text-align-center.samies-section-title::after { margin-left: auto; margin-right: auto; }
body.samies-kpt-runtime-page .samies-kpt-alt-section .wp-block-image { margin: 0 0 14px; }
body.samies-kpt-runtime-page .samies-kpt-alt-section .wp-block-image img { height: auto; max-width: 100%; }
body.samies-kpt-runtime-page .samies-logo-stack .wp-block-image { text-align: center; }
body.samies-kpt-runtime-page .samies-logo-stack .wp-block-image img {
    background: #fff;
    padding: 10px 14px;
    border-radius: 4px;
}
body.samies-kpt-runtime-page .wp-block-button__link {
    background: var(--samies-accent, #b10000) !important;
    color: #fff !important;
    border-radius: 3px;
}

/* provider logos: original file, original proportions, never upscaled */
body.samies-kpt-runtime-page .samies-provider-logo { text-align: center; margin: 0 !important; }
body.samies-kpt-runtime-page .samies-provider-logo img {
    width: auto !important;
    height: auto !important;
    max-width: min(100%, 360px) !important;
    background: #fff;
    padding: 12px 16px;
    border-radius: 4px;
    box-sizing: content-box;
}
body.samies-kpt-runtime-page .samies-provider-logo img[src*="bbb"] { padding: 0; background: transparent; }
body.samies-kpt-runtime-page .samies-kpt-alt-section .wp-block-buttons { justify-content: flex-start; margin-top: 8px; }
/* buttons centred in the editor (Justify: center) stay centred inside alternating sections (AR-CONTACT-001R3) */
body.samies-kpt-runtime-page .samies-kpt-alt-section .wp-block-buttons.is-content-justification-center { justify-content: center; }
body.samies-kpt-runtime-page .samies-home-intro { text-align: center; }
@media (max-width: 767px) {
    body.samies-kpt-runtime-page .samies-kpt-alt-section .wp-block-buttons { justify-content: center; }
    body.samies-kpt-runtime-page .samies-kpt-alt-section .samies-section-title,
    body.samies-kpt-runtime-page .samies-kpt-alt-section .samies-section-title + p { text-align: left; }
}

/* ---------- 4b. Shared design standard: section backgrounds at --samies-panel-opacity (50%) ----
   The background lives on ::before so only the background is transparent; text, logos and
   buttons stay fully opaque. Standard sections + CTA use the texture; .samies-bg-N sections
   use their own profile image (shingles). Heroes keep photography, B&W layers keep B&W. */
body.samies-kpt-runtime-page .samies-kpt-alt-section,
body.samies-kpt-runtime-page .samies-kpt-row-cta {
    position: relative !important;
    isolation: isolate;
    background: transparent !important;
    --samies-panel-bg: linear-gradient(var(--samies-texture-overlay, rgba(0,0,0,0)), var(--samies-texture-overlay, rgba(0,0,0,0))), var(--samies-texture, none);
    --samies-panel-bg-size: auto;
    --samies-panel-bg-repeat: repeat;
    --samies-panel-bg-color: #111;
}
body.samies-kpt-runtime-page .samies-kpt-alt-section::before,
body.samies-kpt-runtime-page .samies-kpt-row-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-color: var(--samies-panel-bg-color);
    background-image: var(--samies-panel-bg);
    background-size: var(--samies-panel-bg-size);
    background-repeat: var(--samies-panel-bg-repeat);
    background-position: center top;
    opacity: var(--samies-panel-opacity, .5);
}
body.samies-kpt-runtime-page .samies-kpt-alt-section > .kt-row-column-wrap,
body.samies-kpt-runtime-page .samies-kpt-row-cta > .kt-row-column-wrap { position: relative; z-index: 1; }

/* readability over 50% backgrounds: soft shadow on panel text only */
body.samies-kpt-runtime-page .samies-kpt-alt-section :is(h1,h2,h3,h4,p,li,cite,figcaption),
body.samies-kpt-runtime-page .samies-kpt-row-cta :is(h2,h3,p) {
    text-shadow: 0 1px 3px rgba(0,0,0,.85), 0 0 12px rgba(0,0,0,.55);
}

/* Universal Maps: texture frames the map, never covers its geography */
body.samies-kpt-runtime-page .samies-texture-frame {
    background: #111 var(--samies-texture, none) repeat center top;
    padding: clamp(10px, 2vw, 24px);
}
body.samies-kpt-runtime-page .samies-texture-frame iframe,
body.samies-kpt-runtime-page .samies-texture-frame .samies-map-surface { background: none; }

/* ---------- 5. Section backgrounds from the profile (shingles etc.) — same 50% rule ---- */
body.samies-kpt-runtime-page .samies-bg-1,
body.samies-kpt-runtime-page .samies-bg-2,
body.samies-kpt-runtime-page .samies-bg-3 {
    --samies-panel-bg-size: cover;
    --samies-panel-bg-repeat: no-repeat;
    --samies-panel-bg-color: #000;
}
body.samies-kpt-runtime-page .samies-bg-1 { --samies-panel-bg: linear-gradient(var(--samies-bg-1-tint, rgba(0,0,0,.55)), var(--samies-bg-1-tint, rgba(0,0,0,.55))), var(--samies-bg-1, none); }
body.samies-kpt-runtime-page .samies-bg-2 { --samies-panel-bg: linear-gradient(var(--samies-bg-2-tint, rgba(0,0,0,.45)), var(--samies-bg-2-tint, rgba(0,0,0,.45))), var(--samies-bg-2, none); }
body.samies-kpt-runtime-page .samies-bg-3 { --samies-panel-bg: linear-gradient(var(--samies-bg-3-tint, rgba(0,0,0,.55)), var(--samies-bg-3-tint, rgba(0,0,0,.55))), var(--samies-bg-3, none); }

/* ---------- 6. Tiled gallery + lightbox ----------------------------------- */
body.samies-kpt-runtime-page .samies-tiled-gallery {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}
body.samies-kpt-runtime-page .samies-tiled-gallery a {
    position: relative;
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
    background: #111;
}
body.samies-kpt-runtime-page .samies-tiled-gallery img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease;
}
body.samies-kpt-runtime-page .samies-tiled-gallery a::after {
    content: attr(data-zoom-label);
    position: absolute;
    inset: auto 0 0 0;
    padding: 8px;
    background: rgba(0,0,0,.6);
    color: #fff;
    font-size: 13px;
    letter-spacing: .1em;
    text-align: center;
    opacity: 0;
    transition: opacity .3s ease;
}
body.samies-kpt-runtime-page .samies-tiled-gallery a:hover img,
body.samies-kpt-runtime-page .samies-tiled-gallery a:focus-visible img { transform: scale(1.06); }
body.samies-kpt-runtime-page .samies-tiled-gallery a:hover::after,
body.samies-kpt-runtime-page .samies-tiled-gallery a:focus-visible::after { opacity: 1; }
.samies-lightbox {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.92);
}
.samies-lightbox[open] { display: flex; }
.samies-lightbox img { max-width: 92vw; max-height: 86vh; box-shadow: 0 0 40px rgba(0,0,0,.8); }
.samies-lightbox button {
    position: absolute;
    border: 0;
    background: rgba(255,255,255,.12);
    color: #fff;
    font-size: 28px;
    width: 48px; height: 48px;
    border-radius: 50%;
    cursor: pointer;
}
.samies-lightbox .samies-lightbox__close { top: 18px; right: 18px; }
.samies-lightbox .samies-lightbox__prev { left: 18px; top: 50%; transform: translateY(-50%); }
.samies-lightbox .samies-lightbox__next { right: 18px; top: 50%; transform: translateY(-50%); }

/* ---------- 7. Service cards (3-up) -------------------------------------- */
body.samies-kpt-runtime-page .samies-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 2vw, 28px);
}
body.samies-kpt-runtime-page .samies-card {
    background: rgba(0,0,0,.7);
    border-top: 3px solid var(--samies-accent, #b10000);
    text-align: center;
    padding-bottom: 18px;
}
body.samies-kpt-runtime-page .samies-card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; }
body.samies-kpt-runtime-page .samies-card h3 { margin: 14px 12px 4px; font-size: 1.25rem; }
body.samies-kpt-runtime-page .samies-card .samies-card__brand { margin: 0; font-weight: 700; color: var(--samies-heading, #fff) !important; }
body.samies-kpt-runtime-page .samies-card .samies-card__note { margin: 4px 12px 0; font-size: .95rem; color: var(--samies-grey, #ccc) !important; }

/* ---------- 8. Testimonials ------------------------------------------------ */
body.samies-kpt-runtime-page .samies-testimonials {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(14px, 2vw, 28px);
}
body.samies-kpt-runtime-page .samies-testimonial {
    margin: 0;
    background: rgba(0,0,0,.7);
    border-left: 3px solid var(--samies-accent, #b10000);
    padding: 20px;
}
body.samies-kpt-runtime-page .samies-testimonial p { font-style: italic; }
body.samies-kpt-runtime-page .samies-testimonial footer { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
body.samies-kpt-runtime-page .samies-testimonial footer img { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; }
body.samies-kpt-runtime-page .samies-testimonial cite { font-style: normal; font-weight: 700; color: #fff; }
body.samies-kpt-runtime-page .samies-testimonial cite span { display: block; font-weight: 400; opacity: .8; font-size: .9em; }

body.samies-kpt-runtime-page .samies-review-badge { text-align: center; margin: 0 auto 22px !important; }
body.samies-kpt-runtime-page .samies-review-badge img { max-width: min(300px, 70%) !important; }

/* ---------- 9. CTA receiver ----------------------------------------------- */
body.samies-kpt-runtime-page .samies-kpt-row-cta {
    border-top: 3px solid var(--samies-accent, #b10000);
    margin-bottom: 0 !important;
    padding: clamp(22px, 4vw, 52px) !important;
    text-align: center;
}

/* ---------- 10. GOLD BW row: continues the same BW layer, no navy tint ---- */
body.samies-kpt-runtime-page .samies-kpt-row-bw {
    width: 100vw !important;
    max-width: none !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
    margin-top: 0 !important;
    min-height: 28vh !important;
    position: relative;
    isolation: isolate;
    background: #000 !important;
    z-index: 0 !important;
}
body.samies-kpt-runtime-page .samies-kpt-row-bw::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(var(--samies-bw-tint, rgba(0,0,0,.55)), #000),
        var(--samies-kpt-bw-image, none);
    background-size: 100% auto;
    background-position: center bottom;
    background-repeat: repeat-y;
    filter: grayscale(var(--samies-bw-grayscale, 1));
    z-index: -1;
}

/* ---------- 11. Black stage (30x140) ------------------------------------- */
body.samies-kpt-runtime-page .samies-kpt-row-30x140 {
    padding: 28px 12px 34px !important;
    background-color: #000 !important;
    background-image:
        linear-gradient(var(--samies-stage-overlay, rgba(0,0,0,.88)), var(--samies-stage-overlay, rgba(0,0,0,.88))),
        var(--samies-stage-bg, var(--samies-texture, none)) !important;
    background-repeat: repeat !important;
    background-position: center center !important;
    background-size: auto, var(--samies-stage-bg-size, auto) !important;
}
body.samies-kpt-runtime-page .samies-kpt-row-30x140 .samies-kpt-dynamic-title {
    color: var(--samies-title-color, #ffffff) !important;
    -webkit-text-stroke: var(--samies-title-stroke, 0);    /* profile black_stage.title_stroke */
    paint-order: stroke fill;                               /* stroke outside the letters, fill stays full */
    margin: 0 0 .2em;
}
body.samies-kpt-runtime-page .samies-kpt-row-30x140 .samies-kpt-dynamic-slogan {
    color: var(--samies-slogan-color, #b10000) !important;
    font-family: var(--samies-slogan-font, inherit) !important;
    -webkit-text-stroke: var(--samies-slogan-stroke, 0);   /* profile black_stage.slogan_stroke */
    paint-order: stroke fill;                               /* stroke outside the letters, fill stays full */
    margin: 0;
}

/* ---------- 12. Phones ---------------------------------------------------- */
@media (max-width: 767px) {
    body.samies-kpt-runtime-page .samies-kpt-row-hero > .kt-row-column-wrap {
        width: var(--samies-content-w-phone, 95%) !important;
        max-width: var(--samies-content-w-phone, 95%) !important;
    }
    body.samies-kpt-runtime-page .samies-kpt-row-hero::before {
        background-position: var(--samies-hero-position-phone, 50% 0%) !important;
    }
    body.samies-kpt-runtime-page .samies-tiled-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    body.samies-kpt-runtime-page .samies-card-grid,
    body.samies-kpt-runtime-page .samies-testimonials { grid-template-columns: minmax(0, 1fr); }
    body.samies-kpt-runtime-page .samies-slideshow__nav { width: 32px; height: 32px; line-height: 32px; font-size: 20px; }
    body.samies-kpt-runtime-page .samies-slideshow__dots { display: none; }
    body.samies-kpt-runtime-page .samies-slideshow { padding: var(--samies-slide-frame-pad-phone, 2.4%); }
    body.samies-kpt-runtime-page .samies-slideshow__viewport { aspect-ratio: var(--samies-slide-ratio-phone, 16 / 8); }
}
@media (prefers-reduced-motion: reduce) {
    body.samies-kpt-runtime-page .samies-slide { transition: none; }
    body.samies-kpt-runtime-page .samies-tiled-gallery img { transition: none; }
}

/* Tablet/phone header: the Universal Header switches to its tablet container at 1024px and
   may sit in the page flow there (profile header.height_px_tablet / out_of_flow_tablet). */
@media (max-width: 1024px) {
    body.samies-kpt-runtime-page .samies-kpt-row-hero {
        margin-top: calc(-1 * var(--samies-header-pull-tablet, 0px)) !important;
        padding-top: var(--samies-header-h-tablet, 0px) !important;
    }
}

/* Per-section background opacity (profile section_backgrounds.N.opacity); falls back to the shared panel opacity */
body.samies-kpt-runtime-page .samies-bg-1 { --samies-panel-opacity: var(--samies-bg-1-opacity, var(--samies-panel-opacity-base, .5)); }
body.samies-kpt-runtime-page .samies-bg-2 { --samies-panel-opacity: var(--samies-bg-2-opacity, var(--samies-panel-opacity-base, .5)); }
body.samies-kpt-runtime-page .samies-bg-3 { --samies-panel-opacity: var(--samies-bg-3-opacity, var(--samies-panel-opacity-base, .5)); }

/* ---------- Media shown whole (object-fit: contain) and product cards — used by content pages ---------- */
body.samies-kpt-runtime-page .samies-media-contain { margin: 0 !important; background: #111; }
body.samies-kpt-runtime-page .samies-media-contain img { display: block; width: 100%; height: auto; object-fit: contain; object-position: center; }
body.samies-kpt-runtime-page .samies-product-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 18px 0 6px; }
body.samies-kpt-runtime-page .samies-product-card { display: block; padding: 12px 14px; background: rgba(8,8,8,.85); border: 1px solid #494949; color: #fff; font-weight: 700; line-height: 1.3; text-decoration: none; }
body.samies-kpt-runtime-page a.samies-product-card:hover,
body.samies-kpt-runtime-page a.samies-product-card:focus-visible { border-color: var(--samies-accent, #b10000); outline: none; }
@media (max-width: 420px) { body.samies-kpt-runtime-page .samies-product-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Kadence compatibility: rowlayout clearfix --------------------------------------
   Kadence Blocks sets `.kb-row-layout-wrap:before { display: table }` (clearfix). A table box does
   not stretch between left/right, so every Pattern888 background drawn on a row's ::before
   rendered 0px wide on real Kadence pages (hero missing, section panels missing). */
body.samies-kpt-runtime-page .kb-row-layout-wrap.samies-kpt-row-hero::before,
body.samies-kpt-runtime-page .kb-row-layout-wrap.samies-kpt-alt-section::before,
body.samies-kpt-runtime-page .kb-row-layout-wrap.samies-kpt-row-cta::before,
body.samies-kpt-runtime-page .kb-row-layout-wrap.samies-kpt-row-bw::before {
    display: block !important;
    clear: none !important;
}

/* B&W continues through the GOLD BW row down to the black stage (JS stack); its single faded
   layer is only the no-JS fallback. */
body.samies-kpt-runtime-page .samies-kpt-row-bw.has-bw-stack::before { display: none !important; }
body.samies-kpt-runtime-page .samies-kpt-row-bw > .samies-bw-stack { z-index: -1; }

/* ---------- Document pages (legal, policies): hero row .samies-kpt-document + .samies-document-panel ----------
   Width, panel darkness and link colours come from the profile (layout.content_width_document,
   layout.document_panel_opacity, brand.link_color / link_hover / link_active). */
body.samies-kpt-runtime-page .samies-kpt-row-hero.samies-kpt-document > .kt-row-column-wrap {
    width: var(--samies-document-w, var(--samies-content-w, 85%)) !important;
    max-width: var(--samies-document-w, var(--samies-content-w, 85%)) !important;
}
body.samies-kpt-runtime-page .kb-row-layout-wrap.samies-kpt-alt-section.samies-document-panel {
    --samies-panel-bg: none;
    --samies-panel-bg-color: #000;
}
body.samies-kpt-runtime-page .kb-row-layout-wrap.samies-kpt-alt-section.samies-document-panel::before {
    opacity: var(--samies-document-panel-opacity, .5) !important;
}
body.samies-kpt-runtime-page .samies-document-panel .kt-inside-inner-col {
    text-align: left;
    line-height: 1.75;
}
body.samies-kpt-runtime-page .samies-document-panel :is(h2,h3,h4) { margin: 1.6em 0 .55em; line-height: 1.3; }
body.samies-kpt-runtime-page .samies-document-panel .kt-inside-inner-col > :first-child { margin-top: 0; }
body.samies-kpt-runtime-page .samies-document-panel :is(p,ul,ol) { margin: 0 0 1.1em; }
body.samies-kpt-runtime-page .samies-document-panel :is(ul,ol) { padding-left: 1.4em; }
body.samies-kpt-runtime-page .samies-document-panel a:not(.wp-block-button__link) {
    color: var(--samies-link, #ffffff) !important;
    overflow-wrap: anywhere;
}
body.samies-kpt-runtime-page .samies-document-panel a:not(.wp-block-button__link):hover,
body.samies-kpt-runtime-page .samies-document-panel a:not(.wp-block-button__link):focus-visible {
    color: var(--samies-link-hover, var(--samies-accent, #b10000)) !important;
}
body.samies-kpt-runtime-page .samies-document-panel a:not(.wp-block-button__link):active {
    color: var(--samies-link-active, var(--samies-link-hover, #b10000)) !important;
}
@media (max-width: 767px) {
    body.samies-kpt-runtime-page .samies-kpt-row-hero.samies-kpt-document > .kt-row-column-wrap {
        width: var(--samies-content-w-phone, 95%) !important;
        max-width: var(--samies-content-w-phone, 95%) !important;
    }
}


/* ---------- AR-POSTS-001: hero continues under short pages; 888B posts' tags + Previous/Next on the B&W ---------- */
body.samies-kpt-runtime-page .samies-hero-continue {
    position: absolute;
    left: 0;
    right: 0;
    background-size: 100% auto;
    background-position: var(--samies-hero-position, 50% 0%);
    background-repeat: no-repeat;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 var(--samies-hero-fade, 80%), transparent 100%);
            mask-image: linear-gradient(to bottom, #000 0%, #000 var(--samies-hero-fade, 80%), transparent 100%);
}
body.samies-888b-post .samies-kpt-row-bw.samies-888b-bw-stage :is(.entry-footer, .post-navigation) {
    background: transparent !important;
    padding: 24px 0 !important;
    margin: 0 !important;
}
body.samies-888b-post .samies-kpt-row-bw.samies-888b-bw-stage :is(.entry-footer, .post-navigation) :is(a, h2, h3, .nav-subtitle, .nav-title) {
    text-shadow: 0 1px 3px rgba(0,0,0,.85);
}
body.samies-kpt-runtime-page .samies-kpt-row-30x140.samies-30x140-above-footer {
    margin-bottom: 0 !important;
}

/* ---------- AR-POSTS-003: 888B post sections — photo one side, text the other, alternating ---------- */
body.samies-888b-post .samies-888b-section > .kt-row-column-wrap { align-items: flex-start; }
body.samies-888b-post .samies-888b-section .samies-888b-photo { margin: 0 !important; }
body.samies-888b-post .samies-888b-section .samies-888b-photo img {
    display: block; width: 100%; height: auto; border-radius: 4px;
    box-shadow: 0 8px 28px rgba(0,0,0,.55); cursor: zoom-in;
}
body.samies-888b-post .samies-888b-section .samies-888b-photo figcaption { text-align: center; font-size: .9em; opacity: .85; margin-top: 8px; }
/* the photo stays beside its text while a long section scrolls past (desktop) */
@media (min-width: 1025px) {
    body.samies-888b-post .samies-888b-section:not(.samies-888b-photos) .kadence-column:has(> .kt-inside-inner-col > .samies-888b-photo:only-child) > .kt-inside-inner-col {
        position: sticky; top: 120px;
    }
}
body.samies-888b-post .samies-888b-section :is(ul, ol) { margin: 0 0 1em 1.3em; padding: 0; }
body.samies-888b-post .samies-888b-section li { margin: .25em 0; }
body.samies-888b-post .samies-888b-section li::marker { color: var(--samies-accent, #b10000); }
body.samies-888b-post .samies-888b-section h3 { margin: 1.1em 0 .4em; font-size: 1.2em; }
body.samies-888b-post .samies-888b-section h2.samies-section-title { margin-top: 0; }
body.samies-888b-post .samies-888b-photos > .kt-row-column-wrap { align-items: stretch; }
body.samies-888b-post .samies-888b-photos .samies-888b-photo img { aspect-ratio: 4 / 3; object-fit: cover; }
