/* 330 Hosting Blog Styles
   Professional, accessible, and SEO-optimized blog styling
   ========================================================= */

/* CSS Custom Properties */
:root {
  --color-primary: #14b8a6;
  --color-primary-dark: #0d9488;
  --color-primary-light: #2dd4bf;
  --color-accent: #2dd4bf;
  --color-dark: #0f172a;
  --color-dark-secondary: #1e293b;
  --color-text: #1e293b;
  --color-text-secondary: #4b5563;
  --color-text-muted: #6b7280;
  --color-border: #e5e7eb;
  --color-bg: #ffffff;
  --color-bg-secondary: #f8fafc;
  --color-bg-tertiary: #f1f5f9;
  --color-success: #10b981;
  --color-error: #ef4444;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-mono: 'SF Mono', SFMono-Regular, Consolas, 'Liberation Mono', Menlo, monospace;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --max-width: 800px;
  --max-width-wide: 1200px;
}

/* Reset and Base */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background-color: var(--color-bg);
}

/* Skip Link for Accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--color-dark);
  color: #fff;
  padding: 8px 16px;
  z-index: 1000;
  text-decoration: none;
  font-weight: 600;
}

.skip-link:focus {
  top: 0;
}

/* Header Navigation - Matches main site */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 10px 0;
  background: #0f172a;
  transition: all 0.5s ease-out;
}

.site-header.scrolled {
  padding: 6px 0;
  background: rgba(10, 15, 26, 0.95);
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Animated gradient border at top */
.header-gradient-border {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.15);
  opacity: 0.4;
  transition: all 0.5s ease-out;
}

.site-header.scrolled .header-gradient-border {
  height: 1px;
  opacity: 0.8;
}

/* Subtle glow effects */
.header-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: transparent;
  opacity: 1;
  transition: opacity 0.5s ease-out;
}

.site-header.scrolled .header-glow {
  opacity: 0.3;
}

/* Bottom shadow gradient */
.header-bottom-shadow {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  opacity: 0.5;
  transition: opacity 0.5s ease-out;
}

.site-header.scrolled .header-bottom-shadow {
  opacity: 1;
}

.header-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 10;
}

/* Logo */
.logo-wrapper {
  transition: all 0.5s ease-out;
  transform-origin: left center;
}

.site-header.scrolled .logo-wrapper {
  transform: scale(0.75);
}

.logo-link {
  display: block;
}

.logo-link:hover .header-logo {
  filter: brightness(1.1);
}

.header-logo {
  height: auto;
  object-fit: contain;
  width: 200px;
  transition: all 0.5s ease-out;
}

.site-header.scrolled .header-logo {
  width: 168px;
}

@media (max-width: 1024px) {
  .header-logo {
    width: 172px;
  }
  .site-header.scrolled .header-logo {
    width: 152px;
  }
}

@media (max-width: 768px) {
  .header-logo {
    width: 140px;
  }
  .site-header.scrolled .header-logo {
    width: 124px;
  }
}

/* Navigation */
.main-nav {
  display: flex;
  align-items: center;
}

.nav-container {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 6px 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.5s ease-out;
}

.site-header.scrolled .nav-container {
  gap: 2px;
  padding: 5px 10px;
}

/* Nav Links */
.nav-link {
  position: relative;
  padding: 6px 10px;
  font-size: 0.75rem;
  font-weight: 500;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  transition: all 0.3s ease;
}

.site-header.scrolled .nav-link {
  font-size: 0.75rem;
}

.nav-link::before {
  content: '';
  position: absolute;
  inset: 0;
  background: transparent;
  transition: all 0.3s ease;
}

.nav-link:hover::before,
.nav-link.active::before {
  background: transparent;
}

.nav-text {
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

.nav-link:hover .nav-text,
.nav-link.active .nav-text {
  color: #fff;
}

/* Nav Indicator - Underline for active, dot for hover */
.nav-indicator {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) scale(0);
  width: calc(100% - 20px);
  height: 2px;
  background: #2dd4bf;
  transition: all 0.3s ease;
}

