/* ===== ISMS Lite — Landing Page ===== */
/* Design: Corporate/Professional, Font: Poppins + JetBrains Mono, Palette: Teal + Orange CTA, Signature: Grid-Background + Teal gradient text */

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { overflow-x: clip; }

:root {
  /* Backgrounds */
  --bg: #FFFFFF;
  --bg-alt: #F8FAFC;
  --bg-dark: #0F172A;
  --bg-dark-surface: #1E293B;
  --surface: #FFFFFF;
  --border: #E2E8F0;
  --border-strong: #CBD5E1;

  /* Text */
  --text: #1E293B;
  --text-secondary: #64748B;
  --text-tertiary: #94A3B8;

  /* Teal Accent (Primary) */
  --accent: #0F766E;
  --accent-hover: #115E59;
  --accent-light: #14B8A6;
  --accent-surface: #F0FDFA;
  --accent-border: #CCFBF1;
  --accent-text: #FFFFFF;

  /* CTA / Orange */
  --cta: #F59E0B;
  --cta-hover: #D97706;
  --cta-light: #FEF3C7;

  /* Semantic */
  --success: #16A34A;
  --warning: #EAB308;
  --danger: #DC2626;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.04), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.06), 0 4px 10px rgba(0,0,0,0.04);
  --shadow-xl: 0 20px 50px rgba(0,0,0,0.1), 0 8px 20px rgba(0,0,0,0.06);

  /* Layout */
  --radius: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-2xl: 24px;
  --max-width: 1152px;

  /* Fonts */
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', ui-monospace, monospace;

  /* Fluid typography */
  --text-sm: clamp(0.8125rem, 0.78rem + 0.15vw, 0.875rem);
  --text-base: clamp(0.9375rem, 0.9rem + 0.2vw, 1rem);
  --text-lg: clamp(1.0625rem, 1rem + 0.35vw, 1.125rem);
  --text-xl: clamp(1.25rem, 1.1rem + 0.7vw, 1.5rem);
  --text-2xl: clamp(1.5rem, 1.2rem + 1.5vw, 2rem);
  --text-3xl: clamp(1.875rem, 1.4rem + 2vw, 2.25rem);
  --text-4xl: clamp(2.25rem, 1.5rem + 3vw, 3.5rem);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; height: auto; display: block; }

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* --- Section --- */
.section {
  padding: clamp(3rem, 5vw, 5rem) 0;
}

.section--alt {
  background: var(--bg-alt);
}

.section--dark {
  background: var(--bg-dark);
  color: #FFFFFF;
}

.section-label {
  font-size: var(--text-sm);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-light);
  margin-bottom: 0.75rem;
}

.section-title {
  font-size: var(--text-3xl);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  margin-bottom: 0.75rem;
  text-wrap: balance;
}

.section-desc {
  color: var(--text-secondary);
  font-size: var(--text-lg);
  max-width: 640px;
  line-height: 1.6;
}

.section-header {
  margin-bottom: 3rem;
}

.section-header--center {
  text-align: center;
}

.section-header--center .section-desc {
  margin: 0 auto;
}

/* --- Navigation --- */
.site-header {
  position: fixed;
  top: 0;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  transition: box-shadow 0.3s;
}

.site-header.scrolled {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.site-header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  color: var(--text) !important;
}

.logo-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius);
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-text {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text);
}

.logo-text span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: var(--text-sm);
  transition: color 0.2s;
}

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

.nav-cta {
  background: var(--accent);
  color: var(--accent-text) !important;
  padding: 0.5rem 1rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: var(--text-sm);
  transition: background 0.2s;
}

.nav-cta:hover {
  background: var(--accent-hover);
  color: var(--accent-text) !important;
}

/* Mobile menu button */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  padding: 0.5rem;
  color: var(--text-secondary);
  cursor: pointer;
}

/* Mobile menu overlay */
.mobile-menu {
  display: none;
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  padding: 1rem 1.5rem;
  z-index: 99;
  box-shadow: var(--shadow-lg);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu a {
  display: block;
  padding: 0.75rem 0;
  color: var(--text-secondary);
  font-weight: 500;
  font-size: var(--text-base);
  border-bottom: 1px solid var(--border);
}

.mobile-menu a:last-child {
  border-bottom: none;
}

.mobile-menu .nav-cta {
  display: block;
  text-align: center;
  margin-top: 0.75rem;
  padding: 0.75rem;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.5rem;
  border-radius: var(--radius-lg);
  font-weight: 600;
  font-size: var(--text-sm);
  cursor: pointer;
  border: none;
  font-family: var(--font);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  line-height: 1;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-text);
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: var(--accent-text);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  border-color: var(--accent-border);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-outline-primary {
  background: var(--bg);
  color: var(--accent);
  border: 2px solid var(--accent);
}

.btn-outline-primary:hover {
  background: var(--accent-surface);
  color: var(--accent);
}

.btn-group {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1;
}

.badge--accent {
  background: var(--accent-surface);
  color: var(--accent);
  border: 1px solid var(--accent-border);
}

.badge--neutral {
  background: var(--bg-alt);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-light);
  animation: badge-pulse 3s ease-in-out infinite;
}

