/* ═══════════════════════════════════════════════════════════
   COMPONENTS.CSS — Buttons, Forms, Cards, Badges, CTAs
   Load THIRD in every HTML file (after base.css, layout.css)
═══════════════════════════════════════════════════════════ */

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 50px;
  padding: 0 26px;
  border-radius: 10px;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 700;
  font-size: .95rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .25s var(--ease);
  user-select: none;
}

.btn:hover { transform: translateY(-1px); }

/* Disabled state for all buttons */
.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* Button press effect — scale down slightly on click for tactile feel */
.btn:not(:disabled):active {
  transform: scale(0.97) translateY(0) !important;
}
.btn--blue {
  background: var(--blue);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(29,78,216,.25);
}
.btn--blue:hover {
  box-shadow: 0 8px 20px rgba(29,78,216,.35);
}

.btn--red {
  background: var(--red);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(220,38,38,.25);
}
.btn--red:hover {
  box-shadow: 0 8px 20px rgba(220,38,38,.35);
}

.btn--outline {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--border);
}
.btn--outline:hover { border-color: var(--ink); }

.btn--white {
  background: var(--white);
  color: var(--ink);
  box-shadow: var(--shadow);
}
.btn--white:hover { box-shadow: var(--shadow-md); }

/* Ghost button — for use on dark backgrounds */
.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 2px solid rgba(255,255,255,.5);
}
.btn--ghost:hover {
  border-color: var(--white);
  box-shadow: 0 0 0 2px rgba(255,255,255,.15);
}

/* ── Service Cards ── */
.service-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow .3s var(--ease), transform .3s var(--ease), border-color .25s;
  position: relative;
}

.service-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--red), var(--red-accent));
  opacity: 0;
  transition: opacity .3s;
}

.service-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
  border-color: var(--blue-light);
}

.service-card:hover::after {
  opacity: 1;
}

.service-card__image {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
}

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

.service-card:hover .service-card__image img {
  transform: scale(1.04);
}

.service-card__icon {
  position: absolute;
  bottom: 14px;
  left: 16px;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: rgba(255,255,255,.95);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow); transform: translateX(3px);
}

.service-card__icon svg {
  color: var(--blue);
}

.service-card__body {
  padding: 20px 24px 24px;
}

.service-card__title {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 8px;
  letter-spacing: -.01em;
}

.service-card__desc {
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.service-card__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--blue);
  text-decoration: none;
  transition: gap .2s;
}

.service-card:hover .service-card__link { gap: 10px; }

/* ── Review Cards ── */
.review-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: box-shadow .3s, transform .3s;
  position: relative;
  overflow: hidden;
}

.review-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--blue), var(--blue-light));
  opacity: 0;
  transition: opacity .3s;
}

.review-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.review-card:hover::before {
  opacity: 1;
}

.review-card__stars {
  color: var(--amber);
  font-size: .88rem;
  letter-spacing: 2px;
  margin-bottom: 14px;
  display: flex;
  gap: 3px;
  transition: filter .25s;
}

.review-card:hover .review-card__stars {
  filter: drop-shadow(0 0 4px rgba(245,158,11,.5));
}

.review-card__text {
  font-size: .9rem;
  color: var(--ink-2);
  line-height: 1.7;
  margin-bottom: 18px;
  font-style: italic;
}

.review-card__author {
  display: flex;
  align-items: center;
  gap: 12px;
}

.review-card__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: .85rem;
  color: var(--white);
  flex-shrink: 0;
}

.review-card__name {
  font-size: .86rem;
  font-weight: 800;
}

.review-card__role {
  font-size: .73rem;
  color: var(--muted);
}

/* ── FAQ Items ── */
.faq__list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 800px;
}

.faq__footer {
  margin-top: 24px;
  display: flex;
}

.faq__footer .btn {
  height: 42px;
  padding: 0 20px;
  font-size: .82rem;
}

.faq-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s, background .2s, box-shadow .25s;
}

.faq-item:hover,
.faq-item[open] {
  border-color: var(--blue-light);
  background: var(--surface-2-alt);
  box-shadow: inset 3px 0 0 var(--blue);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  cursor: pointer;
  font-weight: 800;
  font-size: .95rem;
  list-style: none;
  gap: 16px;
  transition: color .2s;
}