.nav-link:hover .nav-indicator {
  transform: translateX(-50%) scaleX(1);
}

.nav-link.active .nav-indicator {
  transform: translateX(-50%) scaleX(1);
}

/* CTA Button */
.nav-cta {
  position: relative;
  overflow: hidden;
  margin-left: 6px;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  text-decoration: none;
  color: #0f172a;
  background: #f97316;
  transition: all 0.3s ease;
}

.site-header.scrolled .nav-cta {
  padding: 6px 12px;
  font-size: 0.6875rem;
}

.cta-shine {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.2);
  transform: translateX(-100%);
  transition: transform 0.7s ease;
}

.nav-cta:hover .cta-shine {
  transform: translateX(100%);
}

.cta-text {
  position: relative;
  z-index: 1;
}

/* Mobile Navigation */
.mobile-phone-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-left: auto;
  margin-right: 10px;
  border-radius: 12px;
  border: 1px solid rgba(20, 184, 166, 0.35);
  background: rgba(20, 184, 166, 0.2);
  color: #5eead4;
}

@media (max-width: 768px) {
  .mobile-phone-btn {
    display: flex;
  }
}

.mobile-menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  cursor: pointer;
  transition: background 0.2s ease;
}

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

.menu-bar {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 9999px;
  background: #2dd4bf;
  transition: all 0.3s ease;
}

.site-header.scrolled .menu-bar {
  width: 20px;
}

@media (max-width: 768px) {
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(10, 15, 26, 0.98);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  }

  .main-nav.open {
    display: block;
  }

  .nav-container {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 16px;
    border: none;
    border-radius: 0;
    background: transparent;
  }

  .nav-link {
    padding: 12px 16px;
    border-radius: 8px;
  }

  .nav-cta {
    margin-left: 0;
    margin-top: 8px;
    text-align: center;
  }

  .mobile-menu-btn {
    display: flex;
  }
}

/* Add top padding to body to account for fixed header */
body {
  padding-top: 92px;
}

.site-header.scrolled ~ .breadcrumbs,
.site-header.scrolled ~ main {
  /* Content adjusts when header shrinks */
}

/* Breadcrumbs */
.breadcrumbs {
  background: var(--color-bg-secondary);
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border);
}

.breadcrumbs-container {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 0 20px;
}

.breadcrumbs nav {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color 0.2s;
}

.breadcrumbs a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.breadcrumbs span[aria-current="page"] {
  color: var(--color-text);
  font-weight: 500;
}

.breadcrumb-separator {
  color: var(--color-text-muted);
}

/* Main Content Container */
.blog-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 40px 20px 60px;
}

/* Article Header */
.article-header {
  margin-bottom: 40px;
  padding-bottom: 32px;
  border-bottom: 1px solid var(--color-border);
}

.article-header h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-text);
  margin: 0 0 20px 0;
  letter-spacing: -0.02em;
}

/* Hero photo (images in /images/blog/, shared with the React posts) */
.article-hero {
  margin: 0 0 40px;
}

.article-hero img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid var(--color-border);
}

.article-inline {
  margin: 8px 0 28px;
}

.article-inline img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--color-border);
}

.article-inline figcaption,
.article-hero figcaption {
  margin-top: 8px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Article Meta */
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

.article-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.article-meta-icon {
  width: 18px;
  height: 18px;
  opacity: 0.7;
}

.author-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #0f766e;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}

.author-details {
  display: flex;
  flex-direction: column;
}

.author-name {
  font-weight: 600;
  color: var(--color-text);
}

.author-title {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.meta-divider {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--color-text-muted);
}

/* Article Content */
.article-content {
  font-size: 1.0625rem;
  color: var(--color-text);
}

.article-content h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 48px 0 20px 0;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-accent);
  letter-spacing: -0.01em;
}

.article-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 36px 0 16px 0;
}

.article-content h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 28px 0 12px 0;
}

.article-content p {
  margin: 0 0 20px 0;
}

/* Subsection labels - styled as bold inline headers without using strong tags */
.article-content .subsection-label {
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 8px;
}