@keyframes badge-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* --- Grid background pattern --- */
.grid-bg {
  background-image:
    linear-gradient(rgba(15, 118, 110, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 118, 110, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
}

/* --- Gradient text --- */
.gradient-text,
.highlight {
  background: linear-gradient(135deg, #0F766E 0%, #14B8A6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* --- Screenshot frame --- */
.screenshot-frame {
  border-radius: var(--radius-lg);
  background: var(--bg-alt);
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.05);
  overflow: hidden;
}

.screenshot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16/9;
  padding: 3rem;
  text-align: center;
}

.screenshot-placeholder p {
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  font-weight: 500;
}

.screenshot-placeholder .hint {
  color: var(--border-strong);
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* ============================= */
/* --- HERO SECTION --- */
/* ============================= */

.hero {
  padding: 7rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero-content {
  max-width: 48rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.hero h1 {
  font-size: var(--text-4xl);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.hero .lead {
  font-size: var(--text-lg);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  max-width: 40rem;
}

.hero .lead-secondary {
  font-size: var(--text-base);
  color: var(--text-tertiary);
  margin-bottom: 2rem;
}

.hero-screenshot {
  margin-top: 4rem;
  position: relative;
}

.hero-screenshot .screenshot-frame {
  max-width: 100%;
}

.hero-glow {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(204, 251, 241, 0.15), transparent);
  border-radius: var(--radius-2xl);
  filter: blur(16px);
  z-index: -1;
  transform: scale(1.05);
}

/* Decorative blurred circles */
.hero-deco-1 {
  position: absolute;
  top: 5rem;
  right: 0;
  width: 24rem;
  height: 24rem;
  background: rgba(204, 251, 241, 0.3);
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

.hero-deco-2 {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 18rem;
  height: 18rem;
  background: rgba(254, 243, 199, 0.25);
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
}

/* ============================= */
/* --- PROBLEM / PAIN SECTION --- */
/* ============================= */

.pain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.pain-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  border: 1px solid var(--border);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
}

.pain-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.pain-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.pain-icon--danger { background: #FEF2F2; color: var(--danger); }
.pain-icon--warning { background: #FFFBEB; color: var(--cta-hover); }
.pain-icon--neutral { background: var(--bg-alt); color: var(--text-secondary); }

.pain-card h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.pain-card p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.pain-stat {
  font-weight: 600;
  font-size: var(--text-2xl);
}

.pain-stat--danger { color: var(--danger); }
.pain-stat--warning { color: var(--cta-hover); }
.pain-stat--neutral { color: var(--text-secondary); }

.pain-stat-label {
  font-size: var(--text-sm);
  font-weight: 400;
  color: var(--text-tertiary);
}

/* ============================= */
/* --- SOLUTION SECTION --- */
/* ============================= */

.solution-content {
  max-width: 48rem;
}

/* ============================= */
/* --- FEATURE BLOCKS --- */
/* ============================= */

.feature-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 4rem;
}

.feature-block:last-child {
  margin-bottom: 0;
}

.feature-block--reverse .feature-block-content {
  order: 2;
}

.feature-block--reverse .feature-block-media {
  order: 1;
}

.feature-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
}

.feature-badge--teal { background: var(--accent-surface); color: var(--accent); }
.feature-badge--amber { background: #FFFBEB; color: var(--cta-hover); }
.feature-badge--red { background: #FEF2F2; color: var(--danger); }

.feature-block h3 {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}

.feature-block p {
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 1rem;
}

.feature-block p:last-child {
  margin-bottom: 0;
}

.framework-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.framework-tag {
  font-size: 0.75rem;
  background: var(--surface);
  color: var(--text-secondary);
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.feature-block-media .screenshot-frame {
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================= */
/* --- MODULE GRID --- */
/* ============================= */

.module-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.module-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  border: 1px solid var(--border);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
  cursor: default;
}

.module-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px -12px rgba(15, 118, 110, 0.12);
}

.module-icon {
  margin-bottom: 0.5rem;
  color: var(--accent);
}

.module-icon--cta { color: var(--cta); }
.module-icon--danger { color: var(--danger); }
.module-icon--amber { color: var(--cta-hover); }

.module-card h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.module-card p {
  color: var(--text-secondary);
  font-size: 0.75rem;
  line-height: 1.5;
}

/* ============================= */
/* --- KI SECTION --- */
/* ============================= */

.ki-card {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 100%);
  border-radius: var(--radius-2xl);
  padding: clamp(2rem, 4vw, 3.5rem);
  color: #FFFFFF;
}

.ki-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.ki-card .section-label {
  color: var(--accent-light);
}

.ki-card h2 {
  font-size: var(--text-3xl);
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.ki-card p {
  color: #CBD5E1;
  line-height: 1.65;
}

.ki-features {
  margin-top: 1.5rem;
}

.ki-feature {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.ki-feature-icon {
  color: var(--accent-light);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.ki-feature-text {
  color: #CBD5E1;
  font-size: var(--text-sm);
}

.ki-feature-text strong {
  color: #FFFFFF;
  font-weight: 500;
}

.ki-note {
  color: var(--text-tertiary) !important;
  font-size: var(--text-sm);
  margin-top: 1.5rem;
}

.ki-screenshot {
  background: rgba(51, 65, 85, 0.5);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(71, 85, 105, 0.5);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ki-screenshot p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
}

/* ============================= */
/* --- BENEFITS GRID --- */
/* ============================= */

.benefits-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.benefit-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1px solid var(--border);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
}

.benefit-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.benefit-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-lg);
  background: var(--accent-surface);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.benefit-card h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.benefit-card p {
  color: var(--text-secondary);
  font-size: var(--text-sm);
  line-height: 1.6;
}

/* ============================= */
/* --- PRICING SECTION --- */
/* ============================= */

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 64rem;
  margin: 0 auto;
}

.pricing-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 1.75rem;
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s, box-shadow 0.3s;
}

.pricing-card:hover {
  transform: translateY(-4px);
}

.pricing-card--featured {
  border: 2px solid var(--accent);
  position: relative;
  box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.1), 0 8px 40px -8px rgba(15, 118, 110, 0.2);
}

.pricing-card--featured:hover {
  box-shadow: 0 0 0 2px rgba(15, 118, 110, 0.2), 0 16px 60px -12px rgba(15, 118, 110, 0.3);
}

.pricing-badge {
  position: absolute;
  top: -0.75rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--accent-text);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}

.pricing-header {
  margin-bottom: 1.5rem;
}

.pricing-header h3 {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.pricing-header .pricing-subtitle {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.pricing-price {
  margin-bottom: 1.5rem;
}

.pricing-amount {
  font-size: var(--text-4xl);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.pricing-period {
  color: var(--text-secondary);
  font-size: var(--text-base);
}

.pricing-vat {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

.pricing-features {
  list-style: none;
  margin-bottom: 2rem;
  flex-grow: 1;
}

.pricing-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: 0.625rem;
}

.pricing-features .pricing-check {
  color: var(--accent-light);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.pricing-features .pricing-highlight {
  color: var(--text);
  font-weight: 500;
}

.pricing-note {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: 2rem;
  max-width: 42rem;
  margin-left: auto;
  margin-right: auto;
}

/* ============================= */
/* --- TECH SECTION --- */
/* ============================= */

.tech-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.code-block {
  background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.75rem;
  overflow: hidden;
}

.code-block pre {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.9;
  color: #E2E8F0;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.code-block .prompt { color: var(--text-secondary); }
.code-block .cmd { color: var(--accent-light); }
.code-block .success { color: #4ADE80; }
.code-block .url { color: var(--accent-light); }

.code-block .code-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 0.75rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.code-block .code-card-lang {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.code-block .code-card-dots {
  display: flex;
  gap: 0.375rem;
}

.code-block .code-card-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
}

.tech-specs {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.tech-spec h4 {
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.tech-spec p {
  font-size: var(--text-sm);
  color: var(--text-tertiary);
}

/* Dark section text */
.section--dark .section-title { color: #FFFFFF; }
.section--dark .section-desc { color: var(--text-tertiary); }
.section--dark .section-label { color: var(--accent-light); }
.section--dark h4 { color: #FFFFFF; }

/* ============================= */
/* --- MSP SECTION --- */
/* ============================= */

.msp-card {
  background: linear-gradient(135deg, var(--accent-surface) 0%, #FFFFFF 100%);
  border-radius: var(--radius-2xl);
  border: 1px solid var(--accent-border);
  padding: clamp(2rem, 4vw, 3.5rem);
}

.msp-content {
  max-width: 42rem;
}

.msp-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 2rem 0;
}

.msp-stat {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 1rem;
  border: 1px solid var(--accent-surface);
}

.msp-stat-value {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--accent);
}

.msp-stat-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.msp-note {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: 0.75rem;
}

/* ============================= */
/* --- STEPS (How it works) --- */
/* ============================= */

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  max-width: 56rem;
  margin: 2.5rem auto 0;
}

.step-card {
  position: relative;
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: 2rem 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.step-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.step-number {
  display: inline-block;
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--accent);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 1rem;
}

.step-card h3 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.step-card p {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ============================= */
/* --- CALC (Revenue Example) --- */
/* ============================= */

.calc-card {
  max-width: 36rem;
  margin: 2rem auto 0;
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.calc-items {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.calc-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
}

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

.calc-label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.calc-value {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
}

.calc-item--cost .calc-value {
  color: var(--text-secondary);
}

.calc-item--revenue .calc-value {
  color: var(--accent);
}

.calc-item--highlight {
  padding-top: 1.25rem;
  margin-top: 0.25rem;
  border-top: 2px solid var(--accent);
  border-bottom: none;
}

.calc-item--highlight .calc-label {
  font-weight: 600;
  color: var(--text);
  font-size: var(--text-base);
}

.calc-item--highlight .calc-value {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--accent);
}

.calc-note {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* ============================= */
/* --- FAQ --- */
/* ============================= */

.faq-list {
  max-width: 42rem;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item:first-child {
  border-top: 1px solid var(--border);
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 1.25rem 0;
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.faq-question::-webkit-details-marker {
  display: none;
}

.faq-toggle {
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: transform 0.2s ease;
}

.faq-item[open] .faq-toggle {
  transform: rotate(180deg);
}

.faq-answer {
  padding: 0 0 1.25rem;
}

.faq-answer p {
  font-size: var(--text-sm);
}

/* --- Example Cards (Berater page) --- */

.example-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.example-card {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-xl);
  padding: clamp(1.25rem, 2.5vw, 2rem);
}

.example-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.example-card-badge {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: rgba(15,118,110,0.15);
  padding: 0.2rem 0.625rem;
  border-radius: var(--radius);
}

.example-card-file {
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  color: rgba(255,255,255,0.4);
}

.example-card-meta {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.example-card-meta h3 {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--surface);
  margin: 0;
}

.example-card-version {
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  color: rgba(255,255,255,0.4);
}

.example-card-desc {
  font-size: var(--text-sm);
  color: rgba(255,255,255,0.5);
  margin-bottom: 1.25rem;
}

/* Control preview inside framework card */

.example-control {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 1rem 1.25rem;
}

.example-control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.example-control-number {
  font-size: 0.75rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 600;
  color: var(--accent);
}

.example-control-cat {
  font-size: 0.6875rem;
  color: rgba(255,255,255,0.35);
}

.example-control h4 {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--surface);
  margin-bottom: 0.75rem;
}

.example-control-section {
  margin-bottom: 0.5rem;
}

.example-control-section:last-child {
  margin-bottom: 0;
}

.example-control-label {
  display: block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.125rem;
}

.example-control-section p {
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.65);
  line-height: 1.5;
  margin: 0;
}

/* Mapping entries */

.example-mapping-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.example-mapping-entry {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--radius-lg);
  padding: 0.875rem 1rem;
}

.example-mapping-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.375rem;
}

.example-mapping-source,
.example-mapping-target {
  font-size: 0.8125rem;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 500;
  color: var(--surface);
}

.example-mapping-arrow {
  color: rgba(255,255,255,0.3);
  font-size: 0.75rem;
}

.example-mapping-type {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius);
  margin-bottom: 0.25rem;
}

.example-mapping-type--equivalent {
  color: #34d399;
  background: rgba(52,211,153,0.12);
}

.example-mapping-type--partial {
  color: #fbbf24;
  background: rgba(251,191,36,0.12);
}

.example-mapping-note {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin: 0;
  line-height: 1.4;
}

/* --- Framework List (Berater page) --- */

.framework-list {
  max-width: 48rem;
  margin: 2rem auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.framework-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  padding: 0.875rem 1.5rem;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.framework-row:last-child {
  border-bottom: none;
}

.framework-row--hub {
  background: var(--accent-surface);
  border-bottom-color: var(--accent-border);
}

.framework-name {
  font-weight: 600;
  font-size: var(--text-sm);
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.framework-hub-badge {
  display: inline-block;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--surface);
  background: var(--accent);
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius);
}

.framework-controls {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.framework-role {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-align: right;
}

/* --- MSP Pricing Custom Hint --- */

.msp-pricing-custom {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: 0.5rem;
}

.msp-pricing-custom a {
  color: var(--accent);
  text-decoration: underline;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* --- Pricing Grid Variants --- */

.pricing-grid--duo {
  grid-template-columns: repeat(2, 1fr);
  max-width: 48rem;
}

/* --- MSP Pricing (Feature list + tier table) --- */

.msp-pricing {
  max-width: 56rem;
  margin: 2.5rem auto 0;
}

.msp-pricing-includes {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: 2rem;
}

.msp-pricing-includes h3 {
  font-size: var(--text-base);
  font-weight: 600;
  margin-bottom: 1.25rem;
}

.msp-pricing-includes ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.625rem 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.msp-pricing-includes li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

.msp-pricing-includes .pricing-check {
  color: var(--accent);
  flex-shrink: 0;
  margin-top: 0.125rem;
}

/* Tier table */

.msp-pricing-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.msp-pricing-table-header,
.msp-pricing-table-row {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, 1fr);
}

.msp-pricing-table-header {
  border-bottom: 2px solid var(--border);
}

.msp-pricing-col {
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.msp-pricing-col--label {
  align-items: flex-start;
  text-align: left;
}

.msp-pricing-col--popular {
  background: var(--accent-surface);
}

.msp-pricing-popular {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--surface);
  background: var(--accent);
  padding: 0.125rem 0.625rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
}

.msp-pricing-tier-name {
  font-size: var(--text-base);
  font-weight: 700;
  color: var(--text);
}

.msp-pricing-instances {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-top: 0.125rem;
}

.msp-pricing-table-row {
  border-bottom: 1px solid var(--border);
}

.msp-pricing-table-row:last-child {
  border-bottom: none;
}

.msp-pricing-row-title {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text);
  display: block;
}

.msp-pricing-row-desc {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
  display: block;
  line-height: 1.4;
}

.msp-pricing-price {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--text);
}

.msp-pricing-price--lifetime {
  color: var(--accent);
}

.msp-pricing-period {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.msp-pricing-table-row--lifetime {
  background: linear-gradient(135deg, rgba(15,118,110,0.03) 0%, rgba(15,118,110,0.06) 100%);
}

.msp-pricing-table-row--cta .msp-pricing-col {
  padding: 1rem;
}

.msp-pricing-table-row--cta .btn {
  width: 100%;
}

.msp-pricing-vat {
  text-align: center;
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  margin-top: 1rem;
}

/* ============================= */
/* --- DEMO / CONTACT SECTION --- */
/* ============================= */

.demo-wrapper {
  max-width: 36rem;
  margin: 0 auto;
  text-align: center;
}

.demo-form {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 2rem;
  border: 1px solid var(--border);
  text-align: left;
  margin-top: 2rem;
}

/* contact_form() plugin styles */
.contact-form .form-group {
  margin-bottom: 1rem;
}

.contact-form label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  margin-bottom: 0.375rem;
}

.contact-form label .optional {
  font-weight: 400;
  color: var(--text-tertiary);
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 0.625rem 1rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  font-family: var(--font);
  font-size: var(--text-sm);
  color: var(--text);
  background: var(--bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--accent-light);
  box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.15);
}

.contact-form textarea {
  resize: vertical;
  min-height: 80px;
}

.contact-form button[type="submit"] {
  width: 100%;
  padding: 0.875rem;
  border-radius: var(--radius-lg);
  background: var(--accent);
  color: var(--accent-text);
  font-family: var(--font);
  font-weight: 600;
  font-size: var(--text-base);
  border: none;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}

.contact-form button[type="submit"]:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.25);
}

/* Success/error messages from contact form plugin */
.contact-form .form-success {
  background: #F0FDF4;
  border: 1px solid #BBF7D0;
  color: var(--success);
  padding: 1rem;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  text-align: center;
}

.contact-form .form-error {
  background: #FEF2F2;
  border: 1px solid #FECACA;
  color: var(--danger);
  padding: 1rem;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  text-align: center;
}

/* ============================= */
/* --- FOOTER --- */
/* ============================= */

.site-footer {
  background: var(--bg-dark);
  padding: 3rem 0;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.footer-logo .logo-icon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
}

.footer-logo .logo-text {
  font-size: var(--text-sm);
  font-weight: 600;
  color: #CBD5E1;
}

.footer-logo .logo-text span {
  color: var(--accent-light);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}

.footer-links a {
  color: var(--text-tertiary);
  font-size: var(--text-sm);
  transition: color 0.2s;
}

.footer-links a:hover {
  color: #FFFFFF;
}

.footer-note {
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}

/* ============================= */
/* --- ANIMATIONS --- */
/* ============================= */

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger.visible > * {
  opacity: 1;
  transform: translateY(0);
}

.stagger.visible > *:nth-child(1) { transition-delay: 0ms; }
.stagger.visible > *:nth-child(2) { transition-delay: 60ms; }
.stagger.visible > *:nth-child(3) { transition-delay: 120ms; }
.stagger.visible > *:nth-child(4) { transition-delay: 180ms; }
.stagger.visible > *:nth-child(5) { transition-delay: 240ms; }
.stagger.visible > *:nth-child(6) { transition-delay: 300ms; }

/* Hero entrance animation */
.hero-enter {
  opacity: 0;
  transform: translateY(20px);
  animation: hero-enter 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-enter--1 { animation-delay: 0ms; }
.hero-enter--2 { animation-delay: 100ms; }
.hero-enter--3 { animation-delay: 200ms; }
.hero-enter--4 { animation-delay: 300ms; }
.hero-enter--5 { animation-delay: 500ms; }

@keyframes hero-enter {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================= */
/* --- 404 PAGE --- */
/* ============================= */

.error-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
}

.error-code {
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 800;
  color: var(--border-strong);
  line-height: 1;
  letter-spacing: -0.04em;
}

.error-title {
  font-size: var(--text-2xl);
  font-weight: 700;
  margin: 1rem 0 0.5rem;
}

.error-desc {
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

/* ============================= */
/* --- RESPONSIVE --- */
/* ============================= */

@media (max-width: 1024px) {
  .feature-block {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .feature-block--reverse .feature-block-content,
  .feature-block--reverse .feature-block-media {
    order: unset;
  }

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

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

  .example-cards {
    grid-template-columns: 1fr;
  }

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

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

  .steps-grid {
    grid-template-columns: 1fr;
    max-width: 28rem;
  }

}

@media (max-width: 768px) {
  .hero {
    padding: 5.5rem 0 3rem;
  }

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

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

  .pricing-grid,
  .pricing-grid--duo {
    grid-template-columns: 1fr;
    max-width: 24rem;
  }

  .msp-pricing-includes ul {
    grid-template-columns: 1fr;
  }

  .msp-pricing-table-header,
  .msp-pricing-table-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .msp-pricing-col--label {
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.75rem;
  }

  .msp-pricing-table-header .msp-pricing-col--label {
    display: none;
  }

  .msp-pricing-table-header .msp-pricing-col {
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
  }

  .msp-pricing-table-header .msp-pricing-col:last-child {
    border-bottom: none;
  }

  .msp-pricing-table-header {
    display: none;
  }

  .msp-pricing-table-row {
    display: flex;
    flex-direction: column;
  }

  .msp-pricing-table-row .msp-pricing-col:not(.msp-pricing-col--label) {
    flex-direction: row;
    justify-content: space-between;
    padding: 0.625rem 1rem;
  }

  .msp-pricing-table-row .msp-pricing-col:not(.msp-pricing-col--label)::before {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    font-weight: 500;
  }

  .msp-pricing-table-row--yearly .msp-pricing-col:nth-child(2)::before { content: "MSP 5"; }
  .msp-pricing-table-row--yearly .msp-pricing-col:nth-child(3)::before { content: "MSP 10"; }
  .msp-pricing-table-row--yearly .msp-pricing-col:nth-child(4)::before { content: "MSP 25"; }
  .msp-pricing-table-row--yearly .msp-pricing-col:nth-child(5)::before { content: "Unlimited"; }

  .msp-pricing-table-row--lifetime .msp-pricing-col:nth-child(2)::before { content: "MSP 5"; }
  .msp-pricing-table-row--lifetime .msp-pricing-col:nth-child(3)::before { content: "MSP 10"; }
  .msp-pricing-table-row--lifetime .msp-pricing-col:nth-child(4)::before { content: "MSP 25"; }
  .msp-pricing-table-row--lifetime .msp-pricing-col:nth-child(5)::before { content: "Unlimited"; }

  .msp-pricing-table-row--cta {
    display: none;
  }

  .msp-pricing-price {
    font-size: var(--text-lg);
  }

  .steps-grid {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .msp-stats {
    grid-template-columns: 1fr;
  }

  .framework-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .framework-role {
    text-align: left;
  }

  .nav-links {
    display: none;
  }

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

  .site-footer .container {
    flex-direction: column;
    text-align: center;
  }

  .footer-links {
    justify-content: center;
    flex-wrap: wrap;
  }

  .btn-group {
    flex-direction: column;
  }

  .btn-group .btn {
    width: 100%;
  }
}

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

  .comparison-table {
    font-size: 0.8125rem;
  }

  .comparison-table th,
  .comparison-table td {
    padding: 0.75rem 0.5rem;
  }
}

/* ============================= */
/* --- BLOG INDEX --- */
/* ============================= */

.blog-header {
  padding: 7rem 0 3rem;
  position: relative;
  overflow: hidden;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  color: inherit;
}

.blog-card:hover .blog-card-img {
  transform: scale(1.05);
}

.blog-card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--bg-alt);
}

.blog-card-image--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
}

.blog-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.blog-card-image picture {
  display: block;
  height: 100%;
}

.blog-card-image picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.blog-card-body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.blog-card-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.blog-card-excerpt {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 1rem;
  flex-grow: 1;
}

.blog-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: auto;
}

.blog-card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

.blog-card-meta-item svg {
  flex-shrink: 0;
}

.blog-empty {
  text-align: center;
  padding: 4rem 1rem;
}

.blog-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--radius-xl);
  background: var(--accent-surface);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
}

.blog-empty h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.blog-empty p {
  color: var(--text-secondary);
  font-size: var(--text-base);
}

/* ============================= */
/* --- CATEGORY BADGE --- */
/* ============================= */

.category-badge {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  background: var(--accent-surface);
  border: 1px solid var(--accent-border);
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
  line-height: 1;
}

/* ============================= */
/* --- ARTICLE PAGE --- */
/* ============================= */

/* Magazine-style article header */
.article-magazine-header {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: flex-end;
  padding-top: 4rem;
  padding-bottom: 0;
  overflow: hidden;
}

.article-magazine-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.article-magazine-bg-img,
.article-magazine-bg picture,
.article-magazine-bg picture img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.article-magazine-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.3) 0%,
    rgba(15, 23, 42, 0.5) 40%,
    rgba(255, 255, 255, 0.95) 75%,
    rgba(255, 255, 255, 1) 100%
  );
}

