@font-face {
  font-family: 'Relative Book Bold';
  src: url('https://www.jovie.com/app/uploads/2022/12/Relative-Bold.ttf') format('truetype');
}
@font-face {
  font-family: 'Helvetica Bold';
  src: url('https://www.jovie.com/app/uploads/2022/12/Helvetica-Bold.ttf') format('truetype');
}
@font-face {
  font-family: 'Relative Book';
  src: url('https://www.jovie.com/app/uploads/2022/12/Relative-Book.ttf') format('truetype');
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* rem base (= 10px). Replaces the global `html{font-size:10px}` that bootstrap-css
   provided site-wide — bootstrap is dequeued on this page (phase2-functions.php),
   so this keeps the Elementor header/footer rem sizes matching the live site. */
html { font-size: 62.5%; }

:root {
  --orange: #F16B22;
  --navy: #1A475E;
  --bg: #FFFFFF;
  --bg-light: #F3F3F3;
  --bg-warm: #F3EFEE;
  --card: #FFFFFF;
  --border: #E1E0E5;
  --text: #5A5758;
  --text-dark: #1a475d;
  --text-secondary: #54595F;
  --teal: #8CD5DF;
  --white: #FFFFFF;
  --radius: 8px;
  --radius-sm: 5px;
  --radius-pill: 25px;
}

body {
  font-family: 'Helvetica', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 26px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* —— HEADER —— */
#header-1 { margin: 0 auto; }
#header-1 a { text-decoration: none; color: inherit; }
#nav-1 ul { display: flex; padding: 0; margin: 0; width: auto !important; margin-left: 0 !important; justify-content: flex-end !important; gap: 8px; }
#nav-1 ul li { display: inline-block; width: auto !important; }
#nav-1 ul li a {
  font-family: 'Relative Book Bold', Sans-serif !important;
  font-size: 18px !important;
  font-weight: 300 !important;
  text-transform: capitalize !important;
  color: rgb(26, 71, 94) !important;
  white-space: nowrap;
  width: auto !important;
  margin: 0 !important;
  padding: 0 12px !important;
}
#a-1 span, #a-2 span, #a-3 span {
  font-family: 'Relative Book Bold', Sans-serif;
}
#div-7 { width: 100% !important; }
#nav-1 { width: 100% !important; }

/* —— FULL-WIDTH BACKGROUND WITH CONSTRAINED CONTENT —— */
.hero-wrap.full-width,
.breadcrumb-wrap.full-width,
.careers-wrap.full-width {
  width: 100%;
}
.hero-wrap .full-width-inner,
.breadcrumb-wrap .full-width-inner,
.careers-wrap .full-width-inner {
  max-width: 1550px;
  margin: 0 auto;
  padding-left: 15px;
  padding-right: 15px;
}

/* —— BREADCRUMB —— */
.breadcrumb-wrap { background: var(--bg-light) !important; border-bottom: 1px solid var(--border) !important; }
.breadcrumb-wrap .breadcrumb { padding: 10px 20px; font-size: 13px; color: var(--text) !important; }
.breadcrumb-wrap .breadcrumb span { color: var(--orange) !important; font-weight: 500; }

