/* ===========================================================================
   Landing-page block builder — the GENERIC blocks only.
   Loaded (by lib/lp-routes.js) only on a page that has been converted to the
   builder, and only ever used by blocks the owner ADDED. The page's own
   sections keep their measured 1:1 styling in /v2/lp-<template>.css and are
   not touched by anything in this file — every selector here is under .lp-b.

   The palette and the fonts are the host page's own custom properties, so an
   added block reads as part of the page rather than as a widget dropped on it.
   =========================================================================== */

.lp-b { position: relative; padding: 48px 18px; }
.lp-b-in { max-width: 1200px; margin: 0 auto; }

/* Backgrounds. `none` is the page's own paper; the other two exist so a block
   dropped between two dark sections doesn't cut a white stripe through them. */
.lp-b--paper { background: var(--paper); }
.lp-b--dark {
  background: url('/uploads/2023/08/Group-67.webp') 50% 50%/cover no-repeat;
  color: var(--gold);
}
.lp-b--dark .lp-b-h { color: var(--gold); }
.lp-b--dark .lp-b-text { color: var(--paper); }
.lp-b--dark .lp-b-rule { background: rgba(245, 213, 166, .45); }

/* Heading — the page's display face, sized off the viewport like the clone's
   own headings so an added heading doesn't sit at a different scale. */
.lp-b-h {
  font-family: 'levi', 'almoni', sans-serif;
  font-weight: 700;
  color: var(--purple);
  font-size: clamp(26px, 3.05vw, 52px);
  line-height: 1.18;
  margin: 0;
}
.lp-b-heading .lp-b-h + * { margin-top: 18px; }

/* Rich text */
.lp-b-text {
  font-family: 'almoni', sans-serif;
  color: var(--purple);
  font-size: clamp(16px, 1.25vw, 22px);
  line-height: 1.65;
}
.lp-b-text p { margin: 0 0 14px; }
.lp-b-text p:last-child { margin-bottom: 0; }
.lp-b-text a { color: var(--maroon); text-decoration: underline; }
.lp-b--dark .lp-b-text a { color: var(--yellow); }
.lp-b-text b, .lp-b-text strong { font-weight: 700; }
.lp-b-text ul, .lp-b-text ol { margin: 0 0 14px; padding-inline-start: 24px; }

/* Image */
.lp-b-img img { max-width: 100%; height: auto; border-radius: 8px; }

/* Video — 16:9, never wider than the column */
.lp-b-video { max-width: 900px; margin: 0 auto; }
.lp-b-video video,
.lp-b-video iframe {
  display: block; width: 100%; aspect-ratio: 16 / 9;
  border: 0; border-radius: 10px; background: #000;
}

/* Buttons. .lp-cta is the page's own button, from /v2/lp-<template>.css — it
   is reused deliberately so an added CTA is the same object the clone uses.
   Two overrides: the clone's CTAs are absolutely positioned one-liners, these
   sit in normal flow and must be allowed to wrap. */
.lp-b-btns { display: flex; flex-wrap: wrap; gap: 14px; align-items: stretch; }
.lp-b-btns .lp-cta {
  position: static; white-space: normal;
  font-size: clamp(15px, 1.5vw, 26px); line-height: 1.25;
  padding: 18px 26px; max-width: 100%;
}
.lp-b-btns .lp-cta.lp-b-out {
  background: transparent; color: var(--maroon);
  box-shadow: inset 0 0 0 2px var(--maroon);
}
.lp-b--dark .lp-b-btns .lp-cta.lp-b-out {
  color: var(--gold); box-shadow: inset 0 0 0 2px var(--gold);
}

/* Divider / spacer */
.lp-b-rule { height: 2px; background: rgba(44, 4, 83, .18); border-radius: 2px; }
.lp-b-space { width: 100%; }
.lp-b-divider, .lp-b-spacer { padding-block: 0; }

@media (max-width: 900px) {
  .lp-b { padding: 32px 16px; }
  .lp-b-btns .lp-cta { width: 100%; }
}

/* ── live blocks: segulot / articles cards, cta ──────────────────────────────── */
.lp-live-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 18px; }
.lp-live-card {
  display: flex; flex-direction: column; text-decoration: none; color: inherit;
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 2px 14px rgba(44, 4, 83, .10); transition: transform .15s, box-shadow .15s;
}
.lp-live-card:hover { transform: translateY(-2px); box-shadow: 0 6px 22px rgba(44, 4, 83, .16); }
.lp-live-card img, .lp-live-noimg { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #f3ead6; }
.lp-live-segulot .lp-live-card img, .lp-live-segulot .lp-live-noimg { aspect-ratio: 3 / 4; object-fit: cover; object-position: top; }
.lp-live-body { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px 16px; text-align: right; }
.lp-live-t { font-weight: 700; font-size: 18px; line-height: 1.3; color: var(--maroon, #7e022b); }
.lp-live-s { font-size: 15px; line-height: 1.45; color: #4a4152; }
.lp-live-cta { display: flex; justify-content: center; }
@media (max-width: 900px) {
  .lp-live-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 560px) {
  .lp-live-grid { grid-template-columns: 1fr; }
  /* the picture keeps the cards' landscape 16:10 frame beside the text: a
     full-height narrow strip cut a wide cover photo down to its middle third */
  .lp-live-articles .lp-live-card { flex-direction: row; align-items: flex-start; gap: 12px; padding: 10px; }
  .lp-live-articles .lp-live-card img, .lp-live-articles .lp-live-noimg {
    flex: 0 0 42%; width: 42%; aspect-ratio: 16 / 10; height: auto; min-height: 0; border-radius: 10px;
  }
  .lp-live-articles .lp-live-body { flex: 1 1 auto; min-width: 0; padding: 2px 0 4px 2px; }
  .lp-live-segulot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lp-live-t { font-size: 16.5px; }
  .lp-live-s { font-size: 14px; }
}

/* ── admin preview only ──────────────────────────────────────────────────────
   The stage adds .lp-pv-on to the document element. Nothing below can reach a
   visitor: the live page carries no data-lp-block attributes at all. */
.lp-pv-on [data-lp-block] { outline: 2px dashed transparent; outline-offset: -2px; transition: outline-color .15s; }
.lp-pv-on [data-lp-block]:hover { outline-color: rgba(136, 24, 17, .45); cursor: pointer; }
.lp-pv-on [data-lp-block].lp-pv-sel { outline: 3px solid #e0a53c; outline-offset: -3px; }
