/*
 * LEPAS Studio content blocks (news articles and legal pages written in Studio).
 * Mobile-first. Uses em/% only: the site scales rem with resizeRoot.js.
 * Rendered by studio/resources/views/blocks/*.blade.php.
 */
.lp-blocks {
    --lp-gap: 1.25em;
    --lp-bronze: #b68a68;
    --lp-ink: #1a1a1a;
    --lp-muted: #6b6b6b;
    color: var(--lp-ink);
    line-height: 1.7;
    overflow-wrap: break-word;
}
.lp-blocks *,
.lp-blocks *::before,
.lp-blocks *::after {
    box-sizing: border-box;
}

/* Neutralize the legacy article styles (indent, image offset) inside blocks */
.newsDetail .article-content .lp-blocks p,
.lp-blocks p {
    text-indent: 0;
    margin: 0 0 1em;
    text-align: left;
}
.newsDetail .article-content .lp-blocks img,
.lp-blocks img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 0;
}
.lp-block {
    margin: 0 0 calc(var(--lp-gap) * 1.6);
}
.lp-block:last-child {
    margin-bottom: 0;
}

/* Text */
.lp-text h2,
.lp-column-text h2,
.lp-image-text-body h2 {
    font-size: 1.5em;
    line-height: 1.25;
    margin: 1.2em 0 0.6em;
    font-weight: 600;
}
.lp-text h3,
.lp-column-text h3,
.lp-image-text-body h3 {
    font-size: 1.2em;
    line-height: 1.3;
    margin: 1em 0 0.5em;
    font-weight: 600;
}
.lp-text > :first-child,
.lp-column-text > :first-child,
.lp-image-text-body > :first-child {
    margin-top: 0;
}
.lp-blocks ul,
.lp-blocks ol {
    padding-left: 1.4em;
    margin: 0 0 1em;
}
.lp-blocks ul { list-style: disc; }
.lp-blocks ol { list-style: decimal; }
.lp-blocks li { margin: 0.25em 0; }
.lp-blocks a {
    color: inherit;
    text-decoration: underline;
    text-decoration-color: var(--lp-bronze);
    text-underline-offset: 0.2em;
}
.lp-blocks blockquote {
    margin: 1em 0;
    padding-left: 1em;
    border-left: 3px solid var(--lp-bronze);
    color: var(--lp-muted);
}
.lp-blocks hr,
.lp-divider {
    border: 0;
    border-top: 1px solid #d9d6d0;
    margin: calc(var(--lp-gap) * 1.6) 0;
}
.lp-blocks figcaption {
    margin-top: 0.6em;
    font-size: 0.85em;
    color: var(--lp-muted);
    text-align: center;
}

/* Image sizes: wide/full bleed out of the text column on larger screens */
.lp-image img { border-radius: 4px; }
@media (min-width: 900px) {
    .lp-size-wide { margin-left: -8%; margin-right: -8%; }
    .lp-size-full { width: 100vw; position: relative; left: 50%; transform: translateX(-50%); }
    .lp-size-full img { border-radius: 0; }
}

