/* ==========================================================================
   components.css — reusable UI pieces (buttons, icons, cards, accordion,
   table, form, floating call bar)
   ========================================================================== */

/* Icons (inline SVG sprite, see <svg id="icon-sprite"> in index.html) ------- */
.icon {
  flex-shrink: 0;
  width: 1rem; height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--sm { width: 0.875rem; height: 0.875rem; }
.icon--lg { width: 1.25rem;  height: 1.25rem; }
.icon--xl { width: 1.5rem;   height: 1.5rem; }

/* Buttons ------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: 7px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.7;
  color: var(--white);
  transition: background-color .15s, border-color .15s, color .15s;
}
.btn--call     { background: var(--red); }
.btn--call:hover { background: var(--red-dark); }
.btn--whatsapp { background: var(--whatsapp); }
.btn--whatsapp:hover { background: var(--whatsapp-dark); }
.btn--ghost {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.15); }
.btn--white {
  background: var(--white);
  color: var(--red);
  font-weight: 800;
  font-size: 15px;
  padding: 1rem 1.75rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.15);
}
.btn--white:hover { background: var(--surface); }

.btn--lg    { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2); }
.btn--wide  { padding-inline: 1.75rem; }
.btn--xl    { font-size: 15px; padding: 0.875rem 1.75rem; }
.btn--block { width: 100%; padding-block: 0.75rem; font-size: 13px; }
.btn--form  { width: 100%; padding-block: 0.875rem; font-size: 13.5px; }
.btn--nav   { padding: 0.5rem 1rem; font-size: 13px; border-radius: 12px; }
.btn--menu  { justify-content: flex-start; padding: 0.625rem 0.75rem; font-size: 14px; border-radius: 6px; }

/* Eyebrow label + accent rule ---------------------------------------------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blue);
}
.eyebrow::before,
.eyebrow--center::after {
  content: "";
  width: 20px; height: 2px;
  border-radius: 1px;
  background: var(--bar, var(--red));
}
.eyebrow--center {
  display: inline-flex;
  gap: 0.5rem;
  margin-bottom: 0;
}
.eyebrow--light { color: rgba(255, 255, 255, 0.7); }
.eyebrow--amber { --bar: var(--amber); }

.rule {
  display: block;
  width: 40px; height: 3px;
  margin: 0.5rem auto 0.75rem;
  border-radius: 1.5px;
  background: var(--bar, var(--red));
}
.rule--amber { --bar: var(--amber); }

.pill {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.25rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
}

/* Fault cards ---------------------------------------------------------------- */
.fault-card {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: 0 2px 12px rgba(10, 25, 49, 0.06);
  transition: box-shadow .2s;
}
.fault-card:hover { box-shadow: 0 8px 24px rgba(10, 25, 49, 0.12); }
.fault-card::before {                       /* coloured top bar */
  content: "";
  display: block;
  height: 4px;
  background: var(--blue);
}
.grid--faults > .fault-card:nth-child(3n + 2)::before { background: var(--navy); }
.grid--faults > .fault-card:nth-child(3n)::before     { background: var(--amber); }

.fault-card__media {
  position: relative;
  height: 92px;
  overflow: hidden;
  background: var(--navy);
}
.fault-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0.9;
  transition: transform .5s;
}
.fault-card:hover .fault-card__media img { transform: scale(1.04); }
.fault-card__media::after {                 /* dark gradient overlay */
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 25, 49, 0.8), transparent);
}
.fault-card__tag {
  position: absolute;
  left: 0.5rem; bottom: 0.5rem;
  z-index: 1;
  padding: 0.25rem 0.5rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.8);
}
.fault-card__body { padding: 0.75rem; }
.fault-card__title {
  margin-bottom: 0.375rem;
  font-size: 13px;
  line-height: 1.35;
  color: var(--navy);
}
.fault-card__text { font-size: 12px; line-height: 1.55; color: var(--muted); }

/* Generic content cards ------------------------------------------------------ */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 10px rgba(10, 25, 49, 0.04);
  transition: box-shadow .2s;
}
.card:hover { box-shadow: 0 8px 24px rgba(10, 25, 49, 0.08); }

