/* TD Tranzit: mobile-only layout, 2026-10-06. Original theme assets stay intact. */
@media only screen and (max-width: 767px) {
  /* A normal-flow mobile hero avoids Revolution Slider's desktop inline scaling. */
  #mfn-rev-slider.td-mobile-layout #rev_slider_1_1_wrapper {
    display: none !important;
  }

  #mfn-rev-slider .td-mobile-hero {
    box-sizing: border-box;
    position: relative;
    width: 100%;
    padding: 36px 20px 40px;
    color: #fff;
    background-color: #171b23;
    background-position: 72% center;
    background-size: cover;
    overflow: hidden;
  }

  .td-mobile-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(9, 14, 24, .18), rgba(9, 14, 24, .5));
    pointer-events: none;
  }

  .td-mobile-hero > * { position: relative; z-index: 2; }

  .td-mobile-hero > .td-mobile-video {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 72% center;
    pointer-events: none;
  }

  .td-mobile-hero .td-mobile-title {
    margin: 0 0 24px;
    font-family: Montserrat, sans-serif;
    font-size: clamp(27px, 7.6vw, 44px);
    font-weight: 800;
    line-height: 1.23;
    letter-spacing: -.5px;
    color: #d9d9d9;
  }

  .td-mobile-hero .td-mobile-intro {
    margin: 0 0 30px;
    font-family: "Exo 2", sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.45;
    white-space: normal;
    overflow-wrap: break-word;
  }

  .td-mobile-hero .td-mobile-call {
    display: block;
    margin: 0 0 24px;
  }

  .td-mobile-hero .td-mobile-phone {
    margin: 0;
    font-family: "Exo 2", sans-serif;
    font-size: 22px;
    line-height: 1.3;
    color: #fff;
  }

  .td-mobile-phone > span {
    display: block;
    margin-top: 3px;
    font-size: clamp(25px, 7.2vw, 30px);
    font-weight: 900;
    line-height: 1.25;
    white-space: nowrap;
  }

  .td-mobile-phone a {
    display: inline-block;
    padding: 4px 0;
    color: #fff;
    text-decoration: none;
  }

  .td-mobile-hero .td-mobile-call-note {
    margin-top: 6px;
    font-family: "Roboto Condensed", sans-serif;
    font-size: 14px;
    line-height: 1.4;
    color: #e0d9dc;
  }

  .td-mobile-hero .td-mobile-whatsapp {
    margin: 4px 0 0;
  }

  .td-mobile-whatsapp > a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-sizing: border-box;
    width: 100%;
    min-height: 50px;
    padding: 13px 20px;
    border: 2px solid #fff;
    border-radius: 30px;
    font-family: Montserrat, sans-serif;
    font-size: 16px;
    font-weight: 900;
    line-height: 1.25;
    letter-spacing: 1px;
    text-transform: uppercase;
    text-decoration: none;
    color: #fff;
    background: rgba(0, 0, 0, .12);
  }

  .td-mobile-hero a:focus-visible {
    outline: 3px solid #ffb12c;
    outline-offset: 4px;
  }

  /* Thirty categories: two columns, continuous vertical flow in source order. */
  #services {
    padding-bottom: 40px !important;
  }

  #services > .section_wrapper {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 16px;
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  #services > .section_wrapper::before,
  #services > .section_wrapper::after { display: none; }

  #services > .section_wrapper > .mcb-wrap { grid-column: 1 / -1; }

  #services .td-part-row,
  #services .td-part-row > .mcb-wrap-inner { display: contents; }

  #services .td-part-row::before,
  #services .td-part-row::after,
  #services .td-part-row > .mcb-wrap-inner::before,
  #services .td-part-row > .mcb-wrap-inner::after,
  #services .td-part-spacer,
  #services .td-parts-heading .column_divider { display: none; }

  #services .td-parts-heading .column { margin-bottom: 0; }
  #services .td-parts-heading h1 { margin-bottom: 0; }

  #services .td-part-row .column.one-fifth {
    float: none;
    clear: none;
    width: 100% !important;
    min-width: 0;
    margin: 0;
  }

  #services .td-part-row .column_attr {
    padding: 0 !important;
    text-align: center;
  }

  #services .td-part-row .image_frame {
    display: block;
    width: 64px;
    margin: 0 auto 10px;
  }

  #services .td-part-row img {
    display: block;
    width: 64px;
    height: 64px;
    object-fit: contain;
  }

  #services .td-part-row hr { display: none; }

  #services .td-part-row p {
    margin: 0;
    font-size: 16px;
    line-height: 1.3;
    overflow-wrap: anywhere;
    hyphens: auto;
  }

  /* Full-width photograph; Slick's matching mobile option removes 20% side peeks. */
  #gallery {
    padding-top: 32px !important;
    padding-bottom: 28px !important;
  }

  #gallery > .section_wrapper {
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
  }

  #gallery .column_column {
    box-sizing: border-box;
    margin-bottom: 18px;
    padding: 0 20px;
  }

  #gallery h1 {
    margin-bottom: 0;
    font-size: clamp(28px, 8vw, 40px);
    line-height: 1.15;
  }

  #gallery .column_slider,
  #gallery .content_slider {
    margin-bottom: 0;
  }

  #gallery .content_slider_ul li {
    padding: 0 !important;
    transform: none !important;
  }

  #gallery .content_slider_ul li::after { display: none; }

  #gallery .content_slider_ul img {
    display: block;
    width: 100%;
    height: auto;
  }

  #gallery .content_slider.hide-dots .slider_pagination {
    display: block !important;
    margin-top: 14px;
    padding: 0 20px;
  }

  /* Five certificates: exactly two rows (3 + 2); original full-size links retained. */
  #replacementcar > .section_wrapper {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  #replacementcar > .section_wrapper > .mcb-wrap > .mcb-wrap-inner {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 12px;
    align-items: start;
  }

  #replacementcar > .section_wrapper > .mcb-wrap > .mcb-wrap-inner::before,
  #replacementcar > .section_wrapper > .mcb-wrap > .mcb-wrap-inner::after {
    display: none;
  }

  #replacementcar .mcb-wrap-inner > .column {
    grid-column: 1 / -1;
    min-width: 0;
    float: none;
  }

  #replacementcar .mcb-wrap-inner > .column.one-fifth {
    grid-column: auto;
    clear: none;
    width: 100% !important;
    margin: 0 0 16px;
  }

  #replacementcar .column.one-fifth .image_frame,
  #replacementcar .column.one-fifth .image_wrapper,
  #replacementcar .column.one-fifth .image_wrapper > a {
    display: block;
    width: 100%;
    margin: 0;
  }

  #replacementcar .column.one-fifth img {
    display: block;
    width: 100%;
    height: auto !important;
    max-height: 190px;
    object-fit: contain;
    object-position: top center;
  }

  /* Keep the orange phone artwork intact; remove the surrounding empty space. */
  #contact {
    padding-top: 36px !important;
    padding-bottom: 36px !important;
  }

  #contact > .section_wrapper {
    padding-left: 20px !important;
    padding-right: 20px !important;
  }

  #contact .column_placeholder,
  #contact .column_divider { display: none; }

  #contact .column_image { margin-bottom: 0; }
}
