/* ============================================================
   HAUSKAUFRECHNER24 — Main CSS
   2026 Modern Design — Clean, Professional, Fast
   ============================================================ */

/* Google Fonts — Inter */
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300..900;1,14..32,300..900&display=swap');

/* ---- Variables ---- */
:root {
  /* Colors */
  --c-primary:        #1D4ED8;
  --c-primary-dark:   #1E3A8A;
  --c-primary-light:  #EFF6FF;
  --c-accent:         #10B981;
  --c-accent-light:   #ECFDF5;
  --c-yellow:         #F59E0B;
  --c-yellow-light:   #FFFBEB;

  --c-text:           #111827;
  --c-text-muted:     #6B7280;
  --c-text-light:     #9CA3AF;

  --c-bg:             #FFFFFF;
  --c-bg-alt:         #F9FAFB;
  --c-bg-dark:        #F3F4F6;
  --c-border:         #E5E7EB;
  --c-border-dark:    #D1D5DB;

  /* Category colors */
  --c-rechner:       #1D4ED8;
  --c-ratgeber:      #059669;
  --c-finanzierung:  #7C3AED;
  --c-kosten:        #D97706;
  --c-checklisten:   #0891B2;
  --c-bundesland:    #be185d;
  --c-staedte:       #0f766e;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  /* Sizing */
  --max-w:       1220px;
  --max-w-text:  780px;
  --header-h:    68px;

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;

  /* Radius */
  --r-sm:  6px;
  --r:     12px;
  --r-lg:  16px;
  --r-xl:  24px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow:    0 4px 8px rgba(0,0,0,.07), 0 1px 3px rgba(0,0,0,.04);
  --shadow-md: 0 8px 16px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 16px 32px rgba(0,0,0,.08), 0 4px 8px rgba(0,0,0,.04);
  --shadow-xl: 0 24px 48px rgba(0,0,0,.10), 0 8px 16px rgba(0,0,0,.04);

  /* Transitions */
  --ease:      0.18s ease;
  --ease-slow: 0.28s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-primary); text-decoration: none; }
a:hover { color: var(--c-primary-dark); }
button, input, select, textarea { font-family: inherit; }


/* ============================================================
   LAYOUT
   ============================================================ */

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-8);
}

.container-narrow {
  max-width: var(--max-w-text);
  margin: 0 auto;
  padding: 0 var(--sp-8);
}

.site-content { padding-top: var(--header-h); min-height: 80vh; }


/* ============================================================
   HEADER — Desktop
   ============================================================ */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--header-h);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--ease), box-shadow var(--ease);
}

.site-header.scrolled {
  border-color: var(--c-border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--sp-8);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  color: var(--c-text);
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
  flex-shrink: 0;
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--c-primary);
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
}

.logo-icon svg { width: 18px; height: 18px; }
.site-logo:hover { color: var(--c-primary); }
.site-logo .logo-24 { color: var(--c-primary); }

/* Desktop Nav */
.header-desktop {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  flex: 1;
  justify-content: space-between;
}

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

.main-nav a {
  display: block;
  padding: var(--sp-2) var(--sp-4);
  color: var(--c-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: var(--r-sm);
  transition: color var(--ease), background var(--ease);
}

.main-nav a:hover,
.main-nav a.active {
  color: var(--c-primary);
  background: var(--c-primary-light);
}

.header-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.55rem 1.1rem;
  background: var(--c-primary);
  color: white;
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--r-sm);
  white-space: nowrap;
  transition: background var(--ease), transform var(--ease), box-shadow var(--ease);
  flex-shrink: 0;
}

.header-cta:hover {
  background: var(--c-primary-dark);
  color: white;
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.header-cta svg { width: 14px; height: 14px; }

/* ============================================================
   HEADER — Mobile
   ============================================================ */

.header-mobile {
  display: none;
  align-items: center;
  gap: var(--sp-3);
}

.hamburger {
  width: 40px;
  height: 40px;
  border: none;
  background: none;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  padding: var(--sp-2);
  border-radius: var(--r-sm);
  transition: background var(--ease);
}

.hamburger:hover { background: var(--c-bg-alt); }

.hamburger span {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--c-text);
  border-radius: 2px;
  transition: transform var(--ease), opacity var(--ease), width var(--ease);
}

