/**
 * Layout Builder Front-End Styles
 * Used by single-layout.php for posts/pages with the Layout Builder enabled.
 *
 * Patterns are intentionally aligned with css/exhibit-template-visual.css so
 * the visual language stays consistent across the site.
 */

/* ==== container reset ==== */
.layout-builder-post {
    max-width: none;
    margin: 0;
    padding: 0;
    width: 100%;
}
.layout-section { display: block; }

/* ==== shared typography (Swiss design system — Inter + tokenized sizes) ==== */
.layout-builder-post h2 {
    font-size: clamp(34px, 4.4vw, 72px);
    font-weight: 300;
    letter-spacing: -.03em;
    line-height: .95;
    color: var(--ink, #0a0a0a);
    margin: 0 0 25px;
}
.layout-builder-post h2 b { font-weight: 700; }
.layout-builder-post .lb-text-content,
.layout-builder-post .lb-text-content p {
    font-size: var(--t-deck, 17px);
    line-height: 1.6;
    color: #888;
}
.layout-builder-post .lb-text-content p { margin-bottom: 1em; }

/* ==== shared button ==== */
.lb-button {
    display: inline-block;
    margin-top: 30px;
    padding: 14px 35px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--ink, #0a0a0a);
    background: transparent;
    border: 1px solid var(--ink, #0a0a0a);
    border-radius: 0;
    transition: background .15s ease, color .15s ease;
}
.lb-button:hover {
    color: #fff;
    background: var(--ink, #0a0a0a);
    border-color: var(--ink, #0a0a0a);
    text-decoration: none;
}

/* ==== banner ==== */
.lb-banner {
    background-color: #EAB830;
    background-image: linear-gradient(135deg, rgba(255,255,255,0.08) 25%, transparent 25%),
                      linear-gradient(225deg, rgba(255,255,255,0.06) 15%, transparent 15%);
    padding: 80px 60px 90px;
    width: 100%;
    box-sizing: border-box;
}
.lb-banner-subtitle {
    font-size: var(--t-label, 11px);
    font-weight: 600;
    letter-spacing: var(--tracking-label, .18em);
    text-transform: uppercase;
    color: #3a3a3a;
    margin-bottom: 20px;
}
.lb-banner-title {
    font-size: clamp(40px, 5.6vw, 96px);
    font-weight: 300;
    letter-spacing: var(--tracking-tight, -.04em);
    line-height: 1;
    color: #ffffff;
    margin: 0;
}
.lb-banner-title b { font-weight: 700; }

/* ==== intro + features ==== */
.lb-intro {
    padding: 80px 40px;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
}
.lb-intro-heading {
    font-size: clamp(34px, 4.4vw, 72px);
    font-weight: 300;
    letter-spacing: var(--tracking-tight, -.03em);
    line-height: .95;
    color: var(--ink, #0a0a0a);
    margin: 0 0 15px;
}
.lb-intro-heading b { font-weight: 700; }
.lb-intro-tagline {
    font-size: 20px;
    font-weight: 400;
    line-height: 1.5;
    color: var(--muted, #7a7a7a);
    max-width: 700px;
    margin: 0 auto;
}
.lb-features-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 30px 50px;
    margin-top: 60px;
    text-align: left;
}
.lb-2col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px 50px;
    margin-top: 60px;
    text-align: left;
}
.lb-2col-grid--2-1 { grid-template-columns: 2fr 1fr; }
.lb-2col-grid--1-2 { grid-template-columns: 1fr 2fr; }
.lb-feature-narrative,
.lb-feature-column {
    font-size: var(--t-deck, 17px);
    font-weight: 400;
    line-height: 1.6;
    color: #888;
}
.lb-feature-narrative p,
.lb-feature-column p { margin: 0 0 1em; }
.lb-feature-narrative h2,
.lb-feature-narrative h3,
.lb-feature-narrative h4,
.lb-feature-column h2,
.lb-feature-column h3,
.lb-feature-column h4 {
    color: var(--ink, #0a0a0a);
    font-weight: 700;
    margin: 0 0 12px;
}

/* ==== pull quote ==== */
.lb-pullquote {
    margin: 80px auto;
    max-width: 900px;
    padding: 0 25px;
}
.lb-pullquote-quote {
    margin: 0;
    font-size: 32px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--ink, #0a0a0a);
    quotes: "\201C" "\201D";
}
.lb-pullquote-quote::before { content: open-quote; }
.lb-pullquote-quote::after  { content: close-quote; }
.lb-pullquote-meta {
    margin-top: 28px;
    font-size: 13px;
    line-height: 1.4;
    color: #888;
}
.lb-pullquote-speaker {
    display: block;
    font-weight: 700;
    letter-spacing: var(--tracking-label, .18em);
    text-transform: uppercase;
    color: var(--ink, #0a0a0a);
}
.lb-pullquote-source {
    display: block;
    margin-top: 4px;
}

.lb-pullquote--centered            { text-align: center; }
.lb-pullquote--centered::before {
    content: "\275D";
    display: block;
    font-size: 100px;
    line-height: 1;
    color: #c8c8c8;
    margin-bottom: 20px;
}
.lb-pullquote--centered .lb-pullquote-quote { font-size: 38px; }
.lb-pullquote--centered .lb-pullquote-quote::before,
.lb-pullquote--centered .lb-pullquote-quote::after { content: none; }

.lb-pullquote--left-rule           { text-align: left; padding-left: 40px; border-left: 2px solid var(--ink, #0a0a0a); }
.lb-pullquote--left-rule .lb-pullquote-quote { font-size: 28px; }

.lb-pullquote--font-italic-serif .lb-pullquote-quote {
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-weight: 400;
}
.lb-pullquote--font-script .lb-pullquote-quote {
    font-family: "Dancing Script", "Brush Script MT", cursive;
    font-weight: 600;
    line-height: 1.2;
}
.lb-pullquote--font-display-italic .lb-pullquote-quote {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-style: italic;
    font-weight: 500;
    line-height: 1.25;
}
.lb-pullquote--centered.lb-pullquote--font-script .lb-pullquote-quote { font-size: 52px; }
.lb-pullquote--centered.lb-pullquote--font-display-italic .lb-pullquote-quote { font-size: 44px; }

/* ==== specifications table ==== */
.lb-spectable {
    max-width: 900px;
    margin: 80px auto;
    padding: 0 25px;
}
.lb-spectable-heading {
    font-size: 28px;
    font-weight: 700;
    color: var(--ink, #0a0a0a);
    margin: 0 0 16px;
}
.lb-spectable-intro {
    font-size: var(--t-deck, 17px);
    line-height: 1.6;
    color: #888;
    margin: 0 0 32px;
}
.lb-spectable-list {
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--ink, #0a0a0a);
}
.lb-spectable-row {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
    align-items: baseline;
    padding: 14px 0;
    border-bottom: 1px solid #e6e6e6;
}
.lb-spectable-label {
    margin: 0;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: var(--tracking-label, .18em);
    text-transform: uppercase;
    color: var(--ink, #0a0a0a);
}
.lb-spectable-value {
    margin: 0;
    font-size: var(--t-deck, 17px);
    line-height: 1.5;
    color: var(--ink, #0a0a0a);
}
.lb-spectable-note {
    display: inline-block;
    margin-left: 12px;
    font-size: 13px;
    color: #888;
    font-style: italic;
}

/* ==== timeline ==== */
.lb-timeline {
    max-width: 900px;
    margin: 80px auto;
    padding: 0 25px;
}
.lb-timeline-heading {
    font-size: 28px;
    font-weight: 700;
    color: var(--ink, #0a0a0a);
    margin: 0 0 16px;
}
.lb-timeline-intro {
    font-size: var(--t-deck, 17px);
    line-height: 1.6;
    color: #888;
    margin: 0 0 40px;
}
.lb-timeline-entries {
    list-style: none;
    padding: 0;
    margin: 0;
}
.lb-timeline-entry {
    position: relative;
}
.lb-timeline-date {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: var(--tracking-label, .18em);
    text-transform: uppercase;
    color: var(--ink, #0a0a0a);
}
.lb-timeline-image {
    margin: 0 0 12px;
}
.lb-timeline-image img {
    display: block;
    max-width: 100%;
    height: auto;
}
.lb-timeline-entry-heading {
    font-size: 18px;
    font-weight: 700;
    color: var(--ink, #0a0a0a);
    margin: 0 0 8px;
}
.lb-timeline-entry-description {
    font-size: var(--t-deck, 17px);
    line-height: 1.6;
    color: #888;
    margin: 0;
}

/* --- vertical, left-aligned dates --- */
.lb-timeline--vertical-left .lb-timeline-entry {
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 24px;
    padding: 0 0 36px 0;
    margin-left: 12px;
    border-left: 2px solid #e6e6e6;
    padding-left: 28px;
}
.lb-timeline--vertical-left .lb-timeline-entry::before {
    content: "";
    position: absolute;
    left: -7px;
    top: 4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ink, #0a0a0a);
}
.lb-timeline--vertical-left .lb-timeline-entry:last-child {
    padding-bottom: 0;
    border-left-color: transparent;
}
.lb-timeline--vertical-left .lb-timeline-date {
    align-self: start;
    padding-top: 2px;
}

/* --- vertical, alternating sides --- */
.lb-timeline--vertical-alt .lb-timeline-entries {
    position: relative;
    padding: 0;
}
.lb-timeline--vertical-alt .lb-timeline-entries::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    left: 50%;
    width: 2px;
    background: #e6e6e6;
    transform: translateX(-50%);
}
.lb-timeline--vertical-alt .lb-timeline-entry {
    display: grid;
    grid-template-columns: 1fr 24px 1fr;
    gap: 0;
    padding-bottom: 40px;
}
.lb-timeline--vertical-alt .lb-timeline-entry::before {
    content: "";
    grid-column: 2;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--ink, #0a0a0a);
    margin: 4px auto 0;
}
.lb-timeline--vertical-alt .lb-timeline-entry:nth-child(odd) .lb-timeline-date {
    grid-column: 1;
    text-align: right;
    padding-right: 24px;
}
.lb-timeline--vertical-alt .lb-timeline-entry:nth-child(odd) .lb-timeline-body {
    grid-column: 3;
    padding-left: 24px;
}
.lb-timeline--vertical-alt .lb-timeline-entry:nth-child(even) .lb-timeline-date {
    grid-column: 3;
    grid-row: 1;
    text-align: left;
    padding-left: 24px;
}
.lb-timeline--vertical-alt .lb-timeline-entry:nth-child(even) .lb-timeline-body {
    grid-column: 1;
    grid-row: 1;
    text-align: right;
    padding-right: 24px;
}
.lb-timeline--vertical-alt .lb-timeline-entry:nth-child(even) .lb-timeline-image {
    display: flex;
    justify-content: flex-end;
}

/* --- horizontal scrollable --- */
.lb-timeline--horizontal { max-width: none; padding: 0 25px; }
.lb-timeline--horizontal .lb-timeline-entries {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
    gap: 30px;
    padding: 20px 0 30px;
    scroll-snap-type: x mandatory;
    border-top: 2px solid #e6e6e6;
}
.lb-timeline--horizontal .lb-timeline-entry {
    flex: 0 0 280px;
    scroll-snap-align: start;
    padding-top: 24px;
    position: relative;
}
.lb-timeline--horizontal .lb-timeline-entry::before {
    content: "";
    position: absolute;
    top: -7px;
    left: 0;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--ink, #0a0a0a);
}
.lb-timeline--horizontal .lb-timeline-date { display: block; margin-bottom: 8px; }

/* ==== image + text (full-bleed) ==== */
.lb-image-text {
    display: flex;
    align-items: center;
    width: 100%;
}
.lb-image-text.lb-image-right { flex-direction: row-reverse; }
.lb-image-text-image {
    flex: 0 0 50%;
    box-sizing: border-box;
    padding: 60px;
}
.lb-image-text-image img {
    width: 100%;
    height: auto;
    display: block;
}
.lb-image-text-image--bordered img {
    border: 1px solid #ddd;
}
.lb-image-text-text {
    flex: 1;
    padding: 80px;
    max-width: 600px;
    box-sizing: border-box;
}

/* ==== video + text ==== */
.lb-video-text {
    display: flex;
    align-items: center;
    gap: 50px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 40px;
}
.lb-video-text-text   { flex: 0 0 33%; }
.lb-video-text-embed  { flex: 1; border-radius: 4px; overflow: hidden; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.lb-video-text-embed iframe {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
}

/* ---- video + text: accent band variant ---- */
.lb-video-text--accent {
    position: relative;
    max-width: 1200px;
    margin: 80px auto 100px;
    padding: 0 40px;
    align-items: flex-start;     /* don't stretch columns to equal height */
    gap: 40px;
    overflow: visible;
}
/* Yellow band: fixed height, full-bleed both sides. Matches .lb-banner —
   same base color and the same subtle diagonal-stripe overlay. */
.lb-video-text--accent::before {
    content: "";
    position: absolute;
    top: 0;
    height: 340px;
    left: calc(50% - 50vw);
    right: calc(50% - 50vw);
    background-color: #EAB830;
    background-image: linear-gradient(135deg, rgba(255,255,255,0.08) 25%, transparent 25%),
                      linear-gradient(225deg, rgba(255,255,255,0.06) 15%, transparent 15%);
    z-index: 0;
}
.lb-video-text--accent.lb-video-text--video-left {
    flex-direction: row-reverse;
}

/* Text column: heading sits on the yellow band; body copy is a white card
   that overlaps the band and projects below it. */
.lb-video-text--accent .lb-video-text-text {
    position: relative;
    z-index: 1;
    flex: 0 0 38%;
    padding: 50px 0 0 40px;
    box-sizing: border-box;
}
.lb-video-text--accent .lb-video-text-text h2 {
    margin: 0 0 30px;
    color: var(--ink, #0a0a0a);
}
.lb-video-text--accent .lb-video-text-text .lb-text-content {
    position: relative;
    background: #fff;
    padding: 30px 35px 40px;
    margin-right: -20px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
}

/* Video card: capped width so it doesn't blow up the column, sits raised
   above the yellow band with a thin white frame and soft shadow. */
.lb-video-text--accent .lb-video-text-embed {
    position: relative;
    z-index: 2;
    flex: 1 1 auto;
    max-width: 640px;
    margin: 30px 0 0;
    border-radius: 0;
    box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    background: #fff;
    padding: 12px;
    box-sizing: border-box;
}

/* ==== carousel ==== */
.lb-carousel {
    padding: 60px 20px;
    background-color: #fff;
    max-width: 700px;
    margin: 0 auto;
    box-sizing: border-box;
}
.lb-carousel-heading {
    text-align: center;
    margin-bottom: 40px;
}
.lb-carousel-viewport {
    position: relative;
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
}
/* Optional drop shadow — enabled per-section via the admin checkbox. */
.lb-carousel--shadow .lb-carousel-viewport {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.lb-carousel-track {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    transition: transform .35s ease;
    outline: none;
}
.lb-carousel-track:focus-visible {
    box-shadow: inset 0 0 0 3px #ffd400;
}
.lb-carousel-slide {
    flex: 0 0 100%;
    min-width: 0;
    margin: 0;
}
.lb-carousel-slide figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.lb-carousel-slide img {
    display: block;
    max-width: 100%;
    max-height: 500px;
    width: auto;
    height: auto;
    margin: 0 auto;
    object-fit: contain;
}
.lb-carousel-slide a {
    display: block;
    width: 100%;
    color: inherit;
    text-decoration: none;
}
.lb-carousel-slide a img { transition: opacity .15s; }
.lb-carousel-slide a:hover img { opacity: .9; }
.lb-carousel-slide figcaption {
    padding: 15px 20px;
    font-size: var(--t-meta, 13px);
    color: var(--muted, #7a7a7a);
    text-align: center;
    width: 100%;
    box-sizing: border-box;
}
.lb-carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,0.25);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
    padding: 0;
    z-index: 2;
}
.lb-carousel-arrow:hover,
.lb-carousel-arrow:focus-visible {
    background: rgba(0,0,0,0.7);
    outline: none;
}
.lb-carousel-prev { left: 16px; }
.lb-carousel-next { right: 16px; }
.lb-carousel-dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
    flex-wrap: wrap;
}
.lb-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid #888;
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: background .15s, transform .15s;
}
.lb-carousel-dot:hover { background: #bbb; }
.lb-carousel-dot[data-active] { background: #222; border-color: #222; transform: scale(1.15); }
.lb-carousel-dot:focus-visible { outline: 2px solid #ffd400; outline-offset: 2px; }

/* ==== carousel side-by-side layout ==== */
.lb-carousel-section {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 40px;
    box-sizing: border-box;
}
.lb-carousel-section--carousel-left { flex-direction: row-reverse; }

.lb-carousel-section-text {
    flex: 1;
    max-width: 480px;
}
.lb-carousel-section-text h2 {
    margin: 0 0 20px;
}
.lb-carousel-section-body {
    margin-bottom: 24px;
    font-size: var(--t-deck, 17px);
    line-height: 1.6;
    color: #888;
}
.lb-carousel-section-text .lb-button { display: inline-block; }

.lb-carousel-section-carousel {
    flex: 1 1 0;
    min-width: 0;
}

/* When the carousel sits inside the side-by-side wrapper, drop its standalone
   width cap / centering so it fills its column. */
.lb-carousel-section .lb-carousel {
    max-width: none;
    padding: 0;
    margin: 0;
}

/* ==== image gallery (grid, not paged) ====
   Editor picks a max column count (2/3/4/5) via --lb-gallery-cols. Media
   queries below cap that maximum on narrower viewports so the grid never
   tries to render more columns than the viewport can comfortably hold. */
.lb-gallery {
    padding: 60px 40px 80px;
}
.lb-gallery-grid {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(var(--lb-gallery-cols, 3), 1fr);
    gap: 24px;
}
.lb-gallery-tile {
    margin: 0;
}
.lb-gallery-tile figure {
    margin: 0;
    display: flex;
    flex-direction: column;
}
.lb-gallery-tile img {
    display: block;
    width: 100%;
    height: auto;
}
/* Frame around each tile's image. In natural-aspect mode the img is
   width:100%; the frame just inline-block wraps it. In fixed-height mode
   the img shrink-wraps to its rendered bounds and the frame collapses to
   match so the optional border can hug the visible artwork. */
.lb-gallery-tile-image-frame {
    display: inline-block;
    line-height: 0;
    max-width: 100%;
    max-height: 100%;
}
/* Uniform tile height: editor set --lb-gallery-img-height. The tile
   wrapper (link or button) becomes a flex-centered fixed-height area; the
   frame inside collapses to the rendered artwork; the img sizes by height
   with width: auto so its element bounds equal the visible bounds.
   !important is needed because wp_get_attachment_image() emits an inline
   style="width:100%;height:NN.N%;max-width:Npx" aspect-ratio hint that
   would otherwise win on specificity. */
.lb-gallery--fixed-height .lb-gallery-tile-link,
.lb-gallery--fixed-height .lb-gallery-tile-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: var(--lb-gallery-img-height);
}
.lb-gallery--fixed-height .lb-gallery-tile-image-frame img {
    width: auto !important;
    max-width: 100% !important;
    height: var(--lb-gallery-img-height) !important;
    max-height: var(--lb-gallery-img-height) !important;
    object-fit: contain;
}
/* Snug border that hugs the rendered artwork (not the tile letterbox). */
.lb-gallery--bordered .lb-gallery-tile-image-frame {
    border: 1px solid #ddd;
    box-sizing: border-box;
}
.lb-gallery-tile-link,
.lb-gallery-tile-button {
    display: block;
    width: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}
.lb-gallery-tile-link img,
.lb-gallery-tile-button img {
    transition: opacity .15s;
}
.lb-gallery-tile-link:hover img,
.lb-gallery-tile-button:hover img,
.lb-gallery-tile-link:focus-visible img,
.lb-gallery-tile-button:focus-visible img {
    opacity: .88;
}
.lb-gallery-tile-button:focus-visible,
.lb-gallery-tile-link:focus-visible {
    outline: 2px solid #ffd400;
    outline-offset: 2px;
}
.lb-gallery-tile figcaption {
    margin-top: 10px;
    font-size: var(--t-meta, 13px);
    line-height: 1.4;
    color: var(--muted, #7a7a7a);
}

@media (max-width: 1100px) {
    .lb-gallery-grid { grid-template-columns: repeat(min(var(--lb-gallery-cols, 3), 4), 1fr); }
}
@media (max-width: 900px) {
    .lb-gallery-grid { grid-template-columns: repeat(min(var(--lb-gallery-cols, 3), 3), 1fr); }
}
@media (max-width: 680px) {
    .lb-gallery-grid { grid-template-columns: repeat(min(var(--lb-gallery-cols, 3), 2), 1fr); gap: 16px; }
    .lb-gallery { padding: 40px 20px 60px; }
}
@media (max-width: 420px) {
    .lb-gallery-grid { grid-template-columns: 1fr; }
}

/* ==== gallery lightbox (shared overlay; built lazily on first open) ==== */
.lb-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lb-gallery-lightbox[hidden] {
    display: none;
}
body.lb-gallery-lightbox-open {
    overflow: hidden;
}
.lb-gallery-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    cursor: zoom-out;
}
.lb-gallery-lightbox-figure {
    position: relative;
    z-index: 1;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 92vw;
    max-height: 90vh;
}
.lb-gallery-lightbox-image {
    display: block;
    max-width: 92vw;
    max-height: 80vh;
    width: auto;
    height: auto;
    object-fit: contain;
    background: #000;
}
.lb-gallery-lightbox-caption {
    margin-top: 14px;
    color: #f0f0f0;
    font-size: 14px;
    line-height: 1.4;
    text-align: center;
    max-width: 80vw;
}
.lb-gallery-lightbox-counter {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: rgba(255, 255, 255, 0.6);
    font-size: 12px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.lb-gallery-lightbox-arrow,
.lb-gallery-lightbox-close {
    position: absolute;
    z-index: 2;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    font-size: 24px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.lb-gallery-lightbox-arrow:hover,
.lb-gallery-lightbox-arrow:focus-visible,
.lb-gallery-lightbox-close:hover,
.lb-gallery-lightbox-close:focus-visible {
    background: rgba(255, 255, 255, 0.28);
    outline: none;
}
.lb-gallery-lightbox-prev { left: 24px; top: 50%; transform: translateY(-50%); }
.lb-gallery-lightbox-next { right: 24px; top: 50%; transform: translateY(-50%); }
.lb-gallery-lightbox-close { top: 16px; right: 16px; }

@media (max-width: 680px) {
    .lb-gallery-lightbox-prev { left: 8px; }
    .lb-gallery-lightbox-next { right: 8px; }
    .lb-gallery-lightbox-arrow,
    .lb-gallery-lightbox-close { width: 36px; height: 36px; font-size: 20px; }
}

/* ==== two-up comparison ==== */
.lb-comparison {
    max-width: 1100px;
    margin: 80px auto;
    padding: 0 25px;
}
.lb-comparison-heading {
    font-size: 28px;
    font-weight: 700;
    color: var(--ink, #0a0a0a);
    margin: 0 0 16px;
}
.lb-comparison-intro {
    font-size: var(--t-deck, 17px);
    line-height: 1.6;
    color: #888;
    margin: 0 0 40px;
}
.lb-comparison-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}
.lb-comparison--stacked .lb-comparison-cards {
    grid-template-columns: 1fr;
    max-width: 700px;
    margin: 0 auto;
}
.lb-comparison-card {
    display: block;
    background: #fff;
}
.lb-comparison-card-action {
    margin: 24px 0 0;
}
.lb-comparison-card-image {
    margin: 0 0 20px;
    background: #f5f5f5;
}
.lb-comparison-card-image img {
    display: block;
    width: 100%;
    height: auto;
}
.lb-comparison--img-full .lb-comparison-card-image,
.lb-comparison--img-clipped .lb-comparison-card-image {
    height: var(--lb-cmp-h);
    background: transparent;
    overflow: hidden;
}
.lb-comparison--img-full .lb-comparison-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
}
.lb-comparison-card-image-frame {
    display: inline-block;
    line-height: 0;
    max-width: 100%;
    max-height: 100%;
}
.lb-comparison-card-image-frame img {
    display: block;
    width: 100%;
    height: auto;
}
.lb-comparison--img-full .lb-comparison-card-image-frame img {
    max-width: 100%;
    max-height: var(--lb-cmp-h);
    width: auto;
    height: var(--lb-cmp-h);
    object-fit: contain;
}
.lb-comparison--img-clipped .lb-comparison-card-image-frame {
    display: block;
    width: 100%;
    height: 100%;
}
.lb-comparison--img-clipped .lb-comparison-card-image-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.lb-comparison-card-image--bordered .lb-comparison-card-image-frame {
    border: 1px solid #ddd;
    box-sizing: border-box;
}
.lb-comparison-card-heading {
    font-size: 22px;
    font-weight: 700;
    color: var(--ink, #0a0a0a);
    margin: 0 0 4px;
    line-height: 1.25;
}
.lb-comparison-card-subhead {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: var(--tracking-label, .18em);
    text-transform: uppercase;
    color: #888;
    margin: 0 0 16px;
}
.lb-comparison-card-bullets {
    list-style: disc;
    padding-left: 22px;
    margin: 0;
    color: #888;
}
.lb-comparison-card-bullets li {
    font-size: var(--t-deck, 17px);
    line-height: 1.5;
    margin: 0 0 8px;
}
.lb-comparison-card-bullets li:last-child { margin-bottom: 0; }

/* ==== featured artifacts ==== */
.lb-featured { padding: 60px 40px 80px; }

/* Uniform cell height controlled per-block from the editor. */
.lb-featured .mod-grid { grid-auto-rows: var(--lb-featured-cell-height, 380px); }

/* Reshuffle button — mirrors the homepage .collection-refresh treatment:
   small monochrome outlined button with an arrow that spins while loading. */
.lb-featured .sec-head .meta { position: relative; }
.lb-featured .sec-head .meta-actions { margin-top: 10px; }
.lb-featured .featured-refresh {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-family: inherit;
    font-size: var(--t-label, 12px);
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink, #0a0a0a);
    background: transparent;
    border: 1px solid var(--ink, #0a0a0a);
    border-radius: 0;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}
.lb-featured .featured-refresh:hover,
.lb-featured .featured-refresh:focus-visible {
    background: var(--ink, #0a0a0a);
    color: #fff;
    outline: none;
}
.lb-featured .featured-refresh-icon {
    display: inline-block;
    font-size: 14px;
    line-height: 1;
    transform-origin: center;
}
.lb-featured.is-loading .featured-refresh { pointer-events: none; opacity: .55; }
.lb-featured.is-loading .featured-refresh-icon {
    animation: pbc-featured-spin .8s linear infinite;
}
@keyframes pbc-featured-spin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}
.lb-featured.is-loading .mod-grid { opacity: .5; transition: opacity .2s; }

/* ==== text block ==== */
.lb-text {
    max-width: 900px;
    margin: 0 auto;
    padding: 60px 40px;
    text-align: center;
}
.lb-text h2 {
    margin-bottom: 30px;
}
.lb-text p {
    font-size: var(--t-deck, 17px);
    line-height: 1.6;
    color: #888;
}

/* ==== cta ==== */
.lb-cta {
    text-align: center;
    padding: 80px 40px;
}
.lb-cta h2 {
    margin-bottom: 20px;
}
.lb-cta p {
    font-size: var(--t-deck, 17px);
    line-height: 1.6;
    color: #888;
    max-width: 60ch;
    margin: 0 auto;
}

/* ==== empty state ==== */
.layout-empty {
    max-width: 700px;
    margin: 60px auto;
    padding: 40px;
    text-align: center;
    background: #f8f8f8;
    border: 1px dashed #bbb;
    color: var(--muted, #7a7a7a);
}

/* ==== responsive ==== */
@media (max-width: 980px) {
    .lb-image-text-text    { padding: 50px 40px; }
    .lb-video-text         { gap: 30px; padding: 60px 30px; }
    .lb-carousel-heading   { margin-bottom: 30px; }
}

@media (max-width: 767px) {
    .lb-banner             { padding: 50px 25px 60px; }
    .lb-intro              { padding: 50px 20px; }
    .lb-features-grid      { grid-template-columns: 1fr; gap: 30px; margin-top: 40px; }
    .lb-2col-grid          { grid-template-columns: 1fr; gap: 30px; margin-top: 40px; }
    .lb-pullquote          { margin: 50px auto; }
    .lb-pullquote--centered .lb-pullquote-quote,
    .lb-pullquote--left-rule .lb-pullquote-quote { font-size: 22px; }
    .lb-pullquote--left-rule { padding-left: 25px; }
    .lb-pullquote--centered::before { font-size: 70px; margin-bottom: 15px; }
    .lb-spectable          { margin: 50px auto; }
    .lb-spectable-row      { grid-template-columns: 1fr; gap: 4px; padding: 12px 0; }
    .lb-spectable-note     { display: block; margin-left: 0; margin-top: 4px; }

    /* Collapse vertical-alt and horizontal timelines into vertical-left. */
    .lb-timeline--vertical-alt .lb-timeline-entries { padding-left: 0; }
    .lb-timeline--vertical-alt .lb-timeline-entries::before { left: 0; transform: none; }
    .lb-timeline--vertical-alt .lb-timeline-entry {
        grid-template-columns: 100px 1fr;
        padding-left: 28px;
        padding-bottom: 30px;
    }
    .lb-timeline--vertical-alt .lb-timeline-entry::before {
        position: absolute;
        left: -7px;
        top: 4px;
        margin: 0;
        grid-column: auto;
    }
    .lb-timeline--vertical-alt .lb-timeline-entry:nth-child(odd) .lb-timeline-date,
    .lb-timeline--vertical-alt .lb-timeline-entry:nth-child(even) .lb-timeline-date {
        grid-column: 1; grid-row: auto;
        text-align: left;
        padding: 2px 0 0;
    }
    .lb-timeline--vertical-alt .lb-timeline-entry:nth-child(odd) .lb-timeline-body,
    .lb-timeline--vertical-alt .lb-timeline-entry:nth-child(even) .lb-timeline-body {
        grid-column: 2; grid-row: auto;
        text-align: left;
        padding: 0;
    }
    .lb-timeline--vertical-alt .lb-timeline-entry:nth-child(even) .lb-timeline-image {
        display: block;
    }

    .lb-timeline--horizontal .lb-timeline-entries {
        display: block;
        overflow-x: visible;
        border-top: none;
        padding: 0;
    }
    .lb-timeline--horizontal .lb-timeline-entry {
        flex: none;
        padding: 0 0 30px 28px;
        margin-left: 12px;
        border-left: 2px solid #e6e6e6;
    }
    .lb-timeline--horizontal .lb-timeline-entry::before {
        top: 4px;
        left: -7px;
    }
    .lb-comparison           { margin: 50px auto; }
    .lb-comparison-cards     { grid-template-columns: 1fr; gap: 30px; max-width: none; }
    .lb-image-text,
    .lb-image-text.lb-image-right { flex-direction: column; }
    .lb-image-text-image,
    .lb-image-text-text    { flex: none; width: 100%; max-width: none; }
    .lb-image-text-image   { padding: 30px 25px 0; }
    .lb-image-text-text    { padding: 30px 25px 50px; }
    .lb-video-text         { flex-direction: column; padding: 50px 25px; gap: 30px; }
    .lb-video-text-text    { flex: none; width: 100%; }
    .lb-video-text--accent,
    .lb-video-text--accent.lb-video-text--video-left { flex-direction: column; padding: 0; margin: 40px 0; }
    .lb-video-text--accent::before,
    .lb-video-text--accent.lb-video-text--video-left::before {
        top: 0; bottom: 0; left: 0; right: 0;
    }
    .lb-video-text--accent .lb-video-text-text { padding: 40px 25px 30px; flex: none; width: 100%; }
    .lb-video-text--accent .lb-video-text-text h2 { margin-bottom: 30px; }
    .lb-video-text--accent .lb-video-text-embed,
    .lb-video-text--accent.lb-video-text--video-left .lb-video-text-embed { margin: 0 25px 40px; }
    .lb-carousel           { padding: 50px 15px; }
    .lb-carousel-arrow     { width: 30px; height: 30px; font-size: 16px; }
    .lb-carousel-prev      { left: 8px; }
    .lb-carousel-next      { right: 8px; }
    .lb-carousel-slide figcaption { padding: 12px 15px; }
    .lb-carousel-section,
    .lb-carousel-section--carousel-left { flex-direction: column; padding: 40px 20px; gap: 30px; }
    .lb-carousel-section-text { max-width: none; }
    .lb-cta                { padding: 50px 25px; }
}

/* ==== pull quote + image (portrait) ==== */
.lb-pqi {
    margin: 80px auto;
    max-width: 1000px;
    padding: 0 25px;
    display: grid;
    grid-template-columns: minmax(180px, 280px) 1fr;
    gap: 50px;
    align-items: center;
}
.lb-pqi--image-right { grid-template-columns: 1fr minmax(180px, 280px); }
.lb-pqi--image-right .lb-pqi-image { order: 2; }
.lb-pqi--image-right .lb-pqi-body  { order: 1; }
.lb-pqi-image { width: 100%; }
/* Frame inline-block wraps the img and collapses to its rendered bounds,
   so an optional border can hug the visible artwork rather than the
   letterbox / aspect-ratio box. */
.lb-pqi-image-frame {
    display: inline-block;
    line-height: 0;
    max-width: 100%;
    box-sizing: border-box;
}
.lb-pqi-portrait {
    width: 100%;
    height: auto;
    display: block;
}
.lb-pqi--shape-rect .lb-pqi-portrait {
    aspect-ratio: 4 / 5;
    object-fit: cover;
}
.lb-pqi--shape-circle .lb-pqi-image-frame {
    border-radius: 50%;
    overflow: hidden;
}
.lb-pqi--shape-circle .lb-pqi-portrait {
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
}
.lb-pqi--img-full .lb-pqi-image,
.lb-pqi--img-clipped .lb-pqi-image {
    height: var(--lb-pqi-h);
}
/* In full-height mode, let the image column grow to fit the portrait at
   its natural aspect ratio at the chosen pixel height, instead of being
   clamped by the default 180-280px portrait column. */
.lb-pqi--img-full {
    grid-template-columns: auto 1fr;
}
.lb-pqi--img-full.lb-pqi--image-right {
    grid-template-columns: 1fr auto;
}
.lb-pqi--img-full .lb-pqi-image {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto;
}
/* In fixed-height letterbox mode the img shrink-wraps to its rendered
   bounds and the inline-block frame collapses to match. !important is
   needed because wp_get_attachment_image() emits an inline width/height
   aspect-ratio hint that would otherwise win on specificity. */
.lb-pqi--img-full .lb-pqi-portrait {
    aspect-ratio: auto;
    width: auto !important;
    max-width: 100% !important;
    height: var(--lb-pqi-h) !important;
    max-height: var(--lb-pqi-h) !important;
    object-fit: contain;
}
.lb-pqi--img-clipped .lb-pqi-image-frame {
    display: block;
    width: 100%;
    height: 100%;
}
.lb-pqi--img-clipped .lb-pqi-portrait {
    aspect-ratio: auto;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}
.lb-pqi--bordered .lb-pqi-image-frame { border: 1px solid #ddd; }
.lb-pqi-body { min-width: 0; }
.lb-pqi-quote {
    margin: 0;
    font-size: 28px;
    font-weight: 400;
    line-height: 1.3;
    color: var(--ink, #0a0a0a);
    quotes: "\201C" "\201D";
}
.lb-pqi-quote::before { content: open-quote; }
.lb-pqi-quote::after  { content: close-quote; }
.lb-pqi-meta {
    margin-top: 24px;
    font-size: 13px;
    line-height: 1.4;
    color: #888;
}
.lb-pqi-speaker {
    display: block;
    font-weight: 700;
    letter-spacing: var(--tracking-label, .18em);
    text-transform: uppercase;
    color: var(--ink, #0a0a0a);
}
.lb-pqi-role {
    display: block;
    margin-top: 4px;
    color: var(--ink, #0a0a0a);
}
.lb-pqi-source {
    display: block;
    margin-top: 4px;
}
.lb-pqi--font-italic-serif .lb-pqi-quote {
    font-family: Georgia, "Times New Roman", serif;
    font-style: italic;
    font-weight: 400;
}
.lb-pqi--font-script .lb-pqi-quote {
    font-family: "Dancing Script", "Brush Script MT", cursive;
    font-weight: 600;
    line-height: 1.2;
    font-size: 38px;
}
.lb-pqi--font-display-italic .lb-pqi-quote {
    font-family: "Cormorant Garamond", Georgia, serif;
    font-style: italic;
    font-weight: 500;
    line-height: 1.25;
    font-size: 34px;
}

@media (max-width: 767px) {
    .lb-pqi {
        margin: 50px auto;
        grid-template-columns: 1fr;
        gap: 24px;
        max-width: 420px;
    }
    .lb-pqi--image-right .lb-pqi-image { order: 1; }
    .lb-pqi--image-right .lb-pqi-body  { order: 2; }
    .lb-pqi-quote { font-size: 22px; }
    .lb-pqi--font-script .lb-pqi-quote { font-size: 30px; }
    .lb-pqi--font-display-italic .lb-pqi-quote { font-size: 26px; }
}
