/* =========================================================
   WohnungsCheck — Precision PropTech (Legacy pages stylesheet)
   Matches the design system of the main landing page.
   Old class names are preserved so existing HTML keeps working.
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700&family=Geist+Mono:wght@400;500&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* New design tokens */
  --bg:            #FDFDFC;
  --bg-2:          #F6F6F4;
  --bg-3:          #EFEFEC;
  --ink:           #0B0C0E;
  --ink-2:         #1F2226;
  --muted:         #5A6068;
  --muted-2:       #8B9099;
  --line:          rgba(11,12,14,0.08);
  --line-2:        rgba(11,12,14,0.14);
  --accent:        #0047FF;
  --accent-dark:   #0034C2;
  --accent-soft:   #E8EEFF;
  --good:          #00875A;

  --font:          'Geist', ui-sans-serif, system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --mono:          'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius:        16px;
  --radius-sm:     10px;
  --max:           1120px;

  /* Back-compat aliases used by legacy markup */
  --text:          var(--ink);
  --muted2:        var(--muted-2);
  --border:        var(--line);
  --surface:       var(--bg-2);
  --surface-2:     var(--bg-3);
  --brand:         var(--accent);
  --brand2:        var(--accent-dark);
  --primary:       var(--accent);
  --shadow:        0 18px 36px -12px rgba(11,12,14,0.08), 0 40px 80px -30px rgba(11,12,14,0.14);
}

html { height: 100%; scroll-behavior: smooth; }

body {
  font-family: var(--font);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  font-size: 15.5px;
  font-feature-settings: "ss01","cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
  position: relative;
}

/* =========================================================
   TOPBAR
   ========================================================= */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in oklab, var(--bg) 90%, transparent);
  backdrop-filter: saturate(1.5) blur(12px);
  -webkit-backdrop-filter: saturate(1.5) blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  gap: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.015em;
  color: var(--ink);
}

.logo-wrapper {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
}

.logo-img {
  width: 26px;
  height: 26px;
  border-radius: 0;
  object-fit: contain;
}

nav {
  display: flex;
  gap: 0;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

nav a {
  font-size: 13.5px;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 6px;
  transition: color .15s, background .15s;
  border: 1px solid transparent;
}

nav a:hover {
  color: var(--ink);
  background: var(--bg-2);
}

/* =========================================================
   BUTTONS
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 500;
  border: 1px solid var(--line-2);
  color: var(--ink);
  background: var(--bg);
  transition: all .15s;
  white-space: nowrap;
  cursor: pointer;
}

.btn:hover {
  border-color: var(--ink);
  background: var(--bg-2);
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 4px 12px -2px rgba(0,71,255,0.25);
}

.btn-primary:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink);
}

.btn-outline:hover {
  border-color: var(--ink);
  background: var(--bg-2);
}

/* =========================================================
   HEADINGS + BASE TYPOGRAPHY (global scope)
   ========================================================= */
h1, h2, h3, h4, h5, h6 {
  color: var(--ink);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(32px, 4.2vw, 46px);
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin: 16px 0 14px;
}

.lead {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  max-width: 62ch;
  margin: 0 0 18px;
}

/* =========================================================
   CONTENT PAGE (Impressum, Datenschutz, Cookies, Blog Article)
   ========================================================= */
.content-page {
  padding: 60px 0 80px;
  max-width: 820px;
}

.content-page h1 {
  font-size: clamp(32px, 4vw, 44px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  color: var(--ink);
}

.content-page h2 {
  font-size: 26px;
  margin-top: 44px;
  margin-bottom: 16px;
  color: var(--ink);
  letter-spacing: -0.02em;
}

.content-page h3 {
  font-size: 18px;
  margin-top: 28px;
  margin-bottom: 12px;
  color: var(--ink);
  font-weight: 600;
}

.content-page p,
.content-page li {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 14px;
}

.content-page ul,
.content-page ol {
  padding-left: 22px;
  margin-bottom: 16px;
}

.content-page ul li,
.content-page ol li {
  margin-bottom: 8px;
}

.content-page strong { color: var(--ink); font-weight: 600; }

.content-page a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0,71,255,0.3);
  transition: color .15s, text-decoration-color .15s;
}

.content-page a:hover {
  color: var(--accent-dark);
  text-decoration-color: var(--accent-dark);
}

.content-page hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 56px 0;
}

/* =========================================================
   HIGHLIGHT / LINK BOXES
   ========================================================= */
.internal-link-box {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  margin: 28px 0;
  font-size: 15px;
  color: var(--ink-2);
}

.internal-link-box a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(0,71,255,0.3);
}

.internal-link-box a:hover {
  color: var(--accent-dark);
  text-decoration-color: var(--accent-dark);
}

.highlight-box {
  background: var(--bg-2) !important;
  border: 1px solid var(--line-2) !important;
  border-left: 3px solid var(--accent) !important;
  border-radius: var(--radius-sm) !important;
  padding: 18px 20px !important;
  margin: 24px 0 !important;
}

