/* ===== SOUTH END MOBILE ABOUT PAGE FIX ===== */

@media screen and (max-width: 900px) {

  body.about-page {
    overflow-x: hidden !important;
  }

  body.about-page #sel-header {
    display: none !important;
  }

  body.about-page #sel-mobile-menu {
    position: fixed !important;
    top: 20px !important;
    right: 18px !important;
    z-index: 99999999 !important;
  }

  body.about-page main,
  body.about-page section {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  /* History section layout */
  body.about-page .history-section,
  body.about-page .about-history,
  body.about-page .history-block,
  body.about-page .history-row {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 30px 22px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
    overflow: hidden !important;
  }

  /* Text first, image second */
  body.about-page .history-text,
  body.about-page .about-history-text,
  body.about-page .history-content {
    order: 1 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 0 28px 0 !important;
    box-sizing: border-box !important;
  }

  body.about-page .history-image,
  body.about-page .about-history-image,
  body.about-page .history-photo {
    order: 2 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 auto 34px auto !important;
    box-sizing: border-box !important;
  }

  /* Heading smaller and fitting */
  body.about-page h1,
  body.about-page .history-text h1,
  body.about-page .about-history-text h1,
  body.about-page .history-content h1 {
    font-size: 54px !important;
    line-height: 0.95 !important;
    margin: 0 0 20px 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }

  /* Paragraph readable and not cut off */
  body.about-page p,
  body.about-page .history-text p,
  body.about-page .about-history-text p,
  body.about-page .history-content p {
    font-size: 19px !important;
    line-height: 1.38 !important;
    margin: 0 0 18px 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }

  /* Image should fit into frame, not zoom/crop */
  body.about-page .history-image img,
  body.about-page .about-history-image img,
  body.about-page .history-photo img,
  body.about-page img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block !important;
  }

  /* If image wrapper has fixed height, remove it */
  body.about-page .history-image,
  body.about-page .about-history-image,
  body.about-page .history-photo {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    background: transparent !important;
  }
}

/* ===== MOBILE ABOUT HISTORY ORDER + GAP FIX ===== */

@media screen and (max-width: 900px) {

  body.about-page .history-section {
    display: flex !important;
    flex-direction: column !important;
    gap: 0 !important;
    padding-top: 22px !important;
    padding-bottom: 22px !important;
    min-height: 0 !important;
    height: auto !important;
  }

  body.about-page .history-section .history-text {
    width: 100% !important;
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
  }

  body.about-page .history-section .history-image {
    width: 100% !important;
    margin: 0 0 24px 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
  }

  body.about-page .history-section .history-image img {
    width: 100% !important;
    height: auto !important;
    max-height: none !important;
    object-fit: contain !important;
    display: block !important;
  }

  body.about-page .history-section .history-text p {
    margin-bottom: 14px !important;
  }

  body.about-page .history-section:first-of-type .history-text {
    order: 1 !important;
  }

  body.about-page .history-section:first-of-type .history-image {
    order: 2 !important;
  }

  body.about-page .history-section:nth-of-type(2) .history-text {
    order: 3 !important;
  }

  body.about-page .history-section:nth-of-type(2) .history-image {
    order: 4 !important;
  }
}

/* ===== MOBILE ABOUT HISTORY FLOW FIX ===== */

@media screen and (max-width: 900px) {
  body.about-page .mobile-history-flow {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    padding: 24px 18px !important;
    box-sizing: border-box !important;
    gap: 22px !important;
  }

  body.about-page .mobile-history-flow .history-text,
  body.about-page .mobile-history-flow .history-image {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    height: auto !important;
    min-height: 0 !important;
    box-sizing: border-box !important;
  }

  body.about-page .mobile-history-flow .history-image img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
  }

  body.about-page .mobile-history-flow .history-text h1 {
    font-size: 54px !important;
    line-height: 0.95 !important;
    margin: 0 0 18px 0 !important;
  }

  body.about-page .mobile-history-flow .history-text p {
    font-size: 19px !important;
    line-height: 1.38 !important;
    margin: 0 0 14px 0 !important;
    padding: 0 !important;
  }
}

/* ===== MOBILE ABOUT SPLIT FIRST PICTURE BETWEEN PARAGRAPHS ===== */

@media screen and (max-width: 900px) {
  body.about-page .mobile-history-flow {
    gap: 18px !important;
    padding: 18px 18px 28px 18px !important;
  }

  body.about-page .mobile-history-flow .mobile-history-top {
    margin-bottom: 4px !important;
  }

  body.about-page .mobile-history-flow .history-image {
    margin: 4px 0 18px 0 !important;
  }

  body.about-page .mobile-history-flow .mobile-history-rest {
    margin-top: 0 !important;
  }

  body.about-page .mobile-history-flow .history-text p {
    margin-bottom: 16px !important;
  }

  body.about-page .mobile-history-flow .history-image img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
  }
}

