/* Mobile layout for the existing AERZEN theme. Desktop styles stay in style.css. */
@media screen and (max-width: 920px) {
  body { font-size: 16px; line-height: 1.5; }
  .wrapper { width: 100%; box-sizing: border-box; }
  .header { height: auto; background: #fff; }
  .logo { position: static; width: 303px; max-width: calc(100% - 32px); height: auto; padding: 16px; }
  .logo img { display: block; max-width: 100%; height: auto; }
  .main_menu, .region-header { width: 100%; }
  .region-header { display: flex; flex-direction: column; }
  .header .top_phone { position: static; font-size: 20px; line-height: 1.5; margin: 0 16px; }
  .header #block-system-user-menu { position: static; padding: 8px 16px; }
  .header #block-block-8 { order: 1; }
  .header .facebook { position: static; width: auto; margin: 0 16px 12px; font-size: 13px; }
  .header .facebook::after { content: ''; display: block; clear: both; }
  .header .facebook p { margin-left: 70px; }
  .header div.block-search { position: relative; order: 2; top: auto; right: auto; width: auto; height: auto; margin: 0 16px 16px; }
  .header div.block-search .form-item { display: block; margin: 0; padding-right: 52px; }
  .header div.block-search input.form-text { box-sizing: border-box; width: 100%; min-height: 44px; margin: 0; font-size: 16px; }
  .header div.block-search input.form-submit { top: 0; width: 44px; height: 44px; }
  .header #block-system-main-menu { position: static; order: 3; width: 100%; background: #b34818; }
  .header #block-system-main-menu ul.menu { display: flex; flex-wrap: wrap; }
  .header #block-system-main-menu ul.menu li { float: none; flex: 1 1 160px; }
  .header #block-system-main-menu ul.menu li a,
  .header #block-system-main-menu ul.menu li a:hover,
  .header #block-system-main-menu ul.menu li a.active { box-sizing: border-box; height: auto; min-height: 48px; padding: 12px; font-size: 16px; line-height: 24px; border: 1px solid rgba(255,255,255,.15); }
  .bottom_header { position: static; width: 100%; height: auto; aspect-ratio: 900 / 210; background-size: contain; }
  .middle, body.front .middle { border-left: 0; display: flex; flex-direction: column; }
  .container { float: none; width: 100%; margin-right: 0; overflow: visible; min-width: 0; }
  .content_content, body.front .content_content { padding: 20px 16px; border: 0; }
  .left-sidebar, body.front .left-sidebar { float: none; left: auto; width: auto; padding: 20px 16px; border: 0; min-width: 0; }
  body.front .left-sidebar { order: -1; }
  .middle p { line-height: 1.6; }
  .middle h1 { font-size: 26px; line-height: 1.3; margin-bottom: 20px; }
  .middle h2 { font-size: 20px; line-height: 1.4; }
  .middle h3 { font-size: 18px; line-height: 1.4; }
  .middle img { max-width: 100%; height: auto !important; box-sizing: border-box; }
  .middle iframe { max-width: 100%; }
  .middle .field-item { min-width: 0; overflow-wrap: anywhere; }
  .middle table { display: block; max-width: 100%; overflow-x: auto; }
  .region-menu div.block-menu ul.menu li { padding-top: 6px; padding-bottom: 6px; }
  .region-menu div.block-menu ul.menu a { display: inline-block; padding: 6px 0; }
  .middle a[href^="tel:"], .middle a[href^="mailto:"] { display: inline-block; padding: 6px 0; }
  a#fancy-contact { display: inline-block; box-sizing: border-box; max-width: 100%; line-height: 1.5; padding: 12px 18px; }
  .webform-client-form input.form-text,
  .webform-client-form input.form-email,
  .webform-client-form textarea,
  #webform-client-form-83 input[type="text"],
  #webform-client-form-83 input[type="email"],
  #webform-client-form-83 textarea { box-sizing: border-box; width: 100%; max-width: 100%; font-size: 16px; margin-right: 0; }
  .webform-client-form .form-textarea-wrapper { max-width: 100%; }
  #webform-client-form-83 .grippie { box-sizing: border-box; width: 100%; }
  #webform-client-form-83 textarea { min-height: 120px; resize: vertical; }
  #webform-client-form-83 input[type="submit"] { min-height: 44px; margin-top: 16px; font-size: 16px; }
  .fancybox-wrap { width: 330px !important; max-width: calc(100vw - 32px); }
  .fancybox-skin { box-sizing: border-box; width: 100% !important; height: auto !important; }
  .fancybox-inner { width: 100% !important; max-height: calc(100vh - 80px); overflow: auto !important; }
  .footer { height: auto; min-height: 40px; padding: 8px 16px; background-color: #b34818; }
  .footer p { padding-top: 0; }
  a:focus-visible, input:focus-visible, textarea:focus-visible, button:focus-visible { outline: 2px solid #006ab3; outline-offset: 3px; }
}
@media screen and (max-width: 600px) {
  .header #block-system-main-menu ul.menu { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header #block-system-main-menu ul.menu li { min-width: 0; }
  .header #block-system-main-menu ul.menu li:last-child { grid-column: 1 / -1; }
  .header #block-system-main-menu ul.menu li a,
  .header #block-system-main-menu ul.menu li a:hover,
  .header #block-system-main-menu ul.menu li a.active { height: 100%; padding: 12px 6px; font-size: 14px; line-height: 22px; }
  #block-block-2 > .content > table,
  #block-block-2 > .content > table > tbody,
  #block-block-2 > .content > table > tbody > tr,
  #block-block-2 > .content > table > tbody > tr > td { display: block; width: auto; }
  #block-block-2 > .content > table > tbody > tr > td { padding: 16px 0 !important; border-left: 0 !important; }
  #block-block-2 > .content > table > tbody > tr > td + td { border-top: 1px solid #ddd; }
  #block-block-2 .content p { margin-bottom: 12px; }
}
