/* PropTradingReport · site.css
   Shared styles für Profi-UI-Komponenten
   - Reading Progress Bar
   - Scroll-to-Top Button
   - Sticky CTA Bar
   - Sticky TOC
*/

/* ============ READING PROGRESS BAR ============ */
#reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #d4a64a 0%, #b08828 100%);
  z-index: 999;
  width: 0%;
  transition: width 80ms linear;
  box-shadow: 0 1px 4px rgba(212, 166, 74, 0.4);
  pointer-events: none;
}

/* ============ SCROLL-TO-TOP BUTTON ============ */
#scroll-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0f1e3d 0%, #1e3a6b 100%);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(15, 30, 61, 0.25);
  z-index: 95;
  opacity: 0;
  transform: translateY(20px) scale(0.85);
  transition: opacity .25s, transform .25s, background .2s;
  pointer-events: none;
}
#scroll-top.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
#scroll-top:hover {
  background: linear-gradient(135deg, #d4a64a 0%, #b08828 100%);
  transform: translateY(-3px) scale(1.05);
}
#scroll-top:active {
  transform: translateY(0) scale(0.95);
}
@media (max-width: 600px) {
  #scroll-top { bottom: 80px; right: 16px; width: 42px; height: 42px; }
}

/* ============ STICKY CTA BAR ============ */
#sticky-cta {
  position: fixed;
  bottom: -100px;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #0f1e3d 0%, #1e3a6b 100%);
  border-top: 2px solid #d4a64a;
  z-index: 90;
  transition: bottom .35s cubic-bezier(.5, 0, 0, 1);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.18);
}
#sticky-cta.visible {
  bottom: 0;
}
.sticky-cta-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 14px 22px;
  display: flex;
  align-items: center;
  gap: 18px;
  color: white;
}
.sticky-cta-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sticky-cta-info strong {
  font-size: 14.5px;
  font-weight: 700;
}
.sticky-cta-info span {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sticky-cta-btn {
  background: #d4a64a;
  color: white !important;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  transition: background .2s, transform .2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.sticky-cta-btn:hover {
  background: #b08828;
  transform: translateY(-1px);
}
.sticky-cta-close {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background .2s;
}
.sticky-cta-close:hover {
  background: rgba(255, 255, 255, 0.2);
}
@media (max-width: 700px) {
  .sticky-cta-inner { padding: 10px 14px; gap: 10px; }
  .sticky-cta-info strong { font-size: 13px; }
  .sticky-cta-info span { font-size: 11.5px; }
  .sticky-cta-btn { padding: 9px 14px; font-size: 12.5px; }
  .sticky-cta-close { width: 28px; height: 28px; font-size: 16px; }
}

/* ============ STICKY TOC ============ */
.has-sticky-toc { position: relative; }
.sticky-toc {
  position: sticky;
  top: 90px;
  background: #f7f8fb;
  border: 1px solid rgba(15, 30, 61, 0.1);
  border-left: 4px solid #d4a64a;
  border-radius: 10px;
  padding: 18px 20px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
  font-size: 14px;
}
.sticky-toc h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 700;
  color: #0f1e3d;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(15, 30, 61, 0.1);
}
.sticky-toc ol {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: toc;
}
.sticky-toc ol li {
  counter-increment: toc;
  padding: 0;
}
.sticky-toc ol li a {
  display: block;
  padding: 6px 0 6px 22px;
  color: #4a5568;
  text-decoration: none;
  font-size: 13.5px;
  line-height: 1.4;
  position: relative;
  transition: color .2s, background .2s;
  border-radius: 4px;
}
.sticky-toc ol li a::before {
  content: counter(toc);
  position: absolute;
  left: 0;
  top: 6px;
  width: 18px;
  text-align: right;
  color: #8a94a6;
  font-size: 12px;
  font-weight: 500;
}
.sticky-toc ol li a:hover {
  color: #b08828;
}
.sticky-toc ol li a.active {
  color: #b08828;
  font-weight: 600;
  background: rgba(212, 166, 74, 0.08);
  padding-left: 26px;
}
.sticky-toc ol li a.active::before {
  color: #b08828;
  font-weight: 700;
}

/* Layout für Sticky TOC: zwei Spalten */
.toc-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 36px;
  align-items: start;
}
@media (max-width: 1024px) {
  .toc-layout { grid-template-columns: 1fr; }
  .sticky-toc { position: static; max-height: none; }
}