.faq-question::-webkit-details-marker { display: none; }
.faq-question:hover { color: var(--blue); }

.faq-icon {
  flex: 0 0 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .35s cubic-bezier(0.34, 1.56, 0.64, 1), background .2s, border-color .2s, color .2s;
}

.faq-item[open] .faq-icon {
  transform: rotate(45deg);
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.faq-answer {
  padding: 0 22px 18px;
  font-size: .88rem;
  color: var(--ink-2);
  line-height: 1.7;
}

/* ── CTA Band ── */
.cta-band {
  background: var(--ink);
  padding: 72px 0;
  position: relative;
  overflow: hidden;
}

.cta-band::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: rgba(29,78,216,.12);
  pointer-events: none;
}

.cta-band::after {
  content: '';
  position: absolute;
  bottom: -60px;
  left: 10%;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(220,38,38,.08);
  pointer-events: none;
}

.cta-band__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}

.cta-band__text h2 {
  color: var(--white);
  font-size: clamp(1.6rem, 2.8vw, 2.4rem);
  margin-bottom: 6px;
}

.cta-band__text p {
  color: rgba(255,255,255,.5);
  font-size: 1rem;
}

.cta-band__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* ── Why Us Items ── */
.why-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--border);
  transition: box-shadow .25s, transform .25s, border-color .25s;
}

.why-item:hover {
  box-shadow: var(--shadow-md);
  transform: translateX(4px);
  border-color: var(--blue-light);
}

.why-item__icon {
  flex: 0 0 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--blue-pale);
  border: 1px solid var(--blue-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--blue);
}

.why-item__icon svg { color: var(--blue); }

.why-item__title {
  font-size: .95rem;
  font-weight: 800;
  margin-bottom: 3px;
}

.why-item__desc {
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Area Grid Items ── */
.area-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.area-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 600;
  color: var(--ink-2);
  transition: box-shadow .2s, border-color .2s, transform .2s;
}

.area-item:hover {
  box-shadow: var(--shadow); transform: translateX(3px);
  border-color: var(--blue-light);
}

.area-item svg {
  width: 16px;
  height: 16px;
  color: var(--blue);
  flex-shrink: 0;
}

@media (max-width: 1024px) {
  .area-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .testimonials__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .services__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .area-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .testimonials__grid {
    grid-template-columns: 1fr;
  }
  .services__grid {
    grid-template-columns: 1fr;
  }
}

/* ── Gallery Items ── */
.gallery__track {
  display: flex;
  gap: 16px;
  padding: 6px 0;
  overflow-x: auto;
  cursor: grab;
  position: relative;
  z-index: 3;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.gallery__track:active { cursor: grabbing; }

.gallery-item {
  scroll-snap-align: start;
  flex: 0 0 340px;
  height: 240px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s var(--ease);
}

.gallery-item:hover img { transform: scale(1.04); }

/* Gradient overlay replaces the cheap white badge */
.gallery-item::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60%;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 100%);
  pointer-events: none;
}

.gallery-item__label {
  position: absolute;
  bottom: 12px;
  left: 14px;
  z-index: 2;
  font-size: .78rem;
  font-weight: 800;
  color: var(--white);
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
  letter-spacing: .02em;
}

/* ── Process Steps ── */
.process__steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}

.process__step {
  padding: 40px 28px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.06);
  border-right: none;
  transition: background .3s;
  position: relative;
}

.process__step:last-child { border-right: 1px solid rgba(255,255,255,.06); }

.process__step:hover { background: rgba(255,255,255,.07); }

/* Step connector line */
.process__step::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -1px;
  transform: translateY(-50%);
  width: 0;
  height: 40%;
  border-right: 1px dashed rgba(255,255,255,.12);
}

.process__step:last-child::after { display: none; }

.process__step-num {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 3rem;
  font-weight: 800;
  color: var(--blue);
  -webkit-text-stroke: 0;
  line-height: 1;
  margin-bottom: 20px;
  letter-spacing: -.03em;
  position: relative;
  display: inline-block;
}

