/**
 * Public site chrome: header presets, menu, footer presets, forms, notices.
 * Component and layout styles live in page-builder-theme.css; the theme's
 * colours arrive as --lp-* variables inlined by SiteRenderService.
 */
:root {
  --lp-header-bg: #ffffff;
  --lp-footer-bg: #333333;
  --lp-footer-text: #ffffff;
  --lp-nav-link-color: var(--lp-heading-color);
  --lp-nav-hover-color: var(--lp-accent);
  --lp-btn-text-color: #ffffff;
  --lp-topbar-bg: var(--lp-primary);
  --lp-topbar-text: #ffffff;
  --lp-check-color: #2E9E5B;
}

body.lp-site { margin: 0; background: var(--lp-page-bg); font-family: var(--lp-body-font); color: var(--lp-body-color); }
.lp-main { min-height: 50vh; }

/* ── Header ────────────────────────────────────────────────── */
.lp-header { background: var(--lp-header-bg); border-bottom: 1px solid rgba(0, 0, 0, 0.06); }
.lp-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.lp-brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--lp-heading-color); font-family: var(--lp-heading-font); font-weight: 700; font-size: 1.35rem; }
.lp-brand-mark { height: 40px; width: auto; }
.lp-brand-logo { height: 56px; width: auto; max-width: 260px; object-fit: contain; }
.lp-header-actions { display: flex; align-items: center; gap: 12px; }
.lp-header-phone { font-weight: 600; white-space: nowrap; }
.lp-nav-toggle { display: none; border: 1px solid rgba(0, 0, 0, 0.15); background: transparent; border-radius: 6px; font-size: 1.3rem; line-height: 1; padding: 4px 10px; color: var(--lp-nav-link-color); }

/* Menu */
.lp-menu, .lp-submenu { list-style: none; margin: 0; padding: 0; }
.lp-menu { display: flex; flex-wrap: wrap; gap: 4px 22px; align-items: center; }
.lp-menu-item { position: relative; }
.lp-menu > .lp-menu-item > a { display: inline-block; padding: 10px 0; color: var(--lp-nav-link-color); text-decoration: none; font-weight: 600; font-family: var(--lp-body-font); }
.lp-menu > .lp-menu-item > a:hover { color: var(--lp-nav-hover-color); }
.lp-menu-cta > a.btn { color: var(--lp-btn-text-color); padding: 6px 14px; }
.lp-submenu { display: none; position: absolute; top: 100%; left: 0; min-width: 200px; background: var(--lp-header-bg); border: 1px solid rgba(0, 0, 0, 0.08); border-radius: var(--lp-border-radius); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08); padding: 6px 0; z-index: 20; }
.lp-submenu a { display: block; padding: 8px 14px; color: var(--lp-nav-link-color); text-decoration: none; }
.lp-submenu a:hover { color: var(--lp-nav-hover-color); background: rgba(0, 0, 0, 0.03); }
.lp-menu-item.has-children:hover > .lp-submenu,
.lp-menu-item.has-children:focus-within > .lp-submenu,
.lp-menu-item.has-children.lp-open > .lp-submenu { display: block; }
.lp-menu > .lp-menu-item.has-children > a::after { content: ""; display: inline-block; margin-left: 6px; vertical-align: 2px; border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0; }

/* Presets */
.lp-header.lp-header-logo-left-nav-below .lp-nav { padding: 0 0 10px; }
.lp-header.lp-header-logo-left-nav-right .lp-container { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0 32px; }
.lp-header.lp-header-logo-left-nav-right .lp-header-inner { flex: 0 0 auto; }
.lp-header.lp-header-logo-left-nav-right .lp-nav { flex: 1 1 auto; display: flex; justify-content: flex-end; }
.lp-header.lp-header-logo-center-nav-below .lp-header-inner { flex-direction: column; gap: 10px; }
.lp-header.lp-header-logo-center-nav-below .lp-nav .lp-menu { justify-content: center; }
.lp-header.lp-header-logo-center-nav-split .lp-header-inner { flex-direction: column; gap: 10px; }
.lp-header.lp-header-logo-center-nav-split .lp-nav .lp-menu { justify-content: center; }

