/* ============================================================
   PiXX Media – Stylesheet
   Selbstgehostet, keine externen Abhängigkeiten (DSGVO-freundlich)
   ============================================================ */

:root {
  /* Markenfarben aus dem PiXX-Media-Logo: Rot #e5241d, Grau #818181, Schwarz */
  --red: #e5241d;
  --red-dark: #b5170f;
  --ink: #141414;
  --gray: #818181;
  --text: #2b2b2b;
  --muted: #6b6b6b;
  --bg: #ffffff;
  --bg-soft: #f6f6f6;
  --border: #e3e3e3;
  --green: #1d8a4e;
  --error: #c0392b;
  --radius: 10px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --maxw: 1120px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
}

img, svg { max-width: 100%; height: auto; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

.skip-link {
  position: absolute; top: -100px; left: 1rem; z-index: 100;
  background: var(--ink); color: #fff; padding: 0.6rem 1rem;
  border-radius: 0 0 6px 6px; text-decoration: none;
}
.skip-link:focus { top: 0; }

/* ── Typografie ── */
h1, h2, h3, h4 { color: var(--ink); line-height: 1.25; margin-bottom: 0.6em; }
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
h3 { font-size: 1.2rem; }
p { margin-bottom: 1em; }
a { color: var(--red); }
a:hover { color: var(--red-dark); }
ul, ol { padding-left: 1.4rem; margin-bottom: 1em; }
strong { color: var(--ink); }

/* ── Buttons ── */
.btn {
  display: inline-block; padding: 0.7rem 1.4rem; border-radius: var(--radius);
  font-weight: 600; text-decoration: none; border: 2px solid transparent;
  cursor: pointer; font-size: 1rem; transition: all 0.15s ease;
}
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-dark); color: #fff; }
.btn-secondary { background: var(--bg-soft); color: var(--ink); border-color: var(--border); }
.btn-secondary:hover { border-color: var(--red); color: var(--red); }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: var(--bg-soft); }
.btn-outline-light { border-color: rgba(255,255,255,0.6); color: #fff; }
.btn-outline-light:hover { border-color: #fff; background: rgba(255,255,255,0.1); color: #fff; }

/* ── Header ── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 1.5rem; height: 72px; }

.logo, .footer-logo {
  font-size: 1.5rem; font-weight: 800; text-decoration: none; letter-spacing: -0.5px;
}
.logo { display: flex; align-items: center; flex-shrink: 0; }
/* max-width:none: das globale img{max-width:100%} kollabiert das Logo sonst
   im Flex-Header auf 0 Breite (Shrink-to-fit-Zirkel) */
.logo img { height: 48px; width: auto; max-width: none; display: block; }
.logo-pixx { color: var(--red); }
.logo-media { color: var(--ink); }
.site-footer .logo-media { color: #fff; }

/* ── Topbar mit Typing-Animation (wie auf der alten Seite) ── */
.topbar { background: #000; color: #fff; font-size: 0.95rem; }
.topbar-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 42px; flex-wrap: wrap; padding-top: 0.3rem; padding-bottom: 0.3rem;
}
.topbar-text { margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-text strong { color: #fff; }
.typewriter { color: var(--red); font-weight: 700; }
.typewriter::after {
  content: ""; display: inline-block; width: 2px; height: 1em;
  background: var(--red); margin-left: 2px; vertical-align: text-bottom;
  animation: caret-blink 0.9s step-end infinite;
}
@keyframes caret-blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .typewriter::after { animation: none; }
}
.topbar-phone {
  color: #fff; text-decoration: none; font-weight: 700; white-space: nowrap;
}
.topbar-phone:hover { color: var(--red); }
.topbar-phone small { font-weight: 400; color: #bbb; }
@media (max-width: 640px) {
  .topbar-phone small { display: none; }
}

.main-nav { margin-left: auto; }
.nav-menu { display: flex; gap: 0.25rem; list-style: none; padding: 0; margin: 0; }
.nav-menu a {
  display: block; padding: 0.5rem 0.8rem; border-radius: 8px;
  color: var(--text); text-decoration: none; font-weight: 500; font-size: 0.97rem;
}
.nav-menu a:hover { background: var(--bg-soft); color: var(--red); }
.nav-menu a[aria-current="page"] { color: var(--red); font-weight: 700; }

.nav-toggle { display: none; }
.header-phone { white-space: nowrap; }

@media (max-width: 1080px) {
  .header-phone { display: none; }
}
@media (max-width: 860px) {
  .nav-toggle {
    display: flex; flex-direction: column; gap: 5px; justify-content: center;
    background: none; border: 0; padding: 0.6rem; cursor: pointer; margin-left: auto;
  }
  .nav-toggle-bar { width: 24px; height: 3px; background: var(--ink); border-radius: 2px; transition: transform 0.2s; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
  .nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
  .main-nav { margin-left: auto; }
  .nav-menu {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    flex-direction: column; background: #fff; border-bottom: 1px solid var(--border);
    padding: 0.75rem 1.25rem 1.25rem; box-shadow: var(--shadow);
  }
  .nav-menu.open { display: flex; }
  .nav-menu a { padding: 0.75rem 0.8rem; font-size: 1.05rem; }
}

/* ── Hero ── */
.hero {
  background: linear-gradient(135deg, #000 0%, var(--ink) 45%, #6e0e0a 85%, var(--red) 100%);
  color: #fff; padding: 4.5rem 0 4rem;
}
.hero h1 { color: #fff; max-width: 720px; }
.hero .lead { font-size: 1.2rem; max-width: 640px; color: rgba(255,255,255,0.88); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 1.8rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2.4rem; padding: 0; list-style: none; }
.hero-badges li { display: flex; align-items: center; gap: 0.5rem; font-size: 0.95rem; color: rgba(255,255,255,0.85); }
.hero-badges li::before { content: "✓"; font-weight: 700; color: #7fd4a3; }

/* ── Sektionen ── */
.section { padding: 3.5rem 0; }
.section-soft { background: var(--bg-soft); }
.section-head { max-width: 680px; margin-bottom: 2.2rem; }
.section-head .kicker {
  text-transform: uppercase; letter-spacing: 1px; font-size: 0.82rem;
  font-weight: 700; color: var(--red); display: block; margin-bottom: 0.4rem;
}

/* ── Karten ── */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; }
.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card .icon { font-size: 1.9rem; margin-bottom: 0.7rem; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--red); }
.card p { color: var(--muted); font-size: 0.98rem; flex-grow: 1; }
.card .card-link { font-weight: 600; text-decoration: none; }

/* ── Preistabellen ── */
.price-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.4rem; }
.price-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.8rem; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.price-card.highlight { border: 2px solid var(--red); position: relative; }
.price-card .badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--red); color: #fff; font-size: 0.78rem; font-weight: 700;
  padding: 0.2rem 0.9rem; border-radius: 999px; white-space: nowrap;
}
.price-card .price { font-size: 2rem; font-weight: 800; color: var(--ink); margin: 0.4rem 0 0.1rem; }
.price-card .price small { font-size: 1rem; font-weight: 500; color: var(--muted); }
.price-card ul { list-style: none; padding: 0; margin: 1rem 0; flex-grow: 1; }
.price-card ul li { padding: 0.35rem 0 0.35rem 1.6rem; position: relative; font-size: 0.97rem; }
.price-card ul li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.price-note { font-size: 0.88rem; color: var(--muted); }

table.price-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; background: #fff; box-shadow: var(--shadow); border-radius: var(--radius); overflow: hidden; }
table.price-table th, table.price-table td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
table.price-table th { background: var(--ink); color: #fff; font-weight: 600; }
table.price-table td.num { white-space: nowrap; font-weight: 700; color: var(--ink); }
.table-scroll { overflow-x: auto; }

/* ── FAQ ── */
.faq { max-width: 780px; margin: 3rem auto 0; }
.faq-item {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 0.8rem; box-shadow: var(--shadow);
}
.faq-item summary {
  padding: 1rem 1.3rem; font-weight: 600; color: var(--ink);
  cursor: pointer; list-style: none; position: relative; padding-right: 3rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; position: absolute; right: 1.3rem; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--red); transition: transform 0.2s;
}
.faq-item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-answer { padding: 0 1.3rem 1.1rem; color: var(--muted); }

/* ── Formulare ── */
.form-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 2rem; box-shadow: var(--shadow); max-width: 720px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.form-group { margin-bottom: 1.1rem; }
.form-group label { display: block; font-weight: 600; margin-bottom: 0.35rem; color: var(--ink); font-size: 0.95rem; }
.form-group .required { color: var(--red); }
input[type="text"], input[type="email"], input[type="tel"], select, textarea {
  width: 100%; padding: 0.7rem 0.9rem; border: 1px solid var(--border);
  border-radius: 8px; font: inherit; color: var(--text); background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--red); outline-offset: 1px; border-color: var(--red); }
textarea { min-height: 140px; resize: vertical; }
.form-hint { font-size: 0.85rem; color: var(--muted); margin-top: 0.25rem; }
.form-check { display: flex; align-items: flex-start; gap: 0.6rem; margin-bottom: 1rem; font-size: 0.95rem; }
.form-check input { margin-top: 0.3rem; }

/* Honeypot: für Menschen unsichtbar */
.hp-field { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.alert { padding: 1rem 1.3rem; border-radius: var(--radius); margin-bottom: 1.5rem; font-weight: 500; }
.alert-success { background: #e6f6ec; color: var(--green); border: 1px solid #b7e4c7; }
.alert-error { background: #fdecea; color: var(--red); border: 1px solid #f5c6cb; }

/* ── CTA-Band ── */
.cta-band { background: linear-gradient(135deg, var(--red-dark), var(--red)); color: #fff; padding: 2.8rem 0; }
.cta-band h2 { color: #fff; margin-bottom: 0.3rem; }
.cta-band p { color: rgba(255,255,255,0.85); margin: 0; }
.cta-band-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem; }
.cta-band-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; }

/* ── Footer ── */
.site-footer { background: var(--ink); color: #c6d2dd; padding: 3rem 0 1rem; font-size: 0.95rem; }
.site-footer a { color: #d9e4ee; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer h3 { color: #fff; font-size: 1rem; margin-bottom: 0.8rem; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer ul { list-style: none; padding: 0; }
.site-footer ul li { margin-bottom: 0.45rem; }
.footer-logo { display: block; margin-bottom: 0.8rem; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); margin-top: 2.5rem; padding-top: 1.2rem; font-size: 0.85rem; color: #8fa3b5; }

/* ── Fließtext-Seiten (Recht, Artikel) ── */
.prose { max-width: 780px; margin: 0 auto; padding: 3rem 1.25rem; }
.prose h1 { margin-bottom: 0.8rem; }
.prose h2 { margin-top: 2.2rem; }
.prose h3 { margin-top: 1.6rem; }
.prose .meta { color: var(--muted); font-size: 0.92rem; margin-bottom: 2rem; }
.prose blockquote {
  border-left: 4px solid var(--red); background: var(--bg-soft);
  padding: 1rem 1.3rem; margin: 1.5rem 0; border-radius: 0 var(--radius) var(--radius) 0;
}
.prose .box {
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.3rem 1.5rem; margin: 1.5rem 0;
}
.prose .box-warn { background: #fff8e6; border-color: #f0dfa8; }

/* ── Autorenbox (E-E-A-T) ── */
.author-box {
  display: flex; gap: 1.2rem; align-items: flex-start;
  background: var(--bg-soft); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.4rem; margin-top: 3rem;
}
.author-avatar {
  width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0;
  background: var(--red); color: #fff; display: flex; align-items: center;
  justify-content: center; font-size: 1.5rem; font-weight: 800;
}
.author-box h3 { margin-bottom: 0.2rem; }
.author-box p { font-size: 0.93rem; color: var(--muted); margin: 0; }

/* ── Artikel-Listing ── */
.article-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.4rem; }
.article-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.article-card time { font-size: 0.85rem; color: var(--muted); }
.article-card h3 { margin: 0.4rem 0 0.5rem; font-size: 1.1rem; }
.article-card h3 a { color: var(--ink); text-decoration: none; }
.article-card h3 a:hover { color: var(--red); }
.article-card p { color: var(--muted); font-size: 0.95rem; flex-grow: 1; }

/* ── Schritt-Liste ── */
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step; position: relative; padding: 0 0 1.4rem 3.4rem;
}
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 0;
  width: 2.3rem; height: 2.3rem; border-radius: 50%;
  background: var(--red); color: #fff; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.steps li h3 { margin-bottom: 0.2rem; }

/* ── Breadcrumb ── */
.breadcrumb { font-size: 0.88rem; color: var(--muted); padding: 1.2rem 0 0; }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--red); }

/* ── Trust-Leiste ── */
.trust-strip { display: flex; flex-wrap: wrap; gap: 2rem; justify-content: center; padding: 1.8rem 0; }
.trust-strip .item { text-align: center; }
.trust-strip .item strong { display: block; font-size: 1.5rem; color: var(--red); }
.trust-strip .item span { font-size: 0.9rem; color: var(--muted); }

/* ── Support-Widget (Zammad, Muster von vizitcard.de übernommen) ── */
/* Zammad-Chatfenster nutzt z-index ~899 — Widget knapp darunter, damit das
   offene Chatfenster Button/Panel überdeckt statt umgekehrt. */
#px-support { position: fixed; right: 1rem; bottom: 1rem; z-index: 890; }
.px-sup-toggle {
  width: 3.4rem; height: 3.4rem; border-radius: 50%; border: 0; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--red); color: #fff; box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  transition: transform 0.15s ease, background 0.15s ease;
}
.px-sup-toggle:hover { background: var(--red-dark); transform: scale(1.06); }
.px-sup-toggle svg { width: 1.7rem; height: 1.7rem; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.px-sup-panel {
  position: fixed; right: 1rem; bottom: 5.4rem; width: min(92vw, 21rem);
  background: #fff; color: var(--text); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: 0 12px 40px rgba(0,0,0,0.25);
  padding: 1rem 1.1rem 1.1rem; display: none; z-index: 891;
}
.px-sup-panel.open { display: block; }
.px-sup-head { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; margin-bottom: 0.35rem; }
.px-sup-head h2 { margin: 0; font-size: 1.05rem; }
.px-sup-close { border: 0; background: none; cursor: pointer; font-size: 1.3rem; line-height: 1; color: var(--muted); padding: 0.2rem 0.4rem; border-radius: 8px; }
.px-sup-close:hover { color: var(--ink); background: var(--bg-soft); }
.px-sup-intro { margin: 0 0 0.8rem; font-size: 0.86rem; color: var(--muted); }
.px-sup-chatbtn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.65rem 0.9rem; border-radius: 10px; border: 0; cursor: pointer;
  background: var(--red); color: #fff; font-size: 0.95rem; font-weight: 600;
}
.px-sup-chatbtn:hover { background: var(--red-dark); }
.px-sup-dot { width: 0.55rem; height: 0.55rem; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,0.35); }
/* Zammad togglet .is-inactive am Button, je nachdem ob ein Agent online ist */
.px-sup-chatbtn.is-inactive { background: var(--bg-soft); color: var(--muted); cursor: default; pointer-events: none; }
.px-sup-chatbtn.is-inactive .px-sup-dot { background: #9ca3af; box-shadow: none; }
.px-sup-hint { margin: 0.45rem 0 0; font-size: 0.8rem; color: var(--muted); }
.px-sup-chatbtn.is-inactive ~ .px-sup-hint-on { display: none; }
.px-sup-chatbtn:not(.is-inactive) ~ .px-sup-hint-off { display: none; }
.px-sup-divider { display: flex; align-items: center; gap: 0.6rem; margin: 0.9rem 0 0.7rem; color: var(--muted); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; }
.px-sup-divider::before, .px-sup-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.px-sup-links { list-style: none; padding: 0; margin: 0; }
.px-sup-links li { margin-bottom: 0.45rem; }
.px-sup-links a { font-size: 0.92rem; text-decoration: none; font-weight: 600; }
@media (max-width: 480px) {
  .px-sup-panel { right: 0.5rem; left: 0.5rem; width: auto; bottom: 5.2rem; }
  #px-support { right: 0.75rem; bottom: 0.75rem; }
}
