*,
*::before,
*::after {
  box-sizing: border-box;
}

body.ts{
  background:linear-gradient(
    to right,
    #462417 0%,
    #403a34 20%,
    #403a34 80%,
    #462417 100%
);
}

img,
iframe,
svg {
  max-width: 100%;
  height: auto;
}

body.ts {
  background: linear-gradient(to right, #462417 0%, #403a34 20%, #403a34 80%, #462417 100%);
}

.lightbox-img {
  cursor: pointer;
}

/* Track Services */
.ts-section {
  scroll-margin-top: 110px;
  padding: 80px 0;
  transition: background-color 0.3s ease;
}

#railotm,
#relayrail {
  background: #fff;
}

#processing,
#contact {
  background: #0b3b8c;
  color: #fff;
}

#processing .ts-section-title,
#processing .ts-section-lead,
#processing p,
#contact .ts-section-title,
#contact .ts-section-lead,
#contact p {
  color: #fff;
}

.ts-hero {
  position: relative;
  width: 100%;
  margin: 0;
}

.ts-hero-img {
  display: block;
  width: 100%;
  height: auto;
}

.ts-hero-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
}

.ts-hero-overlay::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
}

.ts-hero-text {
  position: relative;
  max-width: 860px;
  color: #fff;
}

.ts-hero-text h1 {
  font-family: "Arial Narrow", Arial, Helvetica, sans-serif;
  margin: 0 0 10px;
  font-size: 56px;
  font-weight: 100;
  line-height: 1.1;
}

.ts-hero-text p {
  margin: 10px 0 0;
  font-size: 28px;
  font-weight: 100;
  line-height: 1.5;
}

.ts-section-intro {
  font-family: "Arial Narrow", Arial, Helvetica, sans-serif;
  text-align: center;
  max-width: min(66%, 720px);
  margin: 64px auto;
}

.ts-section-intro .ts-section-title {
  font-size: 44px;
  font-weight: 100;
  line-height: 1.1;
  margin: 0 0 10px;
}

.ts-section-intro .ts-section-lead {
  font-size: 24px;
  font-weight: 100;
  margin: 0;
  line-height: 1.5;
}

.ts-section-career {
  font-size: 40px;
  font-weight: 100;
  line-height: 1.1;
  margin: 0 0 10px;
}

.ts-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  align-items: start;
  margin: 26px 0;
}

.ts-media {
  margin: 0;
}

.ts-media-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 4px;
}

.ts-text p {
  margin: 0;
  line-height: 2;
}

.ts-video {
  display: flex;
  justify-content: center;
  margin: 64px 0;
}

.ts-video iframe {
  width: 100%;
  max-width: 540px;
  aspect-ratio: 16/9;
  height: auto;
  border: 0;
}

.ts-kicker {
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.ts-icon-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  margin: 14px 0 28px;
}

.ts-icon-item {
  text-align: center;
  padding: 14px 12px;
  border: 1px solid #d6dae4;
  background: #f7f7f9;
}

.ts-icon-text-title {
  font-weight: 600;
}

.ts-icon-text {
  font-size: 16px;
  line-height: 2;
}

.icon {
  display: inline-flex;
  vertical-align: middle;
}

.icon svg {
  vertical-align: -0.15em;
}

#processing .ts-icon-item {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  border-radius: 10px;
  backdrop-filter: blur(2px);
}

#processing .ts-icon-text {
  color: #fff;
  font-size: 14px;
  line-height: 1.25;
}

.ts-photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 40px 0;
}

.ts-photo-grid figure {
  margin: 0;
}

.ts-photo-grid img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  border-radius: 4px;
}

.ts-image-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 22px;
  margin: 26px auto;
  max-width: 80%;
}

.ts-image-grid figure {
  height: 300px;
  margin: 0;
}

.ts-image-grid img {
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 4px;
}

.ts-image-grid figure.ts-image-cut img {
  height: 150px;
  margin-top: 80px;
}

.ts-form-wrap {
  display: flex;
  justify-content: center;
  margin: 40px 0 0;
  margin-top: -20px;
}

/* Contact form */
.rcl-form--single {
  max-width: 640px;
  padding: 12px 14px;
  margin: 12px 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
}

.rcl-form--labels-left {
  max-width: 640px;
  padding: 12px 14px;
}

.rcl-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.rcl-row label {
  width: 120px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(0, 0, 0, 0.8);
  flex-shrink: 0;
}

.rcl-row input,
.rcl-row textarea {
  flex: 1;
  padding: 7px 9px;
  font: inherit;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 6px;
}

.rcl-row textarea {
  resize: vertical;
}

.rcl-btn {
  margin-top: 6px;
  padding: 8px 16px;
  font-weight: 600;
  border: 0;
  border-radius: 999px;
  background: #111;
  color: #fff;
  cursor: pointer;
}

