/* Mobile-only responsive layer for the legacy Top Escort table layout. */
.mobile-nav-top {
  display: none;
}

@media (max-width: 1100px) {
  html,
  body.site-top-page {
    width: 100%;
    max-width: 100%;
    margin: 0;
    overflow-x: hidden;
  }

  body.site-top-page,
  body.site-top-page * {
    box-sizing: border-box;
  }

  .mobile-nav-top {
    display: flex;
    position: relative;
    z-index: 20;
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    align-items: center;
    justify-content: center;
    gap: 8px 16px;
    flex-wrap: wrap;
    background: #5c6431;
    border-bottom: 3px solid #93754f;
  }

  .mobile-nav-top a,
  .mobile-nav-top a:link,
  .mobile-nav-top a:visited {
    color: #fff;
    font: 700 13px/1.4 Arial, sans-serif;
    text-decoration: none;
    white-space: nowrap;
  }

  body.site-top-page table,
  body.site-top-page tbody,
  body.site-top-page tr,
  body.site-top-page td {
    max-width: 100% !important;
    min-width: 0 !important;
  }

  body.site-top-page table[width],
  body.site-top-page .outer-layout-top {
    width: 100% !important;
    max-width: 100% !important;
  }

  body.site-top-page table[height],
  body.site-top-page tr[height],
  body.site-top-page td[height] {
    height: auto !important;
    min-height: 0 !important;
  }

  body.site-top-page img {
    max-width: 100% !important;
    height: auto !important;
  }

  body.site-top-page p,
  body.site-top-page td,
  body.site-top-page a,
  body.site-top-page span,
  body.site-top-page div {
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.site-top-page input,
  body.site-top-page textarea,
  body.site-top-page select {
    max-width: 100% !important;
  }

  /* Remove only the decorative left and right rails at mobile widths. */
  .outer-layout-top > tbody > tr > td:not([colspan]):first-child,
  .outer-layout-top > tbody > tr > td:not([colspan]):last-child {
    display: none !important;
  }

  .outer-layout-top > tbody > tr > td:not([colspan]):nth-child(2) {
    display: table-cell !important;
    width: 100% !important;
  }

  .outer-layout-top > tbody > tr:first-child > td[colspan] > table > tbody > tr:first-child > td:first-child,
  .outer-layout-top > tbody > tr:first-child > td[colspan] > table > tbody > tr:first-child > td:last-child {
    display: none !important;
  }

  .outer-layout-top > tbody > tr:first-child > td[colspan] > table > tbody > tr:first-child > td:nth-child(2) {
    display: table-cell !important;
    width: 100% !important;
  }

  /* City galleries: four desktop columns become two readable phone columns. */
  .model-grid-top,
  .model-grid-top > tbody {
    display: block !important;
    width: 100% !important;
  }

  .model-grid-top > tbody > tr {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .model-grid-top > tbody > tr > td {
    display: block !important;
    width: 100% !important;
    padding: 7px 5px !important;
    text-align: center;
  }

  .model-grid-top img {
    display: block;
    width: auto !important;
    margin: 0 auto;
  }

  /* Model detail photo and facts stack vertically. */
  .model-profile-top,
  .model-profile-top > tbody {
    display: block !important;
    width: 100% !important;
  }

  .model-profile-top > tbody > tr:first-child {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
  }

  .model-profile-top > tbody > tr:first-child > td {
    display: block !important;
    width: 100% !important;
    padding: 8px !important;
  }

  /* Service choices remain compact and tap-friendly. */
  .service-grid-top,
  .service-grid-top > tbody {
    display: block !important;
    width: 100% !important;
  }

  .service-grid-top > tbody {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-grid-top > tbody > tr {
    display: contents !important;
  }

  .service-grid-top > tbody > tr > td {
    display: block !important;
    width: 100% !important;
    min-height: 44px;
    padding: 10px 8px !important;
  }

  /* Footer contact/order form uses the full viewport instead of a squeezed half. */
  .outer-layout-top form,
  .outer-layout-top form > table {
    width: 100% !important;
    max-width: 100% !important;
  }

  .outer-layout-top form input:not([type="hidden"]),
  .outer-layout-top form textarea,
  .outer-layout-top form select {
    width: 100% !important;
    min-width: 0 !important;
  }
}

@media (max-width: 430px) {
  .mobile-nav-top {
    gap: 8px 12px;
  }

  .mobile-nav-top a {
    font-size: 12px;
  }

  body.site-top-page .pt,
  body.site-top-page .pt1,
  body.site-top-page .t2 {
    line-height: 1.55;
  }
}