.article-magazine-content {
  position: relative;
  z-index: 1;
  padding-bottom: 2rem;
}

.article-magazine-header .breadcrumb-nav a {
  color: rgba(255,255,255,0.7);
}

.article-magazine-header .breadcrumb-nav a:hover {
  color: white;
}

.article-magazine-header .breadcrumb-nav li {
  color: rgba(255,255,255,0.4);
}

.article-magazine-header .breadcrumb-nav li:not(:last-child)::after {
  color: rgba(255,255,255,0.3);
}

.article-magazine-header .breadcrumb-nav span[aria-current] {
  color: rgba(255,255,255,0.5);
}

.article-magazine-header .article-meta-item {
  color: var(--text-secondary);
}

.article-magazine-header .article-meta-item svg {
  color: var(--text-tertiary);
}

/* Breadcrumb navigation */
.breadcrumb-nav {
  margin-bottom: 1.25rem;
}

.breadcrumb-nav ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: var(--text-sm);
}

.breadcrumb-nav li {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  color: var(--text-tertiary);
}

.breadcrumb-nav li:not(:last-child)::after {
  content: "/";
  color: var(--border);
  margin-left: 0.125rem;
}

.breadcrumb-nav a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s;
}

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

.breadcrumb-nav span[aria-current] {
  color: var(--text-tertiary);
}

