/* LPIC Header Polish — header fix layer.
   Loaded AFTER the design system (lpic-2026.css), so these rules win ties.
   Every selector is scoped to .lpic-topline / .lpic-site-header:
   nothing outside the header is affected. No content is changed. */

/* ---------- Burger button (injected by JS; desktop-hidden) ---------- */
.lpic-burger { display: none; }

/* ---------- Desktop guards (>1024px): keep the approved design,
   just protect the nav spacing and the brand lockup ---------- */
.lpic-site-header .lpic-nav a {
  white-space: nowrap;
  padding-top: 6px;
  padding-bottom: 6px;
}
.lpic-site-header .lpic-brand-img img { max-width: 100%; }
.lpic-site-header .lpic-brand-text .elementor-text-editor { min-width: 0; }

/* ---------- Tablet & mobile (<=1024px) ---------- */
@media (max-width: 1024px) {

  /* Compact topline: visible again (the design system hides it <=800px),
     smaller type, centered, clean wrapping. */
  .lpic-topline.elementor-section { display: block; }
  .lpic-topline > .elementor-container {
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 2px;
  }
  .lpic-topline > .elementor-container > .elementor-top-column {
    width: 100% !important;
    flex: 0 0 100%;
  }
  .lpic-topline .elementor-text-editor {
    text-align: center;
    font-size: 11.5px;
    line-height: 1.6;
  }
  .lpic-topline .lpic-toplinks a { white-space: nowrap; }
  .lpic-topline .lpic-top-sep { padding: 0 8px; }
  /* The contact line is one unbroken inline run in the markup; as flex
     items the links wrap cleanly instead of overflowing the viewport. */
  .lpic-topline .lpic-toplinks .elementor-text-editor {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    row-gap: 2px;
  }

  /* Header row: brand + burger on one line, panel wraps below. */
  .lpic-site-header > .elementor-container {
    flex-wrap: wrap;
    align-items: center;
  }

  /* Brand column: flexible single row — logo ~46px tall next to the name. */
  .lpic-site-header > .elementor-container > .elementor-top-column:nth-child(1) {
    width: auto !important;
    flex: 1 1 auto;
    min-width: 0;
    order: 1;
  }
  .lpic-site-header .lpic-brand > .elementor-container {
    flex-wrap: nowrap;
    align-items: center;
  }
  .lpic-site-header .lpic-brand > .elementor-container > .elementor-column:nth-child(1) {
    width: auto !important;
    flex: 0 0 auto;
  }
  .lpic-site-header .lpic-brand > .elementor-container > .elementor-column:nth-child(2) {
    width: auto !important;
    flex: 1 1 auto;
    min-width: 0;
  }
  .lpic-site-header .lpic-brand-img img {
    height: 46px;
    width: auto;
  }
  .lpic-site-header .lpic-brand-text strong {
    font-size: 13px;
    letter-spacing: .04em;
    white-space: nowrap;
  }
  .lpic-site-header .lpic-brand-text small {
    font-size: 8px;
    white-space: nowrap;
  }

  /* Burger: end of the header row, mobile only. */
  .lpic-site-header .lpic-burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    order: 2;
    margin-inline-start: auto;
    padding: 0;
    background: #ffffff;
    border: 1px solid #d7e1e6;
    border-radius: 6px;
    color: #0c314c;
    font-size: 21px;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .lpic-site-header .lpic-burger:hover,
  .lpic-site-header .lpic-burger:focus-visible {
    border-color: #00aeb8;
    color: #039fa8;
    outline: none;
  }

  /* Nav + button columns: hidden until the menu opens. */
  .lpic-site-header > .elementor-container > .elementor-top-column:nth-child(2),
  .lpic-site-header > .elementor-container > .elementor-top-column:nth-child(3) {
    display: none;
  }
  .lpic-site-header.lpic-menu-open > .elementor-container > .elementor-top-column:nth-child(2),
  .lpic-site-header.lpic-menu-open > .elementor-container > .elementor-top-column:nth-child(3) {
    display: block;
    width: 100% !important;
    flex: 0 0 100%;
  }
  .lpic-site-header > .elementor-container > .elementor-top-column:nth-child(2) { order: 3; }
  .lpic-site-header > .elementor-container > .elementor-top-column:nth-child(3) { order: 4; }

  /* Open panel: stacked full-width link rows + full-width button. */
  .lpic-site-header.lpic-menu-open > .elementor-container > .elementor-top-column:nth-child(2) {
    border-top: 1px solid #e6edf0;
    margin-top: 10px;
    padding-top: 6px;
  }
  .lpic-site-header.lpic-menu-open .lpic-nav .elementor-text-editor {
    display: block;
  }
  .lpic-site-header.lpic-menu-open .lpic-nav a {
    display: block;
    padding: 13px 8px;
    font-size: 15px;
    color: #0c314c;
    border-bottom: 1px solid #eef3f5;
  }
  .lpic-site-header.lpic-menu-open .lpic-nav a:last-child { border-bottom: 0; }
  .lpic-site-header.lpic-menu-open .lpic-nav a:hover {
    color: #039fa8;
    background: #f2f8f9;
  }
  .lpic-site-header.lpic-menu-open > .elementor-container > .elementor-top-column:nth-child(3) {
    padding: 12px 0 16px;
  }
  .lpic-site-header.lpic-menu-open .lpic-btn .elementor-button {
    width: 100%;
    justify-content: center;
  }
}

