/* ============================================================
   WOODLEY COLLISION — SHARED COMPONENTS
   Reusable across pages (homepage + service pages, etc.).
   Section-specific layout stays in the page stylesheet.
   ============================================================ */

/* ============================================================
   SERVICE CARD
   Photo with tag pills (top), then title + red rule + copy,
   divider, and an "Explore Service" link with arrow button.
   Fixed 298px wide on the grid; fluid to 100% when stacked.
   ============================================================ */
.svc-card {
  display: flex;
  flex-direction: column;
  width: 298px;
  background: var(--white);
  border: 1px solid var(--gray-50);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 2px rgba(0, 0, 0, 0.01);
  overflow: hidden;
}
.svc-card__link-wrap {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: inherit;
  text-decoration: none;
}
.svc-card__link-wrap:focus-visible {
  outline: 3px solid rgba(225, 26, 23, 0.35);
  outline-offset: -3px;
}

/* --- Photo area with tag pills --- */
.svc-card__media {
  position: relative;
  height: 200px;
  display: flex;
  align-items: flex-end;
  padding: var(--sp-12);
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  overflow: hidden;
}
.svc-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.svc-card__tags {
  position: relative;
  display: flex;
  gap: var(--sp-8);
  z-index: 1;
}
.svc-card__tag {
  display: inline-flex;
  align-items: center;
  padding: var(--sp-4) var(--sp-8);
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 3px rgba(0, 0, 0, 0.06);
  font-size: 0.75rem;          /* 12px */
  font-weight: 500;
  line-height: 1.333;
  text-transform: uppercase;
  color: #383838;
  white-space: nowrap;
}

/* --- Body --- */
.svc-card__body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  flex: 1;
  padding: var(--sp-16) var(--sp-20);
  gap: var(--sp-16);
}
.svc-card__head { display: flex; flex-direction: column; gap: var(--sp-8); }
.svc-card__title {
  font-size: 1.5rem;           /* 24px */
  font-weight: 600;
  line-height: 1.167;
  color: var(--gray-900);
}
.svc-card__rule {
  width: 48px;
  height: 2px;
  background: var(--color-red);
  border: none;
  border-radius: 2px;
}
.svc-card__desc {
  font-size: var(--fs-body-s);  /* 14px */
  font-weight: 400;
  line-height: 1.571;
  color: #555;
}

/* --- Footer: divider + explore link --- */
.svc-card__foot { display: flex; flex-direction: column; gap: var(--sp-16); }
.svc-card__divider { height: 1px; background: var(--gray-50); border: none; }
.svc-card__action {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.svc-card__link {
  font-size: var(--fs-body);    /* 16px */
  font-weight: 500;
  line-height: var(--lh-snug);
  color: var(--gray-900);
  transition: color var(--dur) var(--ease);
}
.svc-card__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-round);
  color: var(--gray-900);
  flex-shrink: 0;
  transition: background-color var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              color var(--dur) var(--ease);
}
.svc-card__arrow svg { width: 20px; height: 20px; fill: none; stroke-width: 1.75; }

/* Hover: lift the card, fill the arrow */
.svc-card { transition: box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease); }
.svc-card:hover {
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
  transform: translateY(-3px);
}
.svc-card:hover .svc-card__link { color: var(--color-red); }
.svc-card:hover .svc-card__arrow {
  background: var(--color-red);
  border-color: var(--color-red);
  color: var(--white);
}

/* ============================================================
   LOGO MARQUEE
   Infinite horizontal scroll of logo cards. The track holds the
   logo set TWICE; animating translateX to -50% loops seamlessly
   (copy 2 lands exactly where copy 1 began). Pauses on hover and
   respects reduced-motion. Edge fades soften entry/exit.
   ============================================================ */
.marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  /* fade the left/right edges */
  -webkit-mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 6%, #000 94%, transparent);
}
.marquee__track {
  display: flex;
  width: max-content;
  gap: var(--sp-24);
  animation: marquee-scroll var(--marquee-duration, 40s) linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - (var(--sp-24) / 2))); }
}

/* Each logo card */
.marquee__item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 187px;
  height: 70px;
  padding: var(--sp-8);
  background: var(--white);
  border: 1px solid var(--gray-50);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 2px rgba(0, 0, 0, 0.01);
}
.marquee__item--logo,
.marquee__item--text {
  padding-inline: var(--sp-16);
}
.marquee__item img {
  max-width: 140px;
  max-height: 51px;
  width: auto;
  height: auto;
  object-fit: contain;
}
.insurer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  color: var(--gray-900);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.25;
  text-align: center;
}

/* Reduced motion: stop the animation, let it scroll manually instead */
@media (prefers-reduced-motion: reduce) {
  .marquee { overflow-x: auto; }
  .marquee__track { animation: none; }
}

/* Mobile sizing (cards 144x54 per Figma) */
@media (max-width: 600px) {
  .marquee__track { gap: var(--sp-12); }
  .marquee__item { width: 144px; height: 54px; }
  .marquee__item img { max-width: 110px; max-height: 40px; }
  .marquee__item--logo,
  .marquee__item--text { padding-inline: var(--sp-12); }
  .insurer-badge { font-size: 0.8125rem; }
  @keyframes marquee-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(calc(-50% - (var(--sp-12) / 2))); }
  }
}

