/* ==========================================================================
   TALL GRASS & MAINTENANCE — RESPONSIVE STYLES
   Breakpoints: 1024px, 992px, 768px, 480px, 360px
   Mobile-First & High-Resolution Displays
   ========================================================================== */

/* --- Tablet Devices (<= 1024px) --- */
@media (max-width: 1024px) {
  :root {
    --container-padding: 1.25rem;
  }

  .nav-menu {
    gap: 1.15rem;
  }

  .nav-link {
    font-size: 0.9rem;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.75rem;
  }

  .stat-card:nth-child(2)::after {
    display: none;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .why-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .process-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .reviews-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }

  .service-details-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .service-sidebar {
    order: 2;
  }
}

/* --- Mobile & Tablet Header Transition (<= 992px) --- */
@media (max-width: 992px) {
  html, body {
    overflow-x: hidden !important;
    max-width: 100% !important;
  }

  body.nav-lock {
    overflow: hidden !important;
    height: 100% !important;
  }

  /* HIDE TOP BAR ON MOBILE */
  .top-bar {
    display: none !important;
  }

  /* Fixed 64px Header Bar on Mobile */
  .site-header {
    height: 64px !important;
    padding: 0 !important;
    position: sticky !important;
    top: 0 !important;
    width: 100% !important;
    z-index: 10000 !important;
    background-color: #ffffff !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    box-sizing: border-box !important;
    display: flex !important;
    align-items: center !important;
  }

  .header-container {
    padding: 0 1rem !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 0.5rem !important;
  }

  .header-brand {
    gap: 0.6rem !important;
    min-width: 0 !important;
    flex-shrink: 1 !important;
    overflow: hidden !important;
  }

  .brand-logo-img,
  .brand-logo img,
  .header-brand img,
  .site-header img {
    height: 40px !important;
    max-height: 40px !important;
    width: auto !important;
    flex-shrink: 0 !important;
  }

  .brand-title {
    font-size: 1.1rem !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  .brand-subtitle {
    display: none !important;
  }

  /* HIDE DESKTOP CTA BUTTON ON MOBILE TOP BAR */
  .header-cta-btn {
    display: none !important;
  }

  /* SHOW CLEAN HAMBURGER BUTTON ON MOBILE RIGHT */
  .nav-toggle-btn {
    display: flex !important;
  }

  /* FULL VIEWPORT MOBILE MENU DRAWER (NEVER OFF-SCREEN) */
  .header-nav {
    position: fixed !important;
    top: 64px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: calc(100vh - 64px) !important;
    height: calc(100dvh - 64px) !important;
    background-color: #ffffff !important;
    box-sizing: border-box !important;
    padding: 1.25rem 1.5rem 3rem !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    z-index: 99999 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    transform: translateX(-100%) !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.28s !important;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15) !important;
  }

  .header-nav.is-open,
  .header-nav.open {
    transform: translateX(0) !important;
    visibility: visible !important;
    pointer-events: auto !important;
  }

  .nav-list {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    width: 100% !important;
  }

  .nav-item {
    width: 100% !important;
    border-bottom: 1px solid #f1f5f9 !important;
  }

  .nav-link {
    width: 100% !important;
    padding: 0.95rem 0.25rem !important;
    font-size: 1.05rem !important;
    justify-content: space-between !important;
  }

  .nav-link.active {
    border-bottom: none !important;
    color: var(--color-primary) !important;
  }

  /* Mobile Dropdown */
  .nav-dropdown-menu {
    position: static !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    box-shadow: none !important;
    border: none !important;
    background-color: #f8faf9 !important;
    border-radius: var(--radius-sm) !important;
    padding: 0.5rem !important;
    margin: 0.25rem 0 0.75rem !important;
    display: none !important;
    pointer-events: auto !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .dropdown-parent.is-expanded .nav-dropdown-menu {
    display: block !important;
  }

  .dropdown-item {
    padding: 0.65rem 0.75rem !important;
    font-size: 0.92rem !important;
  }

  /* Mobile Nav CTA Buttons */
  .mobile-nav-cta {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    margin-top: 1.5rem !important;
    padding-top: 1.25rem !important;
    border-top: 2px solid #f1f5f9 !important;
    width: 100% !important;
  }

  .btn-mobile-cta {
    width: 100% !important;
    text-align: center !important;
    justify-content: center !important;
    padding: 0.85rem 1rem !important;
    font-size: 1rem !important;
  }

  .mobile-nav-phone {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    font-weight: 700 !important;
    font-size: 0.95rem !important;
    color: var(--color-primary) !important;
    text-decoration: none !important;
    padding: 0.65rem 1rem !important;
    background-color: #f0fdf4 !important;
    border-radius: var(--radius-sm) !important;
    border: 1px solid rgba(26, 83, 42, 0.15) !important;
  }
}

/* --- Mobile Landscape & Medium Screens (<= 768px) --- */
@media (max-width: 768px) {
  .hero {
    padding: 3.5rem 0 4.5rem;
  }

  .hero-trust-badges {
    gap: 1.25rem;
  }

  .about-split {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .about-float-badge {
    position: static;
    margin-top: 1.25rem;
    display: inline-block;
  }

  .sectors-split {
    grid-template-columns: 1fr;
  }

  .articles-grid {
    grid-template-columns: 1fr;
  }

  .reviews-grid {
    grid-template-columns: 1fr;
  }

  .cta-box {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }

  .cta-text-content {
    max-width: 100%;
  }

  .cta-actions {
    width: 100%;
  }

  .contact-split {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }
}

/* --- Mobile Phones (<= 480px) --- */
@media (max-width: 480px) {
  :root {
    --container-padding: 1rem;
  }

  .section {
    padding: 3.75rem 0;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .stat-card::after {
    display: none;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .why-grid {
    grid-template-columns: 1fr;
  }

  .process-grid {
    grid-template-columns: 1fr;
  }

  .about-features-list {
    grid-template-columns: 1fr;
  }

  .service-bullet-grid {
    grid-template-columns: 1fr;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .estimate-form-card {
    padding: 1.5rem 1.25rem;
  }

  .brand-logo img {
    height: 42px;
  }

  .brand-name {
    font-size: 1.1rem;
  }

  .brand-tagline {
    display: none !important;
  }
}

@media (max-width: 360px) {
  .brand-name {
    font-size: 0.88rem;
  }

  .brand-logo img {
    height: 34px;
  }
}

/* --- Reduced Motion Support (Accessibility) --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
