/* ManilaStay Car Hire page — v1-4-2.
   Page-scoped additions for the v12 Car Hire reference page.
   Car Hire media is mapped from the governed 2026/05 WordPress Media Library upload batch. */

.ms-carhire-template .ms-hero--carhire::before {
  background-image:
    linear-gradient(
      to bottom,
      rgba(26, 39, 48, 0.22) 10%,
      rgba(26, 39, 48, 0.52) 55%,
      rgba(26, 39, 48, 0.72) 88%
    );
  background-color: var(--ms-color-primary-dark);
  background-position: 50% 30%;
}

.ms-carhire-qc-center-note {
  text-align: center;
  margin-top: 1.25rem;
}

.ms-carhire-template .ms-charter-card,
.ms-carhire-template .ms-route-card {
  position: relative;
}

.ms-carhire-template .ms-charter-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.14);
}

.ms-table-card {
  margin-top: 1.5rem;
  border: 1px solid var(--ms-color-border-soft);
  border-radius: 16px;
  padding: 0.75rem;
  background: #fff;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.04);
}

.ms-price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.ms-price-table th {
  text-align: left;
  font-weight: 700;
  padding: 0.28rem 0.5rem;
  border-bottom: 1px solid var(--ms-color-border-soft);
  white-space: nowrap;
}

.ms-price-table th:nth-child(2),
.ms-price-table th:nth-child(3),
.ms-price-table th:nth-child(4),
.ms-price-table td:nth-child(2),
.ms-price-table td:nth-child(3),
.ms-price-table td:nth-child(4) {
  text-align: center;
}

.ms-hours-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.18rem 0.45rem;
  border-radius: 999px;
  background: rgba(71, 91, 102, 0.08);
  border: 1px solid rgba(71, 91, 102, 0.14);
  color: var(--ms-color-primary);
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.1;
  white-space: nowrap;
  margin: 0;
}

.ms-price-table td {
  padding: 0.72rem 0.5rem;
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
  vertical-align: middle;
}

.ms-price-table tbody tr:last-child td {
  border-bottom: none;
}

.ms-price-table td[data-label="Destination"] {
  font-weight: 700;
}

.ms-table-cta {
  margin-top: 1.5rem;
  display: flex;
  justify-content: center;
}

.ms-muted-note {
  margin-top: 0.85rem;
  margin-bottom: 0;
}

.ms-carhire-template .ms-vehicle-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 12rem);
  min-height: 6rem;
  border-radius: 0.9rem;
  background: rgba(71, 91, 102, 0.08);
  color: var(--ms-color-primary);
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (max-width: 640px) {
  .ms-table-card {
    padding: 0.75rem;
  }

  .ms-price-table thead {
    display: none;
  }

  .ms-price-table,
  .ms-price-table tbody,
  .ms-price-table tr,
  .ms-price-table td {
    display: block;
    width: 100%;
  }

  .ms-price-table tr {
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 14px;
    padding: 0.12rem 0.4rem;
    margin-bottom: 0.45rem;
  }

  .ms-price-table tr:last-child {
    margin-bottom: 0;
  }

  .ms-price-table td {
    border: none;
    padding: 0.18rem 0.15rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 0.55rem;
    text-align: left;
  }

  .ms-price-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--ms-color-text);
    justify-self: start;
    text-align: left;
  }

  .ms-price-table td:nth-child(3),
  .ms-price-table td:nth-child(4) {
    text-align: left;
  }

  .ms-price-table td .ms-price-val,
  .ms-price-table td .ms-hours-badge {
    justify-self: center;
    text-align: center;
  }

  .ms-price-table td[data-label="Destination"] {
    display: block;
    padding: 0.75rem 0.35rem 0.35rem;
    font-size: 1.05rem;
  }

  .ms-price-table td[data-label="Destination"]::before {
    content: "";
  }
}

/* v1-4-1: Car Hire parity refinements.
   1) Charter duration pills turn slate/white on card hover, matching v12.
   2) Vehicle options keep the v12 two-column card rhythm instead of inheriting the generic 3-column services grid. */
@media (hover: hover) and (pointer: fine) {
  .ms-carhire-template .ms-charter-card:hover .ms-badge,
  .ms-carhire-template .ms-charter-card:hover .ms-u-info-box {
    background: var(--ms-color-primary);
    color: #ffffff;
    border-color: rgba(213, 75, 15, 0);
  }

  .ms-carhire-template .ms-charter-card:hover .ms-card-microcta-link {
    color: var(--ms-color-primary);
  }
}

@media (min-width: 768px) {
  .ms-carhire-template .ms-vehicles .ms-services-grid.ms-services-grid--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.ms-carhire-template .ms-vehicle-card {
  text-align: left;
  padding: 1rem 1.4rem 1.3rem;
}

.ms-carhire-template .ms-vehicle-media {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0.35rem;
  margin-bottom: 0.5rem;
  background: #ffffff;
  border-radius: 0.9rem;
}

.ms-carhire-template .ms-vehicle-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
  transform: none;
}

.ms-carhire-template .ms-vehicle-media--suv img {
  width: 82%;
  height: 82%;
}

.ms-carhire-template .ms-vehicle-media--van img {
  width: 78%;
  height: 78%;
}