@media (max-width: 860px) {
  .lp-nav-toggle { display: inline-block; }
  .lp-nav { display: none; padding: 0 0 12px; }
  body.lp-nav-open .lp-nav { display: block; }
  .lp-menu { flex-direction: column; align-items: stretch; gap: 0; }
  .lp-menu > .lp-menu-item > a { display: block; padding: 10px 4px; border-top: 1px solid rgba(0, 0, 0, 0.06); }
  .lp-submenu { display: block; position: static; box-shadow: none; border: 0; padding: 0 0 0 16px; }
  .lp-header.lp-header-logo-left-nav-right .lp-container { display: block; }
  .lp-header.lp-header-logo-left-nav-right .lp-nav { display: none; }
  body.lp-nav-open .lp-header.lp-header-logo-left-nav-right .lp-nav { display: block; }
  /* An open phone menu in a sticky header scrolls inside the screen */
  .lp-header-sticky .lp-nav { max-height: calc(100vh - 90px); overflow-y: auto; }
}

/* ── Top bar (Settings: top bar above the header) ──────────── */
.lp-topbar { background: var(--lp-topbar-bg); color: var(--lp-topbar-text); font-size: .9rem; font-weight: 600; }
.lp-topbar-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 40px; }
.lp-topbar a { color: inherit; text-decoration: none; }
.lp-topbar-phone { display: inline-flex; align-items: center; gap: 8px; padding: 8px 0; white-space: nowrap; }
.lp-topbar-phone:hover, .lp-topbar-link:hover { opacity: .85; }
.lp-topbar-links { display: flex; align-items: center; align-self: stretch; }
.lp-topbar-link { padding: 8px 14px; }
.lp-topbar .lp-topbar-cta { align-self: stretch; display: inline-flex; align-items: center; border-radius: 0; padding: 0 18px; color: var(--lp-btn-text-color); font-size: .9rem; }
@media (max-width: 576px) { .lp-topbar-link { display: none; } }

/* ── Sticky header (Settings: keep the header at the top) ──── */
.lp-header-sticky { position: sticky; top: 0; z-index: 100; transition: box-shadow .2s ease; }
.lp-header-sticky.is-stuck { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.10); }
/* Links to a row anchor land below the sticky header (lp-site.js measures it) */
html[data-lp-sticky] { scroll-padding-top: var(--lp-sticky-h, 90px); }

/* ── Footer ────────────────────────────────────────────────── */
.lp-footer { background: var(--lp-footer-bg); color: var(--lp-footer-text); padding: 36px 0; margin-top: 40px; font-size: 0.95rem; }
.lp-footer a { color: inherit; text-decoration: none; opacity: 0.9; }
.lp-footer a:hover { opacity: 1; text-decoration: underline; }
.lp-footer-heading { font-family: var(--lp-heading-font); font-weight: 700; margin-bottom: 10px; font-size: 1.05rem; }
.lp-footer-simple { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.lp-footer-grid { display: flex; flex-wrap: wrap; gap: 28px 40px; margin-bottom: 28px; }
.lp-footer-brand { flex: 1.5 1 220px; }
.lp-footer-col { flex: 1 1 140px; }
.lp-footer-contact { flex: 1.3 1 200px; }
.lp-footer-grid .lp-footer-contact > div { margin-bottom: 4px; }
.lp-footer-links { list-style: none; margin: 0; padding: 0; }
.lp-footer-links li { margin-bottom: 6px; }
.lp-footer-logo { display: block; height: 48px; width: auto; max-width: 240px; object-fit: contain; }
.lp-footer-centered .lp-footer-logo { margin: 0 auto; }
.lp-footer-tagline { margin: 12px 0 0; opacity: .85; max-width: 34ch; }
.lp-footer-centered .lp-footer-tagline { margin: 4px auto 0; }
.lp-footer-phone { font-family: var(--lp-heading-font); font-size: 1.25rem; font-weight: 700; }
.lp-footer-centered { text-align: center; display: flex; flex-direction: column; gap: 8px; }
.lp-footer-bottom { opacity: 0.75; font-size: 0.85rem; }
.lp-footer-grid + .lp-footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, 0.15); }
.lp-footer-legal { display: inline-flex; flex-wrap: wrap; gap: 4px 18px; }
.lp-footer-centered .lp-footer-legal { justify-content: center; }
@media (max-width: 768px) {
  .lp-footer-brand, .lp-footer-contact { flex-basis: 100%; }
  .lp-footer-col { flex: 1 1 calc(50% - 40px); }
}