.card--machine { padding: 1.5rem; }
.card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px; height: 48px;
  margin-bottom: 1rem;
  border-radius: var(--radius);
  background: rgba(10, 25, 49, 0.07);
  color: var(--navy);
}
.card__title { margin-bottom: 0.5rem; font-size: 15px; color: var(--navy); }
.card__text  { font-size: 13.5px; line-height: 1.7; color: var(--muted); }

/* Service cards (accent colour set per variant) ------------------------------ */
.service-card {
  --accent: var(--blue);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  transition: box-shadow .2s;
}
.service-card:hover { box-shadow: 0 8px 24px rgba(10, 25, 49, 0.1); }
.service-card::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--accent);
}
.service-card--amber { --accent: var(--amber); }
.service-card--brown { --accent: var(--brown); }
.service-card--green { --accent: var(--green); }

.service-card__body { padding: 1.5rem; }
.service-card__icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px; height: 44px;
  margin-bottom: 1rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--navy);
}
.service-card__title { margin-bottom: 0.5rem; font-size: 15px; color: var(--navy); }
.service-card__text  { margin-bottom: 0.75rem; font-size: 13.5px; line-height: 1.65; color: var(--muted); }
.service-card__link  { font-size: 13px; font-weight: 700; color: var(--blue); }

/* Pricing cards -------------------------------------------------------------- */
.price-card {
  --accent: var(--red);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 2px 10px rgba(10, 25, 49, 0.04);
}
.price-card::before {
  content: "";
  display: block;
  height: 4px;
  background: var(--accent);
}
.price-card--amber { --accent: var(--amber); }
.price-card--green { --accent: var(--green); }
.price-card--brown { --accent: var(--brown); }

.price-card__body { padding: 1.5rem; }
.price-card__title { margin-bottom: 0.5rem; font-size: 15px; color: var(--navy); }
.price-card__text  { margin-bottom: 1rem; font-size: 13px; line-height: 1.6; color: var(--muted); }

.price-card__amount {
  margin-bottom: 1rem;
  padding: 1rem;
  text-align: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
}
.price-card__label {
  margin-bottom: 0.25rem;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.price-card__price { font-size: 18px; font-weight: 900; color: var(--navy); }
.price-card__unit  { font-size: 11px; color: var(--muted); }

.price-card__features { display: grid; gap: 0.375rem; margin-bottom: 1.25rem; }
.price-card__features li {
  display: flex;
  gap: 0.375rem;
  font-size: 12.5px;
  color: var(--muted);
}
.price-card__features li::before { content: "✓"; font-weight: 800; color: var(--blue); }

.quote-band {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  margin-bottom: 2.5rem;
  padding: 1.5rem;
  text-align: center;
  background: var(--navy);
  border-radius: var(--radius-lg);
}
.quote-band__text { font-size: 16px; font-weight: 700; color: var(--white); }
@media (min-width: 768px) {
  .quote-band { flex-direction: row; padding: 1.75rem; }
  .quote-band__text { font-size: 18px; }
}

/* Pricing table (reflows into stacked cards on small screens) ---------------- */
.price-table-wrap {
  overflow-x: auto;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.price-table { width: 100%; font-size: 13.5px; }
.price-table thead tr { background: var(--navy); color: var(--white); font-size: 12.5px; }
.price-table th { padding: 0.875rem; text-align: left; font-weight: 700; }
.price-table td { padding: 0.875rem; color: var(--muted); }
.price-table tbody tr { border-top: 1px solid var(--line); transition: background-color .15s; }
.price-table tbody tr:hover { background: rgba(10, 25, 49, 0.03); }
.price-table td:first-child { font-weight: 700; color: var(--navy); }
.price-table td:last-child  { font-weight: 800; white-space: nowrap; color: var(--red); }

@media (max-width: 767px) {
  .price-table-wrap { overflow: visible; background: none; border: 0; }
  .price-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .price-table, .price-table tbody { display: block; }
  .price-table tbody tr {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.625rem;
    padding: 1rem;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }
  .price-table td { padding: 0; font-size: 12.5px; }
  .price-table td:first-child { flex-basis: 100%; font-size: 13.5px; margin-bottom: -0.25rem; }
  .price-table td[data-label="Description"] { flex-basis: 100%; line-height: 1.5; }
  .price-table td[data-label="Qty"],
  .price-table td[data-label="Parts"],
  .price-table td[data-label="Call-Out"] {
    padding: 0.25rem 0.5rem;
    font-size: 11px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 5px;
  }
  .price-table td[data-label]:not(:first-child):not(:last-child):not([data-label="Description"])::before {
    content: attr(data-label) ": ";
  }
  .price-table td:last-child { font-size: 13px; }
}

/* Tiles (brands, coverage areas) --------------------------------------------- */
.tile {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 0.875rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 5px;
  transition: border-color .15s;
}
.tile:hover { border-color: rgba(37, 99, 235, 0.4); }
.tile__name { margin-bottom: 0.375rem; font-size: 12.5px; font-weight: 700; line-height: 1.25; color: var(--navy); }
.tile__text { flex: 1; font-size: 11px; line-height: 1.5; color: var(--muted); }

.tile--area {
  padding: 0.75rem 0.875rem;
  background: var(--surface);
  border-radius: 4px;
}
.tile--area .tile__name { margin: 0; font-size: 13px; font-weight: 600; transition: color .15s; }
.tile--area:hover .tile__name { color: var(--blue); }

/* FAQ accordion --------------------------------------------------------------- */
.faq-item {
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .15s, box-shadow .15s;
}
.faq-item.is-open {
  border-color: var(--navy);
  box-shadow: 0 4px 16px rgba(10, 25, 49, 0.06);
}

.faq-item__question { margin: 0; font-size: inherit; letter-spacing: 0; line-height: inherit; }
.faq-item__trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.875rem 1rem;
  text-align: left;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink);
  transition: background-color .15s, color .15s;
}
.faq-item__trigger:hover { background: var(--surface); }
.faq-item.is-open .faq-item__trigger { background: var(--navy); color: var(--white); }
.faq-item__label { padding-right: 0.5rem; line-height: 1.4; }

