/* ================================================================
   IoT Routers Theme — clean review/blog layout
   Ink #0d1b2a | Accent #0057ff | Teal #00b4cc | Line #e4e8ed
   (Shares palette/DNA with IoTPortal so cluster sites feel related)
   ================================================================ */

:root {
  --ink:        #0d1b2a;
  --ink-soft:   #2e3d4f;
  --muted:      #637282;
  --line:       #e4e8ed;
  --soft:       #f5f7fa;
  --blue:       #0057ff;
  --blue-light: #eef3ff;
  --teal:       #00b4cc;
  --teal-light: #e8fafc;
  --orange:     #e07820;
  --green:      #0f9d58;
  --radius:     10px;
  --radius-sm:  6px;
  --shadow:     0 2px 12px rgba(13,27,42,.07);
  --shadow-lg:  0 8px 32px rgba(13,27,42,.12);
  --max-w:      1180px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--ink); background: #fff; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; border-radius: var(--radius-sm); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
ul, ol { padding-left: 1.3em; }
.container { max-width: var(--max-w); margin-inline: auto; padding-inline: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ================================================================ HEADER */
#site-header { background: #fff; border-bottom: 2px solid var(--ink); position: sticky; top: 0; z-index: 200; }
.header-row {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 20px; max-width: var(--max-w); margin-inline: auto;
}
.site-logo { font-size: 1.4rem; font-weight: 800; letter-spacing: -0.02px; color: var(--ink); }
.site-logo span { color: var(--blue); }
.site-tagline { font-size: 0.78rem; color: var(--muted); margin-top: 2px; }

.main-nav ul { list-style: none; display: flex; gap: 26px; padding: 0; }
.main-nav a {
  color: var(--ink-soft); font-weight: 600; font-size: 0.92rem;
  text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent;
}
.main-nav a:hover, .main-nav a.active { color: var(--blue); border-color: var(--blue); }

.header-cta {
  background: var(--ink); color: #fff; font-weight: 700; font-size: 0.85rem;
  padding: 10px 18px; border-radius: 999px; white-space: nowrap;
}
.header-cta:hover { background: var(--blue); text-decoration: none; }

.hamburger-btn {
  display: none; background: none; border: none; cursor: pointer; padding: 6px;
  flex-direction: column; gap: 5px;
}
.hamburger-btn span { display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ================================================================ HERO / HOMEPAGE GRID */
.hero-section { padding: 36px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 30px; }
.hero-intro { max-width: 720px; }
.hero-intro h1 { font-size: 2rem; font-weight: 800; letter-spacing: -0.5px; margin-bottom: 10px; }
.hero-intro p { color: var(--muted); font-size: 1.05rem; }

.home-grid {
  display: grid; grid-template-columns: 1.4fr 1fr; gap: 26px; margin-bottom: 40px;
}
.home-grid .featured-card img { aspect-ratio: 16/10; object-fit: cover; }
.side-stack { display: flex; flex-direction: column; gap: 18px; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: box-shadow .15s, transform .15s;
}
.card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.card a.card-link { display: block; text-decoration: none; color: inherit; }
.card-body { padding: 16px 18px 18px; }
.card-eyebrow {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.72rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em; color: var(--blue); margin-bottom: 8px;
}
.card h2, .card h3 { font-size: 1.1rem; font-weight: 700; line-height: 1.35; margin-bottom: 6px; }
.featured-card h2 { font-size: 1.5rem; }
.card-excerpt { font-size: 0.92rem; color: var(--muted); }
.card-meta { font-size: 0.78rem; color: var(--muted); margin-top: 10px; }

.grid-4up { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 40px; }
.section-heading {
  display: flex; align-items: center; gap: 12px; margin-bottom: 18px;
}
.section-heading h2 { font-size: 1.3rem; font-weight: 800; }
.section-heading .line { flex: 1; height: 1px; background: var(--line); }

/* Score badge used on review cards */
.score-badge {
  position: absolute; top: 12px; right: 12px; background: var(--ink); color: #fff;
  font-weight: 800; font-size: 0.85rem; border-radius: 999px; padding: 6px 12px;
}
.card-thumb { position: relative; }

/* ================================================================ SINGLE REVIEW POST */
.review-header { padding: 30px 0 10px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.breadcrumb { font-size: 0.82rem; color: var(--muted); margin-bottom: 14px; }
.breadcrumb a { color: var(--muted); }
.category-badge {
  display: inline-block; background: var(--blue-light); color: var(--blue);
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.review-header h1 { font-size: 2.2rem; font-weight: 800; line-height: 1.2; margin-bottom: 14px; max-width: 820px; }
.standfirst { font-size: 1.1rem; color: var(--ink-soft); max-width: 760px; margin-bottom: 18px; }
.meta-bar { display: flex; gap: 18px; font-size: 0.85rem; color: var(--muted); flex-wrap: wrap; }

.featured-image { margin-bottom: 30px; }
.featured-image img { width: 100%; aspect-ratio: 16/8; object-fit: cover; }

.post-layout { display: grid; grid-template-columns: 1fr 300px; gap: 44px; align-items: start; }
.post-content { max-width: 760px; font-size: 1.05rem; }
.post-content h2 { font-size: 1.5rem; font-weight: 800; margin: 36px 0 14px; }
.post-content h3 { font-size: 1.2rem; font-weight: 700; margin: 28px 0 10px; }
.post-content p { margin-bottom: 16px; }
.post-content ul, .post-content ol { margin-bottom: 16px; }
.post-content li { margin-bottom: 6px; }
.post-content figure { margin: 24px 0; }
.post-content figcaption { font-size: 0.82rem; color: var(--muted); margin-top: 8px; text-align: center; }

/* Verdict box */
.verdict-box {
  background: var(--blue-light); border: 1px solid #cfe0ff; border-radius: var(--radius);
  padding: 20px 22px; margin: 24px 0 30px;
}
.verdict-box .verdict-label { font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--blue); margin-bottom: 8px; }
.verdict-box p { margin-bottom: 0; font-size: 1rem; }

/* Spec table */
.spec-table { width: 100%; border-collapse: collapse; margin: 20px 0 30px; font-size: 0.95rem; }
.spec-table th, .spec-table td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.spec-table th { width: 40%; color: var(--muted); font-weight: 600; }
.spec-table tr:nth-child(even) { background: var(--soft); }

/* Gallery */
.review-gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 24px 0 30px; }
.review-gallery img { aspect-ratio: 4/3; object-fit: cover; }

/* Callouts */
.callout { border-radius: var(--radius); padding: 16px 18px; margin: 22px 0; border-left: 4px solid var(--blue); background: var(--blue-light); }
.callout.teal { border-color: var(--teal); background: var(--teal-light); }
.callout.warn { border-color: var(--orange); background: #fff4e8; }
.callout strong { display: block; margin-bottom: 4px; }

/* Use case chips */
.use-cases { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 30px; }
.use-case-chip {
  background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 14px; font-size: 0.88rem; flex: 1 1 220px;
}
.use-case-chip strong { display: block; color: var(--ink); margin-bottom: 2px; font-size: 0.85rem; }

/* Sidebar */
.sidebar { position: sticky; top: 90px; display: flex; flex-direction: column; gap: 22px; }
.sidebar-box { background: var(--soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.sidebar-box h3 { font-size: 0.95rem; font-weight: 800; margin-bottom: 12px; }

.cta-box { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 22px; text-align: center; }
.cta-box h3 { font-size: 1.1rem; margin-bottom: 8px; color: #fff; }
.cta-box p { font-size: 0.88rem; color: #c4cdd8; margin-bottom: 16px; }
.cta-box .btn { display: inline-block; background: var(--blue); color: #fff; font-weight: 700; padding: 10px 22px; border-radius: 999px; }
.cta-box .btn:hover { background: var(--teal); text-decoration: none; }

.related-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.related-list a { color: var(--ink-soft); font-weight: 600; font-size: 0.9rem; }

.tag-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.tag-pill { background: var(--soft); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; font-size: 0.8rem; color: var(--ink-soft); }

/* ================================================================ ARCHIVE */
.archive-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 40px; }

/* ================================================================ FOOTER */
#site-footer { background: var(--ink); color: #c4cdd8; margin-top: 60px; padding: 44px 0 24px; }
#site-footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 30px; margin-bottom: 30px; }
#site-footer h4 { color: #fff; font-size: 0.9rem; margin-bottom: 14px; }
#site-footer ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
#site-footer a { color: #c4cdd8; font-size: 0.88rem; }
#site-footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #243246; padding-top: 18px; text-align: center; font-size: 0.8rem; color: #8a97a8; }

/* ================================================================ LEAD FORM MODAL */
.quote-modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(13,27,42,.6); z-index: 999;
  align-items: center; justify-content: center; padding: 20px;
}
.quote-modal-overlay.open { display: flex; }
.quote-modal { background: #fff; border-radius: var(--radius); padding: 28px; max-width: 420px; width: 100%; position: relative; }
.quote-modal .close-btn { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 1.3rem; cursor: pointer; color: var(--muted); }
.quote-modal h3 { font-size: 1.2rem; margin-bottom: 6px; }
.quote-modal p { color: var(--muted); font-size: 0.9rem; margin-bottom: 16px; }

/* ================================================================ LEAD FORMS */
.sidebar-sub { font-size: 0.85rem; color: var(--muted); margin-bottom: 14px; }
.lead-form { display: flex; flex-direction: column; gap: 10px; }
.lead-form input, .lead-form textarea {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 0.9rem; font-family: inherit; background: #fff;
  color: var(--ink); resize: vertical;
}
.lead-form input:focus, .lead-form textarea:focus { outline: none; border-color: var(--blue); }
.lead-form .btn-submit {
  background: var(--ink); color: #fff; font-weight: 700; font-size: 0.9rem;
  border: none; border-radius: var(--radius-sm); padding: 11px 16px; cursor: pointer;
  transition: background .15s;
}
.lead-form .btn-submit:hover { background: var(--blue); }
.lead-form .btn-submit:disabled { background: var(--muted); cursor: default; }
.lead-form .form-status { font-size: 0.82rem; margin: 0; min-height: 1em; }
.lead-form .form-status.success { color: var(--green); }
.lead-form .form-status.error { color: #d93025; }
.lead-box { border: 1px solid #cfe0ff; background: var(--blue-light); }
.newsletter-box { background: var(--ink); }
.newsletter-box h3 { color: #fff; }
.newsletter-box .sidebar-sub { color: #c4cdd8; }
.newsletter-form .btn-submit { background: var(--blue); }
.newsletter-form .btn-submit:hover { background: var(--teal); }

/* ================================================================ RESPONSIVE */
@media (max-width: 900px) {
  .main-nav { display: none; }
  .hamburger-btn { display: flex; }
  .home-grid { grid-template-columns: 1fr; }
  .grid-4up { grid-template-columns: repeat(2, 1fr); }
  .post-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .archive-grid { grid-template-columns: repeat(2, 1fr); }
  .review-gallery { grid-template-columns: repeat(2, 1fr); }
  #site-footer .container { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .grid-4up, .archive-grid { grid-template-columns: 1fr; }
  .review-header h1 { font-size: 1.6rem; }
}