/* ============ ACCESSIBILITY ============ */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: #d4a64a;
  color: white;
  padding: 12px 18px;
  font-weight: 700;
  text-decoration: none;
  border-radius: 0 0 8px 0;
  z-index: 1000;
  transition: top .2s;
}
.skip-link:focus {
  top: 0;
  outline: 2px solid #fff;
  outline-offset: -4px;
}

/* Focus-Styles für Tastatur-Nutzer */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #d4a64a;
  outline-offset: 2px;
  border-radius: 4px;
}

/* ============ PRINT STYLES ============ */
@media print {
  #reading-progress,
  #scroll-top,
  #sticky-cta,
  .sticky-toc,
  header.site,
  footer.site,
  .topbar,
  nav { display: none !important; }

  body { background: white; color: black; font-size: 11pt; }
  a { color: black; text-decoration: underline; }
  .hero, .verdict, section.block.alt { background: white !important; color: black !important; }
}

/* ============ MOTION REDUCED ============ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============ MOBILE NAVIGATION (Hamburger → Dropdown) ============ */
@media (max-width: 900px) {
  /* Menu-Button immer sichtbar auf Mobile */
  .menu-btn {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: rgba(15, 30, 61, 0.06);
    border: 1px solid rgba(15, 30, 61, 0.1);
    transition: background .2s, transform .2s;
  }
  .menu-btn:active { transform: scale(0.92); }
  .menu-btn[aria-expanded="true"] { background: rgba(212, 166, 74, 0.15); border-color: #d4a64a; color: #b08828; }

  /* Nav als Slide-Down-Panel statt horizontale Bar */
  nav.main {
    display: none !important;
    position: fixed;
    top: 65px;
    left: 0;
    right: 0;
    background: #ffffff;
    flex-direction: column !important;
    gap: 0 !important;
    padding: 16px 22px 28px !important;
    box-shadow: 0 12px 24px rgba(15, 30, 61, 0.12);
    border-bottom: 1px solid rgba(15, 30, 61, 0.1);
    z-index: 88;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    transform: translateY(-12px);
    opacity: 0;
    transition: opacity .2s, transform .2s;
  }
  nav.main.mobile-open {
    display: flex !important;
    transform: translateY(0);
    opacity: 1;
  }
  nav.main a {
    width: 100%;
    padding: 14px 14px !important;
    font-size: 16px !important;
    border-radius: 8px;
    border-bottom: 1px solid rgba(15, 30, 61, 0.06);
    min-height: 48px;
    display: flex;
    align-items: center;
    transition: background .15s;
  }
  nav.main a:last-child { border-bottom: none; }
  nav.main a:hover, nav.main a:focus {
    background: #f7f8fb;
    color: #b08828;
  }
  nav.main a.active {
    background: rgba(212, 166, 74, 0.1);
    color: #b08828;
    font-weight: 700;
  }

  /* Overlay hinter dem Menu */
  .mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(11, 18, 36, 0.4);
    z-index: 85;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
  body.menu-open .mobile-menu-overlay { display: block; }
  body.menu-open { overflow: hidden; }

  /* Topbar: lange E-Mail auf Mobile verstecken (bleibt im Footer + Impressum sichtbar) */
  .topbar .topbar-inner > a[href^="mailto:"],
  .topbar .topbar-inner a[href^="mailto:"] {
    display: none;
  }
  /* Aber: wenn alleinstehend (z.B. Impressum-Topbar), zeigen */
  .topbar .topbar-inner > a[href^="mailto:"]:only-child {
    display: inline-flex;
  }

  /* Topbar-Items kompakter */
  .topbar { font-size: 12px; padding: 7px 0; }
  .topbar a { margin-left: 12px; }
}

/* Touch-Targets generell: mindestens 44px Höhe für interaktive Elemente */
@media (max-width: 900px) {
  button, .btn, nav a, .faq-q, input[type="submit"], input[type="button"] {
    min-height: 44px;
  }
  /* Footer-Links etwas größer für besseren Tap */
  footer.site ul li a {
    padding: 8px 0;
    display: inline-block;
  }
  /* Buttons besser anfassbar */
  .btn {
    padding: 14px 22px !important;
  }
  /* Tabellen scrollen horizontal statt umzubrechen */
  .table-wrapper, .compare-wrapper {
    -webkit-overflow-scrolling: touch;
  }
  /* Hero-Logo nicht zu groß auf kleinen Screens */
  .hero-logo .logo-box {
    width: 64px !important;
    height: 64px !important;
    padding: 7px !important;
  }
  .hero-logo .name {
    font-size: 18px !important;
  }
  .hero-logo .name small {
    font-size: 11px !important;
  }
  /* Score-Circle auf Mobile etwas kleiner */
  .score-circle {
    width: 130px !important;
    height: 130px !important;
  }
  .score-value {
    font-size: 44px !important;
  }
}

/* Sehr kleine Phones (320–380px): noch enger */
@media (max-width: 380px) {
  .container { padding: 0 16px; }
  .hero h1 { font-size: 26px !important; line-height: 1.15 !important; }
  .section-title { font-size: 22px !important; }
  .hero p.lead { font-size: 15.5px !important; }
  .topbar { font-size: 11.5px; }
  .topbar a { margin-left: 8px; }
  .logo { font-size: 18px !important; }
  .logo .badge { font-size: 10px; padding: 3px 7px; }
}

/* ============ META-UPDATE (vor X Tagen aktualisiert) ============ */
.meta-update {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(212, 166, 74, 0.12);
  color: #8a6a1f;
  padding: 4px 10px;
  border-radius: 100px;
  font-size: 12.5px;
  font-weight: 600;
  border: 1px solid rgba(212, 166, 74, 0.25);
}
.meta-update i { font-size: 11px; color: #b08828; }

/* ============ STICKY COMPARE BAR (auf Konkurrent-Reviews) ============ */
#sticky-compare {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg, #0f1e3d 0%, #1a2f5c 100%);
  color: white;
  padding: 14px 20px;
  z-index: 90;
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.18);
  transform: translateY(110%);
  transition: transform .35s cubic-bezier(0.2, 0.8, 0.2, 1);
  border-top: 2px solid #d4a64a;
}
#sticky-compare.visible { transform: translateY(0); }
.sticky-compare-inner {
  max-width: 1240px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 22px;
  flex-wrap: wrap;
}
.sticky-compare-info {
  flex: 1;
  min-width: 240px;
  font-size: 14.5px;
  line-height: 1.4;
}
.sticky-compare-info strong { color: #f5cf7a; font-weight: 700; }
.sticky-compare-info .sub {
  display: block;
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 2px;
}
.sticky-compare-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sticky-compare-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #d4a64a 0%, #b08828 100%);
  color: white;
  text-decoration: none;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14.5px;
  transition: transform .2s, box-shadow .2s;
  box-shadow: 0 4px 14px rgba(212, 166, 74, 0.3);
}
.sticky-compare-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(212, 166, 74, 0.45); }
.sticky-compare-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 13.5px;
}
.sticky-compare-btn-ghost:hover { background: rgba(255, 255, 255, 0.08); }
.sticky-compare-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 8px;
  line-height: 1;
}
.sticky-compare-close:hover { color: white; }
@media (max-width: 780px) {
  #sticky-compare { padding: 12px 14px; }
  .sticky-compare-inner { gap: 12px; }
  .sticky-compare-info { font-size: 13px; min-width: 0; }
  .sticky-compare-info .sub { display: none; }
  .sticky-compare-btn { padding: 9px 16px; font-size: 13.5px; }
  .sticky-compare-btn-ghost { display: none; }
}

