/*
  Abbott Pest Control: shared foundation for every page.
  Loaded after Bootstrap and before each page's own <style>, so page-specific rules still win.

  Direction
  Mode:    Persuade (marketing site)
  World:   a pest-inspection scope. The logo's red crosshair is the targeting mark; grounds are
           desert-night green-black, a cool white, and full fields of Abbott green.
  Palette: ink #121513 ground, white paper, Abbott green #4a7c59 for fields and actions,
           Abbott red #A33327 for the crosshair and the call action.
  Type:    Jost (geometric, close to the logo's wordmark) for display, Source Sans 3 for body.
*/

:root {
  /* Brand (names kept so existing inline rules keep working) */
  --abbott-green: #4a7c59;
  --abbott-green-light: #5d9970;
  --abbott-red: #A33327;
  --abbott-dark: #1a1a1a;

  /* Roles */
  --ink: #121513;
  --ink-2: #1b211d;
  --ink-line: rgba(255, 255, 255, 0.1);
  --paper: #ffffff;
  --mist: #f2f5f2;
  --text: #1d231f;
  --text-muted: #56615a;
  --on-dark: #e8eee9;
  --on-dark-muted: #a9b5ad;
  --link: #2e6b45;
  --link-on-dark: #8fc9a0;
  --red-press: #8a2a20;
  --red-hover: #b93a2d;
  --green-hover: #3e6a4b;
  --focus: #2e6b45;

  /* Type */
  --font-display: 'Jost', 'Futura', 'Century Gothic', system-ui, sans-serif;
  --font-body: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* Space and shape */
  --nav-h: 76px;
  --radius: 10px;
  --radius-pill: 999px;
  --tap: 44px;

  /* Motion */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dur-press: 140ms;
  --dur-fast: 180ms;
  --dur-base: 240ms;

  /* The crosshair as a repeating mark, for dark grounds */
  --marks: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56'%3E%3Cpath d='M28 21v14M21 28h14' stroke='%23ffffff' stroke-opacity='.07' stroke-width='1.5'/%3E%3C/svg%3E");
}

/* Dark containers flip the focus ring and link colors so both stay visible */
.site-nav, .site-footer, .page-hero, .mobile-cta, .bg-dark, .cta-bar, .on-dark {
  --focus: #b8e6c4;
  --link: var(--link-on-dark);
}

/* ---------- Base ---------- */

html { scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.15;
  text-wrap: balance;
}
p, li { text-wrap: pretty; }
.lead { font-weight: 400; }

a { color: var(--link); text-underline-offset: 0.18em; }
a:hover { color: var(--link); }

::selection { background: var(--abbott-green); color: #fff; }

.green-accent { color: var(--abbott-green); }
.red-accent { color: var(--abbott-red); }

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 1.35rem + 1.6vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

/* ---------- Focus ---------- */

/* One ring for every link, button and control. Bootstrap's soft blue glow is replaced. */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 4px;
}
.btn:focus, .btn.focus, .form-control:focus, .custom-select:focus, .navbar-toggler:focus { box-shadow: none; }
.btn:focus-visible, .navbar-toggler:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 1px; }

/* ---------- Buttons ---------- */

.btn {
  font-family: var(--font-body);
  font-weight: 700;
  transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-fast) ease, color var(--dur-fast) ease, border-color var(--dur-fast) ease, box-shadow var(--dur-fast) ease;
}
.btn:active { transform: scale(0.97); }

