/* ============================================================
   LonexCommunity — Page Builder output (v1.33)

   Styles for pages assembled from blocks. Everything here is
   built on the site's own tokens (--accent, --bg-card, --border,
   --radius, --container) and reuses .btn / .container from
   style.css, so a built page inherits the site's branding and
   stays consistent with it automatically.

   All selectors are scoped under .lpb so nothing here can leak
   into the rest of the site.
   ============================================================ */

.lpb {
    --lpb-sp-tight: 36px;
    --lpb-sp-normal: 64px;
    --lpb-sp-roomy: 104px;
    --lpb-gap: 24px;
}

/* Vertical rhythm — one scale, applied consistently. This is the
   single biggest reason hand-written custom pages looked off. */
.lpb-block { padding-top: var(--lpb-sp-normal); padding-bottom: var(--lpb-sp-normal); }
.lpb-block.lpb-sp-tight { padding-top: var(--lpb-sp-tight); padding-bottom: var(--lpb-sp-tight); }
.lpb-block.lpb-sp-roomy { padding-top: var(--lpb-sp-roomy); padding-bottom: var(--lpb-sp-roomy); }

/* Adjacent sections would otherwise stack both paddings and drift apart; the
   preceding section's bottom padding is the gap. */
.lpb-block + .lpb-block:not(.lpb-hero) { padding-top: 0; }
/* Two tinted panels in a row do need a visible seam between them. */
.lpb-block.lpb-tone-card + .lpb-block.lpb-tone-card,
.lpb-block.lpb-tone-accent + .lpb-block.lpb-tone-accent { padding-top: var(--lpb-sp-tight); }

/* Alignment + width modifiers */
.lpb-al-left   { text-align: left; }
.lpb-al-center { text-align: center; }
.lpb-al-right  { text-align: right; }

.lpb-w-narrow .container { max-width: 760px; }
.lpb-w-normal .container { max-width: var(--container); }
.lpb-w-wide   .container { max-width: 1320px; }

/* Tinted panels */
.lpb-tone-card > .container,
.lpb-tone-accent > .container {
    border-radius: var(--radius-lg, 12px);
    padding-top: 40px;
    padding-bottom: 40px;
}
.lpb-tone-card > .container {
    background: var(--bg-card);
    border: 1px solid var(--border);
}
.lpb-tone-accent > .container {
    background: var(--accent-dim);
    border: 1px solid var(--accent);
}

/* ---------------------------------------------- Shared typography */

.lpb-head {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 12px;
}
h2.lpb-head { font-size: 2rem; }
h3.lpb-head { font-size: 1.5rem; }
h4.lpb-head { font-size: 1.2rem; }

.lpb-sub {
    color: var(--text-dim);
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0;
}

.lpb-section-head { margin-bottom: 36px; }
.lpb-section-head .lpb-sub { max-width: 680px; }
.lpb-al-center .lpb-section-head .lpb-sub { margin-left: auto; margin-right: auto; }

/* Rich text (Markdown output) */
.lpb-prose { color: var(--text-dim); line-height: 1.75; font-size: 1rem; }
.lpb-prose > *:first-child { margin-top: 0; }
.lpb-prose > *:last-child  { margin-bottom: 0; }
.lpb-prose h1,
.lpb-prose h2,
.lpb-prose h3,
.lpb-prose h4 {
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.3;
    margin: 1.8em 0 .6em;
}
.lpb-prose h1 { font-size: 1.9rem; }
.lpb-prose h2 { font-size: 1.5rem; }
.lpb-prose h3 { font-size: 1.25rem; }
.lpb-prose h4 { font-size: 1.05rem; }
.lpb-prose p { margin: 0 0 1.1em; }
.lpb-prose a { color: var(--accent); text-decoration: none; }
.lpb-prose a:hover { text-decoration: underline; }
.lpb-prose strong { color: var(--text); font-weight: 600; }
.lpb-prose ul,
.lpb-prose ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.lpb-prose li { margin-bottom: .4em; }
.lpb-prose blockquote {
    margin: 1.2em 0;
    padding: 4px 0 4px 18px;
    border-left: 3px solid var(--accent);
    color: var(--text-dim);
}
.lpb-prose code {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: .9em;
}
.lpb-prose pre {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    overflow-x: auto;
    margin: 0 0 1.1em;
}
.lpb-prose pre code { background: none; border: none; padding: 0; }
.lpb-prose img { border-radius: var(--radius); }
.lpb-prose table { width: 100%; border-collapse: collapse; margin: 0 0 1.1em; }
.lpb-prose th,
.lpb-prose td { border: 1px solid var(--border); padding: 8px 12px; text-align: left; }
.lpb-prose th { background: var(--bg-card); color: var(--text); }
.lpb-prose hr { border: none; border-top: 1px solid var(--border); margin: 2em 0; }

