/* Dog Fence Ontario - Main Stylesheet */

/* ========== CSS RESET & BASE ========== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  /* Colors */
  --primary: #2d5a27;        /* Forest green - trustworthy, natural */
  --primary-dark: #1e3d1a;
  --primary-light: #4a7c43;
  --accent: #e8a83c;         /* Warm gold - friendly, attention */
  --accent-dark: #c78a28;
  --accent-text: #9a6515;    /* Darker gold for text on light backgrounds (WCAG AA 4.95:1) */
  --text: #333333;
  --text-light: #666666;
  --background: #ffffff;
  --background-alt: #f8f9f7;
  --border: #e0e0e0;
  
  /* Typography */
  --font-main: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-heading: 'Segoe UI', system-ui, -apple-system, sans-serif;
  
  /* Spacing */
  --section-padding: 80px 20px;
  --container-width: 1200px;
  --header-height: 70px;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 16px);
}

/* Safe area support for notched phones (iPhone X+) */
@supports (padding: env(safe-area-inset-bottom)) {
  body {
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
  }

  footer {
    padding-bottom: calc(30px + env(safe-area-inset-bottom));
  }

  .mobile-nav-cta {
    padding-bottom: calc(15px + env(safe-area-inset-bottom));
  }
}

body {
  font-family: var(--font-main);
  font-size: 17px;
  line-height: 1.6;
  color: var(--text);
  background: var(--background);
}

html.nav-open {
  overflow: hidden;
}

body.nav-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
  left: 0;
}

body.nav-open header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
}

/* Fallback for browsers without full inert support */
body.nav-open [data-nav-inert="true"] {
  pointer-events: none;
  user-select: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  color: var(--primary-dark);
}

/* Underline links in prose text for accessibility (WCAG 2.1) */
main p a,
main li a,
main td a {
  text-decoration: underline;
  text-decoration-color: rgba(45, 90, 39, 0.4);
  text-underline-offset: 2px;
}
main p a:hover,
main li a:hover,
main td a:hover {
  text-decoration-color: var(--primary);
}
/* Exclude buttons and nav-style links from underline */
main a.btn,
main .package-cta a,
main .common-links a,
main .breadcrumb a {
  text-decoration: none;
}

/* ========== BREADCRUMB ========== */
.breadcrumb {
  padding: 12px 20px;
  font-size: 0.85rem;
  color: var(--text-light);
  max-width: 1200px;
  margin: 0 auto;
}
.breadcrumb a {
  color: var(--primary);
}
.breadcrumb a:hover {
  text-decoration: underline;
}
.breadcrumb .sep {
  margin: 0 6px;
  opacity: 0.5;
}

/* ========== TYPOGRAPHY ========== */
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--text);
}

h1 {
  font-size: 2.75rem;
  margin-bottom: 1rem;
}

h2 {
  font-size: 2.25rem;
  margin-bottom: 1.5rem;
}

h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

p {
  margin-bottom: 1rem;
}

/* ========== LAYOUT ========== */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

section {
  padding: var(--section-padding);
}

.section-alt {
  background: var(--background-alt);
}

/* ========== HEADER & NAVIGATION ========== */
header {
  background: var(--background);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 15px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

.logo-tagline {
  font-size: 0.85rem;
  color: var(--text-light);
  display: none;
}

nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

nav a {
  padding: 8px 16px;
  color: var(--text);
  font-weight: 500;
  border-radius: 4px;
  transition: background 0.2s, color 0.2s;
}

nav a:hover {
  background: var(--background-alt);
  color: var(--primary);
}

.header-cta {
  display: none;
}

.header-phone-icon {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  padding: 6px;
  border-radius: 50%;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}

.header-phone-icon:hover {
  background: var(--background-alt);
  color: var(--primary-dark);
}

.header-phone-icon svg {
  display: block;
}

.phone-tooltip {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 6px;
  background: var(--primary);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  z-index: 1001;
}

.phone-tooltip::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: var(--primary);
}

.phone-tooltip.active {
  display: block;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 8px;
  color: var(--text);
}

.menu-toggle:hover {
  color: var(--primary);
}

/* ========== BUTTONS ========== */
.btn {
  display: inline-block;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
}

.btn-primary {
  background: var(--accent);
  color: #000;
}

.btn-primary:hover {
  background: var(--accent-dark);
  color: #000;
  transform: translateY(-2px);
}

.btn-secondary {
  background: var(--primary);
  color: #fff;
}

.btn-secondary:hover {
  background: var(--primary-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary);
  color: var(--primary);
}

.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}

.btn-outline-light {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
}

