/* =========================================================
   MOBILE: AdSense anchor (small strip) footer clearance
========================================================= */
@media (max-width: 782px){
  body{
    padding-bottom: calc(72px + env(safe-area-inset-bottom)) !important;
  }
}

@media (max-width: 782px){
  .site-footer{
    margin-bottom: calc(72px + env(safe-area-inset-bottom)) !important;
  }
}

/* =========================================================
   RESPONSIVE OVERRIDES (KEEP AT VERY BOTTOM OF FILE)
   - Ad rules removed (they now live in ADSENSE above)
========================================================= */

/* Tablet + down: header/search layout + single column restaurant */
@media (max-width: 900px){
  #rm-primary-nav{ display: none !important; }
  .rm-header-inner{ flex-wrap: wrap; }

  .rm-search-container{
    width: 100% !important;
    max-width: 100% !important;
    order: 10;
    margin-top: 12px;
  }

}

/* Desktop/tablet: tighter toolbar spacing + slimmer filters */
@media (min-width: 783px){
  .rm-search-header{ margin: 14px 0 14px; }
  form.rm-search-filters{ margin: 0 0 10px; }
  .rm-pagination--top{ margin: 10px 0 12px; }
  .rm-pagination{ margin: 8px 0 14px; }

  .rm-search-filters select,
  .rm-search-filters .rm-filter--check,
  .rm-search-filters .rm-filter-reset{
    font-size: 12px !important;
    font-weight: 600;
  }

  .rm-search-filters .rm-filter--check,
  .rm-search-filters .rm-filter-reset{
    height: 40px;
    line-height: 1;
    padding: 0 14px;
    border-radius: 12px;
  }

  .rm-search-filters select{
    height: 40px;
    line-height: 1;
    width: 420px;
    max-width: 70vw;
    padding: 0 44px 0 16px;
    border-radius: 12px;
  }

  .rm-search-filters .rm-filter-row{ gap: 10px; }
}

/* Mobile: general layout (NON-ADS) */


@media (max-width: 782px){
  .restaurant-wrapper{ padding: 26px 14px; }
  .rm-header{ padding: 12px 0; }
  .rm-header-inner{
    padding: 0 14px;
    gap: 12px;
  }

  .rm-logo-mark img.custom-logo{ width: 38px; height: 38px; }
  .rm-logo-text{ font-size: 22px; }
  .rm-tagline{ font-size: 12px; }

  .box-card{ padding: 16px; margin: 16px 0 18px; }
  .restaurant-menu h3{ margin-left: 0; }
  .restaurant-menu h3 + p{ margin-left: 12px; }

  .restaurant-menu h4{ margin-left: 8px; padding-left: 10px; }
  .restaurant-menu h4 + p{ margin-left: 22px; }
  .restaurant-menu p + p{ margin-left: 22px; }

  .site-footer .footer-navigation a{ padding: 12px 14px !important; }

  body.home .rm-home-hero{ display: none !important; }
}


/* =========================================================
   MOBILE: pull restaurant title higher
========================================================= */
@media (max-width: 782px){

  /* tighten the page content top spacing */
  main.site-main,
  #primary,
  .site-main{
    padding-top: 0 !important;
    margin-top: 0 !important;
  }

  /* tighten wrapper spacing (your custom wrapper) */
  .restaurant-wrapper{
    padding-top: 8px !important;
    margin-top: 0 !important;
  }

  /* kill the big default H1 margin and pull it up */
  .restaurant-wrapper h1{
    margin: 6px 0 10px !important;
    line-height: 1.08;
  }

  /* if you have a generic content wrapper adding padding */
  .entry-content{
    margin-top: 0 !important;
    padding-top: 0 !important;
  }
}


/* Footer stack */
@media (max-width: 700px){
  .site-footer .rm-footer-inner{
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
  }
  .site-footer .footer-navigation-wrapper,
  .site-footer .footer-navigation ul{ justify-content: center !important; }
  .site-footer .site-name{ justify-content: center !important; }
}