/* Button rows */
.lpb-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}
.lpb-btn-row:first-child { margin-top: 0; }
.lpb-al-center .lpb-btn-row,
.lpb-btn-row.lpb-al-center { justify-content: center; }
.lpb-al-right .lpb-btn-row,
.lpb-btn-row.lpb-al-right { justify-content: flex-end; }

/* ------------------------------------------------------- Hero */

.lpb-hero {
    position: relative;
    padding-top: 88px;
    padding-bottom: 88px;
    overflow: hidden;
    background-size: cover;
    background-position: center;
}
.lpb-hero--compact { padding-top: 56px; padding-bottom: 56px; }
.lpb-hero--tall    { padding-top: 132px; padding-bottom: 132px; }

/* Default look when no colour is picked: the site's accent, dimmed.
   A hero always sits on brand even if the author configures nothing. */
.lpb-hero--gradient:not([style*="background"]) {
    background: linear-gradient(135deg, var(--accent-dim) 0%, var(--bg-darker) 100%);
    border-bottom: 1px solid var(--border);
}
.lpb-hero--plain { border-bottom: 1px solid var(--border); }

.lpb-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, .55) 0%, rgba(0, 0, 0, .75) 100%);
}
.lpb-hero-inner { position: relative; z-index: 1; }

.lpb-eyebrow {
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .78rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 14px;
}
.lpb-hero-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.1rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 16px;
}
.lpb-hero-sub {
    color: var(--text-dim);
    font-size: 1.12rem;
    line-height: 1.65;
    max-width: 620px;
    margin: 0;
}
.lpb-hero.lpb-al-center .lpb-hero-sub { margin-left: auto; margin-right: auto; }
.lpb-hero--image .lpb-hero-sub { color: rgba(255, 255, 255, .85); }

/* ------------------------------------------------- Grids/cards */

.lpb-grid {
    display: grid;
    gap: var(--lpb-gap);
}
.lpb-cols-2 { grid-template-columns: repeat(2, 1fr); }
.lpb-cols-3 { grid-template-columns: repeat(3, 1fr); }
.lpb-cols-4 { grid-template-columns: repeat(4, 1fr); }

.lpb-card {
    display: block;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 12px);
    padding: 26px;
    text-align: left;
    transition: border-color .15s ease, transform .15s ease;
}
.lpb-card--link { text-decoration: none; color: inherit; }
.lpb-card--link:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}
.lpb-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--accent-dim);
    color: var(--accent);
    margin-bottom: 16px;
}
.lpb-card-title {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0 0 8px;
    color: var(--text);
}
.lpb-card-text {
    color: var(--text-dim);
    font-size: .94rem;
    line-height: 1.65;
    margin: 0;
}
.lpb-card-link {
    display: inline-block;
    margin-top: 14px;
    color: var(--accent);
    font-size: .875rem;
    font-weight: 600;
}
.lpb-card-link::after { content: " →"; }

/* --------------------------------------------------- Gallery */

.lpb-gallery-item {
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
    border: 1px solid var(--border);
    aspect-ratio: 4 / 3;
    background: var(--bg-card);
}
.lpb-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------------------------------------------------- Figure */

.lpb-figure { margin: 0; }
.lpb-figure img { display: block; width: 100%; height: auto; }
.lpb-figure--rounded img { border-radius: var(--radius-lg, 12px); }
.lpb-figure figcaption {
    color: var(--text-muted);
    font-size: .85rem;
    margin-top: 10px;
    text-align: center;
}

/* ----------------------------------------------------- Split */