.btn-call {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: var(--tap);
  padding: 0 1.25rem;
  border: none;
  border-radius: var(--radius-pill);
  background: var(--abbott-red);
  color: #fff;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
}
.btn-call:hover, .btn-call:focus { background: var(--red-hover); color: #fff; }
.btn-call:active { background: var(--red-press); }
.btn-call .svg-inline--fa { margin: 0 !important; }

/* Full-width band that closes most inner pages */
.cta-bar {
  background: var(--abbott-green) var(--marks);
  color: #fff;
  padding: 48px 0;
}
.cta-bar h2, .cta-bar h3 { font-family: var(--font-display); font-weight: 800; }
.cta-bar .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  background: #fff;
  color: var(--ink);
  font-weight: 700;
  border-radius: var(--radius-pill);
  padding: 0 32px;
}
.cta-bar .btn:hover { background: var(--mist); color: var(--ink); }

/* ---------- Nav ---------- */

.site-nav {
  background: var(--ink);
  border-bottom: 3px solid var(--abbott-red);
  min-height: var(--nav-h);
  padding-top: 0;
  padding-bottom: 0;
  font-family: var(--font-body);
}
.site-nav .navbar-brand { display: inline-flex; align-items: center; min-height: var(--tap); padding: 0; margin-right: 1.5rem; }
.site-nav .navbar-brand img { height: 40px; width: auto; display: block; }

.site-nav .navbar-toggler {
  width: var(--tap);
  height: var(--tap);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 992px) { .site-nav .navbar-toggler { display: none; } }

