/* ============================================================
   ECO-FUMIGATION — MOBILE.CSS
   Fixes for mobile responsiveness & button colour correction
   Load AFTER style.css, nav.css, pest-pages.css
   ============================================================ */

/* ════════════════════════════════════════════════════════════
   1. BUTTON COLOUR FIX
   Primary buttons = teal (#1A9B8C) to match nav/logo colour
   ════════════════════════════════════════════════════════════ */
.btn-primary {
  background:   #1A9B8C;
  border-color: #1A9B8C;
  color: #fff;
}
.btn-primary:hover {
  background:   #157a6e;
  border-color: #157a6e;
  color: #fff;
  box-shadow: 0 6px 20px rgba(26,155,140,.35);
}

/* CTA banner buttons keep white outline style */
.cta-banner .btn-outline {
  color: #fff;
  border-color: rgba(255,255,255,.6);
}
.cta-banner .btn-outline:hover {
  background: rgba(255,255,255,.15);
  color: #fff;
}

/* ════════════════════════════════════════════════════════════
   2. GLOBAL OVERFLOW FIX
   Prevent any element breaking the viewport width
   ════════════════════════════════════════════════════════════ */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}
* { min-width: 0; }

.container {
  width: 100%;
  padding-left:  clamp(14px, 4vw, 24px);
  padding-right: clamp(14px, 4vw, 24px);
  box-sizing: border-box;
}

/* ════════════════════════════════════════════════════════════
   3. ANNOUNCEMENT BAR — mobile
   ════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .ann-bar { font-size: .74rem; height: auto; min-height: 36px; padding: 6px 36px 6px 10px; }
  .ann-slide { position: static; opacity: 1; transform: none; text-align: center; padding: 0 24px 0 4px; }
  .ann-slide:not(.active) { display: none; }
}

/* ════════════════════════════════════════════════════════════
   4. UTILITY BAR — collapse on mobile
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .utility-bar { display: none; }
}

/* ════════════════════════════════════════════════════════════
   5. HEADER — mobile fixes
   ════════════════════════════════════════════════════════════ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 900;
  width: 100%;
  background: #fff;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  gap: .5rem;
  padding: 0;
  width: 100%;
}

/* Logo — prevent overflow */
.site-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
  min-width: 0;
  text-decoration: none;
}
.site-logo img {
  width: 42px;
  height: 42px;
  flex-shrink: 0;
}
.logo-text { min-width: 0; overflow: hidden; }
.logo-name {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(.85rem, 3.5vw, 1.05rem);
  color: var(--teal);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logo-sub {
  font-size: clamp(.5rem, 1.8vw, .62rem);
  color: var(--text-light);
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* Header CTA — mobile */
.header-cta {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
}

@media (max-width: 900px) {
  .hdr-phone { display: none; }
  .site-nav  { display: none; }
}

@media (max-width: 480px) {
  .header-inner { height: 58px; }
  .site-logo img { width: 36px; height: 36px; }
  /* Hide Get Free Quote button on very small screens — hamburger only */
  .header-cta .btn { display: none; }
}

/* ════════════════════════════════════════════════════════════
   6. HAMBURGER — make it clearly visible
   ════════════════════════════════════════════════════════════ */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 28px;
  height: 20px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: var(--dark);
  border-radius: 3px;
  transition: all .3s ease;
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 900px) {
  .hamburger { display: flex; }
}

/* ════════════════════════════════════════════════════════════
   7. MOBILE NAV DRAWER — clean up
   ════════════════════════════════════════════════════════════ */
.mob-nav {
  position: fixed;
  top: 0; right: 0;
  width: min(340px, 88vw);
  height: 100vh;
  background: #fff;
  z-index: 960;
  display: flex;
  flex-direction: column;
  transform: translateX(110%);
  transition: transform .35s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
  box-shadow: -4px 0 32px rgba(0,0,0,.15);
}
.mob-nav.open { transform: translateX(0); }

.mob-nav-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  min-height: 64px;
}
.mob-close {
  background: var(--off-white);
  border: none;
  width: 36px; height: 36px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  color: var(--dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all .2s;
}
.mob-close:hover { background: var(--teal); color: #fff; }

.mob-nav-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.mob-link {
  display: flex;
  width: 100%;
  text-align: left;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .93rem;
  color: var(--dark);
  padding: 15px 20px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: none;
  cursor: pointer;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: color .2s, background .2s;
}
.mob-link:hover, .mob-link:active { color: var(--teal); background: var(--teal-light); }

.mob-sub {
  max-height: 0;
  overflow: hidden;
  transition: max-height .3s ease;
  background: var(--off-white);
}
.mob-sub.open { max-height: 600px; }
.mob-sub a {
  display: block;
  font-size: .87rem;
  color: var(--text);
  padding: 12px 28px;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: color .2s;
}
.mob-sub a:hover, .mob-sub a:active { color: var(--teal); }

.mob-nav-foot {
  padding: 16px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: .6rem;
}
.mob-nav-foot .btn {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.mob-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 950;
  opacity: 0;
  display: none;
  transition: opacity .3s;
}
.mob-overlay.show { opacity: 1; }

/* ════════════════════════════════════════════════════════════
   8. HERO SECTION — mobile fixes
   ════════════════════════════════════════════════════════════ */
.hero {
  min-height: auto;
  padding: 0;
}
.hero-content {
  min-height: auto;
  padding: clamp(40px,8vw,80px) 0 clamp(32px,6vw,60px);
}

@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 48px 0 40px;
    text-align: center;
  }
  .hero-visual { display: none; }
  .hero-actions {
    flex-direction: column;
    gap: .7rem;
    align-items: stretch;
  }
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
    padding: 16px 24px;
    font-size: 1rem;
  }
  .hero-trust { justify-content: center; }
  .hero-badge { margin: 0 auto 1rem; }
  .hero h1 { font-size: clamp(1.8rem, 7vw, 2.8rem); }
  .hero-sub { font-size: .98rem; margin: 0 auto 1.5rem; }
}

