/**
 * SEO Content Engine Styles
 * Scoped to .seo-* classes so product buy pages are never affected.
 * All styles use CSS custom properties for consistency with the design system.
 */

/* ============================================================
   Section Containers
   ============================================================ */
.seo-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

.seo-section + .seo-section {
  border-top: 1px solid #e5e7eb;
}

/* ============================================================
   Section Headings
   ============================================================ */
.seo-section h2 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 1.25rem 0;
  line-height: 1.35;
}

.seo-section h3 {
  font-size: 1.125rem;
  font-weight: 600;
  color: #1f2937;
  margin: 0 0 1rem 0;
  line-height: 1.4;
}

.seo-section h4 {
  font-size: 1rem;
  font-weight: 600;
  color: #374151;
  margin: 0 0 0.75rem 0;
}

/* ============================================================
   Cards & Callout Boxes
   ============================================================ */
.seo-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1rem;
}

.seo-card:last-child {
  margin-bottom: 0;
}

.seo-callout {
  background: #f0f9ff;
  border-left: 4px solid #0ea5e9;
  border-radius: 0 10px 10px 0;
  padding: 1.25rem 1.5rem;
  margin: 1.25rem 0;
}

.seo-callout-accent {
  background: #fff7ed;
  border-left: 4px solid #f97316;
}

.seo-callout-success {
  background: #f0fdf4;
  border-left: 4px solid #22c55e;
}

.seo-callout-tip {
  background: #faf5ff;
  border-left: 4px solid #a855f7;
}

.seo-callout h4 {
  color: #0c4a6e;
  margin-bottom: 0.5rem;
}

.seo-callout-accent h4 {
  color: #9a3412;
}

.seo-callout-success h4 {
  color: #166534;
}

.seo-callout-tip h4 {
  color: #6b21a8;
}

/* ============================================================
   Icons & Badges
   ============================================================ */
.seo-icon {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.5rem;
  vertical-align: middle;
  font-size: 1.1rem;
  line-height: 1;
}

.seo-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
}

.seo-badge-blue   { background: #dbeafe; color: #1e40af; }
.seo-badge-green  { background: #dcfce7; color: #166534; }
.seo-badge-orange { background: #ffedd5; color: #9a3412; }
.seo-badge-purple { background: #f3e8ff; color: #6b21a8; }
.seo-badge-teal   { background: #ccfbf1; color: #115e59; }

/* ============================================================
   Internal Links
   ============================================================ */
.seo-link {
  color: #1a56db;
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid transparent;
  transition: border-color 0.15s;
}

.seo-link:hover {
  border-bottom-color: #1a56db;
}

.seo-link-block {
  display: block;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  color: #1e293b;
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 0.5rem;
  transition: all 0.15s;
}

.seo-link-block:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* ============================================================
   Lists
   ============================================================ */
.seo-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.seo-list li {
  position: relative;
  padding-left: 1.75rem;
  padding-bottom: 0.75rem;
  line-height: 1.6;
}

.seo-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #22c55e;
  font-weight: 700;
}

.seo-list-numbered {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: seo-counter;
}

.seo-list-numbered li {
  position: relative;
  padding-left: 2.25rem;
  padding-bottom: 1rem;
  line-height: 1.6;
}

.seo-list-numbered li::before {
  counter-increment: seo-counter;
  content: counter(seo-counter);
  position: absolute;
  left: 0;
  top: -0.1rem;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: #1a56db;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   Related Products Grid
   ============================================================ */
.seo-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

.seo-related-card {
  display: block;
  padding: 1rem 1.25rem;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #1f2937;
  text-decoration: none;
  font-weight: 500;
  transition: all 0.15s;
}

.seo-related-card:hover {
  border-color: #1a56db;
  box-shadow: 0 4px 12px rgba(26, 86, 219, 0.1);
  transform: translateY(-1px);
}

/* ============================================================
   CTA Buttons
   ============================================================ */
.seo-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.seo-cta-primary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #1a56db;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 0.15s;
}

.seo-cta-primary:hover {
  background: #1e429f;
}

.seo-cta-secondary {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background: #f8fafc;
  color: #1e293b;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.15s;
}

.seo-cta-secondary:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* ============================================================
   FAQ Accordion (overrides inline styles from engine)
   ============================================================ */
.seo-faq-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.seo-faq-item {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}

.seo-faq-question {
  width: 100%;
  text-align: left;
  padding: 1rem 1.25rem;
  font-size: 1rem;
  font-weight: 600;
  color: #1f2937;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.seo-faq-question:hover {
  background: #f9fafb;
}

.seo-faq-answer {
  display: none;
  padding: 0 1.25rem 1.25rem;
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.7;
}

.seo-faq-open .seo-faq-answer {
  display: block;
}

/* ============================================================
   Paragraph & Text Utilities
   ============================================================ */
.seo-lead {
  font-size: 1.05rem;
  color: #374151;
  line-height: 1.7;
  margin-bottom: 1rem;
}

.seo-text-muted {
  color: #6b7280;
  font-size: 0.9rem;
}

.seo-divider {
  height: 1px;
  background: #e5e7eb;
  margin: 2rem 0;
  border: none;
}

/* ============================================================
   Industry-Specific Accents
   ============================================================ */
.seo-industry-healthcare    { --accent: #0ea5e9; --accent-bg: #f0f9ff; --accent-text: #0c4a6e; }
.seo-industry-construction  { --accent: #f97316; --accent-bg: #fff7ed; --accent-text: #9a3412; }
.seo-industry-restaurants   { --accent: #ef4444; --accent-bg: #fef2f2; --accent-text: #991b1b; }
.seo-industry-realestate    { --accent: #22c55e; --accent-bg: #f0fdf4; --accent-text: #166534; }
.seo-industry-education     { --accent: #8b5cf6; --accent-bg: #f5f3ff; --accent-text: #5b21b6; }
.seo-industry-finance       { --accent: #64748b; --accent-bg: #f8fafc; --accent-text: #334155; }
.seo-industry-default       { --accent: #1a56db; --accent-bg: #eff6ff; --accent-text: #1e3a8a; }

/* Apply accent to section borders and callouts */
[class*="seo-industry-"] .seo-card {
  border-color: var(--accent, #e5e7eb);
}

[class*="seo-industry-"] .seo-callout {
  border-left-color: var(--accent, #0ea5e9);
  background: var(--accent-bg, #f0f9ff);
}

[class*="seo-industry-"] .seo-callout h4 {
  color: var(--accent-text, #0c4a6e);
}

/* ============================================================
   Nearby Cities Chips
   ============================================================ */
.seo-city-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.seo-city-chip {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  border-radius: 6px;
  background: #f0f4ff;
  color: #1a56db;
  border: 1px solid #dbeafe;
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s;
}

.seo-city-chip:hover {
  background: #dbeafe;
}

/* ============================================================
   Mobile Adjustments
   ============================================================ */
@media (max-width: 640px) {
  .seo-section {
    padding: 1.5rem 1rem;
  }

  .seo-section h2 {
    font-size: 1.125rem;
  }

  .seo-related-grid {
    grid-template-columns: 1fr;
  }

  .seo-cta-row {
    flex-direction: column;
  }

  .seo-cta-primary,
  .seo-cta-secondary {
    width: 100%;
    text-align: center;
  }
}