.article-title {
  font-size: var(--text-4xl);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 1.25rem;
  text-wrap: balance;
  max-width: 52rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
}

.article-meta-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

.article-meta-item svg {
  color: var(--text-tertiary);
  flex-shrink: 0;
}

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

.article-hero {
  padding: 2rem 0 0;
}

.article-hero-figure {
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.article-hero-img {
  width: 100%;
  display: block;
}

.article-hero-figure picture {
  display: block;
}

.article-hero-figure picture img {
  width: 100%;
  display: block;
}

.article-hero-credit {
  background: var(--bg-alt);
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  color: var(--text-tertiary);
  text-align: right;
}

/* --- Article Content --- */

.article-content {
  max-width: 52rem;
  margin: 0 auto;
}

/* --- TL;DR Box --- */

.tldr-box {
  background: var(--accent-surface);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.75rem;
  margin-bottom: 2.5rem;
}

.tldr-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-size: var(--text-base);
  margin-bottom: 0.75rem;
}

.tldr-header strong {
  font-weight: 700;
}

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

.tldr-list li {
  position: relative;
  padding-left: 1.25rem;
  font-size: var(--text-sm);
  color: var(--text);
  line-height: 1.65;
  margin-bottom: 0.5rem;
}

.tldr-list li:last-child {
  margin-bottom: 0;
}

