/* LBI Static Site Styles
   All visual design for localbizinsider.com lives here.
   Article content uses semantic HTML + ats-lbi- prefixed classes.
   Redesign by editing this file - never change Ruby renderers for styling. */

/* -- Reset & Base ------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background: #f9fafb;
}

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; display: block; }

/* -- Site Chrome ------------------------------------------------- */

.ats-lbi-header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  padding: 1rem 1.5rem;
}

.ats-lbi-header nav {
  max-width: 64rem;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ats-lbi-header .ats-lbi-logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2563eb;
}

.ats-lbi-header .ats-lbi-logo:hover {
  text-decoration: none;
}

.ats-lbi-header .ats-lbi-nav {
  display: flex;
  gap: 1.5rem;
}

.ats-lbi-header .ats-lbi-nav a {
  color: #4b5563;
}

.ats-lbi-header .ats-lbi-nav a:hover {
  color: #2563eb;
  text-decoration: none;
}

.ats-lbi-main {
  max-width: 52rem;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.ats-lbi-footer {
  background: #1f2937;
  color: #d1d5db;
  margin-top: 4rem;
  padding: 3rem 1.5rem;
}

/* nowrap keeps multi-word labels ("Terms of Service") intact — the line
   only breaks at the " · " separators between links, never mid-label */
.ats-lbi-footer a { color: #93c5fd; white-space: nowrap; }

.ats-lbi-footer h3 {
  color: #fff;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.ats-lbi-footer .ats-lbi-footer-grid {
  max-width: 64rem;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

@media (min-width: 768px) {
  /* auto-fit so the row stays balanced whether the Company column
     renders (3 cols) or not (2 cols) — no orphaned/empty cells */
  .ats-lbi-footer .ats-lbi-footer-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

.ats-lbi-footer .ats-lbi-footer-bottom {
  max-width: 64rem;
  margin: 2rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid #374151;
  text-align: center;
  font-size: 0.875rem;
}

/* -- Article Content --------------------------------------------- */

article h1 {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

article h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

article h3 {
  font-size: 1.125rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

article p {
  margin-bottom: 1rem;
}

article ul, article ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

article ul { list-style: disc; }
article ol { list-style: decimal; }

article li {
  margin-bottom: 0.25rem;
}

article figure {
  margin-bottom: 2rem;
}

article figure img {
  width: 100%;
  border-radius: 0.5rem;
}

article figcaption {
  font-size: 0.875rem;
  color: #6b7280;
  margin-top: 0.5rem;
}

article section {
  margin-top: 2.5rem;
}

article table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 2rem;
}

article thead { background: #f9fafb; }

article th {
  text-align: left;
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid #e5e7eb;
}

article td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #e5e7eb;
}

article blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #f59e0b;
  background: #fffbeb;
  color: #374151;
  font-style: italic;
}

article blockquote p {
  margin: 0;
}

article blockquote p + p {
  margin-top: 0.75rem;
}

article blockquote cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-weight: 500;
  font-size: 0.9rem;
  color: #6b7280;
}

/* -- Answer Block ------------------------------------------------ */

.ats-lbi-answer {
  background: #eff6ff;
  border-left: 4px solid #3b82f6;
  padding: 1.25rem;
  margin-bottom: 2rem;
  font-size: 1.125rem;
}

/* -- Freshness Date ---------------------------------------------- */

.ats-lbi-freshness {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

/* -- Review-source attribution ----------------------------------- */

.ats-lbi-review-source {
  font-size: 0.875rem;
  color: #6b7280;
  font-style: italic;
  margin-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* -- Homepage spotlight card metadata ---------------------------- */

.ats-lbi-card-meta {
  font-size: 0.875rem;
  color: #6b7280;
  margin: 0.25rem 0;
}

/* -- Table of Contents ------------------------------------------- */

.ats-lbi-toc {
  background: #f9fafb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.ats-lbi-toc h2 {
  font-size: 1.125rem;
  margin-top: 0;
  margin-bottom: 0.75rem;
}

.ats-lbi-toc ol {
  padding-left: 1.5rem;
}

.ats-lbi-toc li {
  margin-bottom: 0.25rem;
}

/* -- Stats Grid (Homepage) --------------------------------------- */

.ats-lbi-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 2rem;
}

@media (min-width: 768px) {
  .ats-lbi-stats {
    grid-template-columns: repeat(4, 1fr);
  }
}

.ats-lbi-stats dl {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 1rem;
  text-align: center;
}

.ats-lbi-stats dd {
  font-size: 1.875rem;
  font-weight: 700;
  color: #2563eb;
}

.ats-lbi-stats dt {
  color: #6b7280;
}

/* -- Listing (Business/Chamber Cards) ---------------------------- */

.ats-lbi-listing {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
  list-style: none;
  padding: 0;
}

@media (min-width: 768px) {
  .ats-lbi-listing {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .ats-lbi-listing {
    grid-template-columns: repeat(3, 1fr);
  }
}

.ats-lbi-listing li {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 1rem;
  margin-bottom: 0;
}

.ats-lbi-listing li h3 {
  margin-top: 0;
}

.ats-lbi-listing li p {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 0.25rem;
}

/* -- Detail Card (Business/Chamber Profile) ---------------------- */

.ats-lbi-detail {
  background: #fff;
  border-radius: 0.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 1.5rem;
  margin-bottom: 2rem;
}

.ats-lbi-detail h2 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.ats-lbi-detail dt {
  font-size: 0.875rem;
  color: #6b7280;
}

.ats-lbi-detail dd {
  margin-bottom: 0.75rem;
  font-weight: 500;
}

/* -- CTA Block --------------------------------------------------- */

.ats-lbi-cta {
  background: #f9fafb;
  border-radius: 0.5rem;
  padding: 1.5rem;
  margin-bottom: 2rem;
  text-align: center;
}

.ats-lbi-cta h2 {
  margin-top: 0;
}

.ats-lbi-cta a {
  display: inline-block;
  background: #2563eb;
  color: #fff;
  padding: 0.5rem 1.5rem;
  border-radius: 0.5rem;
  font-weight: 500;
  margin-top: 0.5rem;
}

.ats-lbi-cta a:hover {
  background: #1d4ed8;
  text-decoration: none;
}

/* -- Blog Index -------------------------------------------------- */

.ats-lbi-post {
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 1.5rem;
  margin-bottom: 1.5rem;
}

.ats-lbi-post h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.ats-lbi-post .ats-lbi-freshness {
  margin-bottom: 0.5rem;
}

/* -- FAQ --------------------------------------------------------- */

article dl dt {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

article dl dd {
  margin-bottom: 1.25rem;
  color: #374151;
}

/* -- Rating Stars ------------------------------------------------ */

.ats-lbi-rating {
  color: #eab308;
}

/* -- RE Deal Article ─────────────────────────────────────────────── */

.ats-lbi-deal-flags { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.ats-lbi-deal-flag { background: #fef3c7; color: #92400e; padding: 0.25rem 0.75rem; border-radius: 999px; font-size: 0.85rem; font-weight: 600; }

.ats-lbi-deal-summary-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 1.25rem; margin-bottom: 1.5rem; }
.ats-lbi-deal-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 0.75rem; }
.ats-lbi-deal-tile { text-align: center; }
.ats-lbi-deal-tile-label { display: block; font-size: 0.75rem; color: #64748b; text-transform: uppercase; letter-spacing: 0.05em; }
.ats-lbi-deal-tile-value { display: block; font-size: 1.25rem; font-weight: 700; color: #0f172a; }
.ats-lbi-deal-verdict { font-style: italic; color: #334155; margin: 0; }

.ats-lbi-deal-toc { margin-bottom: 1.5rem; }
.ats-lbi-deal-toc a { display: block; padding: 0.25rem 0; color: #2563eb; text-decoration: none; }
.ats-lbi-deal-toc a:hover { text-decoration: underline; }

.ats-lbi-deal-section { margin-bottom: 2rem; }
.ats-lbi-deal-section h2 { margin-bottom: 0.5rem; }

.ats-lbi-deal-facts { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.ats-lbi-deal-facts td { padding: 0.35rem 0.5rem; border-bottom: 1px solid #e2e8f0; }
.ats-lbi-deal-facts td:first-child { font-weight: 600; width: 40%; color: #475569; }

.ats-lbi-deal-roi-breakdown { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.ats-lbi-deal-roi-breakdown th, .ats-lbi-deal-roi-breakdown td { padding: 0.4rem 0.5rem; border-bottom: 1px solid #e2e8f0; text-align: left; }
.ats-lbi-deal-roi-breakdown tfoot td { border-top: 2px solid #334155; }

.ats-lbi-deal-sale-comps { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.ats-lbi-deal-sale-comps th, .ats-lbi-deal-sale-comps td { padding: 0.4rem 0.5rem; border-bottom: 1px solid #e2e8f0; text-align: left; }

.ats-lbi-deal-comp-summary { font-size: 0.9rem; color: #475569; margin-bottom: 0.5rem; }

.ats-lbi-deal-faq { margin-bottom: 2rem; }
.ats-lbi-deal-faq h3 { margin: 1rem 0 0.25rem; }
.ats-lbi-deal-faq p { margin: 0 0 0.75rem; }

.ats-lbi-deal-related { margin-bottom: 2rem; }
.ats-lbi-deal-related ul { list-style: none; padding: 0; }
.ats-lbi-deal-related li { margin-bottom: 0.5rem; }

.ats-lbi-deal-error { background: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; padding: 1.25rem; color: #991b1b; }