/* ===== REAL MOBILE ABOUT HISTORY FLOW ===== */

@media screen and (max-width: 900px) {
  body.about-page .mobile-history-flow,
  .mobile-history-flow {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 18px 18px 28px 18px !important;
    box-sizing: border-box !important;
    gap: 18px !important;
    overflow-x: hidden !important;
  }

  body.about-page .mobile-history-flow .history-text,
  .mobile-history-flow .history-text {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  body.about-page .mobile-history-flow .history-image,
  .mobile-history-flow .history-image {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 4px 0 18px 0 !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  body.about-page .mobile-history-flow .history-image img,
  .mobile-history-flow .history-image img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
  }

  body.about-page .mobile-history-flow h1,
  .mobile-history-flow h1 {
    font-size: 52px !important;
    line-height: 0.95 !important;
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
  }

  body.about-page .mobile-history-flow .history-line,
  .mobile-history-flow .history-line {
    margin: 0 0 18px 0 !important;
  }

  body.about-page .mobile-history-flow p,
  .mobile-history-flow p {
    font-size: 19px !important;
    line-height: 1.38 !important;
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    overflow-wrap: break-word !important;
  }
}

/* ===== STATIC MOBILE HISTORY SECTION ===== */

.mobile-history-static {
  display: none;
}

@media screen and (max-width: 900px) {
  body.about-page .history-section {
    display: none !important;
  }

  body.about-page .mobile-history-static {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 18px 18px 28px 18px !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    background: #ffffff !important;
  }

  body.about-page .mobile-history-static h1 {
    font-size: 52px !important;
    line-height: 0.95 !important;
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
    color: #071327 !important;
  }

  body.about-page .mobile-history-static .history-line {
    margin: 0 0 18px 0 !important;
  }

  body.about-page .mobile-history-static p {
    font-size: 19px !important;
    line-height: 1.38 !important;
    margin: 0 0 16px 0 !important;
    padding: 0 !important;
    color: #071327 !important;
    max-width: 100% !important;
    overflow-wrap: break-word !important;
  }

  body.about-page .mobile-history-static .mobile-history-image {
    width: 100% !important;
    margin: 8px 0 22px 0 !important;
    padding: 0 !important;
  }

  body.about-page .mobile-history-static .mobile-history-image img {
    width: 100% !important;
    height: auto !important;
    object-fit: contain !important;
    display: block !important;
  }

  body.about-page .mobile-history-static .image-caption {
    font-size: 13px !important;
    line-height: 1.2 !important;
    margin-top: -26px !important;
    color: #ffffff !important;
    text-align: center !important;
    font-weight: 700 !important;
    position: relative !important;
    z-index: 2 !important;
  }
}

@media screen and (min-width: 901px) {
  body.about-page .mobile-history-static {
    display: none !important;
  }
}

/* ===== MOBILE ABOUT FORM TEXTAREA HEIGHT FIX ===== */

@media screen and (max-width: 900px) {
  body.about-page form.quote-form textarea[name="transport_requirements"] {
    min-height: 150px !important;
    height: 150px !important;
    resize: vertical !important;
    line-height: 1.35 !important;
    padding: 12px 14px !important;
    box-sizing: border-box !important;
  }
}

/* ===== MOBILE ABOUT PHONE FIELD FIX ===== */

@media screen and (max-width: 900px) {
  body.about-page form.quote-form .contact-number-row {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    height: auto !important;
    gap: 0 !important;
    margin-bottom: 22px !important;
  }

  body.about-page form.quote-form .contact-number-row select.country-code-select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    height: 54px !important;
    border: 1px solid #cfdbe7 !important;
    border-bottom: 0 !important;
    padding: 0 14px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
  }

  body.about-page form.quote-form .contact-number-row input.contact-number-input {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 100% !important;
    height: 54px !important;
    border: 1px solid #cfdbe7 !important;
    padding: 0 14px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
  }
}

/* ===== MOBILE ABOUT PHONE FIELD SIDE-BY-SIDE RESTORE ===== */

@media screen and (max-width: 900px) {
  body.about-page form.quote-form .contact-number-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    height: 54px !important;
    gap: 0 !important;
    margin-bottom: 22px !important;
  }

  body.about-page form.quote-form .contact-number-row select.country-code-select {
    width: 96px !important;
    max-width: 96px !important;
    min-width: 96px !important;
    height: 54px !important;
    border: 1px solid #cfdbe7 !important;
    border-right: 0 !important;
    border-bottom: 1px solid #cfdbe7 !important;
    padding: 0 10px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
  }

  body.about-page form.quote-form .contact-number-row input.contact-number-input {
    flex: 1 1 auto !important;
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    height: 54px !important;
    border: 1px solid #cfdbe7 !important;
    padding: 0 14px !important;
    font-size: 16px !important;
    box-sizing: border-box !important;
  }
}