.tldr-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

/* --- Content Body (article markdown) --- */

.content-body {
  font-size: var(--text-base);
  line-height: 1.75;
  color: var(--text);
}

.content-body h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: var(--text);
}

.content-body h3 {
  font-size: var(--text-xl);
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.content-body h4 {
  font-size: var(--text-lg);
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text);
}

.content-body p {
  margin-bottom: 1.25rem;
}

.content-body ul,
.content-body ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.content-body li {
  margin-bottom: 0.375rem;
}

.content-body blockquote {
  border-left: 3px solid var(--accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--bg-alt);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-secondary);
  font-style: italic;
}

.content-body code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  background: var(--bg-alt);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  border: 1px solid var(--border);
}

/* Code blocks as cards */
.content-body .code-card {
  position: relative;
  background: var(--bg-dark);
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 1.5rem;
  overflow: hidden;
}

.content-body .code-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: rgba(255,255,255,0.03);
}

.content-body .code-card-lang {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
}

.content-body .code-card-dots {
  display: flex;
  gap: 0.375rem;
}

.content-body .code-card-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
}

.content-body pre {
  background: var(--bg-dark);
  color: #E2E8F0;
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin-bottom: 1.5rem;
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.75;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* When pre is inside a code-card, reset its own styling */
.content-body .code-card pre {
  border-radius: 0;
  margin-bottom: 0;
  border: none;
}

.content-body pre code {
  background: none;
  padding: 0;
  border: none;
  border-radius: 0;
  color: inherit;
  font-size: inherit;
}

/* Template cards (code blocks without language tag) */
.content-body pre.template-card {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.5rem 1.75rem;
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  line-height: 1.8;
}

.content-body a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
}