.lpb-split-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 48px;
    align-items: center;
}
.lpb-split--left .lpb-split-text { order: 2; }
.lpb-split--left .lpb-split-media { order: 1; }
.lpb-split-media img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg, 12px);
    border: 1px solid var(--border);
}
.lpb-split-text .lpb-head { margin-bottom: 16px; }

/* ----------------------------------------------------- Stats */

.lpb-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--lpb-gap);
    text-align: center;
}
.lpb-stat-value {
    font-family: var(--font-display);
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--accent);
    line-height: 1.1;
}
.lpb-stat-label {
    color: var(--text-dim);
    font-size: .9rem;
    margin-top: 6px;
}

/* ----------------------------------------------------- Steps */

.lpb-steps-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.lpb-step {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 12px);
    padding: 20px 24px;
    text-align: left;
}
.lpb-step-num {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--accent);
    color: #000;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .95rem;
}
.lpb-step-title {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 600;
    margin: 4px 0 6px;
}
.lpb-step-text { color: var(--text-dim); font-size: .94rem; line-height: 1.65; margin: 0; }

/* ------------------------------------------------------- FAQ */

.lpb-faq { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.lpb-faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}
.lpb-faq-item[open] { border-color: var(--accent); }
.lpb-faq-q {
    cursor: pointer;
    list-style: none;
    padding: 16px 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.lpb-faq-q::-webkit-details-marker { display: none; }
.lpb-faq-marker {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--text-dim);
    border-bottom: 2px solid var(--text-dim);
    transform: rotate(45deg);
    transition: transform .15s ease;
    margin-bottom: 4px;
}
.lpb-faq-item[open] .lpb-faq-marker { transform: rotate(-135deg); margin-bottom: 0; margin-top: 4px; }
.lpb-faq-a { padding: 0 20px 18px; }

/* ------------------------------------------------------- CTA */

.lpb-cta-panel {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg, 12px);
    padding: 44px 36px;
}
.lpb-cta.lpb-tone-accent .lpb-cta-panel {
    background: linear-gradient(135deg, var(--accent-dim) 0%, var(--bg-card) 100%);
    border-color: var(--accent);
}
.lpb-cta.lpb-tone-none .lpb-cta-panel { background: none; border: none; padding: 0; }
.lpb-cta-title {
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 10px;
}
.lpb-cta-text { color: var(--text-dim); font-size: 1.02rem; margin: 0; }

/* ----------------------------------------------------- Embed */

.lpb-embed {
    position: relative;
    width: 100%;
    border-radius: var(--radius-lg, 12px);
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000;
}
.lpb-embed::before { content: ""; display: block; padding-top: 56.25%; }
.lpb-embed--4-3::before { padding-top: 75%; }
.lpb-embed--1-1::before { padding-top: 100%; }
.lpb-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* --------------------------------------------------- Divider */

.lpb-divider { padding-top: 0; padding-bottom: 0; }
.lpb-divider.lpb-sp-tight  { height: 36px; }
.lpb-divider.lpb-sp-normal { height: 64px; }
.lpb-divider.lpb-sp-roomy  { height: 104px; }
.lpb-divider .container { height: 100%; display: flex; align-items: center; }
.lpb-hr { width: 100%; border: none; border-top: 1px solid var(--border); margin: 0; }

/* ------------------------------------------------ Responsive */

@media (max-width: 900px) {
    .lpb-cols-3,
    .lpb-cols-4 { grid-template-columns: repeat(2, 1fr); }
    .lpb-split-grid { grid-template-columns: 1fr; gap: 28px; }
    .lpb-split--left .lpb-split-text,
    .lpb-split--left .lpb-split-media { order: 0; }
}

@media (max-width: 600px) {
    .lpb {
        --lpb-sp-tight: 28px;
        --lpb-sp-normal: 44px;
        --lpb-sp-roomy: 64px;
        --lpb-gap: 16px;
    }
    .lpb-cols-2,
    .lpb-cols-3,
    .lpb-cols-4 { grid-template-columns: 1fr; }
    .lpb-hero { padding-top: 60px; padding-bottom: 60px; }
    .lpb-hero--tall { padding-top: 84px; padding-bottom: 84px; }
    .lpb-cta-panel { padding: 28px 20px; }
    .lpb-btn-row .btn { width: 100%; }
    h2.lpb-head { font-size: 1.6rem; }
}