.site-nav .navbar-nav .nav-link {
  position: relative;
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 0.8rem;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.97rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color var(--dur-fast) ease;
}
.site-nav .navbar-nav .nav-link:hover,
.site-nav .navbar-nav .nav-link:focus-visible,
.site-nav .navbar-nav .nav-link.active,
.site-nav .navbar-nav .show > .nav-link { color: #fff; }

/* A red sight line under the current and hovered item */
.site-nav .navbar-nav .nav-link::after {
  content: "";
  position: absolute;
  left: 0.8rem;
  right: 0.8rem;
  bottom: 6px;
  height: 2px;
  background: var(--abbott-red);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.site-nav .navbar-nav .nav-link.dropdown-toggle::after {
  /* Bootstrap uses ::after for the caret; keep its caret and skip the line */
  position: static;
  height: auto;
  background: none;
  transform: none;
  margin-left: 0.4em;
}
.site-nav .navbar-nav .nav-link.active:not(.dropdown-toggle)::after { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) {
  .site-nav .navbar-nav .nav-link:not(.dropdown-toggle):hover::after { transform: scaleX(1); }
}

.site-nav .dropdown-menu {
  background: var(--ink-2);
  border: 1px solid var(--ink-line);
  border-top: 2px solid var(--abbott-red);
  border-radius: 0 0 var(--radius) var(--radius);
  padding: 6px;
  margin-top: 0;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.site-nav .dropdown-item {
  display: flex;
  align-items: center;
  min-height: var(--tap);
  padding: 0 14px;
  border-radius: 6px;
  color: var(--on-dark);
  font-weight: 600;
  transition: background-color var(--dur-fast) ease, color var(--dur-fast) ease;
}
.site-nav .dropdown-item:hover, .site-nav .dropdown-item:focus-visible { background: rgba(255, 255, 255, 0.07); color: #fff; }
.site-nav .dropdown-item.active, .site-nav .dropdown-item:active { background: var(--abbott-green); color: #fff; }

.site-nav .nav-call { margin-left: 0.75rem; }

/* Collapsed menu on phones and small tablets: full-width rows, call button last and full width */
@media (max-width: 991.98px) {
  .site-nav .navbar-collapse { padding: 8px 0 16px; }
  .site-nav .navbar-nav .nav-link { min-height: 48px; padding: 0 4px; border-bottom: 1px solid var(--ink-line); }
  .site-nav .navbar-nav .nav-link::after { display: none; }
  .site-nav .navbar-nav .nav-link.dropdown-toggle::after { display: inline-block; }
  .site-nav .navbar-nav .nav-link.active { color: #fff; box-shadow: inset 3px 0 0 var(--abbott-red); padding-left: 14px; }
  .site-nav .dropdown-menu { border: none; border-left: 2px solid var(--abbott-red); border-radius: 0; box-shadow: none; background: transparent; padding: 0 0 0 12px; }
  .site-nav .nav-call { margin: 16px 0 0; }
  .site-nav .nav-call .btn-call { width: 100%; min-height: 48px; }
}

/* ---------- Inner-page header ---------- */

.page-hero {
  background: var(--ink) var(--marks);
  color: #fff;
  padding: calc(var(--nav-h) + 56px) 0 56px;
  position: relative;
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 1.4rem + 3vw, 3.75rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
  max-width: 20ch;
}
.page-hero .breadcrumb-item a { color: var(--link-on-dark); }
.page-hero .breadcrumb-item + .breadcrumb-item::before { color: var(--on-dark-muted); }

/* ---------- Footer ---------- */

.site-footer {
  background: var(--ink) var(--marks);
  color: var(--on-dark-muted);
  padding: 64px 0 24px;
  border-top: 3px solid var(--abbott-red);
  font-size: 1rem;
}
.site-footer .footer-heading {
  font-family: var(--font-display);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.site-footer a { color: var(--link-on-dark); text-decoration: none; transition: color var(--dur-fast) ease; }
.site-footer a:hover { color: #fff; text-decoration: underline; }

.footer-contact li { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 12px; color: var(--on-dark); }
.footer-contact .svg-inline--fa { flex: none; width: 1em; margin-top: 0.3em; color: var(--abbott-red); }
.footer-contact a { font-weight: 700; font-variant-numeric: tabular-nums; }

.footer-links li { margin-bottom: 4px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 32px; }

.footer-social { display: flex; gap: 8px; }
.footer-social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--tap);
  height: var(--tap);
  border: 1px solid var(--ink-line);
  border-radius: 50%;
  font-size: 1.15rem;
  transition: color var(--dur-fast) ease, border-color var(--dur-fast) ease, transform var(--dur-press) var(--ease-out);
}
.footer-social a:hover { border-color: var(--abbott-green-light); text-decoration: none; }
.footer-social a:active { transform: scale(0.94); }
.footer-map { margin-top: 24px; }
.footer-map iframe { display: block; width: 100%; height: 160px; border: 0; border-radius: var(--radius); }

.site-footer .footer-bottom {
  border-top: 1px solid var(--ink-line);
  padding-top: 20px;
  margin-top: 32px;
  font-size: 0.875rem;
  color: var(--on-dark-muted);
  text-align: center;
}
.site-footer .footer-bottom p { margin: 0; }

/* ---------- Sticky phone bar ---------- */

.mobile-cta { display: none; }

/* Shown whenever the nav is collapsed, so a call button is always on screen */
@media (max-width: 991.98px) {
  .mobile-cta {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99997;
    gap: 10px;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    background: var(--ink);
    border-top: 1px solid var(--ink-line);
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.3);
  }
  .mobile-cta a {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    min-height: 48px;
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    text-decoration: none;
    transition: transform var(--dur-press) var(--ease-out), background-color var(--dur-fast) ease;
  }
  .mobile-cta a:active { transform: scale(0.97); }
  .mobile-cta .cta-call { background: var(--abbott-red); }
  .mobile-cta .cta-chat { background: var(--abbott-green); }
  .mobile-cta a .svg-inline--fa { margin: 0 !important; }
  body { padding-bottom: calc(70px + env(safe-area-inset-bottom)); }
}

@media (max-width: 767.98px) {
  /* Tap targets: links that sit on their own (not inside a sentence) get a 44px hit area */
  .footer-links a { min-height: var(--tap); }
  .footer-contact a { display: inline-flex; align-items: center; min-height: var(--tap); margin: -10px 0; }
  .page-hero .breadcrumb-item a { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); min-width: var(--tap); }
  .btn { min-height: var(--tap); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; animation-delay: 0ms !important; scroll-behavior: auto !important; }
}