.content-body a:hover {
  color: var(--accent-hover);
}

.content-body img {
  border-radius: var(--radius-lg);
  margin: 1.5rem 0;
  box-shadow: var(--shadow-sm);
}

.content-body hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin-bottom: 1.5rem;
}

.table-scroll table {
  margin-bottom: 0;
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: var(--text-sm);
}

.content-body th,
.content-body td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.content-body th {
  font-weight: 600;
  background: var(--bg-alt);
}

/* Responsive table -> card layout on mobile */
@media (max-width: 768px) {
  .content-body table.responsive-table thead {
    display: none;
  }

  .content-body table.responsive-table tbody tr {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
  }

  .content-body table.responsive-table tbody td {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.375rem 0;
    border-bottom: 1px solid var(--border);
    text-align: right;
  }

  .content-body table.responsive-table tbody td:last-child {
    border-bottom: none;
  }

  .content-body table.responsive-table tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--text);
    text-align: left;
    flex-shrink: 0;
    max-width: 40%;
  }

  .content-body table.responsive-table tbody td:empty {
    display: none;
  }
}

/* --- Article Tags --- */

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.article-tag {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-alt);
  padding: 0.3rem 0.75rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

/* --- Article CTA --- */

.article-cta {
  max-width: 52rem;
  margin: 0 auto;
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius-2xl);
  padding: clamp(2rem, 4vw, 3rem);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.article-cta h2 {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
  letter-spacing: -0.02em;
}

