/* ============================================================================
   Vehicle rental — ТЗ §3.4
   ============================================================================

   Loaded only on /rent/. Every selector is new; nothing from style.css is
   redefined. The order modal deliberately reuses the site's own .modal classes
   without restyling them, so it is pixel-identical to the ticket modal and this
   sheet has nothing to say about it.

   Tokens: page #3a4257, panel #2b3141, primary #ed1a20, card radius 20px,
   button radius 10px, transitions 0.35s ease.
   ========================================================================== */

.rent-hero {
  padding: 3rem 0 1.5rem;
  background-color: #2b3141;
}

.rent-hero__title {
  margin: 0.5rem 0 0.75rem;
  font-size: 1.875rem;
  line-height: 1.15;
}

.rent-hero__lead {
  margin: 0;
  max-width: 46rem;
  color: #e6e9f5;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.rent-section__title {
  margin: 0 0 1.5rem;
  font-size: 1.5rem;
}

/* ------------------------------------------------------------- catalogue -- */
.rent-fleet {
  padding: 2.5rem 0 1rem;
}

.rent-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(20rem, 100%), 1fr));
  gap: 1.5rem;
}

.rent-empty {
  margin: 0;
  color: #e6e9f5;
}

.rent-card {
  display: flex;
  flex-direction: column;
  background-color: #2b3141;
  border-radius: 20px;
  overflow: hidden;
}

/* ТЗ asks for the vehicle photo "изолированное на прозрачном/светлом фоне".
   A light plate plus object-fit: contain keeps a cut-out PNG looking cut out;
   `cover` would crop the vehicle like an ordinary photograph.

   The photo fills an absolutely placed box: a percentage height against an
   aspect-ratio is where browsers part. Chrome grew the plate to the photo, Firefox
   shrank the photo to the plate, a third smaller. 10 / 9 is the plate Chrome showed
   with the customer's photo, so most visitors see no change. */
.rent-card__media {
  position: relative;
  aspect-ratio: 10 / 9;
  background: linear-gradient(160deg, #f4f4f9 0%, #d9dce6 100%);
}

.rent-card__image {
  position: absolute;
  inset: 1rem;
  display: block;
  width: calc(100% - 2rem);
  height: calc(100% - 2rem);
  object-fit: contain;
  transition: transform 0.35s ease;
}

.rent-card:hover .rent-card__image {
  transform: scale(1.03);
}

.rent-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: 1.25rem;
  flex: 1;
}

.rent-card__name {
  margin: 0;
  font-size: 1.25rem;
}

.rent-card__note {
  margin: 0;
  color: #cfd5e7;
  font-size: 0.9375rem;
  line-height: 1.45;
}

.rent-specs {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.rent-spec {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.9375rem;
  color: #f4f4f9;
}

/* By height: the bus is drawn 103×75, and squeezed into a 20 px square it came out a
   red blot. No brightness filter either: the bus file has a backing the colour of
   this panel, and the filter lifted that into a visible square. */
.rent-spec__icon {
  width: auto;
  height: 1.5rem;
  object-fit: contain;
}

/* Characteristics with no icon in the site's set get a dot instead of an
   invented glyph — contract §2.2 excludes producing new iconography. */
.rent-spec--text {
  padding-left: 0.875rem;
  position: relative;
}

.rent-spec--text::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5rem;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background-color: #ed1a20;
}

.rent-prices {
  list-style: none;
  margin: 0;
  padding: 0.75rem 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.rent-price {
  display: inline-flex;
  align-items: baseline;
  gap: 0.25rem;
}

.rent-price__value {
  font-weight: 600;
}

.rent-price__unit {
  color: #cfd5e7;
  font-size: 0.875rem;
}

.rent-card__order {
  margin-top: auto;
  justify-content: center;
}

/* ------------------------------------------------------------ advantages -- */
.rent-adv {
  padding: 2.5rem 0;
}

/* ТЗ: 4 колонки. Four across from a tablet up and two below it: left to auto-fit,
   768 px got three, with «На связи 24/7» alone on the next row. */
.rent-adv__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(13rem, 100%), 1fr));
  gap: 1.25rem;
}