.process__step-num::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(29,78,216,.18) 0%, rgba(59,130,246,.08) 100%);
  border: 1.5px solid rgba(29,78,216,.4);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 0 0 4px rgba(29,78,216,.06);
  z-index: -1;
  transition: background .3s, border-color .3s, box-shadow .3s, transform .3s;
}

.process__step:hover .process__step-num {
  color: var(--blue-light);
}

.process__step:hover .process__step-num::before {
  background: linear-gradient(135deg, rgba(59,130,246,.28) 0%, rgba(29,78,216,.2) 100%);
  border-color: rgba(59,130,246,.7);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 0 0 6px rgba(29,78,216,.1), 0 0 24px rgba(29,78,216,.18);
  transform: translate(-50%, -50%) scale(1.06);
}

.process__step-title {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 10px;
}

.process__step-desc {
  font-size: .88rem;
  color: rgba(255,255,255,.6);
  line-height: 1.65;
}

/* ── Stat Items ── */
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}

.stat-item {
  text-align: center;
  padding: 40px 24px;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: background .25s, box-shadow .25s;
  cursor: default;
}

.stat-item:last-child { border-right: none; }

.stat-item:hover {
  background: var(--blue-pale);
  box-shadow: inset 0 0 0 1px rgba(29,78,216,.15), inset 0 3px 0 0 var(--blue);
}

.stat-item__icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--blue-pale);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--blue);
  margin-bottom: 4px;
  transition: background .25s, box-shadow .25s;
}

.stat-item:hover .stat-item__icon {
  background: var(--white);
  box-shadow: 0 2px 8px rgba(29,78,216,.2);
}

.stat-item__num {
  font-size: clamp(2.2rem, 3.5vw, 3rem);
  font-weight: 900;
  color: var(--ink);
  letter-spacing: -.04em;
  line-height: 1;
  margin-bottom: 2px;
}

.stat-item__label {
  font-size: .82rem;
  color: var(--muted);
  font-weight: 600;
}

/* ── Form Components (shared across quote + contact pages) ── */
.form-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow);
}
.form-card__title { font-size: 1.4rem; font-weight: 800; margin-bottom: 6px; }
.form-card__sub { font-size: .88rem; color: var(--muted); margin-bottom: 28px; }

.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--ink-2);
  margin-bottom: 8px;
}
.form-label span { color: var(--red); margin-left: 2px; }

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: 'Manrope', sans-serif;
  font-size: .92rem;
  background: var(--white);
  color: var(--ink);
  transition: border-color .2s, box-shadow .2s;
}

.form-select {
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-color: var(--white);
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--placeholder); opacity: 1; }
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(29,78,216,.12);
}
.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-submit { margin-top: 4px; }
.form-submit .btn { width: 100%; }

.form-error-msg {
  display: none;
  background: var(--red-pale);
  border: 1px solid var(--red-light);
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: .86rem;
  color: var(--red);
  margin-bottom: 16px;
}
.form-error-msg.show { display: block; }

.form-success {
  display: none;
  text-align: center;
  padding: 48px 32px;
}
.form-success.show { display: block; }
.form-success__icon { margin-bottom: 16px; }
.form-success__icon svg { color: var(--green); margin-inline: auto; }
.form-success h3 { font-size: 1.4rem; margin-bottom: 10px; }
.form-success p { font-size: .92rem; color: var(--muted); max-width: 36ch; margin-inline: auto; line-height: 1.65; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .services__grid { grid-template-columns: 1fr; }
  .testimonials__grid { grid-template-columns: 1fr; }
  .why-us__grid { grid-template-columns: 1fr; }
  .process__steps { grid-template-columns: 1fr 1fr; }

  .stats__grid { grid-template-columns: repeat(2, 1fr); }
  /* Right column (items 2 & 4): no right border — vertical divider goes on left side of right column */
  .stat-item:nth-child(2),
  .stat-item:nth-child(4) { border-right: none; }
  /* Top row (items 1 & 2): no bottom border — horizontal divider goes on top of bottom row */
  .stat-item:nth-child(1),
  .stat-item:nth-child(2) { border-bottom: none; }
}