/* —— HERO —— */
.hero-wrap {
  background: url('https://www.jovie.com/app/uploads/2025/07/Homepage_Hero_Desktop.webp') center top/cover no-repeat;
  position: relative;
}
.hero-wrap::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(255,255,255,1) 35%, rgba(255,255,255,0) 65%);
}
.hero-wrap .hero { padding: 48px 20px; display: flex; justify-content: space-between; align-items: center; gap: 40px; position: relative; z-index: 1; }
.hero-wrap .hero-left { flex: 1; max-width: 720px; }
.hero-wrap .hero-tag { font-size: 12px; color: #1a475d; text-transform: uppercase; letter-spacing: 2px; margin-bottom: 12px; font-weight: 600; font-family: 'Relative Book Bold', sans-serif; }
.hero-wrap .hero-h1 { font-size: 36px; font-weight: 700; color: #1a475d; line-height: 1.2; margin-bottom: 14px; font-family: 'Helvetica Bold', sans-serif; }
.hero-wrap .hero-h1 span { color: #1a475d; }
.hero-wrap .hero-sub { font-size: 16px; color: #1a475d; line-height: 1.7; margin-bottom: 28px; max-width: 440px; font-weight: 700; }
.hero-wrap .hero-btns { display: flex; gap: 12px; }
.hero-wrap .hbtn {
  font-size: 15px;
  font-weight: 400;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  background: var(--orange);
  color: #fff;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-family: 'Relative Book Bold', sans-serif;
}
.hero-wrap .hbtn:hover { background: #d95b15; color: #fff;}
.hero-wrap .hbtn-outline { background: transparent; border: 2px solid #1a475d; color: #1a475d; }
.hero-wrap .hbtn-outline:hover { background: rgba(26,71,93,0.08); color: #1a475d; }
.hero-wrap .hero-right { flex-shrink: 0; width: 300px; height: 200px; border-radius: var(--radius); overflow: hidden; }
.hero-wrap .hero-right img { width: 100%; height: 100%; object-fit: cover; }

/* —— BODY LAYOUT: content + right rail —— */
.body-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 0;
  align-items: start;
  max-width: 1550px;
  margin: 0 auto;
  padding: 0 40px;
}

/* —— CONTENT COLUMN —— */
.body-layout .content-col { min-width: 0; }

.body-layout .section { padding: 32px 25px; margin-left: -45px; }
.body-layout .section-alt { background: var(--bg-light); }
.body-layout .section-label { font-size: 12px; color: var(--orange); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 5px; font-weight: 700; font-family: 'Relative Book Bold', sans-serif; }
.body-layout .section-h2 { font-size: 24px; font-weight: 700; color: var(--text-dark); margin-bottom: 6px; font-family: 'Helvetica Bold', sans-serif; }
.body-layout .section-intro p{ font-size: 16px; color: var(--text); line-height: 26px; margin-bottom: 20px; max-width: 780px; }

/* ── Bard rich-text content ─────────────────────────────────────────────
   Bard fields can emit ANY mix of headings (h2–h6), bullet/numbered lists,
   bold lead-ins, links, and paragraphs — and the editor often wraps each
   <li> in a <p> and splits content into multiple single-item <ul>s. These
   rules normalize heading typography, list alignment, and spacing for every
   container on the page that renders a Bard field, so unpredictable content
   still lays out cleanly within its section. */

/* Intro / services / why / team / blog — light sections.
   All heading levels share one font family + the navy heading color; only
   the size differs per level so the hierarchy still reads. */
.body-layout .section-intro h1,
.body-layout .section-intro h2,
.body-layout .section-intro h3,
.body-layout .section-intro h4,
.body-layout .section-intro h5,
.body-layout .section-intro h6 { color: var(--text-dark); font-weight: 700; font-family: 'Helvetica Bold', sans-serif; line-height: 1.4; margin: 18px 0 12px; }
.body-layout .section-intro h1 { font-size: 22px; }
.body-layout .section-intro h2 { font-size: 20px; }
.body-layout .section-intro h3 { font-size: 18px; }
.body-layout .section-intro h4 { font-size: 16px; }
.body-layout .section-intro h5,
.body-layout .section-intro h6 { font-size: 15px; }
.body-layout .section-intro :is(h1, h2, h3, h4, h5, h6) strong { font-weight: 700; color: inherit; }
.body-layout .section-intro ul,
.body-layout .section-intro ol { margin: 0 0 10px; padding-left: 22px; max-width: 780px; }
.body-layout .section-intro ul { list-style: disc; }
.body-layout .section-intro ol { list-style: decimal; }
.body-layout .section-intro li { font-size: 16px; color: var(--text); line-height: 26px; margin-bottom: 10px; }
.body-layout .section-intro li:last-child { margin-bottom: 0; }
.body-layout .section-intro li p { margin: 0; max-width: none; }
.body-layout .section-intro strong { color: var(--text-dark); font-weight: 700; }
.body-layout .section-intro a { color: var(--orange); text-decoration: underline; }
.body-layout .section-intro p:empty { display: none; }

/* Hero subhead, careers band, and contact box — Bard fields that may also
   contain headings/lists. Headings inherit each container's own text color
   (navy on the light hero, white on the dark navy careers/contact boxes) so
   they always match their section, and lists/bold get the same alignment. */
.hero-wrap .hero-sub :is(h1, h2, h3, h4, h5, h6),
.careers-wrap .careers-copy :is(h1, h2, h3, h4, h5, h6),
.body-layout .right-rail .contact-box .hire-note :is(h1, h2, h3, h4, h5, h6) { color: inherit; font-weight: 700; font-family: 'Helvetica Bold', sans-serif; line-height: 1.4; margin: 14px 0 8px; }
.hero-wrap .hero-sub :is(h1, h2, h3) { font-size: 18px; }
.careers-wrap .careers-copy :is(h1, h2, h3) { font-size: 18px; }
.body-layout .right-rail .contact-box .hire-note :is(h1, h2, h3, h4, h5, h6) { font-size: 14px; }
.hero-wrap .hero-sub :is(ul, ol),
.careers-wrap .careers-copy :is(ul, ol),
.body-layout .right-rail .contact-box .hire-note :is(ul, ol) { margin: 0 0 12px; padding-left: 20px; }
.hero-wrap .hero-sub ul,
.careers-wrap .careers-copy ul,
.body-layout .right-rail .contact-box .hire-note ul { list-style: disc; }
.hero-wrap .hero-sub li,
.careers-wrap .careers-copy li,
.body-layout .right-rail .contact-box .hire-note li { margin-bottom: 6px; }
.hero-wrap .hero-sub li p,
.careers-wrap .careers-copy li p,
.body-layout .right-rail .contact-box .hire-note li p { margin: 0; max-width: none; }
.hero-wrap .hero-sub strong,
.careers-wrap .careers-copy strong,
.body-layout .right-rail .contact-box .hire-note strong { color: inherit; font-weight: 700; }
.hero-wrap .hero-sub p:empty,
.careers-wrap .careers-copy p:empty,
.body-layout .right-rail .contact-box .hire-note p:empty { display: none; }

/* Services grid */
.body-layout .sgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.body-layout .scard { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.body-layout .scard-icon { width: 34px; height: 34px; background: rgba(241,107,34,0.12); border-radius: 7px; margin-bottom: 10px; display: flex; align-items: center; justify-content: center; }
.body-layout .scard h3 { font-size: 15px; font-weight: 700; color: var(--text-dark); margin-bottom: 5px; font-family: 'Helvetica Bold', sans-serif; }
/* The service title is a link (SEO anchor text) but should still look like the
   heading, not the orange "Learn more" link, so it inherits the h3 color. */
.body-layout .scard h3 a { color: inherit; text-decoration: none; font-size: inherit; font-weight: inherit; font-family: inherit; }
.body-layout .scard h3 a:hover { color: var(--orange); }
.body-layout .scard p {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 10px;
  /* Service descriptors are shown in full — no line-clamp/ellipsis truncation. */
}
.body-layout .scard a { font-size: 14px; color: var(--orange); text-decoration: none; font-weight: 600; }

/* Why Jovie */
.body-layout .why-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: stretch; }
.body-layout .why-points { display: flex; flex-direction: column; gap: 16px; }
.body-layout .wpt { display: flex; gap: 13px; }
.body-layout .wdot { width: 7px; height: 7px; border-radius: 50%; background: var(--orange); flex-shrink: 0; margin-top: 6px; }
.body-layout .wpt h4 { font-size: 15px; font-weight: 700; color: var(--text-dark); margin-bottom: 3px; font-family: 'Helvetica Bold', sans-serif; }
.body-layout .wpt p { font-size: 14px; color: var(--text); line-height: 1.6; }
.body-layout .why-photo { border-radius: var(--radius); overflow: hidden; height: 100%; min-height: 300px; }
.body-layout .why-photo img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }

/* Testimonials */
.body-layout .testimonials-section { padding: 32px 25px; margin-left: -45px; }
.body-layout .tgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 16px; }
.body-layout .tcard { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); position: relative; }
.body-layout .tcard-stars { color: var(--orange); font-size: 14px; letter-spacing: 1px; margin-bottom: 8px; }
.body-layout .tcard-text { font-size: 14px; color: var(--text); line-height: 1.65; margin-bottom: 14px; font-style: italic; }
.body-layout .tcard-footer { display: flex; align-items: center; gap: 10px; }
.body-layout .tcard-avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(241,107,34,0.12); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--orange); flex-shrink: 0; overflow: hidden; }
.body-layout .tcard-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.body-layout .tcard-name { font-size: 14px; font-weight: 700; color: var(--text-dark); }
.body-layout .tcard-meta { font-size: 12px; color: var(--text); }

/* Team */
.body-layout .team-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.body-layout .tmcard { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.05); cursor: pointer; transition: box-shadow 0.2s; }
.body-layout .tmcard:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.body-layout .tmavatar { width: 112px; height: 112px; border-radius: 50%; margin: 0 auto 8px; overflow: hidden; }
.body-layout .tmavatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.body-layout .tmcard h4 { font-size: 14px; font-weight: 700; color: var(--text-dark); margin-bottom: 2px; }
.body-layout .tmcard p { font-size: 12px; color: var(--text); }