.article-content a {
  color: var(--color-primary-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.article-content a:hover {
  color: var(--color-primary);
}

.article-content strong {
  font-weight: 600;
  color: var(--color-text);
}

.article-content ul,
.article-content ol {
  margin: 0 0 24px 0;
  padding-left: 24px;
}

.article-content li {
  margin-bottom: 10px;
}

.article-content li::marker {
  color: var(--color-primary);
}

/* Tables */
.article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0 32px;
  font-size: 0.95rem;
  overflow-x: auto;
  display: block;
}

.article-content table thead {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.article-content table tbody {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.article-content table th,
.article-content table td {
  padding: 12px 16px;
  text-align: left;
  border: 1px solid var(--color-border);
}

.article-content table th {
  background: var(--color-bg-secondary);
  font-weight: 600;
  color: var(--color-text);
}

.article-content table tr:nth-child(even) {
  background: var(--color-bg-secondary);
}

/* Blockquotes */
.article-content blockquote {
  margin: 24px 0;
  padding: 20px 24px;
  background: var(--color-bg-secondary);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-style: italic;
  color: var(--color-text-secondary);
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

/* Code */
.article-content code {
  background: var(--color-bg-tertiary);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.article-content pre {
  background: var(--color-dark);
  color: #e5e7eb;
  padding: 20px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 24px 0;
}

.article-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* Call-to-Action Box */
/* In-article conversion banner */
.cta-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  margin: 0 0 2rem 0;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.25);
}
.cta-banner-text { flex: 1 1 auto; min-width: 240px; }
.cta-banner-text strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
  color: #fff;
}
.cta-banner-text span {
  font-size: 0.875rem;
  opacity: 0.85;
  color: #fff;
}
.cta-banner-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  flex: 0 0 auto;
}
.cta-banner-actions a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.1rem;
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
}
.cta-banner-actions .banner-cta-phone {
  background: #0f766e;
  color: #fff;
  border: 1px solid #0f766e;
}
.cta-banner-actions .banner-cta-phone:hover {
  background: var(--color-primary-dark);
  border-color: var(--color-primary-dark);
}
.cta-banner-actions .banner-cta-form {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.4);
}
.cta-banner-actions .banner-cta-form:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.7);
}

/* Inline lead-capture form */
.inline-lead-form {
  background: #ffffff;
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 2rem 1.5rem;
  margin: 2.5rem 0;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.inline-lead-form h3 {
  margin: 0 0 0.5rem 0;
  color: var(--color-dark);
  font-size: 1.4rem;
  font-weight: 700;
}
.inline-lead-form p {
  color: var(--color-text-secondary);
  margin: 0 0 1.25rem 0;
  font-size: 0.95rem;
}
.inline-lead-form .lead-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 0.6rem;
  max-width: 640px;
  margin: 0 auto 0.75rem;
}
.inline-lead-form input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  font-size: 1rem; /* 16px: iOS zooms into smaller fields */
  background: #fff;
  color: var(--color-text);
  box-sizing: border-box;
}
.inline-lead-form input:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}
.inline-lead-form button {
  background: #0f766e;
  color: #fff;
  font-weight: 700;
  padding: 0.85rem 1.75rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.15s;
}
.inline-lead-form button:hover { background: var(--color-primary-dark); }
.inline-lead-form .lead-form-fine {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}
.inline-lead-form .lead-form-fine a { color: #0f766e; font-weight: 600; text-decoration: underline; }
@media (max-width: 640px) {
  .inline-lead-form .lead-form-row { grid-template-columns: 1fr; }
  .cta-banner-text { min-width: 0; }
  .cta-banner-actions { width: 100%; flex-direction: column; }
  .cta-banner-actions a { width: 100%; justify-content: center; white-space: normal; text-align: center; }
}

.cta-box {
  background: var(--color-dark);
  color: #fff;
  padding: 32px;
  border-radius: var(--radius-lg);
  margin: 40px 0;
  text-align: center;
}

.cta-box h3 {
  color: #fff;
  font-size: 1.5rem;
  margin: 0 0 12px 0;
}

.cta-box p {
  color: #d1d5db;
  margin: 0 0 24px 0;
}

.cta-box .cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-md);
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta-btn:hover {
  transform: translateY(-2px);
}

