/* Minimal Mobile Fix */
@media only screen and (max-width: 768px) {
  /* Hide sidebar causing whitespace */
  .layout-sidebar-first {
    display: none !important;
  }
  
  /* Hide carousel on mobile */
  .appraisal-carousel,
  .view-appraisal-carousel,
  .slick-slider {
    display: none !important;
  }
  
  /* Hide desktop navigation on mobile */
  .region-primary-menu {
    display: none !important;
  }
  
  /* Hide desktop CTA banner on mobile - keep only mobile version */
  .cta-banner-wrapper,
  .banner-inner,
  #block-instappraisal-clean-freeappraisalcta,
  .free-appraisal-cta {
    display: none !important;
  }
  
  /* But keep the mobile banner visible */
  .mobile-only-appraisal-banner,
  .mobile-free-appraisal-banner {
    display: block !important;
  }
  
  /* Reduce whitespace around categories section on mobile */
  .homepage-categories-section {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }
  
  /* Also reduce any parent container spacing */
  .homepage-categories-section-wrapper,
  .region-content > .homepage-categories-section {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
  
  /* Reduce whitespace around latest appraisals heading */
  .latest-appraisals-heading,
  #latest-appraisals-heading,
  .heading-with-controls {
    margin-top: 10px !important;
    margin-bottom: 10px !important;
    padding-top: 5px !important;
    padding-bottom: 5px !important;
  }
  
  /* Also reduce spacing on the container */
  .latest-appraisals-section,
  .view-latest-appraisals {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
  
  /* Reduce whitespace above categories block */
  #block-instappraisal-homepage-categories,
  .block-instappraisal-homepage-categories {
    margin-top: 10px !important;
    padding-top: 0 !important;
  }
  
  /* Also reduce spacing on parent containers */
  .region-content > #block-instappraisal-homepage-categories {
    margin-top: 10px !important;
  }
  
  /* Fix filter dropdown on mobile to prevent off-screen wrap */
  .filter-dropdown,
  .views-exposed-form select,
  select[name*="filter"],
  .form-select {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  /* Ensure filter form container doesn't overflow */
  .views-exposed-form,
  .filter-wrapper,
  .view-filters {
    max-width: 100% !important;
    padding: 0 10px !important;
    box-sizing: border-box !important;
  }
  
  /* Make filter dropdowns stack vertically on small screens */
  @media only screen and (max-width: 480px) {
    .views-exposed-form .form-item {
      width: 100% !important;
      margin-right: 0 !important;
      margin-bottom: 10px !important;
    }
    
    .views-exposed-form {
      display: flex !important;
      flex-direction: column !important;
      align-items: stretch !important;
    }
  }
}