/* =============================================
   LAYOUT.CSS — Nav, hero, section wrappers,
   final CTA, footer, sticky call button
   The Stairlift Company
   ============================================= */

/* ===== NAVIGATION ===== */
.nav-bar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--white);
  border-bottom: 2px solid var(--border);
  box-shadow: 0 2px 12px rgba(0,48,135,0.07);
  transition: box-shadow 0.2s;
}
/* JS adds this class on scroll */
.nav-bar--scrolled {
  box-shadow: 0 4px 24px rgba(0,48,135,0.14);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 78px;
}

.nav-logo { display: flex; align-items: center; }
.nav-logo-img { height: 48px; width: auto; display: block; flex-shrink: 0; }

.nav-links { display: flex; align-items: center; gap: 36px; list-style: none; }
.nav-links a { font-size: var(--fs-sm); font-weight: 600; color: var(--text); transition: color 0.15s; white-space: nowrap; }
.nav-links a:hover,
.nav-links a[aria-current="page"] { color: var(--navy); }
.nav-links a[aria-current="page"] {
  border-bottom: 2px solid var(--orange);
  padding-bottom: 2px;
}

/* ===== NAV DROPDOWN ===== */
.has-dropdown { position: relative; }

/* Chevron icon inside the trigger link */
.has-dropdown > a {
  display: flex;
  align-items: center;
  gap: 4px;
}
.has-dropdown > a .nav-chevron {
  width: 16px; height: 16px;
  fill: currentColor;
  transition: transform 0.22s ease;
  flex-shrink: 0;
}
.has-dropdown:hover > a .nav-chevron,
.has-dropdown:focus-within > a .nav-chevron { transform: rotate(180deg); }

/* Dropdown panel */
.nav-dropdown {
  position: absolute;
  top: 100%;              /* flush — no gap, padding creates visual space */
  left: 50%;
  transform: translateX(-50%) translateY(-4px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 10px 40px rgba(0,48,135,0.14);
  min-width: 230px;
  padding: 14px 8px 8px; /* top padding = visual gap inside hover area */
  list-style: none;
  z-index: 200;
  /* Hidden state */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
/* Small arrow pointing up */
.nav-dropdown::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  width: 14px; height: 7px;
  background: var(--white);
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}

/* Shown via JS — adds .dropdown-open class on click */
.has-dropdown.dropdown-open .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
/* Also support hover for mouse users as a fallback */
.has-dropdown:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
.has-dropdown:hover > a .nav-chevron { transform: rotate(180deg); }

.nav-dropdown li a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.nav-dropdown li a:hover {
  background: var(--navy-light);
  color: var(--navy);
}
.nav-dropdown li a[aria-current="page"] {
  background: var(--navy-light);
  color: var(--navy);
  border-bottom: none;
  padding-bottom: 11px;
}
/* Small dot indicator per item */
.nav-dropdown li a .nav-dd-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--orange);
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.15s;
}
.nav-dropdown li a:hover .nav-dd-dot,
.nav-dropdown li a[aria-current="page"] .nav-dd-dot { opacity: 1; }

.nav-cta  { display: flex; align-items: center; gap: 18px; }
.nav-phone {
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--navy);
  display: flex; align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.nav-phone svg { width: 20px; height: 20px; fill: var(--orange); flex-shrink: 0; }

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, #001f5b 0%, #003087 55%, #0040b0 100%);
  position: relative;
  overflow: hidden;
  padding: 100px 0 120px;
}
.hero::before {
  content: '';
  position: absolute;
  top: -120px; right: -120px;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
  pointer-events: none;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(232,103,10,0.10);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 60px;
  align-items: center;
  position: relative;
  z-index: 2;
}