.faq-item__chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 28px; height: 28px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--surface);
  color: var(--muted);
  transition: transform .2s, background-color .15s, border-color .15s, color .15s;
}
.faq-item.is-open .faq-item__chevron {
  transform: rotate(180deg);
  background: rgba(255, 255, 255, 0.15);
  border-color: rgba(255, 255, 255, 0.2);
  color: var(--white);
}

.faq-item__panel {
  display: grid;
  grid-template-rows: 1fr;
}
.faq-item__panel > div { min-height: 0; overflow: hidden; }
.faq-item__answer {
  padding: 0.875rem 1rem;
  background: var(--surface);
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--muted);
}

/* Collapse only when JavaScript is available, so answers stay readable without it */
.js .faq-item__panel {
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows .3s, visibility 0s .3s;
}
.js .faq-item.is-open .faq-item__panel {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows .3s, visibility 0s;
}

/* Forms ------------------------------------------------------------------------ */
.form-card {
  padding: 1.5rem;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 4px 20px rgba(10, 25, 49, 0.06);
}
.form-card__title { margin-bottom: 1.25rem; font-size: 16px; color: var(--navy); }

.form { display: flex; flex-direction: column; gap: 0.75rem; }
.form__label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
  color: var(--muted);
}
.form__control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 5px;
  font-size: 13.5px;
  color: var(--ink);
  outline: none;
}
.form__control:focus { border-color: var(--blue); }
.form__control::placeholder { color: var(--placeholder); }
textarea.form__control { min-height: 90px; resize: vertical; }
.form__control[aria-invalid="true"] { border-color: var(--red); }

.form__status {
  min-height: 1.25rem;
  font-size: 13px;
  font-weight: 600;
  color: var(--green);
}
.form__status.is-error { color: var(--red); }

/* Floating call / WhatsApp bar ---------------------------------------------------- */
.floating-cta {
  position: fixed;
  bottom: 20px;
  left: 50%;
  z-index: 999;
  display: flex;
  width: 92%;
  max-width: 340px;
  overflow: hidden;
  border-radius: 28px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  transform: translateX(-50%);
}
.floating-cta a {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--white);
}
.floating-cta__call { background: var(--red); border-right: 1px solid rgba(255, 255, 255, 0.2); }
.floating-cta__wa   { background: var(--whatsapp); }
