/* Responsive layer for the fixed 980px desktop design.
   Desktop (>1000px) is untouched; everything below only applies on narrower screens. */

img { max-width: 100%; }

@media (max-width: 1000px) {
  body { font-size: 14px; line-height: 21px; -webkit-text-size-adjust: 100%; }

  /* containers become fluid */
  #hbfnav-wrap, #fwrap, #content-main {
    width: auto !important; max-width: 980px; padding: 0 16px; box-sizing: border-box;
  }
  #hbfnav-wrap:after, #content-main:after, #fwrap:after, #fnavs:after { content: ""; display: table; clear: both; }

  /* header + navigation */
  header { width: 100%; height: auto; }
  #logo { width: auto; height: auto; padding: 10px 0; }
  #logo img { width: 150px; height: auto; }
  nav { width: 100%; height: auto; text-align: left; border-top: 1px solid #e4e4e4; }
  nav a { display: inline-block; font-size: 14px; line-height: 40px; padding: 0 10px 0 0; margin-right: 6px; }
  nav a:hover { background: transparent; color: #CF2A2C; }

  /* title strip, banners */
  #page-title { width: 100% !important; height: auto; padding: 10px 16px; box-sizing: border-box; background-size: cover; }
  #banner, #inner-banner, #sshadow { width: 100% !important; height: auto !important; }
  #inner-banner img, #banner img { width: 100% !important; height: auto !important; }
  #slider, .nivoSlider { width: 100% !important; height: auto !important; }
  #slider img, .nivoSlider img { width: 100% !important; height: auto !important; max-width: none; }

  /* home page cards */
  #fnavs { width: 100% !important; margin-top: 24px; padding: 0 16px 20px; box-sizing: border-box; }
  .fnavbox { width: 48% !important; margin: 0 1% 20px !important; height: auto !important; }
  .fnavbox li.title, .fnavbox li.wbox, .fnavbox li.wbox img { width: 100% !important; }
  .fnavbox li.wbox { height: auto !important; padding-bottom: 6px; }
  .fnavbox li.wbox img { height: auto !important; }
  .fnavbox li.wbox p { width: auto !important; height: auto !important; float: none !important; }
  .fnavbox li.wbox p.more { width: auto !important; height: auto !important; float: none !important; text-align: right; }

  /* inner pages: sidebar above content */
  #left-col, #right-col { float: none; width: 100% !important; margin: 20px 0; }
  #right-col { border-left: 0; }
  #right-col p, #content-main p { text-align: left; }
  #subnav, #subnav li { width: 100% !important; }

  /* agencies listing */
  .agny-listing, .agny-listing li, .agny-listing li.det { width: 100% !important; }
  .agny-listing li.det img { width: 30% !important; height: auto !important; }
  .agny-listing li.det span { width: 66% !important; box-sizing: border-box; }

  /* contact page: inline-styled table layout + form */
  #content-main table { width: 100% !important; }
  #content-main table td { display: block; width: auto !important; }
  .form, .form_row, .main_textarea, #content-main input[type=text], #content-main textarea, #content-main select {
    width: 100% !important; max-width: 100%; box-sizing: border-box;
  }
  #content-main iframe { max-width: 100%; }
  #content-main h5 { width: auto !important; height: auto !important; }

  /* footer */
  #footer-wrap { height: auto; padding-bottom: 10px; }
  #logos { width: 100% !important; padding-left: 0; box-sizing: border-box; overflow: hidden; }
  #cr { width: 100% !important; height: auto; padding: 10px 0; }
  #cr p.lhs, #cr p.rhs { float: none; text-align: left; }
}

@media (max-width: 600px) {
  .fnavbox { width: 100% !important; margin: 0 0 20px !important; }
  nav a { font-size: 13px; line-height: 36px; padding-right: 8px; }
  #page-title h3 { font-size: 18px; }
  .agny-listing li.det img, .agny-listing li.det span { float: none; display: block; width: 100% !important; border-left: 0; }
}

@media (max-width: 1000px) {
  /* column fixes: no overflow from padding, floats cleared, inline justify overridden */
  #left-col, #right-col { box-sizing: border-box; }
  #right-col { padding-left: 0 !important; overflow-wrap: break-word; }
  #left-col:after, #right-col:after { content: ""; display: table; clear: both; }
  #subnav { float: none !important; }
  #subnav li { float: none !important; }
  #content-main p, #right-col p, #right-col span { text-align: left !important; }
  #right-col img, #right-col table { max-width: 100% !important; height: auto; }
  #right-col h1 { font-size: 22px; line-height: 28px; }
}

@media (max-width: 1000px) {
  #content-main input.main_input, #content-main input[type=email], #content-main input[type=tel] { width: 100% !important; box-sizing: border-box; }
}

/* all widths: the contact page's inline-styled tables carry empty spacer cells that push past the container */
#content-wrap { overflow-x: hidden; }
