/* ===== SmartBotGuide - Mobile-First CSS ===== */

/* ----- Reset & Base ----- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: #111827;
  background: #ffffff;
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ----- Container ----- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ----- Header ----- */
.site-header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

.logo {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
  text-decoration: none;
  white-space: nowrap;
}

.logo:hover {
  text-decoration: none;
  color: #2563eb;
}

.logo span {
  color: #2563eb;
}

/* ----- Nav ----- */
.main-nav {
  display: none;
}

.main-nav.open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 8px 16px 16px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.main-nav ul {
  list-style: none;
}

.main-nav li {
  margin: 0;
}

.main-nav a {
  display: block;
  padding: 12px 0;
  color: #111827;
  font-weight: 500;
  font-size: 16px;
  border-bottom: 1px solid #f3f4f6;
  min-height: 44px;
  line-height: 44px;
  padding: 0;
}

.main-nav a:hover,
.main-nav a.active {
  color: #2563eb;
  text-decoration: none;
}

/* Hamburger */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: #111827;
  margin: 2px 0;
  border-radius: 2px;
}

/* ----- Hero ----- */
.hero {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  padding: 48px 0;
  text-align: center;
}

.hero h1 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 16px;
}

.hero p {
  font-size: 17px;
  line-height: 1.6;
  opacity: 0.95;
  margin-bottom: 24px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ----- Buttons ----- */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 16px;
  text-align: center;
  cursor: pointer;
  min-height: 44px;
  line-height: 1.4;
  border: none;
  text-decoration: none;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: #f59e0b;
  color: #111827;
}

.btn-primary:hover {
  background: #d97706;
}

.btn-secondary {
  background: #ffffff;
  color: #2563eb;
  border: 2px solid #2563eb;
}

.btn-secondary:hover {
  background: #eff6ff;
}

.btn-outline {
  background: transparent;
  color: #ffffff;
  border: 2px solid rgba(255,255,255,0.5);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
}

/* ----- Section ----- */
.section {
  padding: 48px 0;
}

.section-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #111827;
}

.section-subtitle {
  font-size: 16px;
  color: #6b7280;
  margin-bottom: 32px;
}

/* ----- Category Cards ----- */
.category-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.category-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.15s ease;
}

.category-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.category-card-img {
  height: 180px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  overflow: hidden;
}

.category-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.category-card-body {
  padding: 20px;
}

.category-card h3 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 8px;
}

.category-card h3 a {
  color: #111827;
}

.category-card h3 a:hover {
  color: #2563eb;
  text-decoration: none;
}

.category-card p {
  color: #6b7280;
  font-size: 15px;
  margin-bottom: 12px;
}

.category-card .btn {
  width: 100%;
  text-align: center;
}

/* ----- Article Cards ----- */
.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.article-card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
}

.article-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.article-card-img {
  height: 180px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9ca3af;
  font-size: 14px;
  font-weight: 500;
  overflow: hidden;
}

.article-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-card-body {
  padding: 20px;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 13px;
  color: #6b7280;
}

.article-card-tag {
  display: inline-block;
  background: #eff6ff;
  color: #2563eb;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.article-card h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
}

.article-card h3 a {
  color: #111827;
}

.article-card h3 a:hover {
  color: #2563eb;
  text-decoration: none;
}

.article-card p {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

/* ----- Rating Stars ----- */
.stars {
  display: inline-flex;
  gap: 2px;
  color: #f59e0b;
  font-size: 16px;
}

.stars .empty {
  color: #d1d5db;
}

.rating-value {
  font-weight: 700;
  color: #111827;
  margin-left: 4px;
}

/* ----- Breadcrumbs ----- */
.breadcrumbs {
  padding: 16px 0;
  font-size: 14px;
  color: #6b7280;
  border-bottom: 1px solid #f3f4f6;
}

.breadcrumbs a {
  color: #6b7280;
}

.breadcrumbs a:hover {
  color: #2563eb;
}

.breadcrumbs .sep {
  margin: 0 8px;
  color: #d1d5db;
}

/* ----- Comparison Table ----- */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 24px 0;
  overflow-x: auto;
  display: block;
}

.compare-table thead {
  background: #f9fafb;
}

.compare-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: #111827;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}

.compare-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
}

.compare-table .best-pick {
  background: #ecfdf5;
}

.compare-table .best-pick td:first-child::before {
  content: "★ ";
  color: #f59e0b;
  font-weight: 700;
}

.compare-table .btn {
  padding: 8px 16px;
  font-size: 13px;
  min-height: 36px;
}

/* ----- FAQ Accordion ----- */
.faq-item {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 8px;
  overflow: hidden;
}