/* ── Blocks hidden by screen size (block or row setting "Show on") ── */
@media (max-width: 768px) { .lp-hide-mobile { display: none !important; } }
@media (min-width: 769px) { .lp-hide-desktop { display: none !important; } }

/* ── Theme: check-mark lists (Look and Feel, Lists) ──
   Plain lists in text, hero, call to action and service-area intros; block lists carry their own classes. */
html[data-lp-lists="check"] .lp-main ul:not([class]) { list-style: none; padding-left: 0; }
html[data-lp-lists="check"] .lp-main ul:not([class]) > li { position: relative; padding-left: 1.7em; margin-bottom: .35em; }
html[data-lp-lists="check"] .lp-main ul:not([class]) > li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 1.15em; height: 1.15em; background: var(--lp-check-color);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M16 8A8 8 0 1 1 0 8a8 8 0 0 1 16 0m-3.97-3.03a.75.75 0 0 0-1.08.022L7.477 9.417 5.384 7.323a.75.75 0 0 0-1.06 1.06L6.97 11.03a.75.75 0 0 0 1.079-.02l3.992-4.99a.75.75 0 0 0-.01-1.05z'/%3E%3C/svg%3E") center / contain no-repeat;
}
html[data-lp-lists="check"] .lp-main :is(.bg-primary, .bg-dark, .bg-accent) ul:not([class]) > li::before { background: currentColor; }

/* ── Theme: a short rule under section headings (Look and Feel, Headings) ── */
html[data-lp-rule="h2"] .lp-main h2::after { content: ""; display: block; width: 48px; height: 4px; margin: .45em 0 0; border-radius: 2px; background: var(--lp-accent); }
html[data-lp-rule="h2"] .lp-main :is(.text-center, [style*="text-align: center"]) h2::after,
html[data-lp-rule="h2"] .lp-main h2[style*="text-align: center"]::after,
html[data-lp-rule="h2"] .lp-main .lp-reviews--quote .lp-reviews-title::after { margin-left: auto; margin-right: auto; }
html[data-lp-rule="h2"] .lp-main :is(.text-end, [style*="text-align: right"]) h2::after,
html[data-lp-rule="h2"] .lp-main h2[style*="text-align: right"]::after { margin-left: auto; margin-right: 0; }
html[data-lp-rule="h2"] .lp-main :is(.bg-primary, .bg-dark, .bg-accent) h2::after { background: currentColor; opacity: .85; }

/* ── Notices ───────────────────────────────────────────────── */
.lp-preview-bar { background: #f57f17; color: #fff; text-align: center; font-size: 13px; font-weight: 600; padding: 6px 12px; font-family: sans-serif; }
.lp-notice { max-width: 1200px; margin: 16px auto 0; padding: 12px 16px; border-radius: var(--lp-border-radius); font-weight: 600; }
.lp-notice-ok { background: #e8f5e9; color: #2e7d32; }
.lp-notice-err { background: #fdecea; color: #B01D18; }

/* ── Forms ─────────────────────────────────────────────────── */
.lp-form-title { font-family: var(--lp-heading-font); color: var(--lp-heading-color); font-size: 1.3rem; margin: 0 0 12px; }
.lp-form .form-row { margin-bottom: 4px; }
.lp-form .form-columns { display: flex; gap: 16px; }
.lp-form .form-column { min-height: 1px; }
.lp-form label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--lp-heading-color); }
.lp-form input[type="text"], .lp-form input[type="email"], .lp-form input[type="tel"], .lp-form input[type="url"], .lp-form input[type="number"],
.lp-form select, .lp-form textarea {
  width: 100%; padding: 10px 14px; border: 1px solid #dee2e6; border-radius: var(--lp-border-radius);
  font-size: 14px; font-family: inherit; color: var(--lp-body-color); background: #fff; transition: border-color 0.15s;
}
.lp-form input:focus, .lp-form select:focus, .lp-form textarea:focus { outline: none; border-color: var(--lp-primary); box-shadow: 0 0 0 3px rgba(67, 80, 113, 0.12); }
.lp-form .required-star { color: var(--lp-accent); margin-left: 2px; }
.lp-form .checkbox-group, .lp-form .radio-group { display: flex; flex-direction: column; gap: 6px; }
.lp-form .checkbox-group.horizontal, .lp-form .radio-group.horizontal { flex-direction: row; flex-wrap: wrap; gap: 12px; }
.lp-form .checkbox-group label, .lp-form .radio-group label { font-weight: 400; display: flex; align-items: center; gap: 6px; cursor: pointer; }
.lp-form .form-field { padding: 8px 0; }
.lp-form .form-text-block { padding: 4px 0; }
.lp-form .field-help { font-size: 12px; color: #6c757d; margin-top: 4px; }
.lp-form .field-wrap-half { display: inline-block; width: calc(50% - 8px); vertical-align: top; }
.lp-form .form-submit { padding: 16px 0 8px; }
.lp-form .lp-hp { position: absolute; left: -9999px; top: -9999px; height: 0; overflow: hidden; }
@media (max-width: 640px) {
  .lp-form .field-wrap-half { display: block; width: 100%; }
  .lp-form .form-columns { flex-direction: column; }
  .lp-form .form-column { width: 100% !important; }
}

/* ── Reviews (public chrome tweaks; block styles are in page-builder-theme.css) ── */

/* ── Scroll reveal (theme Motion setting; lp-site.js adds .lp-reveal below the fold only) ── */
.lp-reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s cubic-bezier(.22, .61, .36, 1), transform .7s cubic-bezier(.22, .61, .36, 1); }
html[data-lp-motion="lively"] .lp-reveal { transform: translateY(48px) scale(.98); transition-duration: .9s; }
.lp-reveal.lp-revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .lp-reveal { opacity: 1; transform: none; transition: none; } }
@media print { .lp-reveal { opacity: 1 !important; transform: none !important; } }