.btn-outline-light:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.btn-large {
  padding: 18px 36px;
  font-size: 1.1rem;
}

/* ========== HERO SECTION ========== */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 0;
  position: relative;
  overflow: hidden;
  min-height: 500px;
}

/* Full-bleed background image layer */
.hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 70% center;
  display: block;
}

/* Dark gradient overlay for text readability (only when image present) */
.hero:has(.hero-image)::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(30, 61, 26, 0.88) 0%,
    rgba(30, 61, 26, 0.7) 35%,
    rgba(30, 61, 26, 0.35) 55%,
    rgba(30, 61, 26, 0.08) 75%,
    transparent 100%
  );
  z-index: 1;
  pointer-events: none;
}

/* Content layer sits above image + overlay */
.hero-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 80px 40px 60px;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.hero-content {
  max-width: 680px;
}

.hero-content h1 {
  color: #fff;
  font-size: 3rem;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.hero-subtitle {
  font-size: 1.35rem;
  opacity: 0.95;
  margin-bottom: 1.25rem;
  line-height: 1.5;
}

.hero-review-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  font-weight: 600;
  margin-bottom: 14px;
  text-decoration: none;
}

.hero-review-badge:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.95);
  font-size: 0.95rem;
}

.hero-features {
  list-style: none;
  margin-bottom: 0;
  text-align: left;
}

.hero-features li {
  padding: 8px 0;
  padding-left: 30px;
  position: relative;
  font-size: 1.1rem;
}

.hero-features li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.hero-buttons {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: flex-start;
}

.hero-under-cta {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  align-items: center;
  justify-content: flex-start;
}

.hero-cta-note {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.9);
}

.hero-service-link {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.95);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hero-service-link:hover {
  color: #fff;
}

/* ========== TRUST BADGES ========== */
.trust-bar {
  background: var(--background);
  padding: 30px 20px;
  border-bottom: 1px solid var(--border);
}

.trust-bar-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 50px;
  flex-wrap: wrap;
}

.trust-item {
  text-align: center;
}

.trust-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary);
}

.trust-label {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ========== BENEFITS SECTION ========== */
.benefits {
  padding: var(--section-padding);
}

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 40px;
}

.benefit-card {
  text-align: center;
  padding: 30px;
}

.benefit-icon {
  width: 70px;
  height: 70px;
  background: var(--background-alt);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 2rem;
  color: var(--primary);
}

.benefit-icon svg {
  width: 2rem;
  height: 2rem;
}

.benefit-card h3 {
  color: var(--primary);
  margin-bottom: 12px;
}

.benefit-card p {
  color: var(--text-light);
  margin-bottom: 0;
}

/* ========== LINK HIGHLIGHT ========== */
.link-highlight {
  padding: var(--section-padding);
  background: var(--background);
}

.link-highlight-box {
  max-width: 950px;
  margin: 0 auto;
  background: var(--background-alt);
  border-radius: 12px;
  padding: 40px;
  border: 2px solid var(--border);
}

.link-highlight-box h2 {
  text-align: center;
  margin-bottom: 10px;
}

.link-tagline {
  text-align: center;
  color: var(--text-light);
  font-weight: 600;
  margin-bottom: 25px;
}

.link-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 30px;
  align-items: start;
}

.link-features {
  list-style: none;
  margin: 0;
  padding: 0;
}

.link-features li {
  padding: 8px 0;
  padding-left: 28px;
  position: relative;
  color: var(--text);
}

.link-features li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

.link-note {
  margin-top: 15px;
  color: var(--text-light);
  font-size: 0.95rem;
  margin-bottom: 0;
}

.link-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.link-actions .btn {
  width: 100%;
}

/* ========== HOW IT WORKS ========== */
.how-it-works {
  padding: var(--section-padding);
  background: var(--background-alt);
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.step {
  text-align: center;
  position: relative;
}

.step-number {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 auto 20px;
}

.step h3 {
  margin-bottom: 10px;
}

.step p {
  color: var(--text-light);
  font-size: 0.95rem;
}

/* ========== PRICING PREVIEW ========== */
.pricing-preview {
  padding: var(--section-padding);
  text-align: center;
}

.pricing-box {
  max-width: 700px;
  margin: 40px auto 0;
  background: var(--background-alt);
  border-radius: 12px;
  padding: 40px;
  border: 2px solid var(--border);
}

.pricing-range {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 10px;
}

.pricing-note {
  color: var(--text-light);
  margin-bottom: 25px;
}

.pricing-includes {
  text-align: left;
  list-style: none;
  margin-bottom: 25px;
}

.pricing-includes li {
  padding: 8px 0;
  padding-left: 28px;
  position: relative;
}

.pricing-includes li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: bold;
}