/* ============ PREMIUM LOCKED CONTENT ============ */
.premium-locked {
  position: relative;
  background: linear-gradient(180deg, #fffbef 0%, #fef4d8 100%);
  border: 1.5px solid #d4a64a;
  border-radius: 16px;
  padding: 36px 32px 32px;
  margin: 28px 0;
  overflow: hidden;
}
.premium-locked::before {
  content: "★ PREMIUM";
  position: absolute;
  top: 14px;
  right: 18px;
  background: linear-gradient(135deg, #d4a64a, #b08828);
  color: white;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  padding: 4px 11px;
  border-radius: 100px;
}
.premium-locked .lock-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.premium-locked .lock-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0f1e3d, #1e3a6b);
  color: #d4a64a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(15, 30, 61, 0.2);
}
.premium-locked .lock-title {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 19px;
  font-weight: 800;
  color: #0b1224;
  margin: 0;
  line-height: 1.25;
}
.premium-locked .lock-sub {
  font-size: 13px;
  color: #6b5825;
  font-weight: 600;
  margin-top: 2px;
  letter-spacing: 0.02em;
}
.premium-locked .preview {
  position: relative;
  background: #ffffff;
  border-radius: 10px;
  padding: 18px 22px;
  margin-bottom: 18px;
  border: 1px solid rgba(212, 166, 74, 0.25);
  font-size: 14.5px;
  color: #4a5568;
  line-height: 1.65;
  overflow: hidden;
}
.premium-locked .preview::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 65%;
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, 0.85) 50%, #fffbef 100%);
  pointer-events: none;
}
.premium-locked .preview .blurred {
  filter: blur(3.5px);
  user-select: none;
  pointer-events: none;
}
.premium-locked .preview .blurred strong {
  color: #0b1224;
}
.premium-locked .bullets {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 14px;
}
.premium-locked .bullets li {
  font-size: 13.5px;
  color: #4a5568;
  display: flex;
  align-items: center;
  gap: 8px;
}
.premium-locked .bullets li i {
  color: #15803d;
  font-size: 14px;
  flex-shrink: 0;
}
.premium-locked .lock-cta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.premium-locked .cta-text {
  font-size: 13.5px;
  color: #6b5825;
  font-weight: 600;
}
.premium-locked .cta-text strong {
  color: #b08828;
}
.premium-locked .unlock-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: linear-gradient(135deg, #0f1e3d, #1e3a6b);
  color: #d4a64a;
  padding: 11px 22px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid rgba(212, 166, 74, 0.5);
  transition: all .2s;
  box-shadow: 0 4px 14px rgba(15, 30, 61, 0.18);
}
.premium-locked .unlock-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(15, 30, 61, 0.28);
  color: #f5e6c0;
  text-decoration: none;
}
.premium-locked .unlock-btn i { font-size: 13px; }
.premium-locked .stat-row {
  display: flex;
  gap: 24px;
  margin: 14px 0 18px;
  padding: 12px 0;
  border-top: 1px dashed rgba(212, 166, 74, 0.35);
  border-bottom: 1px dashed rgba(212, 166, 74, 0.35);
  flex-wrap: wrap;
}
.premium-locked .stat-item {
  font-size: 12.5px;
  color: #6b5825;
  display: flex;
  align-items: center;
  gap: 6px;
}
.premium-locked .stat-item strong {
  color: #b08828;
  font-size: 14px;
  font-weight: 700;
}
@media (max-width: 600px) {
  .premium-locked { padding: 28px 22px 26px; }
  .premium-locked::before { top: 10px; right: 12px; }
  .premium-locked .lock-cta { flex-direction: column; align-items: stretch; }
  .premium-locked .unlock-btn { justify-content: center; }
}

/* ============ TOPBAR PREMIUM-CTA (auto-injected via site.js) ============ */
.topbar-premium-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: linear-gradient(135deg, #d4a64a, #b08828);
  color: white !important;
  padding: 3px 11px;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-left: 14px !important;
  transition: transform .15s, box-shadow .15s;
}
.topbar-premium-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(212, 166, 74, 0.4);
  color: white !important;
}
.topbar-premium-cta i {
  color: white !important;
  margin-right: 0 !important;
  font-size: 11px;
}
