/* ==========================================================================
   blog-style.css — Cloud Collective Blog Engine
   Ported from PHP blog-style.css, adapted to Cloud Collective colors.
   Brand: navy #002e5b, blue #6c98e1, gold #f8c300, green #84c225
   ========================================================================== */

/* --------------------------------------------------------------------------
   Article Body — text rhythm
   -------------------------------------------------------------------------- */

.blog-body p {
  margin-bottom: 1.25rem;
  color: #cbd5e1;
  line-height: 1.8;
  font-size: 1rem;
}

.blog-body ul,
.blog-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
  color: #cbd5e1;
  line-height: 1.8;
}

.blog-body ul { list-style: disc; }
.blog-body ol { list-style: decimal; }

.blog-body li {
  margin-bottom: 0.5rem;
}

.blog-body li::marker {
  color: #6c98e1;
}

.blog-body a {
  color: #6c98e1;
  text-decoration: none;
  transition: color 0.2s;
}

.blog-body a:hover {
  color: #93c5fd;
  text-decoration: underline;
}

.blog-body img {
  max-width: 100%;
  border-radius: 8px;
  margin: 1.5rem 0;
}

.blog-body blockquote {
  border-left: 3px solid #6c98e1;
  padding-left: 1rem;
  margin: 1.5rem 0;
  color: #94a3b8;
  font-style: italic;
}

.blog-body strong { color: #fff; font-weight: 700; }
.blog-body em { color: #e2e8f0; }

/* --------------------------------------------------------------------------
   Headings (in case render_body classes are overridden)
   -------------------------------------------------------------------------- */

.blog-body h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  margin-top: 2.5rem;
  scroll-margin-top: 100px;
}

.blog-body h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  scroll-margin-top: 100px;
}

/* --------------------------------------------------------------------------
   Callout Boxes — Cloud Collective colors
   -------------------------------------------------------------------------- */

.callout {
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-size: 0.95rem;
  line-height: 1.7;
}

.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

.callout .callout-title {
  font-weight: 700;
  margin-bottom: 0.5rem;
  display: block;
}

/* Step box — blue accent */
.step-box,
.callout-info {
  border-left: 4px solid #6c98e1;
  background: rgba(108, 152, 225, 0.08);
  color: #c7d7ed;
}

.step-box .callout-title,
.callout-info .callout-title {
  color: #6c98e1;
}

/* Note box — green accent (#84c225) */
.note-box {
  border-left: 4px solid #84c225;
  background: rgba(132, 194, 37, 0.08);
  color: #c8dcb8;
}

.note-box .callout-title {
  color: #84c225;
}

/* Warn box — gold accent (#f8c300) */
.warn-box,
.callout-warning {
  border-left: 4px solid #f8c300;
  background: rgba(248, 195, 0, 0.08);
  color: #e8d9a8;
}

.warn-box .callout-title,
.callout-warning .callout-title {
  color: #f8c300;
}

/* Danger callout — red */
.callout-danger {
  border-left: 4px solid #ef4444;
  background: rgba(239, 68, 68, 0.08);
  color: #f0c0c0;
}

.callout-danger .callout-title {
  color: #ef4444;
}

/* --------------------------------------------------------------------------
   Step Cards
   -------------------------------------------------------------------------- */

.step-card {
  background: rgba(108, 152, 225, 0.05);
  border: 1px solid rgba(108, 152, 225, 0.2);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1rem 0;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #6c98e1;
  color: #fff;
  font-weight: 700;
  font-size: 0.85rem;
  margin-right: 0.5rem;
}

.step-title {
  display: inline;
  font-weight: 700;
  color: #fff;
  font-size: 1.1rem;
}

/* --------------------------------------------------------------------------
   Stat Grid & Stat Cards
   -------------------------------------------------------------------------- */

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
}

.stat-card {
  background: rgba(108, 152, 225, 0.06);
  border: 1px solid rgba(108, 152, 225, 0.2);
  border-radius: 10px;
  padding: 1.25rem;
  text-align: center;
}

.stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: #6c98e1;
  display: block;
  margin-bottom: 0.25rem;
}

.stat-label {
  font-size: 0.85rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   Stat Pill (inline)
   -------------------------------------------------------------------------- */

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  background: rgba(108, 152, 225, 0.15);
  border: 1px solid rgba(108, 152, 225, 0.3);
  color: #6c98e1;
}

/* --------------------------------------------------------------------------
   CTA Box & Button
   -------------------------------------------------------------------------- */

.cta-box {
  background: linear-gradient(135deg, rgba(108,152,225,0.12), rgba(0,46,91,0.2));
  border: 1px solid rgba(108, 152, 225, 0.25);
  border-radius: 16px;
  padding: 2rem;
  text-align: center;
  margin: 2rem 0;
}

.cta-btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  background: #6c98e1;
  color: #fff;
  font-weight: 600;
  border-radius: 10px;
  text-decoration: none;
  transition: background 0.3s, transform 0.2s;
}