@media (max-width: 480px) {
  .hero-content { padding: 36px 0 32px; }
  .hero h1 { font-size: clamp(1.6rem, 8vw, 2.2rem); }
  .hero-actions .btn { padding: 15px 20px; font-size: .95rem; }
}

/* ════════════════════════════════════════════════════════════
   9. SERVICE CARDS GRID — mobile
   ════════════════════════════════════════════════════════════ */
.services-grid {
  grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr));
}

@media (max-width: 640px) {
  .services-grid { grid-template-columns: 1fr; }
  .service-card { padding: 22px 18px; }
}

/* ════════════════════════════════════════════════════════════
   10. TABS — mobile
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .tabs-nav {
    gap: .4rem;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: .3rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs-nav::-webkit-scrollbar { display: none; }
  .tab-btn { white-space: nowrap; padding: 10px 16px; font-size: .82rem; flex-shrink: 0; }
  .tab-panel.active { grid-template-columns: 1fr; }
  .tab-panel-image  { display: none; }
}

/* ════════════════════════════════════════════════════════════
   11. AREAS GRID — mobile
   ════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .areas-grid { grid-template-columns: 1fr 1fr; gap: .7rem; }
  .area-card  { padding: 20px 14px; min-height: 130px; }
  .area-card h4 { font-size: .9rem; }
  .area-card p  { font-size: .72rem; }
}
@media (max-width: 400px) {
  .areas-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════
   12. CTA BANNER — mobile
   ════════════════════════════════════════════════════════════ */
.cta-banner { padding: 40px 0; }
@media (max-width: 768px) {
  .cta-banner .container {
    flex-direction: column;
    text-align: center;
    gap: 1.2rem;
  }
  .cta-banner div:last-child {
    flex-direction: column;
    width: 100%;
    gap: .7rem;
  }
  .cta-banner .btn {
    width: 100%;
    justify-content: center;
  }
}

/* ════════════════════════════════════════════════════════════
   13. TESTIMONIALS — mobile
   ════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════
   14. FAQ — mobile
   ════════════════════════════════════════════════════════════ */
/* Global: ensure tap-highlight is suppressed on all screen sizes */
.faq-question { -webkit-tap-highlight-color: transparent; }

@media (max-width: 768px) {
  .faq-question {
    width: 100%;
    text-align: left;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    font-family: var(--font-head);
    font-weight: 600;
    font-size: clamp(.87rem, 2.5vw, .98rem);
    color: var(--dark);
    padding: 18px 20px;
    border-bottom: 1px solid var(--border);
  }
  .faq-item.open .faq-question { color: var(--teal); border-color: var(--teal); }
  .faq-chevron { flex-shrink: 0; transition: transform .3s; }
  .faq-item.open .faq-chevron { transform: rotate(180deg); }
  .faq-answer { max-height: 0; overflow: hidden; transition: max-height .4s ease; }
  .faq-item.open .faq-answer { max-height: 600px; }
  .faq-answer-inner { padding: 16px 20px 20px; font-size: .92rem; color: var(--text-light); line-height: 1.75; }
}