/* ── Lightbox (one shared <dialog>) ── */
.lp-lightbox { width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; margin: 0; padding: 0; border: 0; background: transparent; color: #fff; }
.lp-lightbox::backdrop { background: rgba(10, 12, 16, 0.92); }
.lp-lightbox[open] { display: flex; align-items: center; justify-content: center; }
.lp-lightbox-figure { margin: 0; max-width: calc(100vw - 120px); max-height: calc(100vh - 100px); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.lp-lightbox-figure img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: 6px; }
.lp-lightbox-figure figcaption { font-size: .95rem; opacity: .85; text-align: center; }
.lp-lightbox-close, .lp-lightbox-prev, .lp-lightbox-next { position: fixed; border: 0; background: rgba(255, 255, 255, 0.14); color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 2rem; line-height: 1; cursor: pointer; }
.lp-lightbox-close:hover, .lp-lightbox-prev:hover, .lp-lightbox-next:hover { background: rgba(255, 255, 255, 0.28); }
.lp-lightbox-close { top: 16px; right: 16px; }
.lp-lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lp-lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lp-lightbox-count { position: fixed; bottom: 18px; left: 0; right: 0; text-align: center; font-size: .9rem; opacity: .8; }
body.lp-lightbox-open { overflow: hidden; }
@media (max-width: 576px) {
  .lp-lightbox-figure { max-width: 100vw; }
  .lp-lightbox-prev, .lp-lightbox-next { top: auto; bottom: 8px; transform: none; }
}

/* ── Form errors, success, Turnstile ── */
.lp-form-errors { margin-bottom: 16px; padding: 12px 16px; border: 1px solid #f1aeb5; border-left: 4px solid #dc3545; border-radius: var(--lp-border-radius); background: #fdf2f3; color: #842029; }
.lp-form-errors p { margin: 0 0 6px; font-weight: 600; }
.lp-form-errors ul { margin: 0; padding-left: 18px; }
.lp-form-errors a { color: #842029; }
.lp-form-errors:focus { outline: none; }
.lp-has-error input, .lp-has-error select, .lp-has-error textarea { border-color: #dc3545 !important; }
.lp-field-error { margin-top: 4px; color: #b02a37; font-size: .875rem; }
.lp-form-success { padding: 20px; border: 1px solid #a3cfbb; border-left: 4px solid #198754; border-radius: var(--lp-border-radius); background: #f0f9f4; color: #0f5132; font-weight: 600; }
.lp-form-success:focus { outline: none; }
.lp-turnstile { margin-top: 12px; }
.lp-turnstile:empty { margin: 0; }

/* Links in page text take the theme link colour (Bootstrap would make them its own blue) */
.lp-main a:not([class]) { color: var(--lp-link); }
.lp-main a:not([class]):hover { color: var(--lp-accent); }

/* A page that ends on a full-width section (a split call to action) meets the footer without a gap */
.lp-main:has(> .lp-row:last-child > .lp-container-full) + .lp-footer { margin-top: 0; }