/* LPIC 1.1.1 — home hero photo repair.
   The Fidelity v2 page data stored the home hero photo in Elementor's
   motion-effects background group; Elementor prints no motion-effects
   layer when no motion effect is enabled, so the generated CSS rule had
   no element and the hero rendered as flat navy. The design system
   expects the photo as the hero section's own background (its ::before
   gradient at z-index 1 and the content container at z-index 2 already
   sit above it). Paint it on the section — homepage only (page-id-1535). */
body.page-id-1535 .lpic-hero {
  background-image: url('https://lpicmed.com/wp-content/uploads/2026/10/hero-pro.webp');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* LPIC 1.1.2 — hero photo, reinforced: maximum-specificity + !important
   (1.1.1's plain rule was served but did not paint in the live browser). */
body.page-id-1535 .elementor-1535 section.lpic-hero.elementor-element-787f0fa {
  background-image: url('https://lpicmed.com/wp-content/uploads/2026/10/hero-pro.webp') !important;
  background-size: cover !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
}

/* LPIC 1.1.3 — Elementor 4 markup compatibility layer.
   The Fidelity v2 design CSS was projected from the consultant's static
   stylesheet, which targets the classic .elementor-text-editor inner div
   and two static-only hook classes (.lpic-brand-text, .lpic-hero-foot-item).
   Elementor 4 prints text content directly in .elementor-widget-text-editor
   and the v2 page data hooks the brand as .lpic-brand and the hero stats
   via .lpic-hero-foot — so those design rules matched nothing live (nav
   links jammed, wordmark on one line, hero stats stuck, eyebrow rule lines
   and service icon boxes missing). The rules below re-declare the same
   design declarations against the live markup. */
body.lpic2026 .lpic-eyebrow .elementor-widget-text-editor { display: inline-flex; align-items: center; gap: 13px; }
body.lpic2026 .lpic-eyebrow .elementor-widget-text-editor::before { content: ''; width: 27px; height: 2px; background: currentColor; flex: none; }
body.lpic2026 .lpic-eyebrow-noline .elementor-widget-text-editor::before { display: none; }
body.lpic2026 .lpic-brand .elementor-widget-text-editor { line-height: 1.35; }
body.lpic2026 .lpic-brand strong { display: block; font-family: 'Manrope', sans-serif; font-size: 16px; letter-spacing: .06em; font-weight: 800; color: #0c314c; line-height: 1.4; }
body.lpic2026 .lpic-brand strong em { font-style: normal; color: #0a9cad; }
body.lpic2026 .lpic-brand small { display: block; font-size: 9px; letter-spacing: .22em; color: #5c7481; font-weight: 700; }
body.lpic2026 .lpic-hero-foot .elementor-widget-text-editor { display: flex; align-items: center; gap: 15px; }
@media (min-width: 801px) {
  body.lpic2026 .lpic-nav .elementor-widget-text-editor { display: flex; gap: 30px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
  body.lpic2026 .lpic-nav a.lpic-nav-contact { display: none; }
  body.lpic2026 .lpic-trust-tags .elementor-widget-text-editor { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
  body.lpic2026 .lpic-image-tag .elementor-widget-text-editor { display: flex; gap: 14px; align-items: center; color: #ffffff; }
  body.lpic2026 .lpic-svc-icon .elementor-widget-text-editor { width: 60px; height: 60px; background: #e9f8f9; display: flex; align-items: center; justify-content: center; border-radius: 3px; }
  body.lpic2026 .lpic-contact-loc .elementor-widget-text-editor > span { display: block; font-size: 10px; letter-spacing: .15em; color: #069ba7; font-weight: 800; margin-bottom: 8px; }
}
@media (min-width: 801px) and (max-width: 1024px) {
  body.lpic2026 .lpic-nav .elementor-widget-text-editor { gap: 17px; }
}
@media (max-width: 1024px) {
  body.lpic2026 .lpic-brand strong { font-size: 13px; }
  body.lpic2026 .lpic-brand small { font-size: 8px; }
}

/* LPIC 1.1.4 — widget-level hook mirrors.
   The data hooks live on the widgets themselves (the Hooks Fix updater
   makes Elementor print them). The design CSS addresses those hooks as
   ancestors of a classic .elementor-text-editor div that Elementor 4
   never prints — so the same declarations are re-declared here with the
   hook on the widget itself (.elementor-widget-text-editor.lpic-*). */
body.lpic2026 .elementor-widget-text-editor.lpic-eyebrow { display: inline-flex; align-items: center; gap: 13px; }
body.lpic2026 .elementor-widget-text-editor.lpic-eyebrow::before { content: ''; width: 27px; height: 2px; background: currentColor; flex: none; }
body.lpic2026 .elementor-widget-text-editor.lpic-eyebrow-noline::before { display: none; }
body.lpic2026 .elementor-widget-text-editor.lpic-brand-text { line-height: 1.35; }
body.lpic2026 .elementor-widget-text-editor.lpic-hero-foot-item { display: flex; align-items: center; gap: 15px; }
@media (min-width: 801px) {
  body.lpic2026 .elementor-widget-text-editor.lpic-nav { display: flex; gap: 30px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
  body.lpic2026 .elementor-widget-text-editor.lpic-trust-tags { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; }
  body.lpic2026 .elementor-widget-text-editor.lpic-image-tag { display: flex; gap: 14px; align-items: center; color: #ffffff; }
  body.lpic2026 .elementor-widget-text-editor.lpic-svc-icon { width: 60px; height: 60px; background: #e9f8f9; display: flex; align-items: center; justify-content: center; border-radius: 3px; }
  body.lpic2026 .elementor-widget-text-editor.lpic-contact-loc > span { display: block; font-size: 10px; letter-spacing: .15em; color: #069ba7; font-weight: 800; margin-bottom: 8px; }
}
@media (min-width: 801px) and (max-width: 1024px) {
  body.lpic2026 .elementor-widget-text-editor.lpic-nav { gap: 17px; }
}

/* LPIC 1.1.5 — brand home link: logo image + wordmark link to the homepage
   (restoring the consultant's original, where the brand was an anchor).
   Keep the wordmark's designed colors; no underline. */
body.lpic2026 .lpic-brand a { color: inherit; text-decoration: none; }
body.lpic2026 .lpic-brand a:hover { color: inherit; text-decoration: none; }