.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; width: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile Menu Dropdown */
.mobile-menu {
  display: none;
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  bottom: 0;
  background: white;
  z-index: 999;
  overflow-y: auto;
  padding: var(--sp-6) var(--sp-6) var(--sp-12);
  animation: none;
}

.mobile-menu.open {
  display: block;
  animation: menuIn 0.22s ease;
}

@keyframes menuIn {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.mobile-nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: var(--sp-6);
}

.mobile-nav a {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-4);
  color: var(--c-text);
  font-size: 1.05rem;
  font-weight: 500;
  border-radius: var(--r);
  transition: background var(--ease), color var(--ease);
}

.mobile-nav a:hover {
  background: var(--c-primary-light);
  color: var(--c-primary);
}

.mobile-cta-btn {
  display: block;
  padding: var(--sp-4);
  background: var(--c-primary);
  color: white;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  border-radius: var(--r);
  transition: background var(--ease);
}

.mobile-cta-btn:hover { background: var(--c-primary-dark); color: white; }


/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.7rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: var(--r-sm);
  cursor: pointer;
  border: 2px solid transparent;
  text-decoration: none;
  transition: all var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--c-primary);
  color: white;
  border-color: var(--c-primary);
}
.btn-primary:hover {
  background: var(--c-primary-dark);
  border-color: var(--c-primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: white;
  color: var(--c-text);
  border-color: var(--c-border-dark);
}
.btn-secondary:hover {
  border-color: var(--c-primary);
  color: var(--c-primary);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.btn-ghost {
  background: transparent;
  color: var(--c-primary);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--c-primary-light);
  color: var(--c-primary-dark);
}

.btn-lg { padding: 0.9rem 1.8rem; font-size: 1rem; }
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.8rem; }

.btn svg { width: 16px; height: 16px; flex-shrink: 0; }


/* ============================================================
   HERO
   ============================================================ */

.hero {
  background: linear-gradient(135deg, #EFF6FF 0%, #F0FDF4 60%, #FFFBEB 100%);
  padding: var(--sp-20) 0 var(--sp-16);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(circle, rgba(29,78,216,.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(16,185,129,.04) 0%, transparent 70%);
  pointer-events: none;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-4);
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--r-pill);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--c-text-muted);
  margin-bottom: var(--sp-6);
  box-shadow: var(--shadow-xs);
}

.hero-badge .dot {
  width: 7px;
  height: 7px;
  background: var(--c-accent);
  border-radius: 50%;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.75rem);
  font-weight: 900;
  line-height: 1.12;
  color: var(--c-text);
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-6);
}

.hero h1 .hl-blue  { color: var(--c-primary); }
.hero h1 .hl-green { color: var(--c-accent); }

.hero-sub {
  font-size: 1.15rem;
  color: var(--c-text-muted);
  max-width: 580px;
  margin: 0 auto var(--sp-10, 2.5rem);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-12);
}

.hero-trust {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-6);
  flex-wrap: wrap;
  font-size: 0.8rem;
  color: var(--c-text-light);
}

.hero-trust span {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.hero-trust svg { width: 14px; height: 14px; color: var(--c-accent); }


/* ============================================================
   SECTION
   ============================================================ */

section { padding: var(--sp-16) 0; }

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-primary);
  margin-bottom: var(--sp-3);
  display: block;
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--c-text);
  line-height: 1.2;
}

.section-sub {
  font-size: 1.05rem;
  color: var(--c-text-muted);
  max-width: 520px;
  margin-top: var(--sp-4);
  line-height: 1.65;
}

