/* Site-wide repairs for the converted Loan Mountain site. Article-only styles live in article.css. */

/* Theme Builder adds a short outer wrapper; it must be sticky too, or the header stops at the template boundary. */
.elementor-location-header { position:sticky; top:0; z-index:100; }
body.admin-bar .elementor-location-header { top:32px; }
@media (max-width:782px) { body.admin-bar .elementor-location-header { top:46px; } }

/* Original two-part keyboard focus indicator. Doubled :root outranks the theme's atomic all:revert reset. */
:root:root :is(a,button,input,select,textarea,[tabindex]):focus-visible { outline:3px solid currentColor; outline-offset:2px; box-shadow:0 0 0 5px #21305e; }
:root:root a[href="#main-content"]:focus-visible { outline-color:#fff; }
:root:root a[href="#main-content"]:focus {
  position:fixed; top:16px; left:16px; z-index:100; width:auto; height:auto; margin:0; clip-path:none; overflow:visible;
  padding:12px 20px; border-radius:6px; background:#fff; color:#21305e; font-weight:700;
  box-shadow:0 10px 15px -3px rgba(0,0,0,.1), 0 4px 6px -4px rgba(0,0,0,.1), 0 0 0 5px #21305e;
}
:root:root main#main-content:focus { outline:none; box-shadow:none; }

/* Original base typography: balanced headings, pretty paragraphs (style longhands keep any nowrap mode). */
:root:root :is(h1,h2,h3,h4,h5,h6) { text-wrap-style:balance; }
:root:root p { text-wrap-style:pretty; }

/* Desktop menus: chevron state and the Locations dropdown link rows. */
.elementor [data-lmc-menu-toggle][data-lmc-menu-toggle] :is(svg,img) { transition:transform 150ms cubic-bezier(.4,0,.2,1); }
.elementor [data-lmc-menu-toggle][data-lmc-menu-toggle]:not([aria-controls="desktop-solutions"])[aria-expanded="true"] :is(svg,img) { transform:rotate(180deg); }
[data-lmc-desktop-menu="locations"] ul a {
  display:flex; align-items:center; min-height:44px; padding:8px 12px; border-radius:8px;
  font-size:14px; line-height:20px; font-weight:500; color:var(--primary); text-decoration:none;
  transition:color 150ms, background-color 150ms;
}
[data-lmc-desktop-menu="locations"] ul a:hover { background:var(--muted); color:var(--accent); }
[data-lmc-desktop-menu="locations"] li.current-menu-item > a { background:color-mix(in srgb, var(--accent) 10%, transparent); color:var(--accent); }
@media (min-width:1536px) { .elementor .box-17 { width:auto; gap:20px; } .elementor .box-18, .elementor .image { width:auto; } }

/* Captured collapsed accordion grids keep their closed state; expand only after the controller opens them. */
.box-367[aria-hidden="false"] { grid-template-rows:1fr; }

@media (prefers-reduced-motion:reduce) {
  .elementor [data-lmc-menu-toggle][data-lmc-menu-toggle] :is(svg,img), [data-lmc-desktop-menu="locations"] ul a { transition:none; }
}

/* Original reading progress bar (ScrollProgress): 3px accent bar, grows with page scroll. */
.lmc-scroll-progress { position:fixed; top:0; left:0; right:0; z-index:110; height:3px; background:#4d7b32; transform:scaleX(0); transform-origin:left; pointer-events:none; }
@supports (animation-timeline: scroll()) {
  .lmc-scroll-progress { animation:lmc-scroll-progress linear both; animation-timeline:scroll(root block); }
  @keyframes lmc-scroll-progress { from { transform:scaleX(0); } to { transform:scaleX(1); } }
}

/* Guide request form (original LeadMagnet): visually hidden email label; email + button side by side at 640–1023px and
   from 1536px, stacked otherwise; consent row below with the original 16px checkbox. */
:root:root form.lmc-guide-form { flex-flow:row wrap !important; }
:root:root .lmc-guide-form .gform_validation_container, :root:root .lmc-guide-form .gform_hidden { display:none !important; }
:root:root .lmc-guide-form .shc-gf-f1, :root:root .lmc-guide-form .gform_button, :root:root .lmc-guide-form .shc-gf-f3 { flex:1 1 100% !important; min-width:0 !important; }
:root:root .lmc-guide-form .shc-gf-f1 .gfield_label { position:absolute !important; width:1px !important; height:1px !important; padding:0 !important; margin:-1px !important; overflow:hidden !important; clip:rect(0,0,0,0) !important; white-space:nowrap !important; border:0 !important; }
:root:root .lmc-guide-form .shc-gf-f3 .gchoice { display:flex; align-items:flex-start; gap:12px; }
:root:root .lmc-guide-form .shc-gf-f3 input[type=checkbox] { width:16px !important; height:16px !important; margin:4px 0 0 !important; flex-shrink:0; accent-color:#21305e; }
@media (min-width:640px) and (max-width:1023px), (min-width:1536px) {
  :root:root .lmc-guide-form .shc-gf-f1 { flex:1 1 0% !important; }
  :root:root .lmc-guide-form .gform_button { flex:0 0 auto !important; width:auto !important; }
}

/* 640–767px: the converter applied the phone (<640px) carousel layout to the whole mobile range. In the original,
   Client Success Stories stack as a one-column grid and the Process steps form a two-column grid with no carousel
   controls in this range. */
@media (min-width:640px) and (max-width:767px) {
  .elementor :is(.box-34.box-34, .box-352.box-352) { display:grid; grid-template-columns:minmax(0,1fr); gap:24px; padding:0 24px; margin-block:0; overflow:visible; }
  .elementor :is(.box-34.box-34, .box-352.box-352) > * { width:auto; padding-inline:0; flex:none; }
  .elementor :is(.box-85.box-85, .box-425.box-425) { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:48px; margin-inline:0; padding-block:16px; max-width:none; overflow:visible; }
  .elementor :is(.box-85.box-85, .box-425.box-425) > * { width:auto; min-width:0; max-width:none; padding-inline:0; flex:none; }
  .elementor :is(.box-85, .box-425) h3.e-heading-base.e-heading-base { font-size:18px; }
  .elementor :is(.box-85, .box-425) p.e-paragraph-base.e-paragraph-base { font-size:14px; }
  .elementor .box-98.box-98 { display:none; }
}

/* State guides: the review date is inline text ("Reviewed October 20, 2026") in the original; its converted wrapper
   rendered as a block and pushed the date onto a second line. */
.elementor .box-401 > .box-172 { display:inline; }

/* 640–767px: the source's sm: aspect ratios (content-section frames 5:4, state-guide neighbourhood photo 16:9) were
   lost under the converter's phone variants. */
@media (min-width:640px) and (max-width:767px) {
  .elementor :is(.question-9.question-9, .box-379.box-379) { aspect-ratio:5 / 4; }
  .elementor .image-61.image-61 { aspect-ratio:16 / 9; }
  /* About values: the featured first card spans both columns of the sm grid (CompanyValues). */
  .elementor .elementor-element-06ef572.elementor-element-06ef572 { grid-column:span 2 / span 2; }
}

/* Skip link (skip-link.php): visually hidden until focused. */
.lmc-skip-link:not(:focus) { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }

/* Call-or-text links (original CallTextLink): the single desktop link shows from 640px and the Call / Text Us pair
   (box-27) below it, so 640–767px keeps the desktop link like the original. */
@media (min-width: 640px) and (max-width: 767px) {
  .elementor a.e-con[href^="tel:"]:has(+ .box-27) { display: flex !important; }
}

/* Free Guide confirmation: the download replaces the form right after submitting. */
.lmc-guide-done { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; max-width: 28rem; outline: none; }
.lmc-guide-done-title { margin: 0; font-family: var(--font-display, inherit); font-size: 24px; line-height: 1.25; font-weight: 700; color: var(--primary); }
.lmc-guide-done-text { margin: 0; font-size: 16px; line-height: 1.625; color: var(--muted-foreground); }
.lmc-guide-download { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; margin-top: 4px; padding: 14px 32px; border-radius: 9999px; background: var(--accent); color: var(--accent-foreground, #fff); font-weight: 700; font-size: 16px; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; cursor: pointer; transition: filter .15s; }
.lmc-guide-download:hover { filter: brightness(1.1); color: var(--accent-foreground, #fff); }
.lmc-guide-download:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.lmc-guide-done .lmc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