/* Mobile sticky bottom bar */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #fff;
  border-top: 1px solid var(--border);
  padding: 8px 16px;
  flex-direction: column;
  gap: 4px;
  z-index: 900;
  box-shadow: 0 -2px 8px rgba(0,0,0,0.08);
}
.mobile-sticky-bar .mobile-sticky-contact {
  display: flex;
  justify-content: center;
  gap: 20px;
}
.mobile-sticky-bar .mobile-sticky-contact a {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
}
.mobile-sticky-bar .mobile-sticky-contact svg { flex-shrink: 0; }
.mobile-sticky-bar .mobile-sticky-btn {
  display: block;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  text-decoration: underline;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-family: 'Relative Book Bold', sans-serif;
}

.body-layout .team-dots { display: none; justify-content: center; gap: 8px; margin-top: 12px; }
.body-layout .team-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border); border: none; padding: 0; cursor: pointer; transition: background 0.2s; }
.body-layout .team-dot.active { background: var(--orange); }

/* Team Modal */
.tm-modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 9999; justify-content: center; align-items: center; }
.tm-modal-overlay.active { display: flex; }
.tm-modal-overlay .tm-modal { background: #fff; border-radius: var(--radius); max-width: 520px; width: 90%; max-height: 85vh; overflow-y: auto; padding: 32px; position: relative; box-shadow: 0 8px 32px rgba(0,0,0,0.2); }
.tm-modal-overlay .tm-modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 24px; cursor: pointer; color: var(--text); line-height: 1; opacity: 1; transition: opacity 0.2s; }
.tm-modal-overlay .tm-modal-close:hover { opacity: 0.7;     color: var(--orange); background-color: transparent !important;}
.tm-modal-overlay .tm-modal-avatar { width: 140px; height: 140px; border-radius: 50%; overflow: hidden; margin: 0 auto 16px; }
.tm-modal-overlay .tm-modal-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.tm-modal-overlay .tm-modal h3 { text-align: center; font-size: 22px; font-weight: 700; color: var(--text-dark); margin-bottom: 4px; }
.tm-modal-overlay .tm-modal .tm-modal-role { text-align: center; font-size: 14px; color: var(--orange); font-weight: 600; margin-bottom: 16px; }
.tm-modal-overlay .tm-modal .tm-modal-bio { font-size: 15px; color: var(--text); line-height: 1.7; }

/* Blog */
.body-layout .article-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.body-layout .acard { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; gap: 12px; box-shadow: 0 1px 3px rgba(0,0,0,0.05); }
.body-layout .aimg { width: 120px; height: 120px; border-radius: 7px; flex-shrink: 0; overflow: hidden; }
.body-layout .aimg img { width: 100%; height: 100%; object-fit: cover; }
.body-layout .ameta { font-size: 11px; color: var(--text); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.5px; }
.body-layout .acard h4 { font-size: 14px; font-weight: 700; color: var(--text-dark); line-height: 1.4; margin-bottom: 5px; }
.body-layout .acard h4 a { color: inherit; font-size: inherit; font-weight: inherit; text-decoration: none; }
.body-layout .acard h4 a:hover { color: var(--orange); }
.body-layout .acard a { font-size: 14px; color: var(--orange); text-decoration: none; font-weight: 600; }

