/* AI Estimate Demo Widget */
.ai-estimate-section {
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
  padding: 80px 0;
  position: relative;
  overflow: hidden;
}

.ai-estimate-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.ai-estimate-header {
  text-align: center;
  margin-bottom: 40px;
}

.ai-estimate-header .section-eyebrow {
  color: #93c5fd;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.ai-estimate-header h2 {
  color: #fff;
  font-size: 36px;
  font-weight: 800;
  margin: 0 0 12px 0;
}

.ai-estimate-header p {
  color: rgba(255,255,255,0.7);
  font-size: 18px;
  max-width: 600px;
  margin: 0 auto;
}

/* Input Area */
.ai-estimate-input-wrap {
  max-width: 720px;
  margin: 0 auto 30px;
}

.ai-estimate-form {
  display: flex;
  gap: 12px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 14px;
  padding: 8px;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.ai-estimate-form:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.25);
}

.ai-estimate-form input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  font-size: 16px;
  padding: 14px 16px;
  outline: none;
  font-family: inherit;
}

.ai-estimate-form input::placeholder {
  color: rgba(255,255,255,0.4);
  transition: opacity 0.3s;
}

.ai-estimate-form input:focus::placeholder {
  opacity: 0.2;
}

.ai-estimate-form button {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 14px 28px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, transform 0.1s;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 8px;
}

.ai-estimate-form button:hover {
  background: #1d4ed8;
  transform: translateY(-1px);
}

.ai-estimate-form button:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

/* Example Buttons */
.ai-examples {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 16px;
}

.ai-example-btn {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.6);
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.ai-example-btn:hover {
  background: rgba(59,130,246,0.15);
  border-color: rgba(59,130,246,0.3);
  color: #93c5fd;
}

/* Loading */
.ai-estimate-loading {
  display: none;
  text-align: center;
  padding: 40px 0;
}

.ai-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: ai-spin 0.6s linear infinite;
}

@keyframes ai-spin {
  to { transform: rotate(360deg); }
}

.ai-loading-text {
  color: rgba(255,255,255,0.6);
  font-size: 16px;
  margin-top: 16px;
}

.ai-loading-text span {
  animation: ai-pulse 1.5s ease-in-out infinite;
}

@keyframes ai-pulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* Results */
.ai-estimate-results {
  display: none;
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.ai-results-header {
  background: #1a2a4a;
  color: #fff;
  padding: 20px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai-results-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.ai-results-badge {
  background: rgba(59,130,246,0.2);
  color: #93c5fd;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
}

.ai-results-table {
  width: 100%;
  border-collapse: collapse;
}

.ai-results-table th {
  background: #f5f7fa;
  padding: 12px 16px;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid #e5e7eb;
}

.ai-results-table th:last-child {
  text-align: right;
}

.ai-results-table td {
  padding: 12px 16px;
  font-size: 14px;
  color: #1a2a4a;
  border-bottom: 1px solid #f0f0f0;
}

.ai-results-table td:last-child {
  text-align: right;
  font-weight: 600;
}

.ai-results-table tr:last-child td {
  border-bottom: none;
}

.ai-item-type {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  margin-right: 8px;
}

.ai-type-material {
  background: #e0f2fe;
  color: #0369a1;
}

.ai-type-labor {
  background: #fef3c7;
  color: #92400e;
}

.ai-type-fee {
  background: #f3e8ff;
  color: #7c3aed;
}

.ai-results-total {
  background: #f5f7fa;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 2px solid #e5e7eb;
}

.ai-results-total span:first-child {
  font-size: 16px;
  font-weight: 700;
  color: #1a2a4a;
}

.ai-results-total span:last-child {
  font-size: 24px;
  font-weight: 800;
  color: #1a2a4a;
}

.ai-results-message {
  padding: 12px 24px;
  font-size: 14px;
  color: #6b7280;
  background: #fafbfc;
}

/* CTA after results */
.ai-estimate-cta {
  display: none;
  text-align: center;
  padding: 30px 0 0;
}

.ai-estimate-cta p {
  color: rgba(255,255,255,0.7);
  font-size: 16px;
  margin: 0 0 16px 0;
}

.ai-estimate-cta .btn {
  display: inline-block;
  text-decoration: none;
}

/* All Features Grid */
.all-features-section {
  background: #fff;
  padding: 80px 0;
}

.features-mega-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 50px;
}

.feature-mega-card {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 32px 28px;
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-mega-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
}

.feature-mega-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.feature-mega-icon svg {
  width: 24px;
  height: 24px;
  stroke: #fff;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.feature-mega-card h3 {
  font-size: 18px;
  font-weight: 700;
  color: #1e293b;
  margin: 0 0 8px 0;
}

.feature-mega-card p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
  margin: 0;
}

.feature-mega-card .feature-tag {
  display: inline-block;
  margin-top: 12px;
  padding: 3px 10px;
  background: rgba(37,99,235,0.1);
  color: #2563eb;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

/* Responsive */
@media (max-width: 768px) {
  .ai-estimate-header h2 {
    font-size: 28px;
  }

  .ai-estimate-form {
    flex-direction: column;
    padding: 12px;
  }

  .ai-estimate-form button {
    width: 100%;
    justify-content: center;
  }

  .ai-examples {
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 8px;
    -webkit-overflow-scrolling: touch;
  }

  .ai-example-btn {
    flex-shrink: 0;
  }

  .ai-results-table th:nth-child(2),
  .ai-results-table th:nth-child(3),
  .ai-results-table td:nth-child(2),
  .ai-results-table td:nth-child(3) {
    display: none;
  }

  .features-mega-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

@media (max-width: 480px) {
  .ai-estimate-section {
    padding: 50px 0;
  }

  .ai-estimate-header h2 {
    font-size: 24px;
  }
}