/* Gallery */
.lp-gallery-track {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6em;
}
.lp-gallery-item img {
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 4px;
}
@media (min-width: 768px) {
    .lp-cols-3 .lp-gallery-track { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lp-cols-4 .lp-gallery-track { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.lp-gallery-carousel .lp-gallery-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 0.75em;
    padding-bottom: 0.5em;
    -webkit-overflow-scrolling: touch;
}
.lp-gallery-carousel .lp-gallery-item {
    flex: 0 0 85%;
    scroll-snap-align: center;
}
@media (min-width: 768px) {
    .lp-gallery-carousel .lp-gallery-item { flex-basis: 60%; }
}

/* Columns: stacked on phones, side by side from 768px */
.lp-columns {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--lp-gap);
}
@media (min-width: 768px) {
    .lp-columns-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lp-columns-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.lp-column-media { margin: 0 0 0.8em; }
.lp-column-media img { border-radius: 4px; }

/* Image + text */
.lp-image-text {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: var(--lp-gap);
    align-items: center;
}
.lp-image-text-media { margin: 0; }
.lp-image-text-media img { border-radius: 4px; }
@media (min-width: 768px) {
    .lp-image-text { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: calc(var(--lp-gap) * 1.6); }
    .lp-media-right .lp-image-text-media { order: 2; }
}

/* Video 16:9 */
.lp-video-frame {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
}
.lp-video-frame iframe,
.lp-video-frame video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Quote */
.lp-quote {
    margin-left: 0;
    margin-right: 0;
    padding: 1.2em 0 1.2em 1.2em;
    border-left: 3px solid var(--lp-bronze);
}
.lp-quote blockquote {
    margin: 0;
    padding: 0;
    border: 0;
    font-size: 1.25em;
    line-height: 1.45;
    font-style: italic;
    color: var(--lp-ink);
}
.lp-quote figcaption {
    text-align: left;
    margin-top: 0.8em;
    font-style: normal;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.75em;
}

/* Button (same feel as the site's .colorBtn) */
.lp-button { display: flex; }
.lp-align-center { justify-content: center; }
.lp-align-right { justify-content: flex-end; }
.lp-blocks .lp-btn {
    display: inline-block;
    padding: 0.85em 2.2em;
    font-size: 0.85em;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid #111;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.lp-blocks .lp-btn-solid { background: #111; color: #fff; }
.lp-blocks .lp-btn-solid:hover { background: var(--lp-bronze); border-color: var(--lp-bronze); }
.lp-blocks .lp-btn-outline { background: transparent; color: #111; }
.lp-blocks .lp-btn-outline:hover { background: #111; color: #fff; }

/* Imported HQ HTML keeps its own look */
.newsDetail .article-content .lp-legacy p { text-indent: 2em; text-align: justify; }
.newsDetail .article-content .lp-legacy img { margin-left: -2em; width: auto; display: inline; }

@media (prefers-reduced-motion: reduce) {
    .lp-blocks .lp-btn { transition: none; }
}

/* ---------- Document editor output (.lp-doc): inline images, grid columns, tables ---------- */
.lp-doc img{display:block;max-width:100%;height:auto;margin:1.2em auto;border-radius:4px}
.lp-doc img[style*="width"]{max-width:100%}
.lp-doc p{margin:0 0 1em}
.lp-doc h2{font-size:1.5em;line-height:1.25;margin:1.4em 0 .6em;font-weight:600}
.lp-doc h3{font-size:1.2em;line-height:1.3;margin:1.2em 0 .5em;font-weight:600}
.lp-doc > :first-child{margin-top:0}
.lp-doc .grid-layout{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--lp-gap);margin:0 0 calc(var(--lp-gap) * 1.6)}
.lp-doc .grid-layout-col > :first-child{margin-top:0}
.lp-doc .grid-layout-col img{margin-top:0}
@media (min-width:640px){.lp-doc .grid-layout[data-from-breakpoint="sm"]{grid-template-columns:var(--cols)}}
@media (min-width:768px){.lp-doc .grid-layout[data-from-breakpoint="md"]{grid-template-columns:var(--cols)}}
@media (min-width:1024px){.lp-doc .grid-layout[data-from-breakpoint="lg"],.lp-doc .grid-layout:not([data-from-breakpoint]){grid-template-columns:var(--cols)}}
@media (min-width:1280px){.lp-doc .grid-layout[data-from-breakpoint="xl"]{grid-template-columns:var(--cols)}}
.lp-doc table{width:100%;border-collapse:collapse;margin:0 0 1.4em;font-size:.95em}
.lp-doc th,.lp-doc td{border:1px solid #ddd8d0;padding:.6em .8em;text-align:left;vertical-align:top}
.lp-doc th{background:#f1efeb;font-weight:600}
.lp-doc .lp-block{margin:calc(var(--lp-gap) * 1.6) 0}