/* ============================================================
   BEFORE/AFTER — LABELED VARIANT (gallery cards)
   Adds BEFORE (white) / AFTER (black) corner pills on top of the
   shared .ba slider. Used by the gallery's 3 comparison cards.
   ============================================================ */
.ba--labeled {
  border-radius: var(--radius-md);
  overflow: hidden;
}
.ba--labeled .ba__img { object-fit: cover; }   /* fill the card, not contain */

.ba__pill {
  position: absolute;
  top: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  padding: var(--sp-4) var(--sp-8);
  border-radius: var(--radius-lg);
  font-size: 0.75rem;          /* 12px */
  font-weight: 500;
  line-height: 1.333;
  white-space: nowrap;
  pointer-events: none;
}
.ba__pill--before {
  left: 12px;
  background: var(--white);
  color: var(--gray-900);
}
.ba__pill--after {
  right: 12px;
  background: var(--gray-900);
  color: var(--white);
}
/* The AFTER pill is part of the (clipped) after layer so it only shows
   on the revealed side; BEFORE pill sits on the base layer. */

/* ============================================================
   REVIEW CARD
   User row (avatar + name/date + Google icon), star rating,
   and review text. Reusable across the homepage reviews row
   and any future testimonials block.
   ============================================================ */
.review-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: var(--sp-16);
  width: 397px;
  min-height: 272px;
  padding: var(--sp-24);
  background: var(--white);
  border: 1px solid var(--gray-50);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 2px rgba(0, 0, 0, 0.01);
}

.review-card__top {
  display: flex;
  flex-direction: column;
  gap: var(--sp-16);
}

/* User row */
.review-card__user {
  display: flex;
  align-items: center;
  gap: var(--sp-12);
}
.review-card__avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-round);
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--white);
  text-transform: uppercase;
}
.review-card__detail {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  flex: 1 0 0;
  min-width: 0;
}
.review-card__name {
  font-size: var(--fs-body);    /* 16px */
  font-weight: 500;
  line-height: var(--lh-snug);
  color: var(--gray-900);
}
.review-card__date {
  font-size: 0.75rem;          /* 12px */
  font-weight: 500;
  line-height: 1.333;
  color: #717171;
}
.review-card__source {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}
.review-card__source svg { width: 100%; height: 100%; display: block; }

/* Star rating */
.review-card__stars {
  display: inline-flex;
  gap: 4px;
  color: #FBBC04;   /* Google gold */
}
.review-card__stars svg { width: 24px; height: 24px; display: block; }

/* Review text */
.review-card__text {
  font-size: var(--fs-body-s);  /* 14px */
  font-weight: 400;
  line-height: 1.571;
  color: #383838;
}

/* ============================================================
   FAQ ACCORDION
   Rounded question cards with a ± toggle. Open state gets a
   stronger border/shadow and reveals the answer with a smooth
   max-height transition (height set in JS). The ± icon morphs
   from plus to minus via a scaling pseudo-element. Reusable.
   ============================================================ */
.faq {
  display: flex;
  flex-direction: column;
  gap: var(--sp-12);
}

.faq__item {
  background: var(--white);
  border: 1px solid var(--gray-50);
  border-radius: var(--radius-md);
  box-shadow: 0 4px 2px rgba(0, 0, 0, 0.01);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
}
.faq__item.is-open {
  border-color: var(--gray-100);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.06);
}

/* Question row (the clickable header) */
.faq__q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-16);
  width: 100%;
  padding: var(--sp-16);
  text-align: left;
  cursor: pointer;
  transition: padding var(--dur) var(--ease);
}
.faq__item.is-open .faq__q { padding-bottom: var(--sp-8); }

.faq__q-text {
  font-size: var(--fs-body);    /* 16px */
  font-weight: 500;
  line-height: var(--lh-snug);
  color: #1c1c1c;
}
.faq__item.is-open .faq__q-text { color: var(--gray-900); }

/* ± toggle (plus that morphs to minus) */
.faq__toggle {
  position: relative;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-round);
}
.faq__toggle::before,
.faq__toggle::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: var(--gray-900);
  border-radius: 2px;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.faq__toggle::before { width: 12px; height: 2px; transform: translate(-50%, -50%); }            /* horizontal bar */
.faq__toggle::after  { width: 2px;  height: 12px; transform: translate(-50%, -50%); }            /* vertical bar  */
.faq__item.is-open .faq__toggle::after { transform: translate(-50%, -50%) scaleY(0); opacity: 0; }

/* Answer (animated container) */
.faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--dur) var(--ease);
}
.faq__a-inner {
  padding: 0 var(--sp-16) var(--sp-16);
  font-size: var(--fs-body-s);  /* 14px */
  font-weight: 400;
  line-height: 1.571;
  color: #383838;
}

/* ============================================================
   FORM CONTROLS
   Inputs, selects, textarea, segmented toggle, dropzone, and a
   checkbox — styled to match the Figma estimate form. Reusable.
   ============================================================ */