/* Local events */
.body-layout .local-section { padding: 32px 25px; margin-left: -45px; }
.body-layout .local-entries { display: flex; flex-direction: column; gap: 28px; margin-top: 20px; }
.body-layout .local-entry { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: center; }
.body-layout .local-entry.reverse { grid-template-columns: 1fr 300px; }
.body-layout .local-entry.reverse .local-entry-img { order: 2; }
.body-layout .local-entry.reverse .local-entry-text { order: 1; }
.body-layout .local-entry-img { width: 100%; height: 190px; border-radius: var(--radius); border: 1px solid var(--border); overflow: hidden; }
.body-layout .local-entry-img img { width: 100%; height: 100%; object-fit: cover; }
.body-layout .local-entry-text h4 { font-size: 16px; font-weight: 700; color: var(--orange); margin-bottom: 8px; line-height: 1.35; font-family: 'Helvetica Bold', sans-serif; }
.body-layout .local-entry-text p { font-size: 15px; color: var(--text); line-height: 1.7; margin-bottom: 10px; }
.body-layout .local-entry-text a { font-size: 14px; color: var(--orange); text-decoration: none; font-weight: 600; }
.body-layout .local-divider { border: none; border-top: 1px solid var(--border); }
.body-layout .local-note { margin-top: 20px; padding: 12px 16px; background: #defbff; border-radius: var(--radius-sm); border-left: none; font-size: 14px; color: var(--text); font-weight: 700; max-width: 780px; }

/* Careers band */
.careers-wrap { background: var(--navy); }
.careers-wrap .careers-band { padding: 44px 40px; display: flex; justify-content: space-between; align-items: center; gap: 32px; }
.careers-wrap .careers-left { flex: 1; max-width: 600px; }
.careers-wrap .careers-label { font-size: 12px; color: var(--orange); text-transform: uppercase; letter-spacing: 1.5px; font-weight: 700; margin-bottom: 8px; font-family: 'Relative Book Bold', sans-serif; }
.careers-wrap .careers-h2 { font-size: 24px; font-weight: 700; color: #fff; line-height: 1.25; margin-bottom: 10px; font-family: 'Helvetica Bold', sans-serif; }
.careers-wrap .careers-copy p{ font-size: 16px; color: rgba(255,255,255,0.75); line-height: 1.7; margin-bottom: 24px; max-width: 480px; }
.careers-wrap .careers-btns { display: flex; gap: 12px; flex-wrap: wrap; }
.careers-wrap .cbtn-primary {
  font-size: 15px;
  font-weight: 400;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  background: var(--orange);
  color: #fff;
  border: none;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-family: 'Relative Book Bold', sans-serif;
}
.careers-wrap .cbtn-primary:hover { background: #d95b15; color: #fff;}
.careers-wrap .cbtn-secondary {
  font-size: 15px;
  font-weight: 400;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,0.75);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-family: 'Relative Book Bold', sans-serif;
}
.careers-wrap .cbtn-secondary:hover { background: rgba(255,255,255,0.08); color: #fff;}
.careers-wrap .careers-mid { flex-shrink: 0; display: flex; flex-direction: column; gap: 10px; width: 180px; }
.careers-wrap .careers-stat { background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius); padding: 14px 18px; text-align: center; min-width: 148px; }
.careers-wrap .careers-stat-num { font-size: 24px; font-weight: 700; color: var(--orange); margin-bottom: 3px; font-family: 'Helvetica Bold', sans-serif; }
.careers-wrap .careers-stat-label { font-size: 12px; color: rgba(255,255,255,0.5); line-height: 1.4; }
.careers-wrap .careers-right { flex-shrink: 0; width: 460px; border-radius: var(--radius); overflow: hidden; }
.careers-wrap .careers-right img { width: 100%; height: 100%; object-fit: cover; }

/* Footer */
.footer-section a { text-decoration: none; color: inherit; }
.footer-section ul { padding: 0; }
.footer-bottom a { text-decoration: none; color: inherit; }
.elementor-location-footer {
  margin-top: 0px !important;
}
/* —— RIGHT RAIL —— */
.body-layout .right-rail {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 20px;
  padding: 32px 0 32px 0;
  align-self: start;
}
.body-layout .right-rail .nav-box {
  background: var(--card);
  border-radius: var(--radius); 
  overflow: hidden; 
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}
.body-layout .right-rail .nav-box-head { background: var(--navy); padding: 16px 20px; border-radius: 8px 8px 0px 0px; }
.body-layout .right-rail .nav-box-head p { font-size: 13px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 1px; font-family: 'Relative Book Bold', sans-serif; }
.body-layout .right-rail .nav-box-sub { font-size: 12px !important; font-weight: 400 !important; text-transform: none !important; letter-spacing: 0 !important; color: rgba(255,255,255,0.7) !important; margin-top: 4px; line-height: 1.4; font-family: 'Relative Book', sans-serif !important; }
.body-layout .right-rail .nav-box-list { list-style: none; padding: 8px 0 12px; }
.body-layout .right-rail .nav-box-list li a {
  display: block;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 400;
  color: var(--text);
  text-decoration: none;
  border-left: 3px solid transparent;
}
.body-layout .right-rail .nav-box-list li a:hover { color: var(--orange); background: rgba(241,107,34,0.04); }
.body-layout .right-rail .nav-box-list li.active a {
  color: var(--orange);
  font-weight: 700;
  border-left-color: var(--orange);
  background: rgba(241,107,34,0.06);
}
.body-layout .right-rail .nav-box-list .nav-divider { border: none; border-top: 1px solid var(--border); margin: 6px 20px; }

/* Contact quick-link box */
.body-layout .right-rail .contact-box {
  background: var(--navy);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}
.body-layout .right-rail .contact-box p.label { font-size: 13px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; font-family: 'Relative Book Bold', sans-serif; }
.body-layout .right-rail .contact-box .addr { font-size: 13px; color: #fff; line-height: 1.5; margin-bottom: 10px; }
.body-layout .right-rail .contact-box .clink { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
.body-layout .right-rail .contact-box .clink a { font-size: 14px; color: #fff; text-decoration: none; font-weight: 500; }
.body-layout .right-rail .contact-box .clink a:hover { color: var(--orange); }
.body-layout .right-rail .contact-box .social-row { display: flex; gap: 6px; margin: 10px 0; }
.body-layout .right-rail .contact-box .sicon { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; }
.body-layout .right-rail .contact-box hr { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 12px 0; }
.body-layout .right-rail .contact-box .hire-note { font-size: 13px; color: #fff; line-height: 1.5; margin-bottom: 10px; }
.body-layout .right-rail .contact-box .join-btn { display: block; background: var(--orange); color: #fff; font-size: 15px; font-weight: 400; padding: 12px 16px; border-radius: var(--radius-sm); text-align: center; text-decoration: none; font-family: 'Relative Book Bold', sans-serif; }
.body-layout .right-rail .contact-box .join-btn:hover { background: #d95b15; }

/* —— MOBILE HEADER —— */
.mobile-header {
  display: none;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.mobile-header img { height: 44px; width: auto; }
.mobile-header .hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 6px;
  background: none;
  border: none;
}
.mobile-header .hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
}
.section-intro h1, .section-intro h2, .section-intro h3, .section-intro h4, .section-intro h5, .section-intro h6, .section-intro ul, .section-intro ol, .section-intro p{
  margin-bottom: 10px;;
}
.section-intro ul, .section-intro ol{
  padding-left: 20px;;
}
/* —— TABLET RESPONSIVE —— */
@media (min-width: 769px) and (max-width: 1024px) {
  .body-layout { grid-template-columns: 1fr 220px; padding: 0 16px; }
  .body-layout .section { padding: 24px 16px; margin-left: 0; }
  .body-layout .testimonials-section { padding: 24px 16px; margin-left: 0; }
  .body-layout .local-section { padding: 24px 16px; margin-left: 0; }
  .body-layout .sgrid { grid-template-columns: repeat(2, 1fr); }
  .body-layout .tgrid { grid-template-columns: repeat(2, 1fr); }
  .body-layout .team-grid { grid-template-columns: repeat(2, 1fr); }
  .body-layout .local-entry { grid-template-columns: 200px 1fr; gap: 20px; }
  .body-layout .local-entry.reverse { grid-template-columns: 1fr 200px; }
}

/* —— MOBILE RESPONSIVE —— */
@media (max-width: 768px) {
  html, body { overflow-x: hidden; }
  .mobile-header { display: flex !important; }
  .mobile-header .hamburger {
    display: flex !important;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 6px;
  }
  .mobile-header .hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
  }
  .breadcrumb-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .breadcrumb-wrap::-webkit-scrollbar { display: none; }
  .breadcrumb-wrap .breadcrumb { padding: 7px 16px; font-size: 12px; white-space: nowrap; }
  .hero-wrap .hero { padding: 28px 16px 24px; flex-direction: column; gap: 20px; }
  .hero-wrap .hero-left { max-width: 100%; }
  .hero-wrap .hero-h1 { font-size: 26px; margin-bottom: 10px; }
  .hero-wrap .hero-sub { font-size: 15px; margin-bottom: 20px; max-width: 100%; }
  .hero-wrap .hero-btns { flex-direction: column; gap: 10px; }
  .hero-wrap .hbtn { width: 100%; padding: 14px 20px; font-size: 15px; text-align: center; border-radius: var(--radius-pill); }
  .hero-wrap .hero-right { display: none; }
  .body-layout { display: block !important; padding: 0 !important; }
  .mobile-services-nav {
    display: flex !important;
    overflow-x: auto;
    gap: 8px;
    padding: 12px 16px;
    background: #fff;
    border-bottom: 1px solid var(--border);
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .mobile-services-nav::-webkit-scrollbar { display: none; }
  .mobile-services-nav a {
    flex-shrink: 0;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    background: var(--bg-light);
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
  }
  .mobile-services-nav a.active {
    background: rgba(241,107,34,0.12);
    color: var(--navy);
    font-weight: 700;
    border-color: var(--orange);
  }
  .body-layout .right-rail { display: none !important; }
  .body-layout .section { padding: 24px 16px; margin-left: 0; }
  .body-layout .section-alt { padding: 24px 16px; }
  .body-layout .local-section { padding: 24px 16px; margin-left: 0; }
  .body-layout .testimonials-section { padding: 24px 16px; margin-left: 0; }
  .body-layout .section-h2 { font-size: 20px; }
  .body-layout .section-intro h1 { font-size: 19px; }
  .body-layout .section-intro h2 { font-size: 18px; }
  .body-layout .section-intro h3 { font-size: 17px; }
  .body-layout .section-intro h4 { font-size: 15px; }
  .body-layout .sgrid { grid-template-columns: 1fr; gap: 10px; }
  .body-layout .scard { padding: 16px; display: flex; align-items: flex-start; gap: 12px; }
  .body-layout .scard-icon { flex-shrink: 0; margin-bottom: 0; }
  .body-layout .why-grid { grid-template-columns: 1fr; gap: 20px; }
  .body-layout .why-photo { display: none; }
  .body-layout .tgrid { grid-template-columns: 1fr; gap: 12px; }
  .body-layout .team-grid {
    display: flex !important;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 12px;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .body-layout .team-grid::-webkit-scrollbar { display: none; }
  .body-layout .tmcard {
    flex: 0 0 85%;
    scroll-snap-align: center;
  }
  .body-layout .team-dots { display: flex !important; }
  .body-layout .article-grid { grid-template-columns: 1fr; gap: 10px; }
  .body-layout .local-entry { grid-template-columns: 1fr !important; gap: 16px; }
  .body-layout .local-entry.reverse .local-entry-img { order: 0 !important; }
  .body-layout .local-entry.reverse .local-entry-text { order: 0 !important; }
  .body-layout .local-entry-img { height: 160px; }
  .mobile-contact-strip {
    display: block !important;
    background: var(--navy);
    padding: 20px 16px;
  }
  .mobile-contact-strip p.label { font-size: 13px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; font-family: 'Relative Book Bold', sans-serif; }
  .mobile-contact-strip .addr { font-size: 13px; color: #fff; line-height: 1.5; margin-bottom: 10px; }
  .mobile-contact-strip .clink { display: flex; align-items: center; gap: 9px; margin-bottom: 9px; }
  .mobile-contact-strip .clink a { font-size: 14px; color: #fff; text-decoration: none; font-weight: 500; }
  .mobile-contact-strip .social-row { display: flex; gap: 6px; margin: 10px 0; }
  .mobile-contact-strip .sicon { width: 28px; height: 28px; border-radius: 50%; background: rgba(255,255,255,0.15); display: flex; align-items: center; justify-content: center; }
  .mobile-contact-strip hr { border: none; border-top: 1px solid rgba(255,255,255,0.1); margin: 12px 0; }
  .mobile-contact-strip .hire-note { font-size: 13px; color: #fff; line-height: 1.5; margin-bottom: 10px; }
  .mobile-contact-strip .join-btn { display: block; background: var(--orange); color: #fff; font-size: 15px; font-weight: 400; padding: 12px 16px; border-radius: var(--radius-sm); text-align: center; text-decoration: none; font-family: 'Relative Book Bold', sans-serif; }
  .hero-wrap { background: #fff !important; }
  .hero-wrap::before { background: none !important; }
  .mobile-sticky-bar { display: flex !important; }
  body { padding-bottom: 90px; }
  .careers-wrap .careers-band { flex-direction: column; padding: 32px 16px; gap: 24px; }
  .careers-wrap .careers-h2 { font-size: 20px; }
  .careers-wrap .careers-mid { flex-direction: row; justify-content: flex-start; }
  .careers-wrap .careers-stat { flex: auto; min-width: 0; padding: 12px 8px; }
  .careers-wrap .careers-stat-num { font-size: 20px; }
  .careers-wrap .careers-btns { flex-direction: column; gap: 10px; }
  .careers-wrap .careers-right { width: 100%; height: 200px; }
  .careers-wrap .cbtn-primary, .careers-wrap .cbtn-secondary { width: 100%; text-align: center; padding: 14px; }
}
.page-template-landingPages .main_outer_location_page{
  z-index: 99;
}
.page-template-landingPages p{
  margin-bottom: 10px;
}
.page-template-landingPages .why-grid p{
  margin-bottom: 0;
}
@media (min-width: 769px) {
  .mobile-header { display: none !important; }
  .mobile-header .hamburger { display: none !important; }
  .mobile-services-nav { display: none !important; }
  .mobile-contact-strip { display: none !important; }
  .mobile-sticky-bar { display: none !important; }
}

/* ===== HEADER (DivMagic) RESPONSIVE ===== */
@media (max-width: 767px) {
  #header-1 {
    display: none !important; padding-top: 0px !important; padding-right: 20px !important; padding-bottom: 0px !important; padding-left: 20px !important;
  }
  #div-1 {
    min-height: 80px !important;
  }
  #div-2 {
    width: 30% !important;
  }
  #div-4 {
    width: 70% !important;
  }
  #div-6 {
    display: none !important;
  }
  #nav-1 {
    display: none !important;
  }
}
@media (max-width: 1024px) {
  #header-1 {
    padding-top: 25px !important; padding-right: 0px !important; padding-bottom: 0px !important; padding-left: 0px !important;
    width: 100% !important; max-width: 100% !important;
  }
  #div-1 {
    min-height: 0px !important; width: 100% !important;
  }
  #div-3 {
    margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 10px !important;
  }
  #div-5 {
    align-items: center !important; justify-content: flex-end !important; padding-top: 0px !important; padding-right: 18px !important; padding-bottom: 0px !important; padding-left: 0px !important;
  }
  #a-1 {
    padding-top: 10px !important; padding-right: 21px !important; padding-bottom: 10px !important; padding-left: 21px !important;
  }
  #a-2 {
    padding-top: 10px !important; padding-right: 21px !important; padding-bottom: 10px !important; padding-left: 21px !important;
  }
  #a-3 {
    padding-top: 10px !important; padding-right: 21px !important; padding-bottom: 10px !important; padding-left: 21px !important;
  }
  #div-7 {
    padding-top: 0px !important; padding-right: 0px !important; padding-bottom: 15px !important; padding-left: 0px !important;
  }
  #a-4 {
    padding: 0px !important;
  }
  #a-5 {
    padding: 0px !important;
  }
  #a-6 {
    padding: 0px !important;
  }
  #a-7 {
    padding: 0px !important;
  }
}
@media (min-width: 768px) {
  #div-2 {
    width: 15% !important;
  }
  #div-4 {
    width: 85% !important;
  }
}
@media (max-width: 1024px) and (min-width: 768px) {
  #div-2 {
    width: 25% !important;
  }
  #div-4 {
    width: 75% !important;
  }
}
@media (max-width: 767px) {
  #img-1 {
    margin-top: -3.4px !important;
  }
}
@media (min-width: 1128px) {
  #img-1 {
    width: 200px !important;
  }
}
@media (min-width: 768px) and (max-width: 1024px) {
  #div-6 {
    display: none !important;
  }
}
@media (max-width: 768px) {
  #header-1 {
    display: none !important;
    position: absolute !important;
    width: 0 !important;
    height: 0 !important;
    overflow: hidden !important;
  }
}