/* ========== TESTIMONIALS ========== */
.testimonials {
  padding: var(--section-padding);
  background: var(--primary);
  color: #fff;
}

.testimonials h2 {
  color: #fff;
  text-align: center;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  margin-top: 40px;
}

.testimonial-card {
  background: rgba(255,255,255,0.1);
  padding: 30px;
  border-radius: 12px;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 20px;
  line-height: 1.7;
}

.testimonial-author {
  font-weight: 600;
}

.testimonial-location {
  opacity: 0.8;
  font-size: 0.9rem;
}

/* ========== SERVICE AREAS ========== */
.service-areas {
  padding: var(--section-padding);
  text-align: center;
}

.areas-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 15px;
  margin-top: 30px;
  margin-bottom: 30px;
}

.area-tag {
  background: var(--background-alt);
  padding: 10px 20px;
  border-radius: 25px;
  font-size: 0.95rem;
  color: var(--text);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.area-tag:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* ========== CTA SECTION ========== */
.cta-section {
  padding: 80px 20px;
  background: var(--accent);
  text-align: center;
}

.cta-section h2 {
  color: #000;
  margin-bottom: 15px;
}

.cta-section p {
  color: rgba(0,0,0,0.7);
  font-size: 1.2rem;
  margin-bottom: 25px;
}

.cta-section .btn-secondary {
  font-size: 1.2rem;
  padding: 18px 40px;
}

.cta-note {
  margin-top: 12px;
  color: rgba(0,0,0,0.7);
  font-size: 0.95rem;
}

/* ========== FOOTER ========== */
footer {
  background: var(--text);
  color: #fff;
  padding: 60px 20px 30px;
}

.footer-inner {
  max-width: var(--container-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
}

.footer-brand p {
  opacity: 0.8;
  margin-top: 15px;
  line-height: 1.7;
}

.footer-column h4,
.footer-heading {
  color: #fff;
  margin-bottom: 20px;
  font-size: 1.1rem;
  font-weight: 700;
}

.footer-column ul {
  list-style: none;
}

.footer-column li {
  margin-bottom: 10px;
}

.footer-column a {
  color: rgba(255,255,255,0.8);
  transition: color 0.2s;
}

.footer-column a:hover {
  color: var(--accent);
}

.footer-contact-item {
  margin-bottom: 12px;
  opacity: 0.9;
}

.footer-bottom {
  max-width: var(--container-width);
  margin: 40px auto 0;
  padding-top: 30px;
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  opacity: 0.7;
  font-size: 0.9rem;
}

/* ========== DROPDOWN NAVIGATION ========== */
.nav-dropdown {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
}

.dropdown-arrow {
  display: inline-flex;
  align-items: center;
  margin-left: 4px;
  transition: transform 0.2s;
  vertical-align: middle;
}

.dropdown-arrow svg {
  display: block;
  width: 10px;
  height: 6px;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--background);
  min-width: 220px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  border-radius: 4px;
  padding: 8px 0;
  z-index: 1000;
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  color: var(--text);
  white-space: nowrap;
}

.dropdown-menu a:hover {
  background: var(--background-alt);
  color: var(--primary);
}

/* Desktop: hover to open dropdowns */
.nav-dropdown:hover .dropdown-menu {
  display: block;
}

/* Click-to-open support (JS toggles .open on .nav-dropdown) */
.nav-dropdown.open .dropdown-menu {
  display: block;
}

/* Rotate arrow when open */
.nav-dropdown.open .dropdown-arrow {
  transform: rotate(180deg);
}

/* Hide mobile-only CTA on desktop */
.mobile-nav-cta {
  display: none;
}

/* Sticky CTA bar — hidden by default, revealed by JS on scroll */
.sticky-cta {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--background);
  border-top: 1px solid var(--border);
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease;
  will-change: transform, opacity;
  z-index: -1;
}

.sticky-cta.sticky-cta-visible {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
  z-index: 1;
}