.field { display: flex; flex-direction: column; gap: var(--sp-8); }
.field__label {
  font-size: var(--fs-body);    /* 16px */
  font-weight: 400;
  line-height: var(--lh-snug);
  color: #1c1c1c;
}
.field__label--muted { color: var(--gray-300); }   /* disabled-style labels (Model/Year until Make chosen) */

/* Base input / select / textarea */
.input,
.select,
.textarea {
  width: 100%;
  font-family: inherit;
  font-size: var(--fs-body);    /* 16px */
  font-weight: 400;
  line-height: var(--lh-snug);
  color: var(--gray-900);
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  padding: var(--sp-12) var(--sp-16);
  transition: border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.input { height: 54px; }
.textarea { min-height: 126px; resize: vertical; line-height: 1.5; }
.input::placeholder,
.textarea::placeholder { color: #8d8d8d; }

.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--gray-400);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}

/* Select with chevron */
.select-wrap { position: relative; }
.select {
  height: 54px;
  cursor: pointer;
  padding-right: 44px;
  color: #8d8d8d;   /* placeholder-style until a value is chosen */
}
.select:required:valid { color: var(--gray-900); }   /* once a real option is picked */
.select-wrap::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 50%;
  width: 20px;
  height: 20px;
  transform: translateY(-50%);
  pointer-events: none;
  background: currentColor;
  color: #8d8d8d;
  -webkit-mask: no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  mask: no-repeat center / 12px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* Two/three column field rows */
.field-row { display: flex; gap: var(--sp-16); }
.field-row > .field { flex: 1 1 0; min-width: 0; }

/* Segmented toggle (Insurance Claim Started? Yes / No / Not Sure) */
.segmented {
  display: inline-flex;
  gap: var(--sp-2);
  padding: var(--sp-4);
  max-width: max-content;
  background: var(--white);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-lg);
}
.segmented__opt {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}
.segmented__opt input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.segmented__opt span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4) var(--sp-12);
  border-radius: var(--radius-lg);
  font-size: var(--fs-body-s);  /* 14px */
  line-height: 1.571;
  color: var(--gray-900);
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
.segmented__opt input:checked + span {
  background: var(--gray-900);
  color: var(--white);
}

@media (max-width: 360px) {
  .segmented {
    width: 100%;
    max-width: none;
  }
  .segmented__opt {
    flex: 1 1 0;
  }
  .segmented__opt span {
    width: 100%;
    padding-inline: var(--sp-8);
  }
}

/* Photo upload dropzone */
.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-8);
  min-height: 126px;
  padding: var(--sp-12) var(--sp-16);
  text-align: center;
  background: var(--gray-50);
  border: 1px solid var(--gray-100);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}
.dropzone:hover { border-color: var(--gray-300); }
.dropzone.is-dragover { border-color: var(--gray-900); background: #ececec; }
.dropzone__icon { width: 24px; height: 24px; color: #383838; }
.dropzone__icon svg { width: 100%; height: 100%; }
.dropzone__title { font-size: var(--fs-body); font-weight: 500; line-height: var(--lh-snug); color: #383838; }
.dropzone__hint { font-size: var(--fs-body-s); font-weight: 400; line-height: 1.571; color: #8d8d8d; }
.dropzone__note { font-size: 0.75rem; font-weight: 400; line-height: 1.4; color: #717171; }
.dropzone input[type="file"] { display: none; }
.dropzone__files { font-size: var(--fs-body-s); color: var(--gray-700); margin-top: var(--sp-4); }

/* Consent checkbox */
.consent { display: flex; gap: var(--sp-8); align-items: flex-start; }
.consent input[type="checkbox"] {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1px solid var(--gray-300);
  border-radius: 4px;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
  position: relative;
  transition: background-color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.consent input[type="checkbox"]:checked {
  background: var(--gray-900);
  border-color: var(--gray-900);
}
.consent input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid var(--white);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.consent label {
  font-size: var(--fs-body-s);  /* 14px */
  font-weight: 400;
  line-height: 1.571;
  color: #717171;
  cursor: pointer;
}


/* ============================================================
   BREADCRUMB  (shared across inner pages)
   ============================================================ */
/* ---- Breadcrumb ---- */
.breadcrumb {
  max-width: var(--container-outer);
  margin-inline: auto;
  margin-bottom: var(--sp-24);
  padding-inline: var(--gutter);
  padding-top: var(--sp-12);
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-size: var(--fs-body-s);   /* 14px */
  line-height: 1.571;
}
.breadcrumb a {
  color: #717171;
  transition: color var(--dur) var(--ease);
}
.breadcrumb a:hover { color: var(--color-red); }
.breadcrumb__sep {
  display: inline-flex;
  width: 16px;
  height: 16px;
  color: #717171;
}
.breadcrumb__sep svg { width: 100%; height: 100%; }
.breadcrumb__current { color: var(--gray-900); }

@media (max-width: 600px) {
  .breadcrumb {
    margin-bottom: var(--sp-20);
  }
}
