/* ============================================================
   MOBILE TEXT READABILITY IMPROVEMENTS
   Add this section to your style.css or replace existing mobile media queries
   
   PROBLEM: Text sizes below 14px are hard to read on mobile
   SOLUTION: Progressive scaling with minimum 14px for body text
============================================================ */

/* ============================================================
   BASE MOBILE OPTIMIZATION (all mobile devices)
============================================================ */
@media (max-width: 768px) {
  
  /* Increase base font size for better readability */
  html {
    font-size: 17px; /* Ensure good base size */
  }
  
  body {
    font-size: 16px; /* Up from default 14px */
    line-height: 1.65; /* Better spacing */
  }
  
  /* Eyebrow labels - increase from 12px */
  .eyebrow {
    font-size: 14px !important;
    padding: 5px 14px !important;
    letter-spacing: 0.6px;
  }
  
  /* Section titles - ensure good size */
  .sec-title {
    font-size: clamp(28px, 4vw, 38px) !important;
    margin-bottom: 16px;
  }
  
  .sec-sub {
    font-size: 16px !important; /* Up from 17px paradoxically reads better at 16 on mobile */
    line-height: 1.7;
  }
  
  /* Buttons - minimum comfortable tap targets */
  .btn-xl  { padding: 19px 28px !important;font-size: 24px; }
.btn-lg  { padding: 16px 26px !important; font-size: 20px; }
.btn-md  { padding: 13px 22px !important; font-size: 16px; }
.btn-sm  { padding: 10px  18px !important; font-size: 15px; }
  /* Navigation items */
  .nav-link {
    font-size: 18px !important; /* Up from 15px */
  }
  
  /* Search dropdown items */
  .dd-group-label {
    font-size: 12px !important; /* Keep same but ensure visibility */
    padding: 14px 20px 8px !important;
  }
  
  .dd-item-query {
    font-size: 16px !important; /* Up from 14px */
    line-height: 1.4;
  }
  
  .dd-item-service {
    font-size: 14px !important; /* Up from 12px */
  }
  
  /* Search components */
  .search-input {
    font-size: 16px !important; /* Up from 15px - prevents zoom on iOS */
    padding: 8px 0 !important;
  }
  
  .search-input::placeholder {
    font-size: 15px !important; /* Up from 14px */
  }
  
  .search-zip {
    font-size: 15px !important; /* Up from 14px */
    padding: 8px 10px !important;
    width: 90px !important; /* Slightly larger for better tap target */
  }
  
  .search-btn {
    font-size: 16px !important; /* Up from 15px */
    padding: 12px 20px !important;
  }
  
  /* Quick pick chips */
  .qp-label {
    font-size: 15px !important; /* Up from 13px */
    margin: 4px 3%;
  }
  
  .qp-chip {
    font-size: 15px !important; /* Up from 13px */
    padding: 8px 16px !important;
  }
}

/* ============================================================
   MEDIUM MOBILE (640px and below - standard smartphones)
============================================================ */
@media (max-width: 640px) {
  
  /* Keep body text readable */
  body {
    font-size: 17px;
  }
  
  /* Search input - CRITICAL: 16px prevents iOS auto-zoom */
  .search-input,
  #serviceSearch {
    font-size: 16px !important;
  }
  
  .search-input::placeholder {
    font-size: 15px !important;
  }
  
  /* ZIP field - keep readable */
  .search-zip,
  #searchZip {
    width: 80px !important;
    min-width: 80px !important;
    font-size: 16px !important; /* Up from 12-13px */
    padding: 8px !important;
  }
  
  /* Search button */
  .search-btn {
    padding: 11px 16px !important;
    font-size: 16px !important; /* Up from 13px */
  }
  
  /* Dropdown items */
  .dd-item {
    padding: 14px 20px !important;
  }
  
  .dd-item-query {
    font-size: 15px !important;
  }
  
  .dd-item-service {
    font-size: 13px !important;
  }
  
  /* Section text */
  .sec-sub {
    font-size: 16px !important;
  }
  
  /* Lead text */
  .lead {
    font-size: 27px !important; /* More moderate than 27px */
  }
}