/* ════════════════════════════════════════════════════════════
   15. PEST PAGE LAYOUT — mobile
   ════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .pest-content-grid { grid-template-columns: 1fr; }
  .pest-sidebar { position: static !important; }
  .sidebar-card { position: static !important; top: auto; }
  .pest-hero-grid { grid-template-columns: 1fr; }
  .pest-hero-card { display: none; }
  .pest-hero-ctas { flex-direction: column; }
  .pest-hero-ctas .btn { width: 100%; justify-content: center; }
}
@media (max-width: 640px) {
  .signs-grid { grid-template-columns: 1fr; }
  .prevention-grid { grid-template-columns: 1fr; }
  .pest-danger-strip { gap: .5rem; }
  .pds-item { padding: 8px 12px; flex: 1; min-width: 0; }
  .pds-label { font-size: .62rem; }
  .pds-value { font-size: .82rem; }
}

/* ════════════════════════════════════════════════════════════
   16. SERVICE HERO — mobile
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .svc-hero { min-height: 320px; padding-bottom: 40px; }
  .svc-intro-grid { grid-template-columns: 1fr; }
  .svc-benefits-grid { grid-template-columns: 1fr 1fr; }
  .svc-process-step { padding: 18px; gap: 1rem; }
  .svc-guarantee-strip .container { flex-direction: column; text-align: center; }
}
@media (max-width: 480px) {
  .svc-benefits-grid { grid-template-columns: 1fr; }
  .svc-hero-ctas { flex-direction: column; }
  .svc-hero-ctas .btn { width: 100%; justify-content: center; }
}

/* ════════════════════════════════════════════════════════════
   17. AREA & INDUSTRY PAGES — mobile
   ════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .area-content-grid { grid-template-columns: 1fr; }
  .industry-hero-grid { grid-template-columns: 1fr; }
  .industry-hero-badge { display: none; }
  .industry-grid { grid-template-columns: 1fr; }
  .quote-page-grid { grid-template-columns: 1fr; }
  .quote-form-card { position: static; }
}
@media (max-width: 640px) {
  .area-cities-grid { grid-template-columns: repeat(2, 1fr); }
  .area-pests-grid  { grid-template-columns: repeat(2, 1fr); }
}

/* ════════════════════════════════════════════════════════════
   17b. CONTACT PAGE — layout
   ════════════════════════════════════════════════════════════ */
.contact-main-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 3rem;
  padding: 50px 0;
  align-items: start;
}
@media (max-width: 900px) {
  .contact-main-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 30px 0;
  }
  .contact-main-grid .quote-form-card {
    position: static;
  }
}

/* ════════════════════════════════════════════════════════════
   18. FOOTER — mobile
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .footer-main { grid-template-columns: 1fr 1fr; gap: 2rem; }
}
@media (max-width: 480px) {
  .footer-main { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; gap: .5rem; }
}

/* ════════════════════════════════════════════════════════════
   19. WHATSAPP FLOAT — keep visible on mobile
   ════════════════════════════════════════════════════════════ */
.whatsapp-float {
  bottom: 16px;
  right: 16px;
  width: 52px;
  height: 52px;
}
.scroll-top {
  bottom: 16px;
  right: 78px;
  width: 40px;
  height: 40px;
}

/* ════════════════════════════════════════════════════════════
   20. CONTACT FORM — mobile
   ════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .form-control {
    font-size: 16px; /* prevents iOS zoom on focus */
  }
  .form-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════
   21. BLOG GRID — mobile
   ════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  #postsGrid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════════
   22. BREADCRUMB — prevent overflow
   ════════════════════════════════════════════════════════════ */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .3rem;
  font-size: .8rem;
  overflow: hidden;
}
.breadcrumb span,
.breadcrumb a {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

/* ════════════════════════════════════════════════════════════
   23. GENERAL SECTION PADDING — mobile
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  section { padding: 50px 0; }
}
@media (max-width: 480px) {
  section { padding: 36px 0; }
  h1 { font-size: clamp(1.6rem, 7vw, 2.2rem); }
  h2 { font-size: clamp(1.3rem, 5vw, 1.8rem); }
}

/* ════════════════════════════════════════════════════════════
   24. TRUST BADGES ROW — mobile
   ════════════════════════════════════════════════════════════ */
@media (max-width: 640px) {
  .trust-strip { gap: .8rem; }
  .trust-item  { flex: 1; min-width: 140px; padding: 16px 12px; }
}

/* ════════════════════════════════════════════════════════════
   25. IOS SAFE AREA — notch/bottom bar support
   ════════════════════════════════════════════════════════════ */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .mob-nav-foot {
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
  .whatsapp-float {
    bottom: calc(16px + env(safe-area-inset-bottom));
  }
}