.section-head { margin-bottom: var(--sp-12); }
.section-head--center { text-align: center; }
.section-head--center .section-sub { margin-left: auto; margin-right: auto; }


/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--c-text);
  text-decoration: none;
  transition: transform var(--ease-slow), box-shadow var(--ease-slow), border-color var(--ease);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: transparent;
  color: var(--c-text);
}

.card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: var(--c-bg-dark);
}

.card-img-ph {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--c-primary-light), #EDE9FE);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
}

.card-img-ph svg { width: 40px; height: 40px; opacity: 0.5; }

.card-body {
  padding: var(--sp-6);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-cat {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: var(--sp-3);
}

.card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--c-text);
  margin-bottom: var(--sp-3);
  flex: 1;
}

.card-excerpt {
  font-size: 0.875rem;
  color: var(--c-text-muted);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-bottom: var(--sp-4);
}

.card-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  font-size: 0.78rem;
  color: var(--c-text-light);
  border-top: 1px solid var(--c-border);
  padding-top: var(--sp-4);
  margin-top: auto;
}

.card-meta svg { width: 13px; height: 13px; }

/* Grid Layouts */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-6); }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--sp-6); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: var(--sp-6); }


/* ============================================================
   CATEGORY CARDS
   ============================================================ */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: var(--sp-4);
}

.cat-card {
  background: white;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r);
  padding: var(--sp-6);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-3);
  color: var(--c-text);
  text-decoration: none;
  transition: all var(--ease-slow);
}

.cat-card:hover {
  border-color: var(--c-primary);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  color: var(--c-text);
}

.cat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--r-sm);
  background: var(--c-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
  transition: background var(--ease), color var(--ease);
}

.cat-icon svg { width: 22px; height: 22px; }
.cat-card:hover .cat-icon { background: var(--c-primary); color: white; }

.cat-name { font-weight: 700; font-size: 0.95rem; }
.cat-count { font-size: 0.78rem; color: var(--c-text-light); }

/* Category color variants */
.cat-card[data-cat="rechner"]      .cat-icon { background: #EFF6FF; color: var(--c-rechner); }
.cat-card[data-cat="ratgeber"]     .cat-icon { background: #ECFDF5; color: var(--c-ratgeber); }
.cat-card[data-cat="finanzierung"] .cat-icon { background: #F5F3FF; color: var(--c-finanzierung); }
.cat-card[data-cat="kosten"]       .cat-icon { background: #FFFBEB; color: var(--c-kosten); }
.cat-card[data-cat="checklisten"]  .cat-icon { background: #ECFEFF; color: var(--c-checklisten); }


/* ============================================================
   SINGLE POST
   ============================================================ */

.post-hero {
  background: var(--c-bg-alt);
  padding: var(--sp-12) 0 var(--sp-8);
  border-bottom: 1px solid var(--c-border);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.82rem;
  color: var(--c-text-light);
  margin-bottom: var(--sp-6);
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--c-text-muted); }
.breadcrumb a:hover { color: var(--c-primary); }
.breadcrumb .sep { color: var(--c-border-dark); }
.breadcrumb .cur { color: var(--c-text); font-weight: 500; }

.post-cat-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--r-pill);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--sp-4);
  background: var(--c-primary-light);
  color: var(--c-primary);
}

.post-title {
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.025em;
  line-height: 1.15;
  color: var(--c-text);
  margin-bottom: var(--sp-6);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  font-size: 0.83rem;
  color: var(--c-text-muted);
  flex-wrap: wrap;
}

.post-meta span { display: flex; align-items: center; gap: var(--sp-2); }
.post-meta svg { width: 14px; height: 14px; }

.post-feat-img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
  border-radius: var(--r-lg);
  margin: var(--sp-8) 0;
}

/* Post Layout */
.post-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: var(--sp-12);
  align-items: start;
  padding: var(--sp-8) 0 var(--sp-16);
}