.highlight-box p { color: var(--ink-2); font-size: 15px; }
.highlight-box strong { color: var(--ink); }

/* =========================================================
   HERO IMAGE (Blog articles)
   ========================================================= */
.hero-image {
  margin: 0 0 32px;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  display: block;
}

.content-page figure {
  margin: 28px 0;
}

.content-page figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  display: block;
}

.content-page figure figcaption {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
}

/* =========================================================
   DATENSCHUTZ / LEGAL — INDEX & GLOSSARY
   ========================================================= */
.index {
  list-style: none;
  padding: 18px 22px;
  margin: 20px 0 32px;
  display: grid;
  gap: 8px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  border-radius: var(--radius-sm);
}

.index li { margin: 0 !important; }

.index-link {
  color: var(--accent);
  font-size: 15px;
  text-decoration: none;
}

.index-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.m-elements {
  list-style: none;
  padding: 0;
  margin: 16px 0;
  display: grid;
  gap: 14px;
}

.m-elements li {
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  font-size: 14.5px;
  color: var(--ink-2);
  line-height: 1.6;
  margin: 0;
}

.m-elements li strong {
  color: var(--ink);
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
}

.glossary {
  list-style: none;
  padding: 0;
  margin: 20px 0;
}

.glossary li {
  margin-bottom: 20px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}

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

.glossary li strong {
  font-size: 16px;
  color: var(--ink);
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
}

.seal { text-align: center; margin: 20px 0; }
.seal img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  border-top: 1px solid var(--line);
  padding: 48px 0 32px;
  background: var(--bg-2);
  color: var(--muted);
  font-size: 13px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  padding-bottom: 40px;
  border-bottom: 1px solid var(--line);
}

.footer-grid > div > div:first-child {
  color: var(--ink) !important;
  font-family: var(--mono);
  font-size: 10.5px !important;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500 !important;
  margin-bottom: 14px !important;
}

.footer-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-stack a {
  color: var(--ink-2);
  font-size: 14px;
  transition: color .15s;
}

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

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.footer-links a {
  color: var(--muted);
  transition: color .15s;
}

.footer-links a:hover { color: var(--ink); }

/* =========================================================
   BLOG INDEX
   ========================================================= */
.blog-header {
  padding: 72px 0 40px;
  text-align: center;
}

.blog-header h1 {
  font-size: clamp(40px, 5vw, 60px);
  letter-spacing: -0.03em;
  font-weight: 500;
  margin: 0 0 16px;
  line-height: 1.04;
}

.blog-header .lead {
  color: var(--muted);
  font-size: clamp(16px, 1.3vw, 18px);
  margin-left: auto;
  margin-right: auto;
}

.blog-categories {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 48px;
}

.category-pill {
  padding: 8px 16px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  text-decoration: none;
  transition: all 0.15s;
  font-family: var(--font);
}

.category-pill:hover {
  border-color: var(--ink);
  background: var(--bg-2);
  color: var(--ink);
}

.category-pill.active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 64px;
}

.blog-card {
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color .18s, transform .18s, box-shadow .18s;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-3px);
  border-color: var(--ink);
  box-shadow: 0 18px 36px -12px rgba(11,12,14,0.08);
}

.blog-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
}

.blog-card-content {
  padding: 26px 26px 28px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.blog-tag {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--accent);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}

.blog-card h3 {
  font-size: 19px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.015em;
  margin: 0 0 10px;
  color: var(--ink);
}

.blog-card p {
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0 0 18px;
  flex-grow: 1;
}

.read-more {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color .15s, gap .15s;
}

.read-more:hover {
  color: var(--accent-dark);
  gap: 8px;
}

/* =========================================================
   LEGACY (rarely used on leftover pages) — kept clean
   ========================================================= */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--bg);
  font-size: 12.5px;
  color: var(--muted);
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--good);
  box-shadow: 0 0 0 3px rgba(0,135,90,0.12);
}

.card {
  border: 1px solid var(--line-2);
  background: var(--bg);
  border-radius: var(--radius);
  padding: 22px;
}

.card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 500; }
.card p  { margin: 0; color: var(--muted); font-size: 14.5px; }

details {
  border: 1px solid var(--line-2);
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 16px 18px;
}
details + details { margin-top: 10px; }
summary {
  cursor: pointer;
  list-style: none;
  font-weight: 500;
  color: var(--ink);
}
summary::-webkit-details-marker { display: none; }
details p { margin: 10px 0 0; color: var(--muted); font-size: 14.5px; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 980px) {
  nav { display: none; }
  .blog-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
}

@media (max-width: 720px) {
  .topbar-inner { gap: 12px; }
  .content-page { padding: 40px 0 60px; }
  .content-page h1 { font-size: 30px; }
  .content-page h2 { font-size: 22px; margin-top: 36px; }
  .blog-header { padding: 48px 0 28px; }
  .blog-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media print {
  .topbar, .footer-links { display: none !important; }
  body { background: #fff; color: #000; }
  .card, .blog-card, details, .internal-link-box { box-shadow: none; border-color: #ccc; }
}