.rcl-note {
  margin-top: 6px;
  font-size: 0.8rem;
  color: rgba(0, 0, 0, 0.6);
}

#contact .rcl-form {
  max-width: 720px;
  width: 100%;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.1);
  background: #0b3b8c;
  border: 0;
  box-shadow: none;
  color: #fff;
}

#contact .rcl-row label {
  color: #fff;
}

#contact input,
#contact textarea {
  background: #fff;
  color: #000;
  border: 1px solid rgba(0, 0, 0, 0.35);
  border-radius: 6px;
}

#contact input:focus,
#contact textarea:focus {
  border-color: #0b3b8c;
  box-shadow: 0 0 0 3px rgba(11, 59, 140, 0.25);
  outline: 0;
}

#contact .rcl-btn {
  background: #fff;
  color: #0b3b8c;
  font-weight: 700;
}

#contact .rcl-btn:hover {
  background: #f0f4ff;
}

#contact .rcl-note {
  color: rgba(255, 255, 255, 0.85) !important;
  margin-top: 24px !important;
}

/* Helpers used by TS layout */
.ts-split > *,
.ts-image-grid > *,
.ts-photo-grid > *,
.ts-icon-row > * {
  min-width: 0;
}

/* Mobile */
@media (max-width: 768px) {
  .ts-section {
    padding: 48px 0;
  }

  .ts-section-intro {
    max-width: 100%;
    margin: 28px auto 22px;
    padding: 0 6px;
    text-align: center;
    font-family: Arial, Helvetica, sans-serif;
  }

  .ts-hero-overlay {
    padding: 16px;
  }

  .ts-hero-text h1 {
    font-size: 28px;
    line-height: 1.12;
    font-weight: 400;
  }

  .ts-hero-text p {
    font-size: 15px;
    line-height: 1.35;
    font-weight: 300;
  }

  .ts-split {
    grid-template-columns: 1fr;
    gap: 14px;
    margin: 18px 0;
  }

  .ts-video {
    margin: 22px 0;
  }

  .ts-video iframe {
    max-width: 100%;
    width: 100%;
  }

  .ts-icon-row {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 12px 0 22px;
  }

  .ts-icon-item {
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
  }

  #processing .ts-icon-item {
    display: grid;
    grid-template-columns: 56px 1fr;
    grid-template-rows: auto auto;
    column-gap: 12px;
    row-gap: 4px;
    align-items: start;
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
  }

  #processing .ts-icon-item .icon {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 56px;
    height: 56px;
    display: grid;
    place-items: start center;
  }

  #processing .ts-icon-item .icon svg {
    width: 40px;
    height: 40px;
  }

  #processing .ts-icon-text-title {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.05;
  }

  #processing .ts-icon-text-title br {
    display: none;
  }

  #processing .ts-icon-text {
    grid-column: 2;
    grid-row: 2;
    margin: 0;
    font-size: 14px;
    line-height: 1.25;
  }

  .ts-image-grid {
    grid-template-columns: 1fr;
    max-width: 100%;
    margin: 18px 0;
  }

  .ts-photo-grid {
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 24px 0;
  }

  .ts-form-wrap {
    margin-top: 18px;
    padding: 0 6px;
  }

  #contact .rcl-form {
    max-width: 100%;
    border-radius: 12px;
  }

  #contact .ts-form-wrap {
    padding: 0 10px;
  }

  #contact form,
  #contact .rcl-form {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  #contact input,
  #contact textarea,
  #contact button {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

  .ts-section-intro .ts-section-title,
  h2.ts-section-title,
  .ts-section-title {
    font-size: 28px !important;
    line-height: 1.5 !important;
    margin-bottom: 64px !important;
  }

  #relayrail .ts-image-grid {
    justify-items: center;
    margin: 18px auto;
  }

  #relayrail .ts-image-grid figure {
    width: 100%;
    max-width: 360px;
    height: auto !important;
    margin: 0 0 14px;
    padding-top: 0 !important;
  }

  #relayrail .ts-image-grid img {
    width: 100% !important;
    height: auto !important;
    max-height: 260px !important;
    object-fit: contain !important;
    object-position: center center !important;
    display: block;
  }

  #relayrail .ts-image-grid figure.ts-image-cut {
    max-width: 260px !important;
  }

  #relayrail .ts-image-grid figure.ts-image-cut img {
    max-height: 160px !important;
    margin-top: 0 !important;
  }

  #relayrail .ts-image-grid + .ts-image-grid {
    margin-top: 36px;
    padding-top: 36px;
    border-top: 1px solid #d6dae4;
  }

  .rcl-row {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .rcl-row label {
    width: auto;
  }
}