/* ============================================================
   SMALL MOBILE (480px and below - smaller phones)
============================================================ */
@media (max-width: 480px) {
  
  /* Ensure minimum readable sizes */
  body {
    font-size: 16px; /* Keep at 15px minimum */
  }
  
  /* Hero/Section titles */
  .sec-title {
    font-size: clamp(24px, 5vw, 32px) !important;
  }
  
  .sec-sub {
    font-size: 16px !important; /* Down slightly but still readable */
    line-height: 1.6;
  }
  
  /* Search components - maintain readability */
  .search-input,
  #serviceSearch {
    font-size: 16px !important; /* KEEP at 16px to prevent zoom */
  }
  
  .search-zip,
  #searchZip {
    width: 70px !important;
    min-width: 70px !important;
    font-size: 14px !important; /* MINIMUM 14px */
    padding: 7px 6px !important;
  }
  
  .search-btn {
    padding: 10px 14px !important;
    font-size: 14px !important; /* Up from 12px */
  }
  
  /* Buttons */
   .btn-xl  { padding: 17px 22px !important;font-size: 22px; }
.btn-lg  { padding: 15px 20px !important; font-size: 18px; }
.btn-md  { padding: 13px 18px !important; font-size: 16px; }
.btn-sm  { padding: 10px  16px !important; font-size: 15px; }
  /* Navigation */
  .nav-link {
    font-size: 16px !important;
    padding: 14px 0 !important;
  }
  
  /* Dropdown */
  .dd-group-label {
    font-size: 13px !important;
    font-weight: 700;
  }
  
  .dd-item-query {
    font-size: 16px !important;
  }
  
  .dd-item-service {
    font-size: 14px !important;
  }
  
  /* Quick picks */
  .qp-chip {
    font-size: 15px !important;
    padding: 8px 14px !important;
  }
  
  /* Lead text */
  .lead {
    font-size: 25px !important;
  }
  
  /* Cards and feature text */
  .why-grid,
  .service-grid,
  .faq-item {
    font-size: 18px !important;
  }
}

/* ============================================================
   EXTRA SMALL MOBILE (380px and below - very small phones)
============================================================ */
@media (max-width: 390px) {
  
  /* Keep text readable even on tiny screens */
  body {
    font-size: 16px; /* Don't go below 15px */
  }
  
  /* Titles */
  .sec-title {
    font-size: clamp(22px, 6vw, 28px) !important;
    line-height: 1.25;
  }
  
  .sec-sub {
    font-size: 15px !important; /* Maintain readability */
  }
  
  /* Search - CRITICAL SIZES */
  .search-input,
  #serviceSearch {
    font-size: 16px !important; /* NEVER below 16px */
  }
  
  .search-zip,
  #searchZip {
    width: 60px !important;
    min-width: 60px !important;
    font-size: 14px !important; /* ABSOLUTE minimum */
    padding: 6px 4px !important;
  }
  
  .search-btn {
    padding: 9px 12px !important;
    font-size: 16px !important; /* Don't go below 14px */
  }
  
  .search-icon {
    font-size: 16px !important; /* Up from 15px */
  }
  
  /* Buttons - maintain tap targets */
  .btn {
    min-height: 44px; /* iOS minimum tap target */
  }
  
  .btn-lg { 
    font-size: 20px !important;
    padding: 13px 20px !important;
  }
  .btn-md { 
    font-size: 18px !important;
    padding: 11px 18px !important;
  }
  .btn-sm { 
    font-size: 16px !important;
    padding: 10px 16px !important;
  }
  
  /* Dropdown items */
  .dd-item-query {
    font-size: 15px !important; /* Keep readable */
  }
  
  .dd-item-service {
    font-size: 14px !important;
  }
  
  .dd-group-label {
    font-size: 14px !important;
  }
  
  /* Quick picks */
  .qp-label {
    font-size: 14px !important;
  }
  
  .qp-chip {
    font-size: 14px !important;
    padding: 7px 12px !important;
  }
   .btn-xl  { padding: 14px 20px !important;font-size: 18px; }
.btn-lg  { padding: 12px 22px !important; font-size: 16px; }
.btn-md  { padding: 10px 18px !important; font-size: 14px; }
.btn-sm  { padding: 8px  16px !important; font-size: 12px; }
}