.faq-question {
  width: 100%;
  background: #ffffff;
  border: none;
  padding: 16px 44px 16px 16px;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  cursor: pointer;
  position: relative;
  min-height: 44px;
  line-height: 1.4;
  font-family: inherit;
}

.faq-question::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: #6b7280;
  font-weight: 300;
}

.faq-item.open .faq-question::after {
  content: "-";
}

.faq-answer {
  display: none;
  padding: 0 16px 16px;
  color: #374151;
  font-size: 15px;
  line-height: 1.6;
}

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

/* ----- Review Summary Box ----- */
.review-summary {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  margin: 24px 0;
}

.review-summary-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.review-summary-score {
  font-size: 36px;
  font-weight: 800;
  color: #2563eb;
}

.review-summary-label {
  font-size: 14px;
  color: #6b7280;
}

.review-summary-stars {
  font-size: 20px;
  color: #f59e0b;
}

.review-summary-pros-cons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.review-summary h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #111827;
}

.review-summary ul {
  list-style: none;
  padding: 0;
}

.review-summary ul li {
  padding: 4px 0;
  font-size: 14px;
  color: #374151;
}

.review-summary .pros li::before {
  content: "+ ";
  color: #10b981;
  font-weight: 700;
}

.review-summary .cons li::before {
  content: "- ";
  color: #ef4444;
  font-weight: 700;
}

/* ----- Table of Contents ----- */
.toc {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 20px;
  margin: 24px 0;
}

.toc-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 12px;
  color: #111827;
}

.toc ol {
  padding-left: 20px;
}

.toc li {
  padding: 4px 0;
  font-size: 14px;
}

.toc a {
  color: #2563eb;
}

/* ----- Author Box ----- */
.author-box {
  display: flex;
  gap: 16px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 20px;
  margin: 32px 0;
  align-items: flex-start;
}

.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #d1d5db;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-size: 12px;
}

.author-info h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.author-info p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

/* ----- CTA Section ----- */
.cta-section {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #ffffff;
  padding: 40px 0;
  text-align: center;
  border-radius: 12px;
  margin: 32px 0;
}

.cta-section h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}

.cta-section p {
  font-size: 15px;
  opacity: 0.9;
  margin-bottom: 20px;
}

/* ----- Trust Section ----- */
.trust-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.trust-item {
  text-align: center;
}

.trust-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #eff6ff;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #2563eb;
}

.trust-item h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.trust-item p {
  font-size: 14px;
  color: #6b7280;
  line-height: 1.5;
}

/* ----- Disclaimer ----- */
.disclaimer {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: #92400e;
  margin: 16px 0;
  line-height: 1.5;
}

/* ----- Contact Form ----- */
.contact-form {
  max-width: 600px;
}

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

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 6px;
  color: #111827;
  font-size: 14px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  color: #111827;
  background: #ffffff;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}

.form-group textarea {
  min-height: 120px;
  resize: vertical;
}

/* ----- Footer ----- */
.site-footer,
body > footer {
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  padding: 32px 0;
  margin-top: 48px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 16px;
  justify-content: center;
}

.footer-links a {
  color: #6b7280;
  font-size: 14px;
}

.footer-links a:hover {
  color: #2563eb;
  text-decoration: none;
}

.footer-disclaimer {
  font-size: 12px;
  color: #9ca3af;
  text-align: center;
  line-height: 1.6;
}

/* ----- Page Header ----- */
.page-header {
  background: #f9fafb;
  padding: 40px 0;
  border-bottom: 1px solid #e5e7eb;
}

.page-header h1 {
  font-size: 28px;
  font-weight: 800;
  color: #111827;
}

.page-header p {
  font-size: 16px;
  color: #6b7280;
  margin-top: 8px;
  max-width: 700px;
}

/* ----- Intro Section ----- */
.intro-section {
  padding: 32px 0;
  font-size: 16px;
  line-height: 1.7;
  color: #374151;
}

