/* ==========================================================================
   RE9.AI - COMPONENTS & INTERACTIVE MODULES STYLESHEET
   ========================================================================== */

/* ==========================================================================
   Tech Service Cards & Grid
   ========================================================================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 30px;
}

.service-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-subtle);
  padding: 36px 30px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.service-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-active);
  background: var(--bg-card-hover);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 153, 0, 0.15);
}

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

.service-card.cyan-accent:hover {
  border-color: var(--border-cyan);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(74, 206, 169, 0.15);
}

.service-card.cyan-accent:hover::before {
  background: linear-gradient(90deg, transparent, var(--accent-cyan), transparent);
  opacity: 1;
}

.service-icon-box {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  margin-bottom: 24px;
  border: 1px solid var(--border-active);
  transition: all var(--transition-normal);
}

.service-card:hover .service-icon-box {
  transform: scale(1.1);
  box-shadow: 0 0 20px var(--primary-glow);
  background: var(--primary);
  color: #000000;
}

.service-card.cyan-accent .service-icon-box {
  background: var(--accent-cyan-soft);
  color: var(--accent-cyan);
  border-color: var(--border-cyan);
}

.service-card.cyan-accent:hover .service-icon-box {
  background: var(--accent-cyan);
  color: #000000;
  box-shadow: 0 0 20px var(--accent-cyan-glow);
}

.service-card h3 {
  font-size: 1.35rem;
  margin-bottom: 12px;
  color: var(--text-white);
}

.service-card p {
  color: var(--text-body);
  font-size: 0.95rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.service-features {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--border-subtle);
  margin-bottom: 24px;
}

.service-features li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-body);
  font-size: 0.875rem;
  margin-bottom: 10px;
}

.service-features li svg {
  color: var(--accent-cyan);
  flex-shrink: 0;
}

/* ==========================================================================
   AI Readiness Diagnostic ("Diagnóstico de Maturidade em IA")
   ========================================================================== */
.ai-quiz-container {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 48px;
  color: var(--text-white);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-lg);
  position: relative;
}

.ai-quiz-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 36px;
  position: relative;
}

.ai-progress-bg {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-50%);
  z-index: 1;
}

.ai-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent-cyan));
  width: 33.33%;
  transition: width var(--transition-normal);
}

.ai-step-indicator {
  position: relative;
  z-index: 2;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  background: var(--bg-surface);
  border: 2px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--text-muted);
  transition: all var(--transition-normal);
}

.ai-step-indicator.active {
  background: var(--primary);
  border-color: var(--text-white);
  color: #000000;
  box-shadow: 0 0 16px var(--primary-glow);
}

.ai-step-indicator.completed {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  color: #000000;
}

.ai-step-pane {
  display: none;
  animation: fadeIn 0.3s ease forwards;
}

.ai-step-pane.active {
  display: block;
}

.ai-step-pane h3 {
  color: var(--text-white);
  font-size: 1.45rem;
  margin-bottom: 8px;
}

.ai-step-pane p {
  color: var(--text-body);
  margin-bottom: 24px;
}

.ai-options-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

.ai-option-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ai-option-card:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--primary-light);
  transform: translateY(-2px);
}

.ai-option-card.selected {
  background: var(--primary-soft);
  border-color: var(--primary);
  box-shadow: 0 0 20px var(--primary-glow);
}

.ai-option-card svg {
  color: var(--primary);
}

.ai-option-card strong {
  color: var(--text-white);
  font-size: 1.05rem;
}

.ai-option-card span {
  color: var(--text-muted);
  font-size: 0.825rem;
  line-height: 1.4;
}

.ai-result-box {
  background: rgba(255, 153, 0, 0.05);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 36px;
  text-align: center;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Project Simulator Component
   ========================================================================== */
.simulator-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
}

.simulator-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
}

.service-select-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  margin-bottom: 12px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.service-select-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--primary);
}

.service-select-item.active {
  background: var(--primary-soft);
  border-color: var(--primary);
}

