/* Mobile layout for the existing bgtaxi theme. Desktop rules remain in the original stylesheets. */
#bgtaxi-menu-toggle, .bgtaxi-submenu-toggle { display: none; }

@media screen and (max-width: 1023px) {
  html { margin-bottom: 0; }
  body, body.f-default, body.f-smaller, body.f-larger { font-size: 16px; line-height: 1.5; background: #fff; }
  td { font-size: inherit; line-height: 1.5; }
  .wrapper { width: 100% !important; max-width: 100%; margin: 0 auto !important; box-sizing: border-box; }
  #masthead { display: flex; flex-direction: column; align-items: center; height: auto; min-height: 0; padding: 0 12px 8px; }
  #masthead > a.nounder { display: block; order: 0; width: 100%; max-width: 320px; }
  #logo { display: block; width: 100%; height: auto; aspect-ratio: 435 / 127; background-size: 100% 100%; }
  #masthead .bgtaxi-brand-caption { position: static !important; order: 1; margin: -5px 0 0; font-size: 22px !important; line-height: 1.2 !important; text-align: center; }
  #mod-top { position: static; order: 2; width: 100%; height: auto; }
  #mod-top .top3 { width: 100%; height: auto; }
  #mod-top .padding { padding: 8px 0 0; }

  #primary-nav { position: relative; z-index: 60; background: #f5f5f5; border-top: 1px solid #ddd; border-bottom: 1px solid #ddd; }
  #primary-nav .nav2, #primary-nav .nav3 { background: none; }
  .bgtaxi-nav-ready #bgtaxi-menu-toggle { display: block; width: calc(100% - 24px); min-height: 46px; margin: 8px 12px; padding: 10px 14px; border: 1px solid #ccc; border-radius: 4px; color: #e57300; background: linear-gradient(#fff, #ececec); font: bold 17px/1.4 Tahoma, Arial, sans-serif; text-align: left; cursor: pointer; }
  #bgtaxi-menu-toggle[aria-expanded="true"] { border-color: #ed810e; }
  #horiz-menu { height: auto; }
  #horiz-menu ul, #horiz-menu ul.nav { float: none; width: auto; margin: 0; padding: 0; }
  .bgtaxi-nav-ready #horiz-menu > ul { display: none; }
  .bgtaxi-nav-ready.bgtaxi-nav-open #horiz-menu > ul { display: block; }
  #horiz-menu li, #horiz-menu li li { position: relative; float: none; width: auto; margin: 0; padding: 0; background: none; }
  #horiz-menu a, #horiz-menu li li a { display: block; float: none; width: auto; height: auto; min-height: 46px; box-sizing: border-box; padding: 12px 16px; border-bottom: 1px solid #ddd; font: bold 16px/1.4 Tahoma, Arial, sans-serif; text-indent: 0; white-space: normal; background: none !important; }
  #horiz-menu li.active > a, #horiz-menu li.active > span > a, #horiz-menu a:focus-visible { border-left: 4px solid #f3800e; padding-left: 12px; background: #fff4e7 !important; color: #111; }
  #horiz-menu .bgtaxi-has-submenu > a, #horiz-menu .bgtaxi-has-submenu > span > a { padding-right: 62px; }
  #horiz-menu ul ul, #horiz-menu li:hover ul, #horiz-menu li.sfHover ul { position: static !important; float: none; top: auto !important; left: auto !important; width: auto !important; height: auto !important; opacity: 1 !important; overflow: visible !important; margin: 0; padding: 0 0 0 12px; border: 0; background: #fafafa; }
  .bgtaxi-nav-ready #horiz-menu ul ul { display: none !important; }
  .bgtaxi-nav-ready #horiz-menu li.bgtaxi-submenu-open > ul { display: block !important; }
  .bgtaxi-nav-ready #horiz-menu .bgtaxi-submenu-toggle { display: block; position: absolute; top: 0; right: 4px; width: 46px; height: 46px; padding: 0; border: 0; border-left: 1px solid #ddd; background: transparent; color: #d96c00; font: bold 22px/1 Arial, sans-serif; cursor: pointer; }
  #horiz-menu .bgtaxi-submenu-toggle[aria-expanded="true"] { transform: rotate(180deg); border-left: 0; border-right: 1px solid #ddd; }
  #bgtaxi-menu-toggle:focus-visible, .bgtaxi-submenu-toggle:focus-visible { outline: 3px solid #333; outline-offset: -3px; }

  #mainbody { display: flex; flex-direction: column; padding: 0; }
  #inset { order: 0; flex: 0 0 auto; width: 100%; height: 132px; box-sizing: border-box; margin: 0; background-position: center center; background-repeat: no-repeat; background-size: auto 132px; background-color: #f58205; }
  #inset > div[style*="margin-left"] { margin-left: 0 !important; padding: 4px 10px; text-align: right; font-size: 12px; }
  #content { order: 1; float: none; width: auto; min-width: 0; margin: 0 !important; padding: 20px 16px 0; box-sizing: border-box; }
  #bottommodules { order: 2; float: none; width: auto; margin: 0 !important; padding: 0 16px; }
  #sidecol { order: 3; float: none; width: auto !important; margin: 24px 16px 0; min-width: 0; }
  #secondcol { order: 4; float: none; width: auto !important; margin: 0 16px; min-width: 0; }
  #sidecol .col2, #secondcol .col2 { padding: 12px 12px 0; }
  #topmodules, #component { float: none; width: 100%; min-width: 0; overflow: visible; }
  #component > .padding, #content.extraspace #component > .padding, #component > .padding > .padding2 { padding: 0; }
  #topmodules .block, #bottommodules .block, .spacer.w49 > .block, .spacer.w33 > .block { float: none; width: 100%; margin: 0; }
  .spacer div.module, .spacer div[class*="module-hilite"], .spacer div.module-quote { margin-left: 0; }
  #pathway { height: auto; padding: 0; margin-bottom: 12px; overflow-wrap: anywhere; }
  .componentheading { line-height: 1.3; }
  .contentheading { height: auto; font-size: 23px; line-height: 1.3; overflow-wrap: anywhere; }
  h1, h2, h3, h4 { height: auto; line-height: 1.35; }
  p, li, .detailsText, .comment-text { overflow-wrap: anywhere; }
  #component p[align="justify"], #component div[align="justify"], #component td[align="justify"], #component [style*="text-align: justify"], #component [style*="text-align:justify"] { text-align: left !important; }
  #component table { max-width: 100%; }
  #component td:not(.contentheading):not(.componentheading):not(.sectiontableheader) { font-size: 16px !important; }
  #component table.contentpaneopen, #component table.contentpane, #component table.blog { width: 100% !important; table-layout: fixed; }
  #component table.blog > tbody > tr > td { display: block; width: 100% !important; padding-left: 0; padding-right: 0; box-sizing: border-box; }
  #component table.blog > tbody > tr { display: block; }
  #component table.blog > tbody { display: block; }
  #component table[width="95%"] { width: 100% !important; table-layout: fixed; }
  #component table[width="95%"] > tbody > tr > td[width="50%"] { display: block; width: 100% !important; box-sizing: border-box; }
  #component table[width="96%"] { width: 100% !important; table-layout: fixed; }
  #component img, #mod-top img, #sidecol img, #secondcol img, #bottommodules img { max-width: 100%; height: auto; box-sizing: border-box; }
  #component iframe, #component video, #component object, #component embed { max-width: 100%; }
  #component .listingPhoto { float: none; display: block; margin: 0 auto 16px; }
  #component .listingSummary, #component .listingDetails, #component .comment-text { max-width: 100%; overflow-wrap: anywhere; font-size: 16px; line-height: 1.5; }
  #component a.subCatNormal, #component a.subCatFeatured { display: inline-block; min-height: 44px; box-sizing: border-box; padding: 8px 0; font-size: 16px; }
  #component a.bulletData { display: inline-block; min-height: 44px; box-sizing: border-box; padding: 6px 4px; }
  #component textarea, #component select, #component input, #sidecol input, #secondcol input { max-width: 100%; box-sizing: border-box; font-size: 16px; }
  #component textarea { width: 100% !important; }
  #component input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="image"]), #component select, #sidecol input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):not([type="image"]) { min-height: 44px; }
  #component div.commentBlogView { height: auto; line-height: 1.6; }
  #component div.show-comment, #component div.show-linkmore, #component div.show-hit, #component div.show-feed { float: none; display: inline-block; height: auto; min-height: 24px; }
  #sidecol a.mainlevel, #sidecol ul.sidenav a { display: block; min-height: 44px; box-sizing: border-box; padding: 10px 0; }
  #sidecol .module-search { width: 100%; height: auto; min-height: 44px; margin-bottom: 24px; background: none; }
  #sidecol .module-search input { width: 100%; min-height: 44px; margin: 0; padding: 10px; border: 1px solid #ccc; border-left: 6px solid #f3800e; background: #fff; }
  #sidecol input[name="searchword"] { width: 100%; min-height: 44px; padding: 8px; }
  #footermods { float: none; padding: 0 16px; }
  .webdesign { margin: 0; padding: 12px 16px; line-height: 1.8; overflow-wrap: anywhere; }
  /* Joomla category news lists: wrap titles while keeping hit counts readable. */
  #component table.bgtaxi-category-list { width: 100%; table-layout: auto; }
  #component table.bgtaxi-category-list td { width: auto !important; white-space: normal; overflow-wrap: anywhere; }
  #component table.bgtaxi-category-list td.bgtaxi-category-hits { width: 6.5em !important; white-space: nowrap; overflow-wrap: normal; }
}