/* Post Content Typography */
.post-content h2 {
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--c-text);
  margin: var(--sp-12) 0 var(--sp-4);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.post-content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--c-text);
  margin: var(--sp-8) 0 var(--sp-3);
}

.post-content h4 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--c-text);
  margin: var(--sp-6) 0 var(--sp-3);
}

.post-content p {
  margin-bottom: var(--sp-6);
  line-height: 1.8;
  font-size: 1.02rem;
}

.post-content ul, .post-content ol {
  margin: 0 0 var(--sp-6) var(--sp-6);
}

.post-content li {
  margin-bottom: var(--sp-2);
  line-height: 1.7;
}

.post-content a { color: var(--c-primary); text-decoration: underline; text-underline-offset: 2px; }
.post-content a:hover { color: var(--c-primary-dark); }

.post-content blockquote {
  border-left: 4px solid var(--c-primary);
  padding: var(--sp-4) var(--sp-8);
  margin: var(--sp-8) 0;
  background: var(--c-primary-light);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-style: italic;
  color: var(--c-primary-dark);
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--sp-8) 0;
  font-size: 0.9rem;
  border-radius: var(--r);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.post-content th {
  background: var(--c-primary);
  color: white;
  padding: var(--sp-4) var(--sp-4);
  text-align: left;
  font-weight: 600;
}

.post-content td {
  padding: var(--sp-4);
  border-bottom: 1px solid var(--c-border);
}

.post-content tr:last-child td { border-bottom: none; }
.post-content tr:nth-child(even) td { background: var(--c-bg-alt); }
.post-content tr:hover td { background: var(--c-primary-light); }

.post-content img {
  border-radius: var(--r);
  margin: var(--sp-8) 0;
  box-shadow: var(--shadow-md);
}

/* Post Sidebar */
.post-sidebar {
  position: sticky;
  top: calc(var(--header-h) + var(--sp-8));
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.widget {
  background: white;
  border: 1px solid var(--c-border);
  border-radius: var(--r);
  padding: var(--sp-6);
}

.widget-title {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--c-text-muted);
  margin-bottom: var(--sp-4);
  padding-bottom: var(--sp-4);
  border-bottom: 1px solid var(--c-border);
}

.toc-list { list-style: none; }

.toc-list a {
  display: block;
  padding: 5px var(--sp-3);
  font-size: 0.83rem;
  color: var(--c-text-muted);
  border-left: 2px solid transparent;
  transition: all var(--ease);
  line-height: 1.45;
}

.toc-list a:hover,
.toc-list a.active {
  color: var(--c-primary);
  border-color: var(--c-primary);
  background: var(--c-primary-light);
}

.related-link {
  display: block;
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--c-border);
  font-size: 0.83rem;
  color: var(--c-text);
  line-height: 1.45;
  transition: color var(--ease);
}

.related-link:hover { color: var(--c-primary); }
.related-link:last-child { border-bottom: none; padding-bottom: 0; }


/* ============================================================
   CATEGORY PAGE
   ============================================================ */

.cat-page-header {
  background: var(--c-bg-alt);
  padding: var(--sp-12) 0;
  border-bottom: 1px solid var(--c-border);
}

.cat-page-header h1 { font-size: 2.2rem; font-weight: 800; letter-spacing: -0.025em; }


/* ============================================================
   PAGINATION
   ============================================================ */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  margin-top: var(--sp-12);
}

.page-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 var(--sp-3);
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid var(--c-border);
  color: var(--c-text-muted);
  text-decoration: none;
  transition: all var(--ease);
}

.page-link:hover { border-color: var(--c-primary); color: var(--c-primary); }
.page-link.active { background: var(--c-primary); border-color: var(--c-primary); color: white; }
.page-link.disabled { opacity: 0.4; pointer-events: none; }


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

.site-footer {
  background: #0F172A;
  color: #94A3B8;
  padding: var(--sp-16) 0 var(--sp-8);
  margin-top: var(--sp-16);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-12);
  margin-bottom: var(--sp-12);
}