/* ===== FOOTER (DivMagic) RESPONSIVE ===== */
@media (max-width: 1024px) {
  #ft-section-1 {
    padding-top: 15px !important; padding-right: 20px !important; padding-bottom: 10px !important; padding-left: 20px !important;
  }
  #ft-div-1 {
    max-width: 1024px !important; margin: 0 auto !important;
  }
  #ft-div-3 {
    margin-top: 0% !important; margin-right: 15% !important; margin-bottom: 0% !important; margin-left: 0% !important;
  }
  #ft-div-4 {
    margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 23px !important; margin-left: 0px !important;
  }
}
@media (max-width: 767px) {
  #ft-section-1 {
    margin-top: 0px !important; margin-bottom: 0px !important; padding-top: 30px !important; padding-right: 20px !important; padding-bottom: 0px !important; padding-left: 20px !important; height: auto !important;
  }
  #ft-div-1 {
    max-width: 767px !important; margin: 0 auto !important; flex-wrap: wrap !important; height: auto !important;
  }
  #ft-div-2 {
    width: 100% !important;
  }
  #ft-div-3 {
    margin-top: 0px !important; margin-right: 0px !important; margin-bottom: 20px !important; margin-left: 0px !important; padding: 0px !important;
  }
  #ft-img-1 {
    width: 200px !important;
  }
  #ft-a-1 {
    width: auto !important;
  }
  #ft-a-2 {
    width: auto !important;
  }
  #ft-div-5 {
    width: 100% !important;
  }
  #ft-div-6 {
    padding: 0px !important;
  }
  #ft-div-7 {
    width: 100% !important;
  }
  #ft-div-8 {
    padding: 0px !important;
  }
  #ft-div-9 {
    margin-top: 12px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important;
  }
  #ft-div-10 {
    width: 100% !important;
  }
  #ft-div-11 {
    padding: 0px !important;
  }
  #ft-div-12 {
    margin-top: 10px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important;
  }
}
@media (min-width: 768px) {
  #ft-div-2 {
    width: 20% !important;
  }
  #ft-div-5 {
    width: 20% !important;
  }
  #ft-div-7 {
    width: 30% !important;
  }
  #ft-div-10 {
    width: 30% !important;
  }
}
@media (max-width: 1024px) and (min-width: 768px) {
  #ft-div-2 {
    width: 35% !important;
  }
  #ft-div-5 {
    width: 20% !important;
  }
  #ft-div-7 {
    width: 20% !important;
  }
  #ft-div-10 {
    width: 20% !important;
  }
}
@media (max-width: 1024px) {
  #ft-bottom-1 {
    padding-top: 10px !important; padding-right: 20px !important; padding-bottom: 10px !important; padding-left: 20px !important;
  }
  #ft-bottom-div-1 {
    max-width: 1024px !important; min-height: 0px !important; margin: 0 auto !important;
  }
}
@media (max-width: 767px) {
  .main_outer_location_page .breadcrumb-wrap, .breadcrumb-wrap.full-width, body .breadcrumb-wrap{
    margin-top: 156px !important;
  }
  #ft-bottom-1 {
    padding: 20px !important;
  }
  #ft-bottom-div-1 {
    max-width: 767px !important; margin: 0 auto !important; flex-wrap: wrap !important; height: auto !important;
  }
  #ft-bottom-div-2 {
    width: 100% !important;
  }
  #ft-bottom-div-3 {
    padding: 0px !important; margin: 0px !important;
  }
  #ft-bottom-div-4 {
    margin-top: -10px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important;
  }
  #ft-bottom-div-5 {
    margin: -10px !important;
  }
  #ft-bottom-div-6 {
    width: 100% !important;
  }
  #ft-bottom-div-7 {
    margin-top: 20px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important;
  }
  #ft-bottom-div-8 {
    margin-top: -10px !important; margin-right: 0px !important; margin-bottom: 0px !important; margin-left: 0px !important;
  }
  #ft-bottom-li-1 {
    justify-content: center !important;
  }
  #ft-bottom-a-1 {
    justify-content: center !important;
  }
  #ft-bottom-li-2 {
    justify-content: center !important;
  }
  #ft-bottom-a-2 {
    justify-content: center !important;
  }
}
@media (min-width: 768px) {
  #ft-bottom-div-2 {
    width: 50% !important;
  }
  #ft-bottom-div-6 {
    width: 50% !important;
  }
}
@media (max-width: 1024px) and (min-width: 768px) {
  #ft-bottom-div-2 {
    width: 70% !important;
  }
  #ft-bottom-div-6 {
    width: 30% !important;
  }
}