.cta-btn-primary {
  background: var(--color-primary);
  color: #fff;
}

.cta-btn-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.cta-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Info Box */
.info-box {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  margin: 24px 0;
}

.info-box-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--color-text);
}

.info-box.tip {
  border-left: 4px solid var(--color-success);
}

.info-box.warning {
  border-left: 4px solid var(--color-primary);
}

/* Inline Comparison Card ("How 330 Hosting compares" grid) */
.inline-compare-card {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem 0;
  padding: 1.5rem;
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: 12px;
}
.inline-compare-card .ic-cell {
  text-align: center;
  padding: 0.5rem;
}
.inline-compare-card .ic-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #b2b6ca;
  font-weight: 600;
  margin-bottom: 0.4rem;
}
.inline-compare-card .ic-value {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
}
.inline-compare-card .ic-cell-featured {
  background: linear-gradient(135deg, var(--color-primary) 0%, #115e59 100%);
  border-radius: 10px;
  padding: 1rem 0.5rem;
  color: #fff;
  position: relative;
  transform: translateY(-6px);
  box-shadow: 0 8px 30px rgba(20, 184, 166, 0.3);
}
.inline-compare-card .ic-cell-featured .ic-label { color: rgba(255, 255, 255, 0.7); }
.inline-compare-card .ic-cell-featured .ic-value { color: #fff; }
.inline-compare-card .ic-featured-badge {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

/* USP grid (4-card benefit list) */
.usp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}
.usp-grid .usp-item {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
}
.usp-grid .usp-item h4 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
  color: var(--color-dark);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.usp-grid .usp-item p {
  margin: 0;
  font-size: 0.875rem;
  color: #475569;
  line-height: 1.5;
}
.usp-grid .usp-check {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  background: #15803d;
  color: #fff;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
}

/* Testimonial card */
.testimonial-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: 8px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
  font-style: italic;
  color: #334155;
}
.testimonial-card .testimonial-author {
  display: block;
  margin-top: 0.75rem;
  font-style: normal;
  font-weight: 600;
  color: var(--color-dark);
  font-size: 0.9rem;
}
.testimonial-card .testimonial-author span {
  font-weight: 400;
  color: #64748b;
}

/* Related Posts Section */
.related-posts {
  margin-top: 60px;
  padding-top: 40px;
  border-top: 1px solid var(--color-border);
}

.related-posts h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 24px 0;
}

.related-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.related-post-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.related-post-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.related-post-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.related-post-card p {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  margin: 0 0 12px 0;
  line-height: 1.5;
}

.related-post-meta {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Author Box */
.author-box {
  background: var(--color-bg-secondary);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  margin-top: 48px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.author-box-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 1.5rem;
  flex-shrink: 0;
}

.author-box-content h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 4px 0;
}

.author-box-content .author-role {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin-bottom: 12px;
}

.author-box-content p {
  font-size: 0.95rem;
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.6;
}