.sticky-cta-inner {
  padding: 8px 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.sticky-cta-phone {
  font-weight: 600;
  color: var(--primary);
  font-size: 0.9rem;
  white-space: nowrap;
}

.sticky-cta-phone:hover {
  color: var(--primary-dark);
}

body.nav-open .sticky-cta {
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
}

/* Compact button variant */
.btn-sm {
  padding: 5px 12px;
  font-size: 0.8rem;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1024px) {
  .benefits-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .steps {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .testimonials-grid {
    grid-template-columns: 1fr;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
  }
  
  .footer-inner {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Reduce header height on landscape phones */
@media (max-height: 500px) and (orientation: landscape) {
  :root {
    --header-height: 44px;
  }
  .header-inner {
    padding: 6px 15px;
  }
  .logo-text {
    font-size: 1.1rem;
  }
  .menu-toggle {
    padding: 6px 10px;
    font-size: 1.2rem;
  }
}

/* ===== MOBILE HEADER & NAV (hamburger mode) ===== */
@media (max-width: 1280px) {
  :root {
    --header-height: 52px;
  }

  .header-inner {
    flex-wrap: nowrap;
    padding: 10px 15px;
    gap: 10px;
  }

  .logo-text {
    font-size: 1.25rem;
  }

  /* Hide desktop nav */
  nav {
    display: none;
  }

  /* Hide desktop CTA buttons in header */
  .header-cta {
    display: none;
  }

  /* Hide phone tooltip on mobile — tel: link works natively */
  .phone-tooltip {
    display: none !important;
  }

  /* Show hamburger menu */
  .menu-toggle {
    display: block;
    order: 10;
    margin-left: auto;
  }

  /* ===== MOBILE NAV PANEL ===== */
  nav.active {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--background);
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 999;
  }

  nav.active > a {
    display: block;
    width: 100%;
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    text-align: center;
    font-size: 1.05rem;
  }

  nav.active > .nav-dropdown {
    display: block;
    width: 100%;
    border-bottom: 1px solid var(--border);
  }

  nav.active > .nav-dropdown > .dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    border-radius: 0;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--primary);
  }

  nav.active > .nav-dropdown.open > .dropdown-toggle {
    color: var(--primary-dark);
  }

  /* ===== MOBILE DROPDOWN BEHAVIOR ===== */
  .nav-dropdown:hover .dropdown-menu {
    display: none;
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border-radius: 0;
    padding: 0;
    background: var(--background-alt);
    display: none;
  }

  .nav-dropdown.open .dropdown-menu {
    display: block;
  }

  .dropdown-menu a {
    display: block;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    border-radius: 0;
    text-align: center;
  }

  .dropdown-menu a:last-child {
    border-bottom: none;
  }

  .dropdown-arrow {
    float: none;
    margin-left: 0;
    margin-right: 0;
  }

  .dropdown-arrow svg {
    width: 14px;
    height: 9px;
  }

  .nav-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
  }

  nav.active > .nav-dropdown > .dropdown-toggle:focus {
    outline: none;
    background: var(--background-alt);
  }

  nav.active > .nav-dropdown > .dropdown-toggle:focus-visible {
    box-shadow: inset 0 0 0 2px var(--primary);
    outline: none;
  }

  nav.active a:focus-visible,
  nav.active button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: -2px;
  }

  /* Mobile CTA buttons inside nav */
  .mobile-nav-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 15px 20px;
    background: var(--background-alt);
    border-top: 1px solid var(--border);
  }

  .mobile-nav-cta .btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 0.95rem;
  }

}

/* ===== MOBILE PAGE CONTENT ===== */
@media (max-width: 768px) {
  :root {
    --section-padding: 50px 20px;
  }

  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  .hero-content h1 {
    font-size: 1.75rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .benefits-grid {
    grid-template-columns: 1fr;
  }

  .steps {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
  }

  .link-grid {
    grid-template-columns: 1fr;
  }

  .link-actions {
    margin-top: 20px;
  }

  .trust-bar-inner {
    gap: 30px;
  }

  .pricing-range {
    font-size: 2rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-column a {
    display: block;
    padding: 12px 0;
    min-height: 44px;
  }

  .footer-column li {
    margin-bottom: 4px;
  }

  .footer-column ul {
    margin-bottom: 20px;
  }

  .footer-brand > p:last-child {
    justify-content: center;
  }

  /* Prevent iOS zoom on form inputs */
  input,
  select,
  textarea {
    font-size: 16px !important;
  }
}

@media (max-width: 480px) {

  .page-hero h1,
  .hero-content h1 {
    font-size: 1.75rem;
  }

  .page-hero p,
  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-buttons {
    flex-direction: column;
  }
  
  .hero-buttons .btn {
    width: auto;
  }
  
  .trust-bar-inner {
    flex-direction: column;
    gap: 20px;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  header {
    position: relative;
  }

  .header-inner {
    padding: 8px 15px;
  }

  .logo-text {
    font-size: 1.1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Back to Top Button — centered in the sticky header bar */
.back-to-top {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  padding: 7px 16px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 0.82rem;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, background 0.2s ease;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}
.back-to-top:hover {
  background: var(--primary-dark);
}
@media (max-width: 768px) {
  .back-to-top {
    padding: 5px 12px;
    font-size: 0.78rem;
  }
}