/* ----- Responsive: Tablet (768px+) ----- */
@media (min-width: 768px) {
  .container {
    padding: 0 24px;
  }

  .hamburger {
    display: none;
  }

  .main-nav {
    display: block;
    position: static;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
  }

  .main-nav ul {
    display: flex;
    gap: 8px;
  }

  .main-nav a {
    padding: 8px 14px;
    border-bottom: none;
    font-size: 15px;
    border-radius: 6px;
    min-height: auto;
    line-height: 1.4;
  }

  .main-nav a:hover,
  .main-nav a.active {
    background: #f3f4f6;
  }

  /* Article nav-links desktop */
  .nav-links {
    display: flex;
    gap: 8px;
    position: static;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
  }

  .nav-links a {
    padding: 8px 14px;
    border-bottom: none;
    font-size: 15px;
    border-radius: 6px;
    min-height: auto;
    line-height: 1.4;
  }

  .nav-links a:hover {
    background: #f3f4f6;
    color: #2563eb;
  }

  .hero {
    padding: 72px 0;
  }

  .hero h1 {
    font-size: 40px;
  }

  .hero p {
    font-size: 18px;
  }

  .category-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .trust-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .review-summary-pros-cons {
    grid-template-columns: repeat(2, 1fr);
  }

  .pros-cons {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-title {
    font-size: 28px;
  }

  .footer-links {
    gap: 24px;
  }
}

/* ===== Article Page Compatibility (cross-agent consistency) ===== */

/* Article header (articles use bare <header>, build agent uses .site-header) */
body > header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}

body > header > .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
}

/* Article nav links */
.nav-links {
  display: none;
  list-style: none;
}

.nav-links.open {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 8px 16px 16px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.nav-links li {
  margin: 0;
}

.nav-links a {
  display: block;
  padding: 12px 0;
  color: #111827;
  font-weight: 500;
  font-size: 16px;
  border-bottom: 1px solid #f3f4f6;
  min-height: 44px;
  line-height: 44px;
  padding: 0;
}

.nav-links a:hover {
  color: #2563eb;
  text-decoration: none;
}

/* Comparison table alias (articles use .comparison-table) */
.comparison-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  margin: 24px 0;
  overflow-x: auto;
  display: block;
}

.comparison-table thead {
  background: #f9fafb;
}

.comparison-table th {
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  color: #111827;
  border-bottom: 2px solid #e5e7eb;
  white-space: nowrap;
}

.comparison-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
}

/* Breadcrumb alias (articles use .breadcrumb singular) */
.breadcrumb {
  padding: 16px 0;
  font-size: 14px;
  color: #6b7280;
  border-bottom: 1px solid #f3f4f6;
}

.breadcrumb a {
  color: #6b7280;
}

.breadcrumb a:hover {
  color: #2563eb;
}

.breadcrumb span {
  color: #111827;
}

/* FAQ section heading style (articles use h3 inside .faq-item) */
.faq-section h2 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 16px;
  color: #111827;
}

.faq-item h3 {
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  padding: 16px;
  cursor: pointer;
  margin: 0;
  min-height: 44px;
  line-height: 1.4;
  position: relative;
  padding-right: 44px;
}

.faq-item h3::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 22px;
  color: #6b7280;
  font-weight: 300;
}

.faq-item.open h3::after {
  content: "-";
}

.faq-item .faq-answer {
  display: none;
  padding: 0 16px 16px;
  color: #374151;
  font-size: 15px;
  line-height: 1.6;
}

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

/* Pros/cons list (articles use .pros-cons) */
.pros-cons {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin: 24px 0;
}

.pros-cons h4 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #111827;
}

.pros-cons ul {
  list-style: none;
  padding: 0;
}

.pros-cons li {
  padding: 4px 0;
  font-size: 14px;
  color: #374151;
}

.pros-cons li::before {
  margin-right: 8px;
}

.pros li::before {
  content: "✓";
  color: #10b981;
  font-weight: 700;
}

.cons li::before {
  content: "✗";
  color: #ef4444;
  font-weight: 700;
}

/* Article content spacing */
.review-article h2 {
  font-size: 24px;
  font-weight: 700;
  margin: 32px 0 12px;
  color: #111827;
}

.review-article h3 {
  font-size: 18px;
  font-weight: 600;
  margin: 24px 0 8px;
  color: #111827;
}

.review-article p {
  margin-bottom: 16px;
  color: #374151;
  line-height: 1.7;
}

.review-article ul,
.review-article ol {
  margin: 0 0 16px 24px;
  color: #374151;
}

.review-article ul li,
.review-article ol li {
  margin-bottom: 8px;
  line-height: 1.6;
}

/* Article meta bar */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 14px;
  color: #6b7280;
  margin: 8px 0 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e7eb;
}

/* Star rating inline (articles use .star-rating with ★/☆) */
.star-rating {
  color: #f59e0b;
  font-size: 16px;
  letter-spacing: 2px;
}

.star-rating .star-empty {
  color: #d1d5db;
}

/* ===== Responsive: Desktop (1024px+) ===== */
@media (min-width: 1024px) {
  .hero h1 {
    font-size: 48px;
  }

  .section {
    padding: 64px 0;
  }

  .page-header h1 {
    font-size: 36px;
  }
}