/* ============================================================
   ULTRA SMALL (320px - iPhone SE, older Android)
   PRIORITY: Maintain readability over perfect layout
============================================================ */
@media (max-width: 320px) {
  
  /* Base text - NEVER go below 14px for body */
  body {
    font-size: 14px; /* Absolute minimum */
    line-height: 1.6;
  }
  
  /* Titles - scale down but keep proportional */
  .sec-title {
    font-size: clamp(20px, 7vw, 26px) !important;
    line-height: 1.3;
  }
  
  .sec-sub {
    font-size: 14px !important; /* Minimum acceptable */
    line-height: 1.6;
  }
  
  /* Search - ABSOLUTE MINIMUMS */
  .search-input,
  #serviceSearch {
    font-size: 16px !important; /* iOS requires 16px to prevent zoom */
  }
  
  .search-zip,
  #searchZip {
    width: 55px !important;
    min-width: 55px !important;
    font-size: 14px !important; /* Don't go below 14px */
    padding: 6px 3px !important;
    text-align: center;
  }
  
  .search-btn {
    padding: 8px 10px !important;
    font-size: 14px !important; /* Minimum */
  }
  
  .search-icon {
    font-size: 15px !important;
  }
  
  /* Buttons - ensure tappable */
  .btn {
    min-height: 44px; /* iOS requirement */
  }
  
  .btn-lg { 
    font-size: 15px !important;
    padding: 12px 18px !important;
  }
  .btn-md { 
    font-size: 14px !important;
    padding: 10px 16px !important;
  }
  .btn-sm { 
    font-size: 14px !important;
    padding: 9px 14px !important;
  }
  
  /* Dropdown - maintain hierarchy */
  .dd-item-query {
    font-size: 14px !important; /* Minimum readable */
    font-weight: 600; /* Bold helps readability */
  }
  
  .dd-item-service {
    font-size: 12px !important; /* Secondary text can be smaller */
  }
  
  .dd-group-label {
    font-size: 11px !important;
    font-weight: 700;
    letter-spacing: 0.8px;
  }
  
  /* Navigation */
  .nav-link {
    font-size: 15px !important;
    padding: 12px 0 !important;
  }
  
  /* Quick picks - maintain usability */
  .qp-chip {
    font-size: 13px !important; /* Slight reduction OK for chips */
    padding: 7px 11px !important;
    min-height: 36px; /* Ensure tappable */
  }
  
  .qp-label {
    font-size: 13px !important;
  }
  
  /* Cards and content */
  .why-grid,
  .service-grid,
  .faq-item {
    font-size: 14px !important;
    line-height: 1.6;
  }
  
  /* Eyebrow */
  .eyebrow {
    font-size: 11px !important;
    padding: 4px 10px !important;
  }
}

/* ============================================================
   ACCESSIBILITY ENHANCEMENTS (all mobile)
============================================================ */
@media (max-width: 768px) {
  
  /* Ensure good contrast */
  body {
    color: #1f2937; /* Darker for better readability */
  }
  
  /* Increase tap target sizes */
  a, button, .btn, .qp-chip, .dd-item {
    min-height: 44px; /* iOS minimum */
    min-width: 44px; /* iOS minimum */
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  
  /* Better spacing for readability */
  p, .sec-sub {
    margin-bottom: 1em;
    line-height: 1.65;
  }
  
  /* Improve form inputs */
  input, select, textarea {
    font-size: 16px !important; /* Prevents zoom on iOS */
    padding: 12px !important;
    border-width: 2px; /* Easier to see */
  }
  
  /* Better placeholder visibility */
  ::placeholder {
    color: #6b7280 !important; /* Darker gray */
    opacity: 0.8;
  }
}

/* ============================================================
   FONT WEIGHT ADJUSTMENTS FOR MOBILE
   Bolder text = Better readability at small sizes
============================================================ */
@media (max-width: 640px) {
  
  /* Make body text slightly bolder */
  body {
    font-weight: 400; /* Ensure normal weight minimum */
  }
  
  /* Strengthen important text */
  .sec-title {
    font-weight: 800; /* Extra bold for titles */
  }
  
  .btn {
    font-weight: 700; /* Extra bold for buttons */
  }
  
  .dd-item-query {
    font-weight: 600; /* Semi-bold for better scan */
  }
  
  .nav-link {
    font-weight: 500; /* Medium weight */
  }
  
  /* Quick pick chips */
  .qp-chip {
    font-weight: 600;
  }
}

/* ============================================================
   LINE HEIGHT OPTIMIZATION
   Better spacing = Better readability
============================================================ */
@media (max-width: 768px) {
  
  /* Generous line height for paragraphs */
  p, .sec-sub, body {
    line-height: 1.7;
  }
  
  /* Titles need less */
  h1, h2, h3, h4, .sec-title {
    line-height: 1.3;
  }
  
  /* Lists */
  li {
    line-height: 1.6;
    margin-bottom: 0.5em;
  }
  
  /* Buttons */
  .btn {
    line-height: 1.4;
  }
}

/* ============================================================
   LETTER SPACING FOR CLARITY
============================================================ */
@media (max-width: 640px) {
  
  /* Slight letter spacing improves readability */
  body, p, .sec-sub {
    letter-spacing: 0.01em;
  }
  
  /* Buttons benefit from more spacing */
  .btn {
    letter-spacing: 0.02em;
  }
  
  /* Keep uppercase tight */
  .eyebrow, .dd-group-label {
    letter-spacing: 0.05em;
  }
}