/* =============================================
   COMPONENTS.CSS — Buttons, cards, trust bar,
   product cards, how-it-works, brands,
   financing, testimonials
   The Stairlift Company
   ============================================= */

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 20px 38px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.3px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.18s, box-shadow 0.18s, background 0.18s;
  text-align: center;
  white-space: nowrap;
  line-height: 1;
}
.btn:hover  { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,0.18); }
.btn:active { transform: translateY(0); }

.btn-primary { background: var(--orange); color: var(--white); border-color: var(--orange); }
.btn-primary:hover { background: #c7570a; border-color: #c7570a; }

.btn-secondary { background: transparent; color: var(--navy); border-color: var(--navy); }
.btn-secondary:hover { background: var(--navy); color: var(--white); }

.btn-white { background: var(--white); color: var(--navy); border-color: var(--white); }
.btn-white:hover { background: var(--navy-light); }

.btn-ghost { background: rgba(255,255,255,0.12); color: var(--white); border-color: rgba(255,255,255,0.5); }
.btn-ghost:hover { background: rgba(255,255,255,0.22); }

.btn-sm { padding: 12px 24px; font-size: var(--fs-xs); }
.btn-lg { padding: 19px 38px; font-size: 20px; }

/* ===== TRUST BAR ===== */
.trust-bar { background: var(--navy); padding: 36px 0; }

.trust-bar-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.trust-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 28px;
  border-right: 1px solid rgba(255,255,255,0.12);
}
.trust-item:last-child { border-right: none; }

.trust-icon {
  width: 52px; height: 52px;
  background: rgba(255,255,255,0.10);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.trust-icon svg { width: 26px; height: 26px; fill: #ffb07a; }

.trust-text-num   { font-family: var(--font-head); font-size: var(--fs-lg); font-weight: 900; color: var(--white); line-height: 1; }
.trust-text-label { font-size: var(--fs-xs); color: rgba(255,255,255,0.80); font-weight: 600; margin-top: 3px; }

/* ===== SECTION CTA WRAPPER ===== */
/* Centred button block below a section's main content */
.section-cta {
  text-align: center;
  margin-top: 52px;
}

/* ===== PRODUCT CARDS ===== */
/* Flexbox so any number of cards centres the last row automatically */
.products-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  justify-content: center;
}

.products-grid > article {
  flex: 0 0 calc(33.333% - 19px);
}

.product-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: var(--navy);
}

.product-card-img {
  height: 220px;
  background: var(--navy-light);
  position: relative;
  overflow: hidden;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.35s ease;
}
.product-card:hover .product-card-img img {
  transform: scale(1.04);
}
.product-card-accent {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 5px;
  background: var(--orange);
  z-index: 1;
}

.product-card-body  { padding: 28px; }
.product-card-title { font-family: var(--font-head); font-size: var(--fs-md); font-weight: 700; color: var(--navy); margin-bottom: 10px; line-height: 1.3; }
.product-card-text  { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.75; margin-bottom: 22px; }
.product-card-link  {
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.15s, color 0.15s;
}
.product-card-link:hover { color: var(--orange); gap: 10px; }
.product-card-link svg { width: 18px; height: 18px; fill: currentColor; }

/* ===== HOW IT WORKS ===== */
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  position: relative;
}
/* Dashed connector line between steps */
.how-grid::before {
  content: '';
  position: absolute;
  top: 44px;
  left:  calc(16.66% + 44px);
  right: calc(16.66% + 44px);
  height: 3px;
  background: repeating-linear-gradient(
    90deg,
    var(--border) 0, var(--border) 12px,
    transparent 12px, transparent 20px
  );
}

.how-step { text-align: center; }

.how-num {
  width: 88px; height: 88px;
  background: var(--navy);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 28px;
  position: relative; z-index: 1;
  box-shadow: 0 6px 24px rgba(0,48,135,0.25);
}
.how-num span { font-family: var(--font-head); font-size: var(--fs-xl); font-weight: 900; color: var(--white); line-height: 1; }