/* Hero copy */
.hero h1 {
  font-family: var(--font-head);
  font-size: var(--fs-3xl);
  font-weight: 900;
  line-height: 1.15;
  color: var(--white);
  margin-bottom: 24px;
}
.hero h1 em { font-style: normal; color: #ffb07a; }

.hero-sub {
  font-size: var(--fs-md);
  color: rgba(255,255,255,0.82);
  line-height: 1.75;
  margin-bottom: 40px;
  max-width: 540px;
}

.hero-actions { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 40px; }

.hero-phone-line {
  font-size: var(--fs-base);
  color: rgba(255,255,255,0.90);
  display: flex; align-items: center;
  gap: 10px;
  font-weight: 600;
  flex-wrap: wrap;
}
.hero-phone-line a   { color: #ffb07a; font-weight: 700; font-size: var(--fs-lg); }
.hero-phone-line svg { width: 22px; height: 22px; fill: var(--orange); flex-shrink: 0; }

.hero-badges { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-badge {
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.20);
  border-radius: 8px;
  padding: 10px 16px;
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.90);
  font-weight: 600;
  display: flex; align-items: center; gap: 8px;
}
.hero-badge svg { width: 16px; height: 16px; fill: #ffb07a; }

/* Hero lead form card */
.hero-card {
  background: var(--white);
  border-radius: 20px;
  padding: 40px 36px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.hero-card-title { font-family: var(--font-head); font-size: var(--fs-md); font-weight: 700; color: var(--navy); margin-bottom: 8px; }
.hero-card-sub   { font-size: var(--fs-sm); color: var(--text-muted); margin-bottom: 28px; line-height: 1.6; }

.hero-form-group { margin-bottom: 16px; }
.hero-form-label {
  display: block;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.hero-form-input {
  width: 100%;
  padding: 16px 18px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: var(--fs-base);
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  transition: border-color 0.15s;
}
.hero-form-input:focus { outline: none; border-color: var(--navy); }

/* Custom select dropdown arrow */
.select-wrapper { position: relative; }
.select-wrapper::after {
  content: '';
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  width: 0; height: 0;
  border-left:  7px solid transparent;
  border-right: 7px solid transparent;
  border-top:   8px solid var(--text-muted);
  pointer-events: none;
}
.hero-form-select {
  width: 100%;
  padding: 16px 44px 16px 18px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: var(--fs-base);
  font-family: var(--font-body);
  color: var(--text);
  background: var(--white);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.hero-form-select:focus { outline: none; border-color: var(--navy); }

.hero-card .btn  { width: 100%; justify-content: center; margin-top: 8px; }
.hero-card-note  { text-align: center; font-size: var(--fs-xs); color: var(--text-muted); margin-top: 14px; }
.hero-card-note svg { width: 14px; height: 14px; fill: var(--green); vertical-align: middle; margin-right: 4px; }

/* ===== FINAL CTA ===== */
.final-cta { padding: 100px 0; }
.final-cta-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: center;
}

.final-cta h2 {
  font-family: var(--font-head);
  font-size: var(--fs-2xl);
  font-weight: 900;
  color: var(--white);
  line-height: 1.2;
  margin-bottom: 16px;
}
.final-cta-sub { font-size: var(--fs-md); color: rgba(255,255,255,0.90); line-height: 1.65; }

.final-cta-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  min-width: 300px;
}
.final-cta-divider { font-size: var(--fs-xs); color: rgba(255,255,255,0.55); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }

.final-cta-phone {
  font-family: var(--font-head);
  font-size: var(--fs-xl);
  font-weight: 900;
  color: var(--white);
  display: flex; align-items: center; gap: 10px;
}
.final-cta-phone svg { width: 28px; height: 28px; fill: rgba(255,255,255,0.7); }
.final-cta-phone a   { color: var(--white); }

/* ===== FOOTER ===== */
.footer {
  background: var(--navy-dark);
  padding: 60px 0 36px;
  color: rgba(255,255,255,0.75);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
.footer-brand p    { font-size: var(--fs-sm); line-height: 1.8; margin-top: 16px; }
.footer-col-title  { font-size: var(--fs-sm); font-weight: 700; color: var(--white); margin-bottom: 18px; }
.footer-links      { list-style: none; }
.footer-links li   { margin-bottom: 10px; }
.footer-links a    { font-size: var(--fs-sm); color: rgba(255,255,255,0.65); transition: color 0.15s; }
.footer-links a:hover { color: var(--white); }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.10);
  padding-top: 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--fs-xs);
  color: rgba(255,255,255,0.40);
  flex-wrap: wrap;
  gap: 12px;
}
.footer-bottom a { color: rgba(255,255,255,0.40); margin-left: 20px; }
.footer-bottom a:hover { color: rgba(255,255,255,0.70); }

/* Footer brand block elements (replaces inline styles) */
.footer-brand-name { font-family: var(--font-head); font-size: 18px; font-weight: 700; color: var(--white); }
.footer-phone-wrap { margin-top: 20px; }
.footer-phone-link { color: var(--white); font-size: 20px; font-weight: 700; }

/* Footer social icons */
.footer-social {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  color: rgba(255,255,255,0.70);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
}
.footer-social-link:hover {
  background: var(--orange);
  border-color: var(--orange);
  color: var(--white);
}
.footer-social-link svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

/* ===== STICKY CALL BUTTON ===== */
.sticky-call {
  position: fixed;
  bottom: 28px; right: 28px;
  z-index: 999;
  background: var(--orange);
  color: var(--white);
  border-radius: 50px;
  padding: 16px 28px;
  font-size: var(--fs-sm);
  font-weight: 700;
  box-shadow: 0 6px 28px rgba(232,103,10,0.40);
  display: flex; align-items: center; gap: 10px;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}
.sticky-call:hover { transform: translateY(-3px); box-shadow: 0 10px 36px rgba(232,103,10,0.50); }
.sticky-call svg   { width: 20px; height: 20px; fill: var(--white); }
/* JS hides it at the very top of the page */
.sticky-call--hidden { opacity: 0; pointer-events: none; }