.footer-brand .site-logo { color: white; margin-bottom: var(--sp-4); }
.footer-brand p { font-size: 0.875rem; color: #64748B; line-height: 1.7; max-width: 280px; }

.footer-col h4 {
  color: white;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-4);
}

.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: var(--sp-3); }

.footer-col a {
  color: #64748B;
  font-size: 0.875rem;
  text-decoration: none;
  transition: color var(--ease);
}

.footer-col a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid #1E293B;
  padding-top: var(--sp-8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  color: #475569;
  flex-wrap: wrap;
  gap: var(--sp-4);
}

.footer-legal { display: flex; gap: var(--sp-6); }
.footer-legal a { color: #475569; text-decoration: none; transition: color var(--ease); }
.footer-legal a:hover { color: white; }


/* ============================================================
   404 & EMPTY STATES
   ============================================================ */

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

.page-404 .big-num {
  font-size: 8rem;
  font-weight: 900;
  color: var(--c-primary);
  line-height: 1;
  letter-spacing: -0.05em;
  margin-bottom: var(--sp-4);
  display: block;
}

.empty-state {
  text-align: center;
  padding: var(--sp-16) 0;
}

.empty-state svg {
  width: 56px;
  height: 56px;
  color: var(--c-border-dark);
  margin: 0 auto var(--sp-4);
}


/* ============================================================
   UTILITIES
   ============================================================ */

.text-center { text-align: center; }
.text-muted  { color: var(--c-text-muted); }
.text-light  { color: var(--c-text-light); }
.fw-700      { font-weight: 700; }
.fw-800      { font-weight: 800; }

.mt-4  { margin-top: var(--sp-4); }
.mt-6  { margin-top: var(--sp-6); }
.mt-8  { margin-top: var(--sp-8); }
.mt-12 { margin-top: var(--sp-12); }
.mb-4  { margin-bottom: var(--sp-4); }
.mb-6  { margin-bottom: var(--sp-6); }
.mb-8  { margin-bottom: var(--sp-8); }
.mb-12 { margin-bottom: var(--sp-12); }

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


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

@media (max-width: 1080px) {
  .post-layout { grid-template-columns: 1fr; }
  .post-sidebar { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-8); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --header-h: 58px; --sp-16: 3.5rem; --sp-20: 4rem; }

  .container, .container-narrow { padding: 0 var(--sp-4); }

  /* Header: hide desktop, show mobile */
  .header-desktop { display: none; }
  .header-mobile  { display: flex; }

  /* Grids */
  .grid-3, .grid-4, .grid-auto { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: repeat(2, 1fr); }

  /* Footer */
  .footer-grid   { grid-template-columns: 1fr; gap: var(--sp-8); }
  .footer-bottom { flex-direction: column; text-align: center; }
  .footer-legal  { justify-content: center; flex-wrap: wrap; gap: var(--sp-4); }

  /* Hero */
  .hero-actions { flex-direction: column; align-items: stretch; }
  .hero-trust   { gap: var(--sp-3); }
}

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


/* ============================================================
   CALCULATOR WIDGETS
   ============================================================ */

.calc-widget {
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: 12px;
  padding: var(--sp-6) var(--sp-6) var(--sp-8);
  margin: var(--sp-8) 0;
}

.calc-widget h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--c-primary);
  margin: 0 0 var(--sp-4);
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.calc-field label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.calc-field input,
.calc-field select {
  padding: .6rem .85rem;
  border: 1.5px solid var(--c-border-dark);
  border-radius: 8px;
  font-size: .95rem;
  font-family: var(--font);
  color: var(--c-text);
  background: #fff;
  transition: border-color .15s;
  width: 100%;
  box-sizing: border-box;
}

.calc-field input:focus,
.calc-field select:focus {
  outline: none;
  border-color: var(--c-primary);
}

.calc-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--c-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: .65rem 1.4rem;
  font-size: .93rem;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  transition: background .15s;
  margin-top: var(--sp-3);
}