.service-select-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.service-checkbox {
  width: 22px;
  height: 22px;
  accent-color: var(--primary);
  cursor: pointer;
}

.simulator-summary-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: var(--text-white);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 0 25px rgba(255, 153, 0, 0.1);
}

.summary-item {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
  font-size: 0.95rem;
}

.summary-item span:first-child {
  color: var(--text-body);
}

.summary-item span:last-child {
  font-weight: 700;
  color: var(--text-white);
}

@media (max-width: 860px) {
  .simulator-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   LawTech Interactive Showcase
   ========================================================================== */
.lawtech-tabs {
  display: flex;
  gap: 12px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 32px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.lawtech-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-body);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.lawtech-tab-btn:hover {
  color: var(--text-white);
  background: rgba(255, 255, 255, 0.05);
}

.lawtech-tab-btn.active {
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid var(--border-active);
}

.lawtech-tab-content {
  display: none;
  animation: fadeIn 0.3s ease;
}

.lawtech-tab-content.active {
  display: block;
}

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 20px;
}

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

.faq-item.active {
  border-color: var(--primary);
}

.faq-header {
  padding: 22px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.faq-header h4 {
  font-size: 1.05rem;
  color: var(--text-white);
  font-weight: 700;
}

.faq-toggle-icon {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-white);
  transition: transform var(--transition-normal), background var(--transition-fast);
}

.faq-item.active .faq-toggle-icon {
  transform: rotate(180deg);
  background: var(--primary);
  color: #000000;
}

.faq-content {
  padding: 0 24px 22px;
  color: var(--text-body);
  font-size: 0.95rem;
  line-height: 1.6;
  display: none;
}

.faq-item.active .faq-content {
  display: block;
  animation: fadeIn 0.3s ease;
}

@media (max-width: 600px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

/* ==========================================================================
   WhatsApp Floating Quick-Widget
   ========================================================================== */
.whatsapp-widget-container {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 1050;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.whatsapp-float-btn {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-full);
  background: var(--whatsapp);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.4);
  border: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
}

.whatsapp-float-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 12px 30px rgba(37, 211, 102, 0.55);
}

.whatsapp-badge-pulse {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  background: var(--primary);
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-main);
}

.whatsapp-popup-card {
  width: 320px;
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-active);
  margin-bottom: 16px;
  overflow: hidden;
  display: none;
  animation: fadeIn 0.25s ease;
}

.whatsapp-popup-card.open {
  display: block;
}

.wa-card-header {
  background: var(--whatsapp-dark);
  color: var(--white);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wa-card-header h5 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: 2px;
}

.wa-card-header p {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
}

.wa-card-body {
  padding: 16px;
  background: var(--bg-surface);
  max-height: 320px;
  overflow-y: auto;
}

.wa-msg-bubble {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0 var(--radius-md) var(--radius-md) var(--radius-md);
  padding: 12px 14px;
  font-size: 0.85rem;
  color: var(--text-heading);
  margin-bottom: 12px;
  line-height: 1.4;
}

.wa-topic-btn {
  width: 100%;
  text-align: left;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 0.825rem;
  font-weight: 600;
  color: var(--text-white);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wa-topic-btn:hover {
  background: var(--primary-soft);
  border-color: var(--primary);
  color: var(--primary-light);
}

/* ==========================================================================
   Discovery Briefing Modal
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(5, 8, 17, 0.85);
  backdrop-filter: blur(12px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
  animation: fadeIn 0.25s ease;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-active);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 580px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 36px;
  position: relative;
  box-shadow: var(--shadow-lg);
  color: var(--text-white);
}

.modal-close-btn {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-body);
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--primary-soft);
  color: var(--primary);
}

.form-group {
  margin-bottom: 18px;
}

.form-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--text-white);
  margin-bottom: 6px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--text-white);
  background: var(--bg-surface);
  transition: border-color var(--transition-fast);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
