/* BBS Financial static site v2.0 — responsive enhancement.
   The original desktop template remains loaded before this stylesheet. */
body { min-width: 0; }
#footer .footer-content { float: none; width: 100%; min-width: 0; text-align: center; }
#header .phone-link, #main .phone-link { color: inherit; text-decoration: none; }
#header .phone-link:hover, #main .phone-link:hover,
#header .phone-link:focus-visible, #main .phone-link:focus-visible { color: #fff; background: #095197; text-decoration: underline; }
#header .mobile-menu-toggle, #header .mobile-search-submit { display: none; }
#header .mobile-menu-toggle:focus-visible, #header .mobile-search-submit:focus-visible,
.static-search button:focus-visible { outline: 2px solid #004b88; outline-offset: 2px; }

/* The original 960px desktop content needs its full width plus margins. */
@media screen and (max-width: 999px) {
  body { margin: 0; text-align: left; }
  #all, #back, #header, #contentarea, #wrapper2, #main, #footer {
    box-sizing: border-box; min-width: 0; max-width: 100%;
  }
  #all { width: 100%; font-size: 0.9375rem; }
  #all #header { padding-top: 0; font-size: 0.875rem; }
  #header .logoheader { margin: 0 !important; min-height: 0; background-size: cover; }
  #header h1#logo { box-sizing: border-box; width: auto; max-width: 100%; margin: 0; padding: 8px 12px; }
  #header #logo img { max-width: 100%; height: auto; }
  #header ul.menu#nav { position: static; display: flex; flex-wrap: wrap; margin: 0; padding: 0; width: auto; }
  #header ul.menu#nav li { display: block; flex: 1 1 auto; }
  #header ul.menu#nav li a:link, #header ul.menu#nav li a:visited {
    box-sizing: border-box; display: block; padding: 12px 10px; text-align: center; line-height: 1.4;
  }
  #header #line { position: static; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 16px; box-sizing: border-box; width: 100%; max-width: none; margin: 0; padding: 8px 12px !important; }
  #line form, #line form .search { display: flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; padding: 0; }
  #header form .inputbox, #header form .inputbox:focus { box-sizing: border-box; width: 13em; max-width: 100%; min-width: 0; margin: 0; padding: 9px; border: 1px solid #aaa; font-size: 16px; }
  #header .mobile-search-submit, #header .mobile-menu-toggle { font: inherit; cursor: pointer; color: #fff; background: #0d4c89; border: 1px solid #0d4c89; border-radius: 3px; min-height: 44px; padding: 8px 12px; }
  #header .mobile-search-submit { display: inline-block; }
  #contentarea { padding: 0 12px !important; }
  #wrapper2 { float: none; padding-bottom: 12px; }
  #main { min-height: 0; padding: 10px 0 20px; overflow-wrap: break-word; }
  #main h2 { font-size: 1.55em; line-height: 1.25; margin: 12px 0; }
  #main .item-page, #main .items-leading { overflow: visible; padding: 0; }
  #main img { max-width: 100%; height: auto; }
  #main .home-banner, #main .home-cards, #main .two-column-layout,
  #main .contact-layout, #main .newsletter-layout, #main .newsletter-inner {
    display: block; width: 100% !important; height: auto !important; box-sizing: border-box;
  }
  #main :is(.home-banner,.home-cards,.two-column-layout,.contact-layout,.newsletter-layout,.newsletter-inner) > tbody { display: block; }
  #main :is(.home-banner,.home-cards,.two-column-layout,.contact-layout,.newsletter-layout,.newsletter-inner) > tbody > tr { display: grid; grid-template-columns: minmax(0,1fr); gap: 14px; }
  #main :is(.home-banner,.home-cards,.two-column-layout,.contact-layout,.newsletter-layout,.newsletter-inner) > tbody > tr > td { display: block; width: auto !important; min-width: 0; height: auto !important; padding: 0 !important; box-sizing: border-box; }
  #main :is(.home-banner,.home-cards,.two-column-layout,.contact-layout,.newsletter-layout,.newsletter-inner) > tbody > tr > td > div,
  #main :is(.two-column-layout,.newsletter-layout) > tbody > tr > td > div > div {
    box-sizing: border-box; width: 100% !important; min-width: 0; max-width: 100%; height: auto !important;
  }
  #main .home-banner td > div { padding: 8px !important; }
  #main .home-banner img { display: block; width: 100%; }
  #main .home-cards td > div { padding: 14px !important; }
  #main .home-cards td > div > br { display: none; }
  #main .home-cards td > div > strong { display: block; margin-bottom: 12px; }
  #main .home-cards img { display: block; margin: 0 auto 14px; }
  #main .two-column-layout td > div[align="center"] { text-align: left; }
  #main .contact-layout > tbody > tr > td:last-child { display: none; }
  #main .contact-layout > tbody > tr > td:first-child > div { max-width: 480px; padding: 14px !important; }
  #main .office-hours { width: 100% !important; table-layout: fixed; border-spacing: 0; font-size: 0.875em; }
  #main .office-hours td { padding: 5px 3px !important; text-align: center; overflow-wrap: normal; }
  #main .newsletter-inner td > div { padding: 0 !important; }
  #main .newsletter-inner img { display: block; max-width: 152px; width: 100%; height: auto; }
  .static-search form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
  .static-search form label { flex: 0 0 100%; }
  .static-search input { box-sizing: border-box; width: auto; min-width: 0; flex: 1 1 120px; max-width: 100%; font-size: 16px; min-height: 44px; }
  .static-search button { min-height: 44px; font-size: 16px; }
  #footer { width: 100%; padding: 15px 12px; }
  #footer .footer-content { font-size: 0.875rem; line-height: 1.7; overflow-wrap: break-word; }
  #footer .footer-content a { display: inline-block; padding: 7px 5px; white-space: nowrap; }
  #footer .footer-separator { display: none; }
  #footer #copyright-year { white-space: nowrap; }
}
@media screen and (min-width: 640px) and (max-width: 999px) {
  #main .home-cards > tbody > tr { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #main .home-cards > tbody > tr > td:last-child { grid-column: 1/-1; }
  #main .home-cards td > div { height: 100% !important; }
  #main .two-column-layout > tbody > tr { grid-template-columns: minmax(0,2fr) minmax(0,1fr); }
  #main .newsletter-inner > tbody > tr { grid-template-columns: minmax(0,152px) minmax(0,1fr); }
}
@media screen and (max-width: 700px) {
  #all { font-size: 1rem; }
  #header .logoheader { background-position: center left; }
  #header h1#logo { padding: 8px 12px; }
  #header #logo img { width: 276px; }
  #header ul.menu#nav { display: block; }
  #header ul.menu#nav li a:link, #header ul.menu#nav li a:visited { text-align: left; min-height: 44px; padding: 12px 16px; border-bottom: 1px solid #ddd; border-right: 0; }
  /* If JS is unavailable all links remain visible. */
  #header.menu-enhanced .mobile-menu-toggle { display: flex; align-items: center; gap: 10px; box-sizing: border-box; width: 100%; border-radius: 0; background: #e0e0e0; color: #333; border: 0; border-bottom: 1px solid #ccc; text-align: left; font-weight: bold; }
  #header.menu-enhanced .mobile-menu-toggle .menu-icon { font-size: 20px; line-height: 1; }
  #header.menu-enhanced:not(.menu-open) ul.menu#nav { display: none; }
  #header #line { align-items: stretch; flex-direction: column; gap: 6px; }
  #header #line > span { text-align: center; }
  #header #line form, #header #line form .search { width: 100%; box-sizing: border-box; }
  #header form .inputbox, #header form .inputbox:focus { flex: 1 1 0; width: 0; min-width: 0; min-height: 44px; }
  #main h2 { font-size: 1.4em; }
}
@media screen and (max-width: 379px) {
  #main .office-hours { display: block; font-size: 0.875rem; }
  #main .office-hours tbody { display: block; }
  #main .office-hours tr { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px 0; }
  #main .office-hours td { display: block; }
}