.calc-btn:hover { background: var(--c-primary-dark); }

.calc-result-box {
  background: #fff;
  border: 1.5px solid var(--c-primary);
  border-radius: 10px;
  padding: var(--sp-4) var(--sp-5);
  margin-top: var(--sp-5);
}

.calc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .9rem;
}

.calc-table th,
.calc-table td {
  padding: .45rem .6rem;
  text-align: left;
  border-bottom: 1px solid var(--c-border);
}

.calc-table th {
  font-weight: 700;
  font-size: .8rem;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}

.calc-table td.num { text-align: right; font-variant-numeric: tabular-nums; }

.calc-table tr.calc-total td {
  background: var(--c-primary-light);
  font-weight: 600;
  border-top: 2px solid var(--c-primary);
}

.calc-table tr.calc-grand td {
  background: var(--c-primary);
  color: #fff;
  font-weight: 700;
}

.calc-hint {
  font-size: .82rem;
  color: var(--c-text-muted);
  margin-top: var(--sp-3);
  line-height: 1.5;
}

/* ============================================================
   INFO BOX + TIP BOX
   ============================================================ */

.info-box {
  background: var(--c-primary-light);
  border-left: 4px solid var(--c-primary);
  border-radius: 0 10px 10px 0;
  padding: var(--sp-4) var(--sp-5);
  margin: var(--sp-6) 0;
}

.info-box strong:first-child {
  display: block;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--c-primary);
  margin-bottom: var(--sp-2);
}

.info-box ul {
  margin: var(--sp-2) 0 0;
  padding-left: var(--sp-5);
}

.info-box li { margin-bottom: .25rem; font-size: .9rem; }

.tip-box {
  background: var(--c-accent-light);
  border-left: 4px solid var(--c-accent);
  border-radius: 0 10px 10px 0;
  padding: var(--sp-4) var(--sp-5);
  margin: var(--sp-6) 0;
}

.tip-box strong:first-child {
  display: block;
  font-size: .82rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--c-accent);
  margin-bottom: var(--sp-2);
}

.tip-box p { margin: 0; font-size: .9rem; }

/* ============================================================
   CHECKLIST
   ============================================================ */

.checklist {
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
  border-radius: 10px;
  padding: var(--sp-4) var(--sp-5);
  margin: var(--sp-4) 0;
}

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

.checklist li {
  padding: .3rem 0 .3rem 1.6rem;
  border-bottom: 1px solid var(--c-border);
  font-size: .9rem;
  position: relative;
}

.checklist li:last-child { border-bottom: none; }

.checklist li::before {
  content: '';
  position: absolute;
  left: 0;
  top: .55rem;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--c-border-dark);
  border-radius: 4px;
  background: #fff;
}

/* ============================================================
   TOOLTIP SYSTEM
   ============================================================ */

.hk-term {
  border-bottom: 1.5px dashed var(--c-primary);
  cursor: help;
  position: relative;
  display: inline;
  color: inherit;
}

.hk-term:hover .hk-tooltip,
.hk-term:focus .hk-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.hk-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  width: 280px;
  background: #1a2332;
  color: #fff;
  border-radius: 10px;
  padding: .75rem 1rem;
  font-size: .82rem;
  line-height: 1.5;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s, transform .18s;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}

.hk-tooltip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: #1a2332;
}

.hk-tooltip strong {
  display: block;
  font-size: .85rem;
  margin-bottom: .3rem;
  color: #93c5fd;
}

.hk-tooltip a {
  display: inline-block;
  margin-top: .4rem;
  color: #60a5fa;
  text-decoration: underline;
  font-size: .8rem;
}

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

  .hk-tooltip {
    position: fixed;
    bottom: auto;
    left: 1rem;
    right: 1rem;
    width: auto;
    top: auto;
    transform: none;
  }

  .hk-term:hover .hk-tooltip,
  .hk-term:focus .hk-tooltip {
    transform: none;
  }
}
