/* Smartphone-only layout adjustments. Desktop styles are not changed. */
@media screen and (max-width: 768px) {
  /* Header: center the logo and reduce the gap above the category navigation. */
  .site-header .header-table,
  .site-header .header-table > tbody,
  .site-header .header-table > tbody > tr,
  .site-header .header-table > tbody > tr > td {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  .site-header .header-table > tbody > tr > td:first-child {
    padding-top: 8px !important;
    padding-bottom: 2px !important;
    text-align: center !important;
  }

  .site-header .header-table > tbody > tr > td:nth-child(2) {
    padding-top: 0 !important;
  }

  .site-header .brand-logo {
    display: block !important;
    width: auto !important;
    max-width: min(216px, 82vw) !important;
    height: auto !important;
    margin: 0 auto !important;
  }

  /* Category navigation: horizontal scrolling with the active item centered by mobile.js. */
  .site-header .nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 2px 8px 7px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    box-sizing: border-box !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-behavior: auto;
  }

  .site-header .nav::-webkit-scrollbar {
    display: none;
  }

  .site-header .nav::before,
  .site-header .nav::after {
    content: "";
    flex: 0 0 50% !important;
    height: 1px;
    pointer-events: none;
  }

  /* On the top page, start the category navigation from the left. */
  .site-header .nav.nav-home-start::before,
  .site-header .nav.nav-home-start::after {
    flex-basis: 0 !important;
    width: 0 !important;
  }

  .site-header .nav a {
    display: inline-block !important;
    flex: 0 0 auto !important;
    white-space: nowrap !important;
  }

  /* Four-card sections: show two cards per row on smartphones. */
  table.layout-4 {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  table.layout-4 > tbody {
    display: block !important;
    width: 100% !important;
  }

  table.layout-4 > tbody > tr {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    width: 100% !important;
  }

  table.layout-4 > tbody > tr > td {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    padding: 0 !important;
    vertical-align: top !important;
  }

  table.layout-4 .card {
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }
  /* Keep the Europe & United Kingdom image at the same mobile width as the other cards. */
  table.layout-4 img[src="norigate-003.jpg"] {
    display: block !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    aspect-ratio: 260 / 163;
    object-fit: cover;
  }

}

.footer-about-mobile {
  display: none;
}

/* Smartphone footer only: two-column first row and centered Information second row. */
@media screen and (max-width: 768px) {
  .footer .footer-table,
  .footer .footer-table > tbody,
  .footer .footer-table > tbody > tr {
    display: block !important;
    width: 100% !important;
  }

  .footer .footer-table > tbody > tr {
    display: grid !important;
    grid-template-columns: minmax(0, 65%) minmax(0, 35%) !important;
    grid-template-rows: auto auto !important;
    column-gap: 16px !important;
    row-gap: 14px !important;
    align-items: start !important;
  }

  .footer .footer-table > tbody > tr > td {
    display: block !important;
    width: auto !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  .footer .footer-table > tbody > tr > td:nth-child(1) {
    grid-column: 1 !important;
    grid-row: 1 !important;
  }

  .footer .footer-table > tbody > tr > td:nth-child(2) {
    grid-column: 2 !important;
    grid-row: 1 !important;
  }

  .footer .footer-table > tbody > tr > td:nth-child(3) {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    text-align: center !important;
  }

  .footer .footer-table > tbody > tr > td:nth-child(3) strong {
    display: block !important;
    margin-bottom: 3px !important;
  }

  .footer .footer-table > tbody > tr > td:nth-child(3) br {
    display: none !important;
  }

  .footer .footer-table > tbody > tr > td:nth-child(3) a {
    display: inline-block !important;
    margin: 0 8px 3px !important;
  }

  .footer .footer-company-suffix {
    display: none !important;
  }

  .footer .footer-about-mobile {
    display: inline-block !important;
  }

  .footer .footer-table > tbody > tr > td:nth-child(3) a {
    margin-left: 5px !important;
    margin-right: 5px !important;
    white-space: nowrap !important;
  }

  .footer .copyright {
    width: 100% !important;
    text-align: center !important;
  }
}