/* ===== FIX: Sticky Right Rail Issue ===== */
/* WordPress theme wrappers can break position:sticky with overflow/transform properties.
   This ensures sticky works properly on location landing pages. */

/* Fix WordPress/Elementor wrapper that may break sticky positioning */
body.page-template-location-single-template,
body.page-template-location-single-template #page,
body.page-template-location-single-template .site,
body.page-template-location-single-template .site-content,
body.page-template-location-single-template main,
body.page-template-location-single-template article {
  overflow: visible !important;
  transform: none !important;
  will-change: auto !important;
  perspective: none !important;
  contain: none !important;
}

/* Ensure .main_outer_location_page doesn't break sticky */
.main_outer_location_page {
  overflow: visible !important;
  transform: none !important;
  position: relative;
}

/* Ensure body-layout creates proper stacking context */
.main_outer_location_page .body-layout {
  position: relative;
  overflow: visible !important;
  isolation: isolate;
}

/* Make sure right-rail sticky works properly */
.main_outer_location_page .right-rail {
  position: sticky !important;
  top: 20px !important;
  align-self: flex-start !important;
  height: fit-content;
  /* max-height: calc(100vh - 40px); */
  overflow-y: auto;
}

/* ===== COLOR OVERRIDES: Ensure exact color match with source of truth ===== */
/* Override any conflicting styles from landingPage.css or WordPress theme */