.cta-btn:hover {
  background: #93c5fd;
  transform: translateY(-1px);
}

/* --------------------------------------------------------------------------
   TOC Box (inline, non-hamburger)
   -------------------------------------------------------------------------- */

.toc-box {
  background: rgba(108, 152, 225, 0.06);
  border: 1px solid rgba(108, 152, 225, 0.2);
  border-radius: 10px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.toc-box .toc-title {
  font-weight: 700;
  color: #6c98e1;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.toc-box ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc-box li {
  margin-bottom: 0.4rem;
}

.toc-box a {
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.toc-box a:hover {
  color: #6c98e1;
}

/* --------------------------------------------------------------------------
   Inline Code & Code Blocks
   -------------------------------------------------------------------------- */

.blog-body code {
  background: rgba(0, 46, 91, 0.6);
  color: #6c98e1;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.875em;
  font-family: 'SF Mono', 'Monaco', 'Cascadia Code', 'Courier New', monospace;
}

.blog-body pre {
  background: rgba(0, 26, 51, 0.8);
  border: 1px solid rgba(108, 152, 225, 0.2);
  border-radius: 8px;
  padding: 1.25rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

.blog-body pre code {
  background: none;
  color: #c7d7ed;
  padding: 0;
  font-size: 0.9rem;
}

/* --------------------------------------------------------------------------
   Tables — navy/slate theme with blue accents
   -------------------------------------------------------------------------- */

.blog-body table,
.threat-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.blog-body th,
.threat-table th {
  background: rgba(108, 152, 225, 0.15);
  color: #6c98e1;
  font-weight: 700;
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 2px solid rgba(108, 152, 225, 0.3);
}

.blog-body td,
.threat-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(108, 152, 225, 0.1);
  color: #cbd5e1;
}

.blog-body tr:hover td,
.threat-table tr:hover td {
  background: rgba(108, 152, 225, 0.05);
}

/* --------------------------------------------------------------------------
   Hamburger TOC Nav — Cloud Collective blue theme
   -------------------------------------------------------------------------- */

nav.toc {
  position: sticky;
  top: 80px;
  z-index: 50;
  margin: 1.5rem 0;
}

nav.toc .nav-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(135deg, #002e5b, #0a2540);
  border: 1px solid rgba(108, 152, 225, 0.3);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  cursor: pointer;
  transition: border-color 0.3s;
}

nav.toc .nav-bar:hover {
  border-color: rgba(108, 152, 225, 0.5);
}

nav.toc .hamburger {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 20px;
  cursor: pointer;
}

nav.toc .hamburger span {
  display: block;
  height: 2px;
  width: 100%;
  background: #6c98e1;
  border-radius: 2px;
  transition: all 0.3s;
}

nav.toc .hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(4px, 4px);
}

nav.toc .hamburger.active span:nth-child(2) {
  opacity: 0;
}

nav.toc .hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(4px, -4px);
}

nav.toc .nav-title {
  font-weight: 600;
  font-size: 0.95rem;
  color: #6c98e1;
}

nav.toc .nav-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  opacity: 0;
  background: #0d1b2e;
  border: 1px solid rgba(108, 152, 225, 0.2);
  border-radius: 10px;
  margin-top: 0.5rem;
}

nav.toc .nav-panel.open {
  max-height: 600px;
  opacity: 1;
  overflow-y: auto;
}

nav.toc .cat-grid {
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

nav.toc .cat-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

nav.toc .cat-group-title {
  font-weight: 700;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6c98e1;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(108, 152, 225, 0.15);
}

nav.toc .toc-link {
  display: block;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  padding: 0.25rem 0 0.25rem 0.75rem;
  border-left: 2px solid transparent;
  transition: all 0.2s;
}

nav.toc .toc-link:hover {
  color: #6c98e1;
  border-left-color: #6c98e1;
}

/* --------------------------------------------------------------------------
   Blog-specific classes (Cloud Collective site patterns)
   -------------------------------------------------------------------------- */

.blog-article {
  max-width: 100%;
}

.blog-cats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.blog-cat {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 600;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: #94a3b8;
  margin-bottom: 1.5rem;
}

.blog-card {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(108, 152, 225, 0.15);
  transition: all 0.3s;
  margin-bottom: 1.5rem;
}

.blog-card:hover {
  border-color: rgba(108, 152, 225, 0.4);
  background: rgba(108, 152, 225, 0.05);
}

.blog-grid {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 3rem;
}

@media (max-width: 1024px) {
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

/* --------------------------------------------------------------------------
   Hero Image
   -------------------------------------------------------------------------- */

.hero-img {
  width: 60%;
  border-radius: 12px;
  border: 1px solid rgba(108, 152, 225, 0.3);
  margin: 1.5rem 0;
}

@media (max-width: 768px) {
  .hero-img {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 640px) {
  .blog-card {
    flex-direction: column;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  nav.toc {
    top: 70px;
  }
}