/*
 * cms-pro widgets — self-contained, theme-aware widget stylesheet.
 *
 * Design rules:
 *   1. Every selector is namespaced under `.cmsp-` so it cannot collide
 *      with the host theme.
 *   2. All colours, fonts, radii read from `--cms-pro-*` custom
 *      properties already exposed by `partials/public-style.blade.php`.
 *      Each var has a neutral default so widgets render correctly even
 *      with no theme variables set.
 *   3. Per-widget tokens (e.g. `--cmsp-card-bg`) sit on the widget root
 *      so admins can drop one line of Custom CSS to retheme that widget
 *      without forking the markup.
 *   4. No Bootstrap, no Porto, no WOW.js, no jQuery. Pure CSS Grid /
 *      Flexbox. Everything is responsive via min-content sizing or
 *      `auto-fit / minmax`, not media-query layouts.
 */

/* ---- Theme tokens with safe defaults ----------------------------- */
.cmsp-block,
.cmsp-block * {
    box-sizing: border-box;
}

.cmsp-block {
    --cmsp-primary: var(--cms-pro-primary, #2563eb);
    --cmsp-secondary: var(--cms-pro-secondary, #0f172a);
    --cmsp-accent: var(--cms-pro-accent, #ef4444);
    --cmsp-text: var(--cms-pro-text, #1f2937);
    --cmsp-muted: color-mix(in srgb, var(--cmsp-text) 60%, transparent);
    --cmsp-heading: var(--cms-pro-heading, #0f172a);
    --cmsp-link: var(--cms-pro-link, var(--cmsp-primary));
    --cmsp-bg: var(--cms-pro-bg, #ffffff);
    --cmsp-surface: #ffffff;
    --cmsp-surface-alt: #f8fafc;
    --cmsp-border: #e5e7eb;
    --cmsp-radius: var(--cms-pro-radius, 8px);
    --cmsp-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --cmsp-shadow-md: 0 6px 18px rgba(15, 23, 42, 0.08);
    --cmsp-shadow-lg: 0 16px 40px rgba(15, 23, 42, 0.12);
    --cmsp-font: var(--cms-pro-font, inherit);
    --cmsp-heading-font: var(--cms-pro-heading-font, inherit);
    --cmsp-gap: clamp(16px, 2.5vw, 32px);
    --cmsp-pad-y: clamp(40px, 6vw, 80px);
    --cmsp-pad-x: clamp(16px, 4vw, 32px);
    color: var(--cmsp-text);
    font-family: var(--cmsp-font);
    line-height: 1.6;
}

/* ---- Page-title strip (H1) -------------------------------------- */
/* The package emits exactly one <h1> per public CMS page so SEO
 * crawlers find a topic heading. By default it's visually-hidden
 * (hosts already brand the page through their first widget); set
 * cms-pro.public.show_page_title=true OR the page metadata
 * show_page_title=true to show it. */
.cms-pro-page-header--sr-only {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---- Section / container ----------------------------------------- */
.cmsp-block {
    width: 100%;
    padding: var(--cmsp-pad-y) var(--cmsp-pad-x);
}
.cmsp-block--flush { padding: 0; }
.cmsp-block--in-column { padding: 0; }

.cmsp-container {
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}
.cmsp-container--narrow { max-width: 880px; }
.cmsp-container--wide { max-width: 1400px; }

/* ---- Section header ---------------------------------------------- */
.cmsp-head {
    text-align: center;
    margin: 0 auto 40px;
    max-width: 760px;
}
.cmsp-head--left { text-align: left; margin-left: 0; }
.cmsp-head--full { max-width: 100%; }
.cmsp-head__title {
    font-family: var(--cmsp-heading-font);
    color: var(--cmsp-heading);
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 12px;
}
.cmsp-head__lead {
    color: var(--cmsp-muted);
    font-size: clamp(1rem, 1.4vw, 1.05rem);
    margin: 0;
}

/* ---- Generic grid ------------------------------------------------- */
.cmsp-grid {
    display: grid;
    gap: var(--cmsp-gap);
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.cmsp-grid--cols-2 { grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); }
.cmsp-grid--cols-3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.cmsp-grid--cols-4 { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
@media (min-width: 720px) {
    .cmsp-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 960px) {
    .cmsp-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
    .cmsp-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
}

/* ---- Buttons ------------------------------------------------------ */
.cmsp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 26px;
    border-radius: var(--cmsp-radius);
    border: 1px solid transparent;
    font-family: var(--cmsp-font);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.cmsp-btn--primary {
    background: var(--cmsp-primary);
    color: #fff;
}
.cmsp-btn--primary:hover {
    background: color-mix(in srgb, var(--cmsp-primary) 88%, #000);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--cmsp-shadow-sm);
}
.cmsp-btn--ghost {
    background: transparent;
    color: var(--cmsp-text);
    border-color: var(--cmsp-border);
}
.cmsp-btn--ghost:hover {
    border-color: var(--cmsp-primary);
    color: var(--cmsp-primary);
}
.cmsp-btn--outline-light {
    background: transparent;
    color: #fff;
    border-color: #fff;
}
.cmsp-btn--outline-light:hover {
    background: #fff;
    color: var(--cmsp-primary);
}

/* ---- Card primitive ---------------------------------------------- */
.cmsp-card {
    background: var(--cmsp-surface);
    border-radius: var(--cmsp-radius);
    border: 1px solid var(--cmsp-border);
    padding: clamp(20px, 2.5vw, 28px);
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cmsp-card--hover:hover {
    transform: translateY(-3px);
    box-shadow: var(--cmsp-shadow-md);
}
.cmsp-card--plain {
    border: 0;
    padding: 0;
    background: transparent;
}

/* ---- Rich text content ------------------------------------------- */
.cmsp-prose {
    color: var(--cmsp-text);
    font-size: 1rem;
    line-height: 1.7;
}
.cmsp-prose > *:first-child { margin-top: 0; }
.cmsp-prose > *:last-child { margin-bottom: 0; }
.cmsp-prose h1, .cmsp-prose h2, .cmsp-prose h3,
.cmsp-prose h4, .cmsp-prose h5, .cmsp-prose h6 {
    color: var(--cmsp-heading);
    font-family: var(--cmsp-heading-font);
    line-height: 1.25;
    margin: 1.25em 0 0.5em;
    font-weight: 700;
}
.cmsp-prose a { color: var(--cmsp-link); }
.cmsp-prose img {
    max-width: 100%;
    height: auto;
    border-radius: var(--cmsp-radius);
}
.cmsp-prose ul, .cmsp-prose ol {
    padding-left: 1.4em;
}

/* ---- Spacer ------------------------------------------------------- */
.cmsp-spacer {
    width: 100%;
    display: block;
}
.cmsp-spacer--line {
    display: flex;
    align-items: center;
}
.cmsp-spacer--line hr {
    flex: 1;
    margin: 0;
    border: 0;
    border-top: 1px solid var(--cmsp-border);
}

/* ---- Rich text widget -------------------------------------------- */
.cmsp-richtext .cmsp-head { margin-bottom: 24px; }

/* ---- Section header widget --------------------------------------- */
.cmsp-section-header { padding: clamp(40px, 6vw, 72px) var(--cmsp-pad-x); }

/* ---- Callout ------------------------------------------------------ */
.cmsp-callout {
    --cmsp-callout-bg: var(--cmsp-surface-alt);
    --cmsp-callout-accent: var(--cmsp-primary);
    background: var(--cmsp-callout-bg);
    border-left: 4px solid var(--cmsp-callout-accent);
    border-radius: var(--cmsp-radius);
    padding: 20px 24px;
    margin: 24px 0;
}
.cmsp-callout__title {
    font-family: var(--cmsp-heading-font);
    color: var(--cmsp-heading);
    font-weight: 700;
    font-size: 1.05rem;
    margin: 0 0 8px;
}
.cmsp-callout__body { font-size: 0.96rem; }
.cmsp-callout__body p:last-child { margin-bottom: 0; }
.cmsp-callout__body a { color: var(--cmsp-link); font-weight: 500; }

/* ---- CTA banner --------------------------------------------------- */
.cmsp-cta {
    --cmsp-cta-bg: var(--cmsp-primary);
    --cmsp-cta-fg: #ffffff;
    background: var(--cmsp-cta-bg);
    color: var(--cmsp-cta-fg);
    border-radius: var(--cmsp-radius);
    padding: clamp(28px, 4vw, 56px);
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    align-items: center;
}
@media (min-width: 720px) {
    .cmsp-cta { grid-template-columns: 1fr auto; }
}
.cmsp-cta__title {
    font-family: var(--cmsp-heading-font);
    color: inherit;
    font-size: clamp(1.4rem, 2.4vw, 2rem);
    margin: 0 0 8px;
    line-height: 1.25;
    font-weight: 700;
}
.cmsp-cta__text { margin: 0; opacity: 0.92; }
.cmsp-cta__sub { margin: 6px 0 0; font-size: 0.95rem; opacity: 0.78; }
.cmsp-cta .cmsp-btn--outline-light {
    border-color: var(--cmsp-cta-fg);
    color: var(--cmsp-cta-fg);
}
.cmsp-cta .cmsp-btn--outline-light:hover {
    background: var(--cmsp-cta-fg);
    color: var(--cmsp-cta-bg);
}

/* ---- Feature / Info / Content boxes ------------------------------ */
.cmsp-feature {
    text-align: center;
    padding: 28px 22px;
    background: var(--cmsp-surface);
    border: 1px solid var(--cmsp-border);
    border-radius: var(--cmsp-radius);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.cmsp-feature:hover {
    transform: translateY(-3px);
    box-shadow: var(--cmsp-shadow-md);
    border-color: color-mix(in srgb, var(--cmsp-primary) 30%, var(--cmsp-border));
}
.cmsp-feature__icon {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--cmsp-primary) 12%, transparent);
    color: var(--cmsp-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 16px;
}
.cmsp-feature__title {
    font-family: var(--cmsp-heading-font);
    color: var(--cmsp-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0 0 8px;
}
.cmsp-feature__text {
    color: var(--cmsp-muted);
    margin: 0;
    font-size: 0.95rem;
}

.cmsp-content-box {
    background: var(--cmsp-surface);
    border: 1px solid var(--cmsp-border);
    border-radius: var(--cmsp-radius);
    padding: clamp(20px, 2.5vw, 28px);
    margin-bottom: var(--cmsp-gap);
}
.cmsp-content-box--plain {
    background: transparent;
    border: 0;
    padding: 0;
}
.cmsp-content-box__title {
    font-family: var(--cmsp-heading-font);
    color: var(--cmsp-heading);
    margin: 0 0 12px;
    font-weight: 700;
}

/* ---- FAQ accordion ------------------------------------------------ */
.cmsp-faq-block .cmsp-head__title { color: var(--cmsp-faq-heading, var(--cmsp-heading)); }
.cmsp-faq {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
/* Two-column desktop layout.
 * IMPORTANT: when items are split into sections (Common / Technical
 * etc.), only the OUTER `.cmsp-faq-sections` becomes 2-up. Each
 * inner `.cmsp-faq` must stay single-column — applying a 2-col grid
 * to both layers stacks 2×2 = 4 columns (the visible regression on
 * /faqs and the homepage). The `.cmsp-faq-block--cols-2 :not(.cmsp-faq-section) > .cmsp-faq`
 * scoping guard limits the inner-grid rule to flat (non-sectioned)
 * accordions. */
.cmsp-faq-sections { display: flex; flex-direction: column; gap: 28px; }
@media (min-width: 768px) {
    /* Sectioned: outer grid is 2-up, inner stays single column. */
    .cmsp-faq-block--cols-2 .cmsp-faq-sections { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; }
    /* Flat (no sections): the items themselves become 2-up. */
    .cmsp-faq-block--cols-2 > .cmsp-container > .cmsp-faq { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; align-items: start; }
}
.cmsp-faq-section__title {
    color: var(--cmsp-faq-heading, var(--cmsp-heading));
    font-family: var(--cmsp-heading-font);
    font-size: 1.25rem;
    font-weight: 700;
    margin: 0 0 14px;
    text-transform: none;
}
/* SVG / image pointer (admin-supplied URL via --cmsp-faq-pointer) */
.cmsp-faq-block--pointer-svg .cmsp-faq__q::after {
    content: "";
    width: 22px;
    height: 22px;
    border: 0;
    background-image: var(--cmsp-faq-pointer);
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center;
    transform: rotate(0deg);
    transition: transform 0.18s ease;
    margin-top: 0;
    margin-left: auto;
    flex: none;
}
.cmsp-faq-block--pointer-svg .cmsp-faq__item[open] .cmsp-faq__q::after {
    transform: rotate(180deg);
    margin-top: 0;
}
.cmsp-faq__item {
    border: 1px solid var(--cmsp-border);
    border-radius: var(--cmsp-radius);
    background: var(--cmsp-surface);
    overflow: hidden;
}
.cmsp-faq__item[open] {
    border-color: color-mix(in srgb, var(--cmsp-primary) 35%, var(--cmsp-border));
    box-shadow: var(--cmsp-shadow-sm);
}
.cmsp-faq__q {
    list-style: none;
    cursor: pointer;
    padding: 18px 22px;
    font-family: var(--cmsp-heading-font);
    color: var(--cmsp-heading);
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 16px;
    user-select: none;
}
.cmsp-faq__q::-webkit-details-marker { display: none; }
.cmsp-faq__q::after {
    content: "";
    width: 12px;
    height: 12px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.18s ease;
    margin-left: auto;
    flex: none;
    margin-top: -4px;
}
.cmsp-faq__item[open] .cmsp-faq__q::after { transform: rotate(-135deg); margin-top: 4px; }
.cmsp-faq__a {
    padding: 0 22px 20px;
    color: var(--cmsp-text);
}
.cmsp-faq__a > *:last-child { margin-bottom: 0; }

/* ---- Stats counter ------------------------------------------------ */
.cmsp-stats {
    --cmsp-stats-bg: var(--cmsp-secondary);
    --cmsp-stats-fg: #ffffff;
    background: var(--cmsp-stats-bg);
    color: var(--cmsp-stats-fg);
    border-radius: var(--cmsp-radius);
    padding: clamp(32px, 4vw, 56px);
}
.cmsp-stats--light {
    --cmsp-stats-bg: var(--cmsp-surface-alt);
    --cmsp-stats-fg: var(--cmsp-text);
}
.cmsp-stats--primary { --cmsp-stats-bg: var(--cmsp-primary); }
.cmsp-stat { text-align: center; }
.cmsp-stat__icon {
    font-size: 2rem;
    opacity: 0.85;
    margin-bottom: 10px;
}
.cmsp-stat__value {
    font-family: var(--cmsp-heading-font);
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    line-height: 1;
    margin: 0 0 6px;
    color: inherit;
}
.cmsp-stat__label {
    font-size: 0.95rem;
    opacity: 0.85;
    margin: 0;
}

/* ---- Pricing table ----------------------------------------------- */
.cmsp-pricing {
    display: grid;
    gap: var(--cmsp-gap);
    grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
}
.cmsp-pricing__plan {
    background: var(--cmsp-surface);
    border: 1px solid var(--cmsp-border);
    border-radius: var(--cmsp-radius);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    text-align: center;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.cmsp-pricing__plan--highlight {
    border-color: var(--cmsp-primary);
    box-shadow: 0 12px 30px color-mix(in srgb, var(--cmsp-primary) 18%, transparent);
    transform: translateY(-4px);
}
.cmsp-pricing__name {
    font-family: var(--cmsp-heading-font);
    color: var(--cmsp-heading);
    font-size: 1.1rem;
    margin: 0 0 12px;
    font-weight: 700;
}
.cmsp-pricing__price {
    font-family: var(--cmsp-heading-font);
    color: var(--cmsp-primary);
    font-size: 2.4rem;
    font-weight: 700;
    line-height: 1;
}
.cmsp-pricing__cycle {
    color: var(--cmsp-muted);
    font-size: 0.85rem;
    margin-top: 4px;
}
.cmsp-pricing__desc {
    color: var(--cmsp-muted);
    font-size: 0.92rem;
    margin: 14px 0 18px;
}
.cmsp-pricing__features {
    list-style: none;
    padding: 0;
    margin: 0 0 22px;
    text-align: left;
    flex: 1;
}
.cmsp-pricing__features li {
    padding: 8px 0;
    border-bottom: 1px dashed var(--cmsp-border);
    font-size: 0.93rem;
    display: flex;
    align-items: center;
    gap: 10px;
}
.cmsp-pricing__features li:last-child { border-bottom: 0; }
.cmsp-pricing__features li::before {
    content: "";
    width: 16px;
    height: 16px;
    flex: none;
    border-radius: 999px;
    background: color-mix(in srgb, var(--cmsp-primary) 15%, transparent);
    background-image: linear-gradient(45deg, transparent 38%, var(--cmsp-primary) 38% 48%, transparent 48% 56%, var(--cmsp-primary) 56% 66%, transparent 66%);
}

/* ---- Process steps ----------------------------------------------- */
.cmsp-steps {
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.cmsp-step {
    display: grid;
    grid-template-columns: minmax(240px, 320px) 1fr;
    align-items: center;
    gap: clamp(16px, 2vw, 28px);
}
.cmsp-step__head {
    display: flex;
    align-items: center;
    gap: 0;
}
.cmsp-step__num {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--cmsp-surface);
    color: var(--cmsp-heading);
    box-shadow: var(--cmsp-shadow-md);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: var(--cmsp-heading-font);
    font-size: 1.4rem;
    font-weight: 700;
    margin-right: -22px;
    position: relative;
    z-index: 2;
}
.cmsp-step__title {
    flex: 1 1 auto;
    background: var(--cmsp-step-bg, var(--cmsp-primary));
    color: var(--cmsp-step-fg, #fff);
    padding: 14px 22px 14px 42px;
    margin: 0;
    font-family: var(--cmsp-heading-font);
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%);
}
.cmsp-step__body {
    color: var(--cmsp-text);
    font-size: 0.96rem;
}
.cmsp-step__body > *:last-child { margin-bottom: 0; }
@media (max-width: 700px) {
    .cmsp-step {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 32px 18px 20px;
        position: relative;
        background: color-mix(in srgb, var(--cmsp-step-bg, var(--cmsp-primary)) 8%, var(--cmsp-surface));
        border-left: 4px solid var(--cmsp-step-bg, var(--cmsp-primary));
        border-radius: var(--cmsp-radius);
    }
    .cmsp-step__head { flex-direction: column; align-items: stretch; }
    .cmsp-step__num {
        position: absolute;
        top: -22px;
        left: 50%;
        transform: translateX(-50%);
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
        margin: 0;
    }
    .cmsp-step__title {
        clip-path: none;
        text-align: center;
        padding: 12px 16px;
        border-radius: calc(var(--cmsp-radius) / 2);
    }
}

/* ---- Logo / technology slider (static fallback grid) ------------- */
.cmsp-logos {
    display: grid;
    gap: clamp(18px, 2vw, 32px);
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    align-items: center;
    justify-items: center;
}
.cmsp-logos__item {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px;
}
.cmsp-logos__item img {
    max-width: 100%;
    height: auto;
    max-height: 60px;
    filter: grayscale(1);
    opacity: 0.75;
    transition: filter 0.2s ease, opacity 0.2s ease;
}
.cmsp-logos__item:hover img {
    filter: none;
    opacity: 1;
}

/* ---- Content / Blog grid ----------------------------------------- */
.cmsp-content-card {
    display: flex;
    flex-direction: column;
    background: var(--cmsp-surface);
    border-radius: var(--cmsp-radius);
    overflow: hidden;
    height: 100%;
    border: 1px solid transparent;
    transition: box-shadow 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}
.cmsp-content-card--bordered { border-color: var(--cmsp-border); }
.cmsp-content-card:hover {
    box-shadow: var(--cmsp-shadow-md);
    transform: translateY(-2px);
}
.cmsp-content-card__media {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: var(--cmsp-surface-alt);
}
.cmsp-content-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}
.cmsp-content-card:hover .cmsp-content-card__media img { transform: scale(1.04); }
.cmsp-content-card__body {
    padding: clamp(16px, 2vw, 22px);
    display: flex;
    flex-direction: column;
    flex: 1;
}
.cmsp-content-card__meta {
    font-size: 0.8rem;
    color: var(--cmsp-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-bottom: 8px;
}
.cmsp-content-card__meta a { color: var(--cmsp-link); text-decoration: none; }
.cmsp-content-card__title {
    font-family: var(--cmsp-heading-font);
    font-size: 1.1rem;
    line-height: 1.35;
    margin: 0 0 10px;
    font-weight: 700;
}
.cmsp-content-card__title a {
    color: var(--cmsp-heading);
    text-decoration: none;
}
.cmsp-content-card__title a:hover { color: var(--cmsp-link); }
.cmsp-content-card__excerpt {
    color: var(--cmsp-muted);
    font-size: 0.95rem;
    margin: 0 0 14px;
    flex: 1;
}
.cmsp-content-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
}
.cmsp-content-card__tags a {
    display: inline-flex;
    padding: 3px 10px;
    background: var(--cmsp-surface-alt);
    color: var(--cmsp-muted);
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 999px;
    transition: background 0.2s, color 0.2s;
}
.cmsp-content-card__tags a:hover {
    background: var(--cmsp-primary);
    color: #fff;
}

/* ---- Empty state -------------------------------------------------- */
.cmsp-empty {
    text-align: center;
    padding: clamp(40px, 6vw, 64px) var(--cmsp-pad-x);
    border: 2px dashed var(--cmsp-border);
    border-radius: var(--cmsp-radius);
    color: var(--cmsp-muted);
}
.cmsp-empty p { margin: 0; }

/* ---- Hero slider -------------------------------------------------- */
.cmsp-hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
    border-radius: 0;
    --cmsp-hero-height: clamp(360px, 60vh, 620px);
}
/* Transparent backdrop — lets the slide image be the entire banner
 * (no dark letterbox on either side). Combined with --cmsp-hero-aspect
 * this makes the wrapper exactly as tall as the image at every viewport
 * size, so the banner stretches edge-to-edge. */
.cmsp-hero--transparent { background: transparent; }
.cmsp-hero--cover { background: transparent; }
.cmsp-hero--no-overlay .cmsp-hero__overlay { display: none; }
.cmsp-hero--no-caption .cmsp-hero__content { display: none; }
.cmsp-hero__viewport {
    position: relative;
    height: var(--cmsp-hero-height);
}
/* When the host gives us an aspect ratio, drop the fixed height in
 * favour of an aspect-driven viewport so the image stays full-bleed
 * without crop or letterbox at any viewport width. */
.cmsp-hero[style*="--cmsp-hero-aspect"] .cmsp-hero__viewport {
    height: auto;
    aspect-ratio: var(--cmsp-hero-aspect);
}
.cmsp-hero--cover .cmsp-hero__media img,
.cmsp-hero--transparent .cmsp-hero__media img { object-fit: cover; }
.cmsp-hero__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}
.cmsp-hero__slide[data-active="true"] {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}
.cmsp-hero__media,
.cmsp-hero__media picture,
.cmsp-hero__media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.cmsp-hero__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
}
.cmsp-hero__content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    padding: clamp(24px, 5vw, 60px);
    color: #fff;
}
.cmsp-hero__content[data-v="top"] { align-items: flex-start; }
.cmsp-hero__content[data-v="center"] { align-items: center; }
.cmsp-hero__content[data-v="bottom"] { align-items: flex-end; }
.cmsp-hero__inner { max-width: 720px; }
.cmsp-hero__content[data-h="left"] { justify-content: flex-start; text-align: left; }
.cmsp-hero__content[data-h="center"] { justify-content: center; text-align: center; }
.cmsp-hero__content[data-h="center"] .cmsp-hero__inner { margin-inline: auto; }
.cmsp-hero__content[data-h="right"] { justify-content: flex-end; text-align: right; }
.cmsp-hero__heading {
    font-family: var(--cmsp-heading-font);
    color: #fff;
    font-size: clamp(1.8rem, 4vw, 3.4rem);
    line-height: 1.1;
    margin: 0 0 14px;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.cmsp-hero__desc {
    color: rgba(255, 255, 255, 0.94);
    margin: 0 0 22px;
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
}
.cmsp-hero__nav {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 12px;
}
.cmsp-hero__btn {
    pointer-events: auto;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 0;
    background: rgba(255, 255, 255, 0.85);
    color: var(--cmsp-text);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.18s ease;
}
.cmsp-hero__btn:hover { background: #fff; }
.cmsp-hero__btn::before {
    content: "";
    width: 10px;
    height: 10px;
    border-top: 2px solid currentColor;
    border-left: 2px solid currentColor;
    transform: rotate(-45deg);
    margin-left: 4px;
}
.cmsp-hero__btn--next::before {
    transform: rotate(135deg);
    margin-left: -4px;
}
.cmsp-hero__dots {
    position: absolute;
    bottom: 18px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    gap: 8px;
    z-index: 3;
}
.cmsp-hero__dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 0;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease;
}
.cmsp-hero__dot[data-active="true"] {
    background: #fff;
    transform: scale(1.2);
}

/* ---- Forms (contact / quote) ------------------------------------ */
.cmsp-form {
    display: grid;
    gap: 16px;
    max-width: 720px;
}
.cmsp-form__row {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr;
}
@media (min-width: 600px) {
    .cmsp-form__row--2 { grid-template-columns: 1fr 1fr; }
}
.cmsp-form__label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--cmsp-heading);
    margin-bottom: 4px;
    display: block;
}
.cmsp-form__input,
.cmsp-form__textarea,
.cmsp-form__select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--cmsp-border);
    border-radius: var(--cmsp-radius);
    font-family: inherit;
    font-size: 0.95rem;
    color: var(--cmsp-text);
    background: var(--cmsp-surface);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
.cmsp-form__input:focus,
.cmsp-form__textarea:focus,
.cmsp-form__select:focus {
    outline: 0;
    border-color: var(--cmsp-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--cmsp-primary) 22%, transparent);
}
.cmsp-form__textarea { min-height: 140px; resize: vertical; }