/* Breadcrumb colors - override old .breadcrumbs-sect styles */
.main_outer_location_page .breadcrumb-wrap,
.breadcrumb-wrap.full-width,
body .breadcrumb-wrap {
  background: #F3F3F3 !important;
  border-bottom: 1px solid #E1E0E5 !important;
}

.main_outer_location_page .breadcrumb-wrap .breadcrumb,
.breadcrumb-wrap .full-width-inner.breadcrumb,
body .breadcrumb-wrap .breadcrumb {
  color: #5A5758 !important;
}

.main_outer_location_page .breadcrumb-wrap .breadcrumb span,
.breadcrumb-wrap .full-width-inner.breadcrumb span,
body .breadcrumb-wrap .breadcrumb span {
  color: #F16B22 !important;
  font-weight: 500 !important;
}

/* Override any old breadcrumb styles */
body .breadcrumbs-sect span {
  color: #F16B22 !important;
}

/* Ensure all text colors match source of truth */
body .main_outer_location_page {
  color: #5A5758;
}

/* Ensure background colors match */
body .section-alt,
body .body-layout .section-alt {
  background: #F3F3F3 !important;
}

/* Ensure border colors match */
body .scard,
body .tcard,
body .tmcard {
  border-color: #E1E0E5 !important;
}
.breadcrumb a{
  text-decoration: none;
}




/* ===== TEAM MODAL FIX — Scoped to Location Single Template ===== */

/* Header and menu z-index — normal state */
.page-template-location-single-template header.elementor-location-header,
.page-template-location-single-template .elementor-location-header {
    position: relative;
    z-index: 999;
}

.page-template-location-single-template .elementor-nav-menu .sub-menu,
.page-template-location-single-template .elementor-nav-menu--dropdown,
.page-template-location-single-template ul.sub-menu {
    z-index: 9999;
}

.page-template-location-single-template #wprmenu_bar,
.page-template-location-single-template #mg-wprm-wrap {
    z-index: 9999;
}

/* Page content — normal state */
.page-template-location-single-template .main_outer_location_page,
.page-template-location-single-template .hero-wrap,
.page-template-location-single-template .breadcrumb-wrap {
    position: relative;
    z-index: 1;
}

/* ===== MODAL ===== */
.page-template-location-single-template .tm-modal-overlay {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 2147483647 !important;
    justify-content: center;
    align-items: center;
    overflow-y: auto;
}

.page-template-location-single-template .tm-modal-overlay.active {
    display: flex !important;
}