.article-cta p {
  color: var(--text-secondary);
  font-size: var(--text-base);
  margin-bottom: 1.5rem;
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.article-cta .btn {
  margin-top: 0.5rem;
}

/* ============================= */
/* --- BLOG RESPONSIVE --- */
/* ============================= */

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

@media (max-width: 768px) {
  .blog-header {
    padding: 5.5rem 0 2rem;
  }

  .blog-grid {
    grid-template-columns: 1fr;
    max-width: 32rem;
    margin: 0 auto;
  }

  .article-magazine-header {
    min-height: 20rem;
  }

  .article-title {
    font-size: var(--text-3xl);
  }

  .article-meta {
    gap: 0.75rem;
  }

  .article-cta {
    padding: 1.5rem;
  }

  .tldr-box {
    padding: 1.25rem;
  }
}

/* ============================= */
/* --- BLOG LAYOUT + SIDEBAR --- */
/* ============================= */

.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2.5rem;
  align-items: start;
}

/* blog-layout no longer used - grid is full-width 3-col */

/* --- Sidebar --- */

.blog-sidebar {
  position: sticky;
  top: 5.5rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.blog-sidebar-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 1.25rem;
}

.blog-sidebar-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 1rem;
}

/* --- Blog Hero Search --- */

.blog-hero-search {
  max-width: 36rem;
  margin: 2rem auto 0;
  position: relative;
  z-index: 20;
}

.blog-header {
  overflow: visible;
  z-index: 10;
  position: relative;
}

/* --- Category Pills --- */

.blog-category-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.blog-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.4375rem 0.875rem;
  border-radius: 999px;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.blog-pill:hover {
  border-color: var(--accent-border);
  color: var(--accent);
  background: var(--accent-surface);
}

.blog-pill.active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

.blog-pill-count {
  font-size: 0.6875rem;
  font-weight: 600;
  opacity: 0.7;
}

.blog-search--hero .blog-search-input {
  padding: 0.875rem 1rem 0.875rem 2.75rem;
  font-size: var(--text-base);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}

.blog-search--hero .blog-search-input:focus {
  border-color: var(--accent);
  box-shadow: var(--shadow-md), 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.blog-search--hero .blog-search-field svg {
  left: 0.875rem;
  width: 20px;
  height: 20px;
}

.blog-search--hero .blog-search-results {
  border-radius: var(--radius-xl);
}

/* --- Blog Search --- */

.blog-search {
  position: relative;
}

.blog-search-field {
  position: relative;
}

.blog-search-field svg {
  position: absolute;
  left: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  pointer-events: none;
  width: 16px;
  height: 16px;
}

.blog-search-input {
  width: 100%;
  padding: 0.625rem 0.75rem 0.625rem 2.25rem;
  font-family: var(--font);
  font-size: var(--text-sm);
  color: var(--text);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.blog-search-input::placeholder {
  color: var(--text-tertiary);
}

.blog-search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

/* --- Search Results Dropdown --- */

.blog-search-results {
  position: absolute;
  top: calc(100% + 0.375rem);
  left: 0;
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 50;
  max-height: 60vh;
  overflow-y: auto;
  display: none;
}

.blog-search-results.active {
  display: block;
}

.blog-search-result {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  padding: 0.625rem 0.75rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border);
  transition: background 0.15s;
}

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

.blog-search-result:hover {
  background: var(--accent-surface);
  color: inherit;
}

.blog-search-result-title {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text);
  line-height: 1.35;
}

.blog-search-result-title mark {
  background: var(--accent-border);
  color: var(--accent);
  border-radius: 2px;
  padding: 0 1px;
}

.blog-search-result-cat {
  font-size: 0.6875rem;
  color: var(--text-tertiary);
}

.blog-search-empty {
  padding: 1rem 0.75rem;
  font-size: var(--text-sm);
  color: var(--text-tertiary);
  text-align: center;
}

