/* Componentes Reutilizáveis - BWB Engenharia */

/* 1. Botão Principal */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background-color: var(--brand);
  color: var(--ink-strong);
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.05rem;
  padding: 0.875rem 1.75rem;
  min-height: 52px;
  border: 2px solid var(--brand);
  border-radius: var(--radius-button);
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
}

.btn-primary:hover {
  background-color: var(--brand-hover);
  border-color: var(--brand-hover);
  color: var(--ink-strong);
}

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

.btn-primary.btn-full {
  width: 100%;
}

/* 2. Botão Secundário */
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  background-color: transparent;
  color: var(--ink-strong);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 0.875rem 1.5rem;
  min-height: 52px;
  border: 1px solid var(--border-control);
  border-radius: var(--radius-button);
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.btn-secondary:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--ink-strong);
}

.bg-dark .btn-secondary {
  color: var(--text-on-dark);
  border-color: var(--border-subtle);
}

.bg-dark .btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--text-on-dark);
}

/* 3. Cards de Serviço */
.service-card {
  background-color: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 2.25rem 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: border-color var(--transition-normal), box-shadow var(--transition-normal);
}

.service-card:hover {
  border-color: var(--border-control);
}

.service-card.featured {
  border: 2px solid var(--ink-strong);
}

.badge-featured {
  position: absolute;
  top: -14px;
  left: 2rem;
  background-color: var(--brand);
  color: var(--ink-strong);
  font-family: var(--font-data);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

/* 4. Formulário em 2 Etapas */
.form-container {
  background-color: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  padding: 2.25rem 2rem;
  box-shadow: 0 6px 8px rgba(17, 20, 22, 0.08);
}

.form-step-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-subtle);
}

.step-label {
  font-family: var(--font-data);
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--mineral);
}

.form-group {
  margin-bottom: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}

.form-group label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.form-control {
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.875rem 1rem;
  min-height: 52px;
  border: 1px solid var(--border-control);
  border-radius: var(--radius-button);
  background-color: var(--surface);
  color: var(--text-primary);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--ink-strong);
  box-shadow: 0 0 0 3px rgba(229, 151, 18, 0.35);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.field-error {
  display: none;
  color: var(--error);
  font-size: 0.8125rem;
  font-weight: 600;
}

.field-error.visible {
  display: block;
}

.form-control[aria-invalid="true"] {
  border-color: var(--error);
}

.field-help {
  color: var(--text-secondary);
  font-size: 0.8125rem;
  line-height: 1.45;
}

.radio-group, .select-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.625rem;
}

.radio-option {
  position: relative;
}

.radio-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-label {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.75rem 0.875rem;
  min-height: 48px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-button);
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  background-color: var(--canvas);
}

.radio-option input[type="radio"]:checked + .radio-label {
  border-color: var(--ink-strong);
  background-color: rgba(229, 151, 18, 0.12);
  color: var(--ink-strong);
  font-weight: 600;
}

.radio-option input[type="radio"]:focus-visible + .radio-label {
  outline: 3px solid var(--ink-strong);
  outline-offset: 2px;
}

.form-privacy-note {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.45;
  text-align: center;
}

/* 5. FAQ Accordion */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.faq-item {
  background-color: var(--surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.faq-trigger {
  width: 100%;
  padding: 1.5rem;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  background: none;
  border: none;
  text-align: left;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--ink-strong);
  cursor: pointer;
}

.faq-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  transition: transform var(--transition-normal);
}

.faq-item.active .faq-icon {
  transform: rotate(180deg);
}

.faq-content {
  display: none;
  padding: 0 1.5rem 1.5rem 1.5rem;
  color: var(--text-primary);
  font-size: 1rem;
  line-height: 1.65;
}

.faq-item.active .faq-content {
  display: block;
}

/* 6. Linha de Referência BWB (Assinatura Visual) */
.ref-line {
  stroke: var(--brand);
  stroke-width: 2px;
  stroke-linecap: round;
  fill: none;
}

@media (max-width: 768px) {
  .ref-line {
    stroke-width: 1.5px;
  }
}

/* Barra CTA Fixa no Mobile */
.mobile-sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: var(--surface);
  border-top: 1px solid var(--border-subtle);
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  box-shadow: 0 -4px 12px rgba(17, 20, 22, 0.1);
  z-index: var(--z-sticky-cta);
}

.cta-label-short {
  display: none;
}

@media (max-width: 768px) {
  .mobile-sticky-cta.visible {
    display: block;
  }
}