.page-template-location-single-template .tm-modal {
    position: relative !important;
    z-index: 2147483647 !important;
    background: #fff;
    border-radius: 8px;
    max-width: 520px;
    width: 90%;
    max-height: 85vh;
    overflow-y: auto;
    padding: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    margin: auto;
}

/* CRITICAL FIX: When modal is active, force EVERY potentially competing 
   element to position:static AND z-index:auto. 
   This destroys their stacking contexts so the modal's fixed positioning 
   can render above everything. */
.page-template-location-single-template:has(.tm-modal-overlay.active) header.elementor-location-header,
.page-template-location-single-template:has(.tm-modal-overlay.active) .elementor-location-header,
.page-template-location-single-template:has(.tm-modal-overlay.active) .breadcrumb-wrap,
.page-template-location-single-template:has(.tm-modal-overlay.active) .breadcrumb,
.page-template-location-single-template:has(.tm-modal-overlay.active) .hero-wrap,
.page-template-location-single-template:has(.tm-modal-overlay.active) .hero,
.page-template-location-single-template:has(.tm-modal-overlay.active) .main_outer_location_page,
.page-template-location-single-template:has(.tm-modal-overlay.active) .body-layout,
.page-template-location-single-template:has(.tm-modal-overlay.active) .careers-wrap,
.page-template-location-single-template:has(.tm-modal-overlay.active) .right-rail,
.page-template-location-single-template:has(.tm-modal-overlay.active) #wprmenu_bar,
.page-template-location-single-template:has(.tm-modal-overlay.active) #mg-wprm-wrap,
.page-template-location-single-template:has(.tm-modal-overlay.active) .elementor-section,
.page-template-location-single-template:has(.tm-modal-overlay.active) .elementor-container,
.page-template-location-single-template:has(.tm-modal-overlay.active) .elementor-column,
.page-template-location-single-template:has(.tm-modal-overlay.active) .elementor-widget-wrap,
.page-template-location-single-template:has(.tm-modal-overlay.active) .elementor-widget,
.page-template-location-single-template:has(.tm-modal-overlay.active) .elementor-element,
.page-template-location-single-template:has(.tm-modal-overlay.active) .elementor-top-section,
.page-template-location-single-template:has(.tm-modal-overlay.active) .elementor-inner-section,
.page-template-location-single-template:has(.tm-modal-overlay.active) .section,
.page-template-location-single-template:has(.tm-modal-overlay.active) .section-alt,
.page-template-location-single-template:has(.tm-modal-overlay.active) .content-col,
.page-template-location-single-template:has(.tm-modal-overlay.active) .team-grid,
.page-template-location-single-template:has(.tm-modal-overlay.active) .testimonials-section,
.page-template-location-single-template:has(.tm-modal-overlay.active) .full-width,
.page-template-location-single-template:has(.tm-modal-overlay.active) .full-width-inner,
.page-template-location-single-template:has(.tm-modal-overlay.active) .elementor-nav-menu .sub-menu,
.page-template-location-single-template:has(.tm-modal-overlay.active) .elementor-nav-menu--dropdown,
.page-template-location-single-template:has(.tm-modal-overlay.active) ul.sub-menu {
    z-index: auto !important;
    transform: none !important;
    filter: none !important;
    perspective: none !important;
    -webkit-filter: none !important;
    will-change: auto !important;
    contain: none !important;
    isolation: auto !important;
}

/* Re-assert modal overlay is fixed and on top */
.page-template-location-single-template:has(.tm-modal-overlay.active) .tm-modal-overlay {
    position: fixed !important;
    z-index: 2147483647 !important;
}

.page-template-location-single-template:has(.tm-modal-overlay.active) .tm-modal {
    position: relative !important;
    z-index: 2147483647 !important;
}

/* Lock body scroll when modal is open */
.page-template-location-single-template:has(.tm-modal-overlay.active) {
    overflow: hidden !important;
}

/* Keep WP admin bar below the modal when it's open */
.page-template-location-single-template:has(.tm-modal-overlay.active) #wpadminbar {
    z-index: 99 !important;
}

/* ===== MOBILE MENU FIX — Scoped to Location Single Template ===== */
/* Fix mobile menu top clipping for both logged-in and logged-out users */

@media (max-width: 768px) {
  /* Logged-out users (no admin bar) — add padding so close button and logo aren't clipped */
  .page-template-location-single-template #mg-wprm-wrap.cbp-spmenu-left,
  .page-template-location-single-template #mg-wprm-wrap.cbp-spmenu-right,
  .page-template-location-single-template #mg-wprm-wrap {
      padding-top: 50px !important;
      top: 0 !important;
  }
  
  /* Logged-in users (admin bar present) — push menu down below the admin bar 
     AND keep the close button/logo visible */
  .page-template-location-single-template.admin-bar #mg-wprm-wrap.cbp-spmenu-left,
  .page-template-location-single-template.admin-bar #mg-wprm-wrap.cbp-spmenu-right,
  .page-template-location-single-template.admin-bar #mg-wprm-wrap {
      padding-top: 50px !important;
      top: 46px !important;
      height: calc(100vh - 46px) !important;
      overflow-y: auto !important;
  }
  
  /* Mobile menu bar — logged-out state */
  .page-template-location-single-template #wprmenu_bar {
      position: fixed !important;
      top: 0 !important;
      left: 0 !important;
      right: 0 !important;
      z-index: 99999 !important;
  }
  
  /* Mobile menu bar — logged-in state (push below admin bar) */
  .page-template-location-single-template.admin-bar #wprmenu_bar {
      top: 46px !important;
  }
}

/* Smaller screens — admin bar becomes 46px sticky */
@media (max-width: 600px) {
  .page-template-location-single-template.admin-bar #mg-wprm-wrap.cbp-spmenu-left,
  .page-template-location-single-template.admin-bar #mg-wprm-wrap.cbp-spmenu-right,
  .page-template-location-single-template.admin-bar #mg-wprm-wrap {
      top: 46px !important;
      height: calc(100vh - 46px) !important;
  }
  
  .page-template-location-single-template.admin-bar #wprmenu_bar {
      top: 46px !important;
  }
}