@media (min-width: 35rem) {
  .rent-adv__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 48.0625rem) {
  .rent-adv__grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.rent-adv__item {
  background-color: #2b3141;
  border-radius: 20px;
  padding: 1.5rem 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.75rem;
}

.rent-adv__icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: brightness(1.4);
}

.rent-adv__title {
  margin: 0;
  font-size: 1.0625rem;
}

/* --------------------------------------------------------------- SEO ------ */
.rent-seo {
  padding: 0 0 3rem;
}

.rent-seo__title {
  margin: 0 0 0.75rem;
  font-size: 1.5rem;
}

/* 52rem at 15px held up to 100 characters a line on a wide screen; 46rem keeps
   it to the measure of a blog article (81-91). */
.rent-seo__text {
  max-width: 46rem;
  color: #cfd5e7;
  line-height: 1.65;
  font-size: 0.9375rem;
}

.rent-seo__text p {
  margin: 0 0 0.75rem;
}

/* The service pages carry their whole description here (ТЗ: text at the
   bottom), with headings and lists; style.css removes list markers globally. */
.rent-seo__text h2 {
  margin: 1.75rem 0 0.75rem;
  font-size: 1.375rem;
  color: #ffffff;
}

.rent-seo__text h3 {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.125rem;
  color: #ffffff;
}

.rent-seo__text ul,
.rent-seo__text ol {
  margin: 0 0 0.75rem;
  padding-left: 1.25rem;
}

.rent-seo__text ul {
  list-style: disc;
}

.rent-seo__text ol {
  list-style: decimal;
}

.rent-seo__text li {
  margin-bottom: 0.375rem;
}

/* 48.0625rem — точное дополнение к 48rem, которым пользуется
   этот же файл до перестановки: нет ширины, где сработали бы
   оба правила или ни одного. */
@media (min-width: 48.0625rem) {
  .rent-hero__title {
    font-size: 2.5rem;
  }

  .rent-section__title {
    font-size: 2rem;
  }
}


@media (prefers-reduced-motion: reduce) {
  .rent-card__image {
    transition: none;
  }
}

/* ------------------------------------------------------------ services -- */
/* ТЗ §3.4 names the template's uses — minibuses, transfers, driver-guide —
   and each is a page of its own. The hub lists them as link cards under the
   hero; a service page lists its siblings at the bottom. */
.rent-hero__order {
  margin-top: 1.25rem;
}

.rent-services {
  padding: 2.5rem 0 0;
}

.rent-services--others {
  padding: 1rem 0 3rem;
}

.rent-services__grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(16rem, 100%), 1fr));
  gap: 1rem;
}

/* Six tracks, so the rows always fill: three to a row, and a remainder of one or
   two is shared out over the last rows. The hub has five services (3+2) and a
   service page four (2+2); auto-fill left one alone from 769 px to any width. No
   count is written down: the editor publishes and withdraws services. */
@media (min-width: 48.0625rem) {
  .rent-services__grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .rent-service {
    grid-column: span 2;
  }

  .rent-service:nth-child(3n+1):nth-last-child(2),
  .rent-service:nth-child(3n+1):nth-last-child(2) ~ .rent-service,
  .rent-service:nth-child(3n+1):nth-last-child(4),
  .rent-service:nth-child(3n+1):nth-last-child(4) ~ .rent-service {
    grid-column: span 3;
  }
}

.rent-service__link {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
  padding: 1.25rem;
  border-radius: 20px;
  background-color: #2b3141;
  color: #ffffff;
  text-decoration: none;
  transition:
    transform 0.35s ease,
    box-shadow 0.35s ease;
}

.rent-service__link:hover,
.rent-service__link:focus-visible {
  transform: translateY(-4px);
  box-shadow: 0 1rem 2rem rgba(12, 16, 29, 0.35);
}

.rent-service__title {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.35;
}

.rent-service__lead {
  color: #cfd5e7;
  font-size: 0.9375rem;
  line-height: 1.5;
}

.rent-service__more {
  margin-top: auto;
  color: #ed1a20;
  font-weight: 600;
  font-size: 0.9375rem;
}

@media (prefers-reduced-motion: reduce) {
  .rent-service__link {
    transition: none;
  }
}