@media (max-width: 600px) {
  .author-box {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
}

/* Site Footer */
.site-footer {
  background: var(--color-dark);
  color: #d1d5db;
  margin-top: 60px;
}

.footer-main {
  max-width: var(--max-width-wide);
  margin: 0 auto;
  padding: 48px 20px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
}

.footer-brand {
  grid-column: span 1;
}

.footer-brand .site-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.footer-brand .logo-icon {
  color: #fff;
}

.footer-brand p {
  font-size: 0.9rem;
  color: #9ca3af;
  margin: 0 0 16px 0;
}

.footer-contact {
  font-size: 0.9rem;
}

.footer-contact a {
  color: var(--color-accent);
  text-decoration: none;
}

.footer-contact a:hover {
  text-decoration: underline;
}

.footer-nav h4 {
  color: #fff;
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 16px 0;
}

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-nav li {
  margin-bottom: 10px;
}

.footer-nav a {
  color: #9ca3af;
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

.footer-nav a:hover {
  color: var(--color-accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 24px max(20px, calc((100% - var(--max-width-wide)) / 2 + 20px));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  text-align: left;
  font-size: 0.875rem;
  color: #cbd5e1;
}

.footer-bottom-logo {
  display: block;
  width: 150px;
}

.footer-bottom-logo img {
  display: block;
  width: 150px;
  height: auto;
}

.footer-bottom p {
  margin: 0;
}

.footer-bottom a {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom a:hover {
  color: var(--color-accent);
}

/* Blog Index Page Styles */
.blog-index-header {
  text-align: center;
  padding: 48px 0 32px;
}

.blog-index-header h1 {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  color: var(--color-text);
  margin: 0 0 16px 0;
  border-bottom: none;
}

.blog-index-header p {
  font-size: 1.125rem;
  color: var(--color-text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.blog-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.blog-item {
  padding: 32px 0;
  border-bottom: 1px solid var(--color-border);
}

.blog-item:last-child {
  border-bottom: none;
}

.blog-item h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 8px 0;
  line-height: 1.3;
}

.blog-item h2 a {
  color: var(--color-text);
  text-decoration: none;
  transition: color 0.2s;
}

.blog-item h2 a:hover {
  color: var(--color-primary);
}

.blog-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin-bottom: 12px;
}

.blog-description {
  color: var(--color-text-secondary);
  margin: 0;
  line-height: 1.6;
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary-dark);
  text-decoration: none;
  font-weight: 500;
  margin-top: 12px;
  font-size: 0.9rem;
}

.blog-read-more:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* Utility Classes */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Print Styles */
@media print {
  .site-header,
  .site-footer,
  .breadcrumbs,
  .cta-box,
  .related-posts {
    display: none;
  }

  body {
    font-size: 12pt;
    line-height: 1.5;
  }

  .blog-container {
    max-width: 100%;
    padding: 0;
  }

  a {
    text-decoration: none;
    color: inherit;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    font-size: 0.8em;
    color: #666;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* Focus Styles for Accessibility */
a:focus,
button:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
  :root {
    --color-border: #000;
  }

  .article-content h2 {
    border-bottom-color: var(--color-text);
  }
}

/* Main-site alignment overrides */
:root {
  --color-primary: #0d9488;
  --color-primary-dark: #0f766e;
  --color-primary-light: #2dd4bf;
  --color-accent: #f97316;
  --color-text: #0f172a;
  --color-text-secondary: #475569;
  --color-text-muted: #64748b;
  --color-border: #e2e8f0;
  --color-bg-secondary: #f8fafc;
}

body {
  background-color: #f8fafc;
}

.header-logo {
  filter: drop-shadow(0 4px 20px rgba(20, 184, 166, 0.22));
}

.nav-link:hover::before,
.nav-link.active::before {
  background: rgba(20, 184, 166, 0.2);
}

.nav-indicator {
  background: #2dd4bf;
}

.nav-cta,
.cta-btn-primary {
  background: #f97316;
  color: #0f172a;
}

.nav-cta:hover,
.cta-btn-primary:hover {
  background: #fb923c;
}

.breadcrumbs {
  background: #fff;
}

.blog-container {
  background: #fff;
  border-left: 1px solid rgba(226, 232, 240, 0.8);
  border-right: 1px solid rgba(226, 232, 240, 0.8);
}

.blog-index-header {
  margin: -40px calc(50% - 50vw) 48px;
  padding: 76px 20px 68px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.blog-index-header h1,
.article-header h1 {
  color: #0f172a;
  letter-spacing: -0.03em;
}

.blog-index-header p {
  color: #475569;
}

.blog-list {
  display: grid;
  gap: 16px;
}

.blog-item {
  padding: 24px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.blog-item:last-child {
  border-bottom: 1px solid #e2e8f0;
}

.blog-item:hover {
  border-color: rgba(37, 99, 235, 0.24);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.article-content h2 {
  border-bottom-color: rgba(37, 99, 235, 0.18);
}

.article-content a,
.blog-read-more {
  color: #0f766e;
}

.article-content a:hover,
.blog-read-more:hover {
  color: #0d9488;
}

.cta-box {
  background: #0f172a;
}

.related-posts {
  background: #f8fafc;
}

.site-footer {
  background: #0f172a;
}

/* 2026 article polish: calmer reading surface and reliable mobile sizing */
.breadcrumbs {
  margin-top: 72px;
  border-bottom: 1px solid var(--color-border);
}

.blog-container {
  max-width: 880px;
  padding: 48px clamp(20px, 4vw, 56px) 72px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.07);
}

.article-header {
  margin-bottom: 44px;
  padding-bottom: 32px;
}

.article-header h1 {
  max-width: 22ch;
  font-size: clamp(2.15rem, 5vw, 3.5rem);
  line-height: 1.08;
}

.article-content {
  font-size: clamp(1.03rem, 1.5vw, 1.125rem);
  line-height: 1.78;
}

.article-content > p:first-child {
  font-size: 1.12em;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

.article-content h2,
.article-content h3,
.article-content h4 {
  scroll-margin-top: 100px;
  line-height: 1.25;
}

.article-content h2 {
  margin-top: 56px;
  border-bottom: 1px solid var(--color-border);
}

.article-content img,
.article-content video,
.article-content iframe {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
}

.article-content table {
  min-width: 620px;
}

.article-content table thead,
.article-content table tbody {
  width: 100%;
  min-width: 620px;
}

.cta-box,
.author-box,
.related-posts {
  border: 1px solid var(--color-border);
}

@media (max-width: 768px) {
  .breadcrumbs {
    margin-top: 64px;
  }

  .breadcrumbs-container {
    padding: 12px 18px;
    white-space: nowrap;
    overflow-x: auto;
  }

  .blog-container {
    width: 100%;
    padding: 32px 18px 52px;
    border-left: 0;
    border-right: 0;
    box-shadow: none;
  }

  .article-header {
    margin-bottom: 32px;
    padding-bottom: 24px;
  }

  .article-header h1 {
    max-width: none;
    font-size: clamp(2rem, 10vw, 2.75rem);
  }

  .article-meta {
    gap: 10px 14px;
  }

  .article-content {
    font-size: 1.03rem;
    line-height: 1.72;
    overflow-wrap: anywhere;
  }

  .article-content h2 {
    margin-top: 44px;
    font-size: 1.65rem;
  }

  .article-content h3 {
    font-size: 1.3rem;
  }

  .article-content ul,
  .article-content ol {
    padding-left: 20px;
  }

  .article-content table {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .article-content table :is(thead, tbody) {
    width: 620px;
    min-width: 620px;
  }

  .cta-box,
  .author-box,
  .related-posts {
    margin-left: -4px;
    margin-right: -4px;
    padding: 24px 20px;
  }

  .cta-btn,
  .cta-box .cta-buttons a {
    width: 100%;
    justify-content: center;
    text-align: center;
  }
}

/* WCAG 2.2 (2.5.8) — ensure header/footer interactive targets are >= 24x24px.
   Inline links get inline-flex + min-height so their hit area meets the minimum
   without changing the visual layout. mobile-menu-btn is intentionally excluded
   so its display:none / responsive toggle is preserved. */
.nav-link,
.nav-cta,
.site-logo,
.footer-brand .site-logo,
.footer-nav a,
.footer-bottom a {
  min-height: 24px;
  display: inline-flex;
  align-items: center;
}
.footer-nav a,
.footer-bottom a {
  min-width: 24px;
}

/* WCAG 1.4.3 — featured badge: darker teal so white text passes (var was #0d9488, 3.74:1). */
.inline-compare-card .ic-featured-badge { background: #0f766e; }

/* WCAG 1.4.3 — pin CTA button colors so a later theme block cannot leak
   teal text (#0f766e) onto them. Primary: dark text on orange (6.5:1).
   Secondary: white text on the dark section (passes). */
.article-content a.cta-btn-primary { background: #f97316; color: #0f172a; }
.article-content a.cta-btn-secondary { color: #fff; }
