/* Location Pages Mobile Responsive Styles */
/* Apply to State, City, and Service Location Pages */

/* Container and Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
  box-sizing: border-box;
}

/* Hero Sections */
.location-hero,
.state-hero,
.service-hero,
.city-hero {
  padding: 120px 20px 60px;
  width: 100%;
  overflow: hidden;
}

.location-hero h1,
.state-hero h1,
.service-hero h1,
.city-hero h1 {
  font-size: clamp(1.75rem, 5vw, 2.5rem);
  line-height: 1.2;
  word-wrap: break-word;
}

.location-hero .subtitle,
.state-hero .subtitle,
.service-hero .subtitle {
  font-size: clamp(1rem, 3vw, 1.25rem);
  max-width: 700px;
  margin: 0 auto;
}

/* Stats Grid */
.local-stats,
.stats-grid,
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  align-items: center;
  padding: 1rem 0;
}

.local-stats .stat,
.stats-grid .stat,
.stats .stat {
  flex: 1 1 250px;
  text-align: center;
  min-width: 0;
}

/* Content Grids */
.content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  width: 100%;
}

/* Lead Form Container */
.sidebar-cta,
.sidebar,
.content-sidebar {
  width: 100%;
  max-width: 100%;
}

/* Form Styles */
.lead-form {
  width: 100%;
  padding: 1.5rem;
  box-sizing: border-box;
}

.form-group {
  margin-bottom: 1rem;
  width: 100%;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem;
  font-size: 1rem;
  border: 1px solid #ddd;
  border-radius: 6px;
  box-sizing: border-box;
}

.form-row {
  display: flex;
  gap: 1rem;
  width: 100%;
}

.form-group.half {
  flex: 1;
  min-width: 0;
}

/* Service Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  width: 100%;
}

/* Benefits Grid */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  width: 100%;
}

/* Process Steps */
.process-steps {
  width: 100%;
  padding: 2rem;
  box-sizing: border-box;
}

.process-step {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  width: 100%;
}

/* FAQ Items */
.faq-section,
.local-faq {
  width: 100%;
  padding: 60px 20px;
  box-sizing: border-box;
}

.faq-item {
  width: 100%;
  padding: 1.5rem;
  margin-bottom: 1rem;
  box-sizing: border-box;
}

/* Cities Grid */
.cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
  width: 100%;
}

/* Keywords Bar */
.keywords-bar {
  width: 100%;
  padding: 20px;
  box-sizing: border-box;
}

.keywords-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* Trust Indicators */
.trust-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-around;
  margin: 1rem 0;
}

.trust-indicators .indicator {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

/* Buttons */
.submit-button,
.cta-button {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  text-align: center;
  box-sizing: border-box;
}

/* Testimonial Card */
.testimonial-card {
  width: 100%;
  padding: 1.5rem;
  box-sizing: border-box;
}

.form-testimonial {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
  width: 100%;
}

/* Mobile Styles */
@media (max-width: 968px) {
  /* Reset grid layouts to single column */
  .content-grid {
    grid-template-columns: 1fr !important;
    gap: 2rem;
  }
  
  .services-grid {
    grid-template-columns: 1fr !important;
  }
  
  .benefits-grid {
    grid-template-columns: 1fr !important;
  }
  
  .cities-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  /* Adjust hero sections for mobile */
  .location-hero,
  .state-hero,
  .service-hero,
  .city-hero {
    padding: 100px 15px 40px;
  }
  
  /* Stack stats vertically on mobile */
  .local-stats,
  .stats-grid,
  .stats {
    flex-direction: column;
    gap: 1.5rem;
  }
  
  .local-stats .stat,
  .stats-grid .stat {
    width: 100%;
    padding: 1rem;
  }
  
  /* Form adjustments */
  .form-row {
    flex-direction: column;
  }
  
  .form-group.half {
    width: 100%;
  }
  
  /* Sidebar becomes static on mobile */
  .sidebar-cta {
    position: relative !important;
    top: 0 !important;
    margin-top: 2rem;
  }
  
  /* Adjust padding and spacing */
  .faq-section,
  .local-faq {
    padding: 40px 15px;
  }
  
  .process-steps {
    padding: 1.5rem;
  }
  
  .keywords-bar {
    padding: 15px;
  }
  
  /* Typography adjustments */
  h2 {
    font-size: clamp(1.5rem, 4vw, 2rem) !important;
  }
  
  h3 {
    font-size: clamp(1.25rem, 3.5vw, 1.5rem) !important;
  }
  
  p, li {
    font-size: 1rem;
    line-height: 1.6;
  }
  
  /* Trust indicators stack on small screens */
  .trust-indicators {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .trust-indicators .indicator {
    font-size: 0.875rem;
  }
  
  /* Form testimonial stacks on mobile */
  .form-testimonial {
    flex-direction: column;
    text-align: center;
  }
  
  .testimonial-avatar {
    margin: 0 auto;
  }
  
  /* Button adjustments */
  .submit-button,
  .cta-button {
    font-size: 1rem;
    padding: 0.875rem 1.5rem;
  }
  
  /* Fix overflow issues */
  body {
    overflow-x: hidden;
  }
  
  main {
    overflow-x: hidden;
  }
  
  section {
    overflow-x: hidden;
  }
  
  /* Ensure all containers respect viewport */
  .container {
    max-width: 100%;
    padding: 0 15px;
  }
  
  /* Fix for inline styled divs */
  div[style*="max-width"] {
    max-width: 100% !important;
  }
  
  div[style*="display: grid"] {
    display: block !important;
  }
  
  div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  
  /* Fix text that might overflow */
  * {
    word-wrap: break-word;
    overflow-wrap: break-word;
  }
}

/* Small mobile devices */
@media (max-width: 480px) {
  .location-hero h1,
  .state-hero h1,
  .service-hero h1,
  .city-hero h1 {
    font-size: 1.5rem;
  }
  
  .location-hero .subtitle,
  .state-hero .subtitle,
  .service-hero .subtitle {
    font-size: 0.95rem;
  }
  
  .cities-grid {
    grid-template-columns: 1fr;
  }
  
  .keywords-list {
    flex-direction: column;
    align-items: stretch;
  }
  
  .keyword-tag {
    text-align: center;
  }
  
  /* Even smaller padding on very small screens */
  .container {
    padding: 0 10px;
  }
  
  .location-hero,
  .state-hero,
  .service-hero,
  .city-hero {
    padding: 90px 10px 30px;
  }
}

/* Fix for form elements specifically */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

/* Ensure images don't overflow */
img {
  max-width: 100%;
  height: auto;
}

/* Fix for the lead form in the sidebar */
#lead-form,
#state-lead-form {
  width: 100%;
  max-width: 100%;
}

/* Override inline styles that cause issues */
@media (max-width: 968px) {
  /* Force override problematic inline styles */
  [style*="position: sticky"] {
    position: relative !important;
  }
  
  [style*="grid-template-columns: 2fr 1fr"] {
    grid-template-columns: 1fr !important;
  }
  
  [style*="display: flex"][style*="gap"] {
    flex-wrap: wrap !important;
  }
}