/* Jamrock mobile polish. All changes scoped to existing website templates. */
/* Responsive base: preserve the desktop design and the quote iframe experience. */
@media (max-width: 1024px) {
  html:not(.jr-quote-embed) { scroll-padding-top: 82px; -webkit-text-size-adjust: 100%; }
  body { max-width: 100%; overflow-x: clip; }
  #jamrock-pro, #jamrock-service-page, #jamrock-area-page { max-width: 100%; }
  #jamrock-pro *, #jamrock-service-page *, #jamrock-area-page * { min-width: 0; }
  #jamrock-pro img, #jamrock-service-page img, #jamrock-area-page img { max-width: 100%; }
  #jamrock-pro h1, #jamrock-pro h2,
  #jamrock-service-page h1, #jamrock-service-page h2,
  #jamrock-area-page h1, #jamrock-area-page h2,
  body:not(:has(#jamrock-pro,#jamrock-service-page,#jamrock-area-page)) h1,
  body:not(:has(#jamrock-pro,#jamrock-service-page,#jamrock-area-page)) h2 {
    overflow-wrap: break-word; hyphens: auto;
  }
}
@media (max-width: 820px) {
  /* Mobile menus need a real scroll area when there are many service links. */
  #jamrock-pro .fp-mobile-menu,
  #jamrock-service-page .jr-mobile-menu,
  #jamrock-area-page .ja-mobile-menu,
  body > header .mobile-menu {
    max-height: calc(100dvh - 78px) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(20px + env(safe-area-inset-bottom)) !important;
  }
  #jamrock-pro .fp-mobile-menu { max-height: calc(100dvh - 72px) !important; }
  #jamrock-service-page .jr-mobile-menu { max-height: calc(100dvh - 78px) !important; }
  #jamrock-area-page .ja-mobile-menu { max-height: calc(100dvh - 76px) !important; }
  body > header .mobile-menu { max-height: calc(100dvh - 76px) !important; }

  #jamrock-pro .fp-mobile-btn,
  #jamrock-service-page .jr-mobile-btn,
  #jamrock-area-page .ja-mobile-btn,
  body > header .mobile-btn {
    min-width: 44px !important; min-height: 44px !important; flex-shrink: 0;
    touch-action: manipulation;
  }
  #jamrock-pro .fp-mobile-menu a,
  #jamrock-pro .fp-mobile-submenu-toggle,
  #jamrock-service-page .jr-mobile-menu a,
  #jamrock-area-page .ja-mobile-menu a,
  body > header .mobile-menu a {
    min-height: 44px !important;
    align-content: center;
    line-height: 1.5 !important;
    touch-action: manipulation;
  }
  #jamrock-pro .fp-mobile-submenu-toggle { width:100%; text-align:left; }
  #jamrock-pro .fp-mobile-menu, #jamrock-service-page .jr-mobile-menu,
  #jamrock-area-page .ja-mobile-menu, body > header .mobile-menu {
    z-index: 200 !important;
  }

  /* All service pages, including newly restored services. */
  #jamrock-service-page .jr-header {
    position: sticky !important; top: 0; z-index: 201 !important;
    height: 78px !important; padding: 0 14px !important;
    background: #073d27;
  }
  #jamrock-service-page .jr-logo img { width: 78px !important; height: 65px !important; object-fit: contain; }
  #jamrock-service-page .jr-shell { width: calc(100% - 28px) !important; }
  #jamrock-service-page .jr-hero { min-height: 0 !important; padding: 42px 0 50px !important; }
  #jamrock-service-page .jr-hero-inner { min-height: 0 !important; padding: 0 !important; }
  #jamrock-service-page .jr-hero h1 {
    font-size: clamp(40px, 9.2vw, 65px) !important;
    line-height: 1.01 !important; letter-spacing: 0 !important;
  }
  #jamrock-service-page .jr-hero h2 {
    font-size: clamp(28px, 6.5vw, 42px) !important; line-height: 1.1 !important;
  }
  #jamrock-service-page .jr-breadcrumb { display:flex; flex-wrap:wrap; gap:5px; line-height:1.5; }
  #jamrock-service-page .jr-hero-copy > p:last-of-type { font-size: 15px !important; line-height: 1.65 !important; }
  #jamrock-service-page .jr-actions { display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:10px !important; }
  #jamrock-service-page .jr-actions a { width:100% !important; min-height:50px; text-align:center; justify-content:center; }
  #jamrock-service-page .jr-overview-grid, #jamrock-service-page .jr-why-grid,
  #jamrock-service-page .jr-location-grid, #jamrock-service-page .jr-faq-grid {
    grid-template-columns:minmax(0,1fr) !important;
  }
  #jamrock-service-page .jr-overview-photo, #jamrock-service-page .jr-why-photo {
    width:100%; min-height:0 !important; max-height:360px; object-fit:cover;
  }
  #jamrock-service-page .jr-use-grid, #jamrock-service-page .jr-process-grid,
  #jamrock-service-page .jr-related-grid { gap:12px !important; }
  #jamrock-service-page .jr-faq summary { min-height:48px; line-height:1.5; }
  #jamrock-service-page .jr-final .jr-actions { max-width:520px; margin-inline:auto; }

  /* Gainesville and other community pages plus informational guides. */
  #jamrock-area-page .ja-header {
    position: sticky !important; top: 0; z-index: 201 !important;
    height: 76px !important; padding: 0 14px !important;
    background:#073d27;
  }
  #jamrock-area-page .ja-logo img { width:76px !important; height:63px !important; object-fit:contain; }
  #jamrock-area-page .ja-shell { width:calc(100% - 28px) !important; }
  #jamrock-area-page .ja-hero, #jamrock-area-page .ja-hero-inner { min-height:0 !important; }
  #jamrock-area-page .ja-hero-inner { padding:0 !important; }
  #jamrock-area-page .ja-hero-copy { padding:50px 0 !important; }
  #jamrock-area-page .ja-hero h1 { font-size:clamp(40px,9.3vw,65px) !important; line-height:1.04 !important; }
  #jamrock-area-page .ja-hero h2 { font-size:clamp(27px,6.4vw,42px) !important; line-height:1.13 !important; }
  #jamrock-area-page .ja-breadcrumb { display:flex; flex-wrap:wrap; gap:5px; line-height:1.5; }
  #jamrock-area-page .ja-actions { display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:10px !important; }
  #jamrock-area-page .ja-actions a { width:100% !important; min-height:50px; justify-content:center; text-align:center; }
  #jamrock-area-page .ja-section { padding:56px 0 !important; }
  #jamrock-area-page .ja-intro-grid, #jamrock-area-page .ja-area-grid,
  #jamrock-area-page .ja-local-card, #jamrock-area-page .ja-faq-grid { grid-template-columns:minmax(0,1fr) !important; }
  #jamrock-area-page .ja-service-grid, #jamrock-area-page .ja-remove-grid { gap:12px !important; }
  #jamrock-area-page .ja-faq summary { min-height:48px; line-height:1.5; }
  #jamrock-area-page .jg-hero h1 { font-size:clamp(39px,8.6vw,64px) !important; line-height:1.07 !important; }
  #jamrock-area-page .jg-layout { grid-template-columns:minmax(0,1fr) !important; }
  #jamrock-area-page .jg-content { min-width:0; }
  #jamrock-area-page .jg-content a { overflow-wrap:anywhere; }
  #jamrock-area-page .jg-side { max-width:100%; }

  /* About and archived reviews templates. */
  body > header .mobile-menu { padding-inline:14px; }
  body > header .mobile-btn { z-index:2; }
  body > main .hero, body > main .hero-inner { min-height:0 !important; }
  body > main .hero-copy { padding:50px 0 !important; }
  body > main .hero h1 { font-size:clamp(40px,9.5vw,64px) !important; line-height:1.05 !important; }
  body > main .actions { display:grid !important; grid-template-columns:minmax(0,1fr) !important; gap:10px !important; }
  body > main .actions a { width:100% !important; min-height:50px; justify-content:center; }
  body > main .grid2, body > main .story, body > main .google-inner { grid-template-columns:minmax(0,1fr) !important; }

  /* Homepage: ensure long mobile navigation and services stay usable. */
  #jamrock-pro .fp-hero h1 { overflow-wrap:break-word; }
  #jamrock-pro .fp-reviews { grid-template-columns:minmax(0,1fr) !important; }
  #jamrock-pro .fp-local-grid, #jamrock-pro .fp-about-grid { grid-template-columns:minmax(0,1fr) !important; }
  #jamrock-pro .fp-more-grid { grid-template-columns:repeat(2,minmax(0,1fr)) !important; }
  #jamrock-pro .fp-more-card { min-width:0; }
  #jamrock-pro .fp-hero-actions, #jamrock-pro .fp-pricing-buttons { gap:10px; }
  #jamrock-pro .fp-hero-actions a, #jamrock-pro .fp-pricing-buttons a {
    min-height:48px; touch-action:manipulation;
  }
  #jamrock-pro .fp-local-availability { color:#435247 !important; opacity:1 !important; }
}
@media (max-width: 520px) {
  /* Prevent headline clipping on 320 to 430px screens. */
  #jamrock-service-page .jr-hero h1 { font-size:clamp(35px,9.7vw,46px) !important; }
  #jamrock-service-page .jr-hero h2 { font-size:clamp(27px,7.2vw,35px) !important; }
  #jamrock-service-page .jr-use-grid, #jamrock-service-page .jr-related-grid,
  #jamrock-service-page .jr-process-grid { grid-template-columns:minmax(0,1fr) !important; }
  #jamrock-service-page .jr-overview h2, #jamrock-service-page .jr-why h2,
  #jamrock-service-page .jr-use-cases h2, #jamrock-service-page .jr-process h2,
  #jamrock-service-page .jr-locations h2, #jamrock-service-page .jr-local-copy h2,
  #jamrock-service-page .jr-faq-section h2, #jamrock-service-page .jr-related h2,
  #jamrock-service-page .jr-final h2 {
    font-size:clamp(31px,9.4vw,43px) !important; line-height:1.08 !important;
  }
  #jamrock-service-page .jr-overview-photo, #jamrock-service-page .jr-why-photo { max-height:270px; }
  #jamrock-service-page .jr-footer-grid { grid-template-columns:minmax(0,1fr) !important; }
  #jamrock-area-page .ja-hero h1 { font-size:clamp(35px,9.6vw,46px) !important; }
  #jamrock-area-page .ja-hero h2 { font-size:clamp(27px,7.2vw,35px) !important; }
  #jamrock-area-page .ja-remove-grid, #jamrock-area-page .ja-service-grid,
  #jamrock-area-page .ja-use-grid, #jamrock-area-page .ja-footer-grid { grid-template-columns:minmax(0,1fr) !important; }
  #jamrock-area-page .ja-heading h2, #jamrock-area-page .ja-intro-copy h2 { font-size:clamp(32px,9vw,43px) !important; line-height:1.08 !important; }
  #jamrock-area-page .ja-service-card { min-height:310px !important; }
  #jamrock-area-page .ja-local-copy { padding:24px 18px !important; }
  #jamrock-area-page .jg-hero h1 { font-size:clamp(35px,9.5vw,47px) !important; }
  #jamrock-area-page .jg-article h2, #jamrock-area-page .jg-content h2 { font-size:clamp(30px,8.7vw,39px) !important; }
  #jamrock-area-page .jg-main { padding:30px 0 54px !important; }
  #jamrock-area-page .jg-side { padding:18px !important; }
  #jamrock-area-page .jg-side .jg-jump { min-height:40px; align-content:center; }
  #jamrock-pro .fp-more-grid { grid-template-columns:minmax(0,1fr) !important; }
  #jamrock-pro .fp-more-card { min-height:0 !important; padding:18px !important; }
  #jamrock-pro .fp-more-services h2 { font-size:clamp(33px,9vw,43px) !important; line-height:1.05 !important; }
  #jamrock-pro .fp-footer-grid { grid-template-columns:minmax(0,1fr) !important; }
  #jamrock-pro .fp-quiz-answer { min-height:48px; }
  #jamrock-pro .fp-quiz-screen input, #jamrock-pro .fp-quiz-screen select,
  #jamrock-pro .fp-quiz-screen textarea { font-size:16px !important; }
  #jamrock-pro .fp-mobile-submenu-toggle { min-height:48px !important; }
  body > main .hero h1 { font-size:clamp(35px,9vw,45px) !important; }
  body > main .values, body > main .services, body > main .areas, body > footer .footer-grid {
    grid-template-columns:minmax(0,1fr) !important;
  }
}
@media (prefers-reduced-motion:reduce) {
  #jamrock-pro .fp-review-track { animation:none !important; }
  #jamrock-pro .fp-more-card, #jamrock-service-page .jr-use-card, #jamrock-area-page .ja-service-card {
    transition:none !important;
  }
}