/* --- Category Filter --- */

.blog-categories {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.blog-category-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4375rem 0.625rem;
  border-radius: var(--radius);
  font-size: var(--text-sm);
  color: var(--text-secondary);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}

.blog-category-item:hover {
  background: var(--bg-alt);
  color: var(--text);
}

.blog-category-item.active {
  background: var(--accent-surface);
  color: var(--accent);
  font-weight: 500;
}

.blog-category-count {
  font-size: 0.6875rem;
  font-weight: 600;
  min-width: 1.5rem;
  height: 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--bg-alt);
  color: var(--text-tertiary);
}

.blog-category-item.active .blog-category-count {
  background: var(--accent-border);
  color: var(--accent);
}

/* --- Tag Cloud --- */

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.tag-cloud-item {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--bg-alt);
  color: var(--text-secondary);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.15s;
  text-decoration: none;
  line-height: 1.3;
}

.tag-cloud-item:hover {
  border-color: var(--accent-border);
  background: var(--accent-surface);
  color: var(--accent);
  transform: translateY(-1px);
}

.tag-cloud-item.active {
  background: var(--accent);
  color: var(--accent-text);
  border-color: var(--accent);
}

/* Tag sizes based on frequency */
.tag-cloud-item--sm {
  font-size: 0.6875rem;
}

.tag-cloud-item--md {
  font-size: 0.8125rem;
}

.tag-cloud-item--lg {
  font-size: 0.9375rem;
  font-weight: 600;
}

/* --- Filter empty state --- */

/* Hidden cards for infinite scroll */
.blog-card--hidden {
  display: none;
}

.blog-load-more {
  text-align: center;
  padding: 2rem 0;
}

.blog-load-more-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: 0 auto;
  animation: spin 0.7s linear infinite;
}

.blog-load-more.done {
  display: none;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.blog-filter-empty {
  display: none;
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-tertiary);
  font-size: var(--text-sm);
}

/* --- Article with TOC --- */

.article-with-toc {
  position: relative;
}

.article-with-toc .article-content {
  max-width: var(--max-width);
  margin: 0 auto;
}

.article-toc {
  position: fixed;
  top: 5rem;
  right: max(1rem, calc((100vw - var(--max-width)) / 2 - 220px));
  width: 200px;
  max-height: calc(100vh - 6rem);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
  transition: opacity 0.2s ease;
}

.article-toc-inner {
  padding-top: 0.5rem;
}

.article-toc-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-tertiary);
  margin-bottom: 0.75rem;
  padding-left: 0.75rem;
}

.article-toc-nav {
  display: flex;
  flex-direction: column;
  border-left: 2px solid var(--border);
}

.article-toc-link {
  display: block;
  padding: 0.3rem 0 0.3rem 0.75rem;
  font-size: 0.8125rem;
  line-height: 1.4;
  color: var(--text-tertiary);
  text-decoration: none;
  border-left: 2px solid transparent;
  margin-left: -2px;
  transition: color 0.15s, border-color 0.15s;
}

.article-toc-link:hover {
  color: var(--text-secondary);
}

.article-toc-link.active {
  color: var(--accent);
  border-left-color: var(--accent);
  font-weight: 500;
}

.article-toc-link--sub {
  padding-left: 1.5rem;
  font-size: 0.75rem;
}

@media (max-width: 1400px) {
  .article-toc {
    display: none;
  }

}

/* ============================= */
/* --- SIDEBAR RESPONSIVE --- */
/* ============================= */

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

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

  .blog-sidebar {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
    order: -1;
  }

  .blog-sidebar-section {
    flex: 1;
    min-width: 250px;
  }

  .article-body-layout {
    grid-template-columns: 1fr;
  }

  .article-body-layout .blog-sidebar {
    order: -1;
    flex-direction: row;
    flex-wrap: wrap;
  }
}

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

  .blog-sidebar-section {
    min-width: 0;
  }

  .blog-layout .blog-grid {
    grid-template-columns: 1fr;
    max-width: 32rem;
    margin: 0 auto;
  }
}

/* ===== Topic Pages ===== */
.topic-header { padding: 7rem 0 3rem; position: relative; overflow: visible; }
.topic-icon { width: 64px; height: 64px; border-radius: var(--radius-xl); background: var(--accent-surface); color: var(--accent); display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; }
.topic-intro { max-width: 52rem; margin: 0 auto; }
.topic-intro .content-body { margin-bottom: 3rem; }
.topic-article-count { font-size: var(--text-sm); color: var(--text-tertiary); margin-top: 0.5rem; }
.topic-back-link { text-align: center; margin-top: 3rem; }

.topic-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.topic-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  text-decoration: none;
  color: inherit;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s, border-color 0.3s;
}

.topic-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-border);
  color: inherit;
}

.topic-card-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-lg);
  background: var(--accent-surface);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.topic-card:hover .topic-card-icon {
  background: var(--accent);
  color: var(--accent-text);
}

.topic-card-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.topic-card-desc {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .topic-grid {
    grid-template-columns: 1fr;
    max-width: 24rem;
    margin: 0 auto;
  }
}

@media (max-width: 1024px) and (min-width: 769px) {
  .topic-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ============================= */
/* --- LIGHTBOX --- */
/* ============================= */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(4px);
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-content img {
  display: block;
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  transform: scale(0.95);
  transition: transform 0.25s ease;
}

.lightbox.open .lightbox-content img {
  transform: scale(1);
}

.lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  transition: color 0.15s;
}

.lightbox-close:hover {
  color: white;
}
