/* ==========================================================================
   sections/services.css — the three lead services, then everything else
   ========================================================================== */

.services {
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
  border-bottom: 1px solid var(--paper-edge);
}

/* --- The three lead services ------------------------------------------- */
.services__lead {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--grid-gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* No card frame: the photo sits on the page, with its text underneath */
.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Stretched link: the whole card is clickable when it has a destination */
.service-card__link {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.service-card__link:focus-visible {
  outline: 2.5px solid var(--red);
  outline-offset: 4px;
  border-radius: var(--radius-lg);
}

.service-card__media {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--paper-tint);
}

.service-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.service-card:hover .service-card__media img { transform: scale(1.05); }

.service-card h3 {
  font-size: var(--step-1);
  margin-bottom: var(--sp-2);
}

.service-card__body {
  padding-top: var(--sp-4);
}

.service-card p {
  font-size: var(--step--1);
  line-height: 1.6;
  color: var(--ink-soft);
}

.service-card p + p { margin-top: var(--sp-2); }

/* --- Everything else in the bays --------------------------------------- */
.services__also {
  margin-top: clamp(2rem, 4vw, 3rem);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--paper-edge);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--grid-gap);
  align-items: start;
}

.services__also ul { grid-column: 2 / -1; }

.services__also h3 {
  font-size: var(--step-1);
}

.services__also ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.services__also li {
  padding: 0.45rem 1rem;
  border: 1px solid var(--red);
  border-radius: 999px;
  background: transparent;
  font-size: var(--step--1);
  font-weight: 500;
  color: var(--red-ink);
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease),
              transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.services__also li:hover {
  background: var(--red);
  border-color: var(--red);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 10px 18px -12px rgba(164, 22, 31, 0.8);
}

@media (max-width: 900px) {
  .services__lead { grid-template-columns: 1fr; }
  .service-card__media { aspect-ratio: 21 / 9; }
  .services__also { grid-template-columns: 1fr; gap: var(--sp-3); }
  .services__also ul { grid-column: 1; }
}

/* ==========================================================================
   Services hub page (services.html). Reuses .service-card / .services__lead
   above, and adds a trailer-types strip plus the general-repair section.
   ========================================================================== */

/* Give the hub hero the same photo height as the service pages, whose taller
   copy stretches the image. */
@media (min-width: 1001px) {
  .hero--hub .hero__media { min-height: 500px; }
}

/* Lead services sit on white; the general-repair section below is beige */
.services--hub { background: var(--white); }

/* Trailer types strip: one line, one link */
/* Its own section: a router to the Trailer Types hub, a distinct beige band */
.svc-types-section {
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
  background: var(--paper-tint);
  border-bottom: 1px solid var(--paper-edge);
}

.svc-types {
  margin-top: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--grid-gap);
}

.svc-types__card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-2);
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  background: var(--white);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-lg);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.svc-types__card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-soft);
}

.svc-types p { color: var(--ink-soft); font-size: var(--step-0); }
.svc-types p strong {
  display: block;
  margin-bottom: var(--sp-1);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step-1);
}
.svc-types a { margin-top: var(--sp-1); }

@media (max-width: 620px) {
  .svc-types { grid-template-columns: 1fr; }
}

.svc-types a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--red-ink);
}

.svc-types a svg { width: 18px; height: 18px; transition: transform 0.25s var(--ease); }
.svc-types a:hover svg { transform: translateX(4px); }

/* --- General repair: its own section: wide photo, checklist cards, CTA --- */
.general {
  padding-block: clamp(3.5rem, 7vw, 6.5rem);
  background: var(--paper);
  border-bottom: 1px solid var(--paper-edge);
}

/* Same full-window-minus-gutter width as the why-this-shop photo */
.general__media {
  overflow: hidden;
  border-radius: var(--radius-lg);
  aspect-ratio: 21 / 8;
  min-height: 240px;
  margin-top: clamp(2rem, 4vw, 3rem);
  margin-bottom: 0;
  margin-inline: calc(50% - 50vw + var(--gutter));
  background: var(--paper-edge);
}

/* Below 630px the 21/8 ratio and the 240px floor would force this band wider
   than the screen. Both agree on 240px at 630px, so the switch is seamless. */
@media (max-width: 630px) {
  .general__media { aspect-ratio: auto; height: 240px; }
}

.general__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 55%;
}

.general__list {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  margin: clamp(2rem, 4vw, 3rem) 0 0;
  padding: 0;
  list-style: none;
}

/* On the single-row (desktop) layout, lift the cards so their top half sits
   over the bottom of the photo. Fixed card height makes "half" exact. */
@media (min-width: 901px) {
  .general__list {
    --gcard-h: 168px;
    align-items: start;
    margin-top: calc(var(--gcard-h) / -2);
  }
  /* min-height, not height: the overlap above is what --gcard-h is for, and a
     label longer than the mockup's should make the card taller rather than
     spill over its own border. */
  .general__item { min-height: var(--gcard-h); }
}

.general__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: var(--sp-3);
  padding: clamp(1.25rem, 2.2vw, 1.75rem) var(--sp-3);
  background: var(--white);
  border: 1px solid var(--paper-edge);
  border-radius: var(--radius-lg);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--step--1);
  line-height: 1.3;
  color: var(--ink);
  box-shadow: 0 12px 28px -20px rgba(28, 27, 25, 0.5);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.general__item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.general__check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 50%;
  background: rgba(200, 32, 42, 0.1);
  color: var(--red);
  transition: background-color 0.3s var(--ease), color 0.3s var(--ease);
}

.general__item:hover .general__check {
  background: var(--red);
  color: var(--white);
}

.general__check svg { width: 20px; height: 20px; }

.general__cta { margin-top: var(--sp-5); }
.general__cta svg { width: 17px; height: 17px; transition: transform 0.25s var(--ease); }
.general__cta:hover svg { transform: translateX(4px); }

@media (max-width: 900px) {
  .general__list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 520px) {
  .general__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* 'Also under one roof' line under the lead services (keeps LQ listed) */
.services__also-note {
  margin-top: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--ink-soft);
  font-size: var(--step-0);
}
.services__also-note a { color: var(--red-ink); font-weight: 600; }

/* Homepage reference to the service packages */
.services__packages-ref { margin-top: clamp(1.5rem, 3vw, 2.25rem); color: var(--ink-soft); font-size: var(--step-0); }
.services__packages-ref a { color: var(--red-ink); font-weight: 600; }

/* Inside 'Also in the bays': sit in the right-hand column, above the pills */
.services__also .services__packages-ref {
  grid-column: 2 / -1;
  margin: 0 0 var(--sp-3);
}
@media (max-width: 900px) {
  .services__also .services__packages-ref { grid-column: 1; }
}

/* Icon before the Recreational / Work labels: red disc, white glyph, soft glow */
.svc-types__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; margin-bottom: var(--sp-2);
  border-radius: 50%; background: var(--red); color: var(--white);
  box-shadow: 0 0 0 6px rgba(200, 32, 42, 0.12);
  transition: transform 0.3s var(--ease), background-color 0.3s var(--ease),
              box-shadow 0.3s var(--ease);
}
.svc-types__card:hover .svc-types__icon {
  transform: scale(1.08);
  background: var(--red-deep);
  box-shadow: 0 0 0 7px rgba(200, 32, 42, 0.12);
}
.svc-types__icon svg { width: 22px; height: 22px; }