.how-step-title { font-family: var(--font-head); font-size: var(--fs-lg); font-weight: 700; color: var(--navy); margin-bottom: 14px; line-height: 1.3; }
.how-step-text  { font-size: var(--fs-base); color: var(--text-muted); line-height: var(--lh-body); }

/* ===== BRANDS ===== */
.brands-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 48px;
}

.brand-tile {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: 12px;
  height: 110px;
  display: flex; align-items: center; justify-content: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.brand-tile:hover { border-color: var(--navy); box-shadow: var(--shadow); }

.brand-tile-name {
  font-family: var(--font-head);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--navy);
  opacity: 0.85;
}

/* ===== FINANCING CARDS ===== */
.financing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 48px;
}

.financing-card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  position: relative;
  transition: transform 0.2s, box-shadow 0.2s;
}
.financing-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.financing-card-accent {
  position: absolute;
  top: 0; left: 32px; right: 32px;
  height: 4px;
  border-radius: 0 0 4px 4px;
}
.financing-card-icon {
  width: 60px; height: 60px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
}
.financing-card-icon svg { width: 30px; height: 30px; fill: var(--white); }
.financing-card-title { font-family: var(--font-head); font-size: var(--fs-md); font-weight: 700; color: var(--navy); margin-bottom: 12px; }
.financing-card-text  { font-size: var(--fs-sm); color: var(--text-muted); line-height: 1.8; margin-bottom: 22px; }
.financing-card-tag   { display: inline-block; padding: 6px 14px; border-radius: 50px; font-size: var(--fs-xs); font-weight: 700; }
.financing-cta { text-align: center; }

/* Financing card colour variants — accent bar, icon bg, tag */
.financing-card-accent--navy   { background: var(--navy); }
.financing-card-accent--orange { background: var(--orange); }
.financing-card-accent--green  { background: var(--green); }

.financing-card-icon--navy   { background: var(--navy); }
.financing-card-icon--orange { background: var(--orange); }
.financing-card-icon--green  { background: var(--green); }

.financing-card-tag--navy   { background: var(--navy-light); color: var(--navy); }
.financing-card-tag--orange { background: var(--orange-lt);  color: var(--orange); }
.financing-card-tag--green  { background: #e8f5ee;           color: var(--green); }

/* ===== TESTIMONIAL CARDS ===== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.testimonial-card {
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: var(--radius);
  padding: 36px 32px;
  position: relative;
}
.testimonial-quote-mark {
  font-family: Georgia, serif;
  font-size: 80px;
  line-height: 1;
  color: rgba(255,255,255,0.12);
  position: absolute;
  top: 16px; left: 24px;
  pointer-events: none;
  font-weight: 700;
}
.testimonial-stars { display: flex; gap: 4px; margin-bottom: 20px; }
.testimonial-stars svg { width: 22px; height: 22px; fill: #ffb07a; }

.testimonial-text {
  font-size: var(--fs-base);
  color: rgba(255,255,255,0.92);
  line-height: var(--lh-body);
  margin-bottom: 28px;
  font-style: italic;
  position: relative; z-index: 1;
}
.testimonial-author   { display: flex; align-items: center; gap: 14px; }
.testimonial-avatar   {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head);
  font-size: var(--fs-md);
  font-weight: 700;
  color: var(--white);
  flex-shrink: 0;
}
.testimonial-name     { font-size: var(--fs-base); font-weight: 700; color: var(--white); line-height: 1.2; }
.testimonial-location { font-size: var(--fs-xs); color: rgba(255,255,255,0.65); margin-top: 3px; }

/* ===== FORM VALIDATION STATES ===== */
.form-field-error input,
.form-field-error select {
  border-color: #d32f2f !important;
}
.form-error-msg {
  display: none;
  font-size: var(--fs-xs);
  color: #d32f2f;
  font-weight: 600;
  margin-top: 6px;
}
.form-field-error .form-error-msg { display: block; }
