/* ============================================================
   Landing-page styles. Scoped under .lp-* / #view-landing.
   Mobile-first; desktop breakpoint at 768px.
   ============================================================ */

:root {
  --lp-brand: #143566;
  --lp-text: #1d1d1f;
  --lp-muted: #5b6470;
  --lp-bg: #ffffff;
  --lp-bg-soft: #f5f7fa;
  --lp-border: #e3e7ec;
  --lp-success: #18a07f;
}

#view-landing { display: none; }
#view-landing.active {
  display: block;
  background: var(--lp-bg);
  color: var(--lp-text);
  -webkit-font-smoothing: antialiased;
}

/* ── Containers ──────────────────────────────────────────── */
.lp-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}
.lp-container--narrow { max-width: 760px; }
.lp-section { padding: 32px 0; }

/* ── Top header (Finconext, scrollt mit) ────────────────── */
.lp-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 16px;
  padding-bottom: 16px;
  gap: 12px;
}
.lp-back {
  background: none; border: none; cursor: pointer;
  font: inherit; font-size: 15px; color: var(--lp-muted);
  padding: 8px 4px; min-height: 40px;
}
.lp-back:hover { color: var(--lp-text); }
.lp-page-header__brand { display: flex; align-items: center; gap: 8px; }
.lp-page-header__logo { height: 24px; width: auto; }
.lp-page-header__name { font-weight: 700; color: var(--lp-text); font-size: 15px; }

/* ── Sticky top bar (Versicherer + Beitragsrechner + zurück) ── */
.lp-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: #ffffff;
  border-top: 1px solid var(--lp-border);
  border-bottom: 1px solid var(--lp-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.lp-topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  padding-bottom: 10px;
  gap: 12px;
}
.lp-topbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  text-decoration: none;
  cursor: pointer;
}
.lp-topbar__logo {
  height: 40px;
  width: auto;
  max-width: 130px;
  object-fit: contain;
  flex-shrink: 0;
}
.lp-topbar__name {
  font-size: 16px;
  font-weight: 700;
  color: var(--lp-brand);
  letter-spacing: -0.2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lp-topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.lp-topbar__calc {
  background: var(--lp-brand);
  color: #fff;
  border: none;
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  border-radius: 999px;
  padding: 9px 18px;
  cursor: pointer;
  min-height: 40px;
  white-space: nowrap;
  transition: opacity 0.15s ease, transform 0.1s ease;
}
.lp-topbar__calc:hover { opacity: 0.9; }
.lp-topbar__calc:active { transform: scale(0.98); }
.lp-topbar__back {
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: 15px;
  color: var(--lp-muted);
  padding: 8px 6px;
  min-height: 40px;
  transition: color 0.15s ease;
}
.lp-topbar__back:hover { color: var(--lp-text); }
@media (max-width: 600px) {
  .lp-topbar__name { font-size: 14px; }
  .lp-topbar__logo { height: 32px; max-width: 95px; }
  .lp-topbar__calc { font-size: 13px; padding: 8px 14px; }
  .lp-topbar__back { font-size: 14px; }
  .lp-topbar__inner { gap: 8px; }
}
@media (max-width: 380px) {
  .lp-topbar__name { display: none; }
}

/* ── Typography ──────────────────────────────────────────── */
.lp-h2 {
  font-size: 28px;
  line-height: 1.2;
  font-weight: 700;
  color: var(--lp-text);
  margin: 0 0 12px;
  letter-spacing: -0.4px;
}
.lp-h2-sub {
  color: var(--lp-muted);
  font-size: 16px;
  margin: 0 0 28px;
}
.lp-lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--lp-text);
  margin: 0 0 16px;
}

/* ── Icons ──────────────────────────────────────────────── */
.lp-icon { display: inline-flex; align-items: center; justify-content: center; }
.lp-icon svg { width: 100%; height: 100%; display: block; }

/* ── CTAs ───────────────────────────────────────────────── */
.lp-cta {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px;
  font: inherit; font-weight: 600; font-size: 16px;
  border: 1.5px solid transparent;
  border-radius: 999px;
  padding: 14px 24px;
  min-height: 48px;
  cursor: pointer;
  transition: transform 0.1s ease, opacity 0.15s ease, background 0.15s ease;
  text-decoration: none;
  white-space: nowrap;
}
.lp-cta:active { transform: scale(0.98); }
.lp-cta--primary {
  background: var(--lp-brand);
  color: #fff;
}
.lp-cta--primary:hover { opacity: 0.9; }
.lp-cta--secondary {
  background: transparent;
  color: var(--lp-brand);
  border-color: var(--lp-brand);
}
.lp-cta--secondary:hover { background: rgba(20, 53, 102, 0.05); }
.lp-cta--ghost {
  background: transparent;
  color: var(--lp-text);
  border-color: var(--lp-border);
}
.lp-cta--ghost:hover { background: var(--lp-bg-soft); }

/* ── Hero ───────────────────────────────────────────────── */
.lp-hero { padding: 20px 0 32px; background: linear-gradient(180deg, var(--lp-bg-soft) 0%, var(--lp-bg) 100%); }
.lp-hero__inner { display: grid; gap: 24px; grid-template-columns: 1fr; }
.lp-hero__h1 {
  font-size: 30px; line-height: 1.15; font-weight: 800;
  letter-spacing: -0.6px; color: var(--lp-text);
  margin: 0 0 14px;
}
.lp-hero__sub { font-size: 17px; color: var(--lp-muted); margin: 0 0 24px; line-height: 1.55; }
.lp-hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.lp-hero__micro { font-size: 13px; color: var(--lp-muted); margin: 0; }
.lp-hero__trustpilot {
  margin-top: 24px;
  max-width: 360px;
  text-align: left;
  min-height: 18px;
  transform-origin: 0 0;
}
.lp-hero__trustpilot .trustpilot-widget {
  transform: scale(0.78);
  transform-origin: 0 0;
  width: 130%;
}
.lp-hero__visual img {
  width: 100%; height: auto; display: block; border-radius: 16px;
  box-shadow: 0 6px 28px rgba(0, 0, 0, 0.08);
  object-fit: cover;
  aspect-ratio: 4 / 3;
}
@media (min-width: 768px) {
  .lp-hero { padding: 44px 0 48px; }
  .lp-hero__inner { grid-template-columns: 1.1fr 1fr; align-items: center; gap: 48px; }
  .lp-hero__h1 { font-size: 44px; }
  .lp-hero__sub { font-size: 19px; }
}

/* ── Trust bar ──────────────────────────────────────────── */
.lp-trust { background: var(--lp-bg-soft); padding: 18px 0; border-top: 1px solid var(--lp-border); border-bottom: 1px solid var(--lp-border); }
.lp-trust__row {
  display: grid; gap: 12px;
  grid-template-columns: 1fr 1fr;
}
.lp-trust__item {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--lp-text);
}
.lp-trust__item--link {
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
  background: none;
  border: none;
  font: inherit;
  font-size: 14px;
  color: var(--lp-text);
  padding: 0;
}
.lp-trust__item--link:hover { color: var(--lp-brand); }
.lp-trust__icon { width: 24px; height: 24px; color: var(--lp-brand); flex-shrink: 0; }
.lp-trust__logo {
  width: auto;
  height: 28px;
  max-width: 90px;
  object-fit: contain;
  flex-shrink: 0;
}
@media (min-width: 768px) {
  .lp-trust__row { grid-template-columns: repeat(4, 1fr); gap: 24px; }
  .lp-trust__item { font-size: 15px; }
}

/* ── Benefits grid ──────────────────────────────────────── */
.lp-benefit-grid {
  display: grid; gap: 16px;
  grid-template-columns: 1fr;
}
@media (min-width: 600px) { .lp-benefit-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) { .lp-benefit-grid { grid-template-columns: repeat(3, 1fr); } }
.lp-benefit-card {
  border: 1px solid var(--lp-border);
  border-radius: 14px;
  padding: 22px;
  background: #fff;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.lp-benefit-card:hover { box-shadow: 0 6px 22px rgba(0, 0, 0, 0.06); transform: translateY(-2px); }
.lp-benefit-card__icon { width: 36px; height: 36px; color: var(--lp-brand); margin-bottom: 14px; }
.lp-benefit-card__title { font-size: 18px; font-weight: 700; margin: 0 0 6px; color: var(--lp-text); }
.lp-benefit-card__text { font-size: 15px; color: var(--lp-muted); margin: 0; line-height: 1.55; }

/* ── Tarif cards ────────────────────────────────────────── */
.lp-tarif-grid {
  display: grid; gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .lp-tarif-grid[data-count="2"] { grid-template-columns: 1fr 1fr; }
  .lp-tarif-grid[data-count="3"] { grid-template-columns: repeat(3, 1fr); }
  .lp-tarif-grid[data-count="4"] { grid-template-columns: repeat(2, 1fr); }
}
.lp-tarif-card {
  position: relative;
  border: 1.5px solid var(--lp-border);
  border-radius: 18px;
  padding: 28px 22px;
  background: #fff;
  display: flex; flex-direction: column;
}
.lp-tarif-card--accent {
  border-color: var(--lp-brand);
  box-shadow: 0 8px 32px rgba(20, 53, 102, 0.10);
}
.lp-tarif-card__badge {
  position: absolute; top: -12px; left: 22px;
  background: var(--lp-brand); color: #fff;
  font-size: 12px; font-weight: 700;
  padding: 5px 12px; border-radius: 999px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
}
.lp-tarif-card__name { font-size: 22px; font-weight: 700; margin: 4px 0 6px; color: var(--lp-text); }
.lp-tarif-card__desc { font-size: 14px; color: var(--lp-muted); margin: 0 0 18px; line-height: 1.5; }
.lp-tarif-card__list { list-style: none; padding: 0; margin: 0 0 22px; flex: 1; }
.lp-tarif-card__list li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 8px 0;
  font-size: 14px;
  border-bottom: 1px solid var(--lp-border);
  color: var(--lp-text);
  line-height: 1.45;
}
.lp-tarif-card__list li:last-child { border-bottom: none; }
.lp-tarif-card__list li strong { font-weight: 600; }
.lp-tarif-card__check { width: 18px; height: 18px; color: var(--lp-success); flex-shrink: 0; margin-top: 2px; }
.lp-tarif-card__cta { width: 100%; }

.lp-tarife__advice {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  margin-top: 36px; text-align: center;
}
.lp-tarife__advice p { margin: 0; font-size: 15px; color: var(--lp-muted); }

/* ── Accordions / table ────────────────────────────────── */
.lp-acc {
  border: 1px solid var(--lp-border);
  border-radius: 12px;
  margin-bottom: 12px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.lp-acc[open] {
  border-color: var(--lp-brand);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}
.lp-acc__summary {
  cursor: pointer;
  list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  font-weight: 600;
  font-size: 16px;
  color: var(--lp-text);
  min-height: 56px;
  border-left: 4px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.lp-acc__summary:hover { background: rgba(20, 53, 102, 0.03); }
.lp-acc[open] .lp-acc__summary {
  background: color-mix(in srgb, var(--lp-brand) 8%, white);
  border-left-color: var(--lp-brand);
  color: var(--lp-brand);
}
.lp-acc__summary::-webkit-details-marker { display: none; }
.lp-acc__chev { width: 18px; height: 18px; color: var(--lp-muted); transition: transform 0.2s ease, color 0.2s ease; flex-shrink: 0; }
.lp-acc[open] .lp-acc__chev { transform: rotate(180deg); color: var(--lp-brand); }
.lp-acc__body { padding: 0 18px 18px; }
.lp-faq__item .lp-acc__summary { font-weight: 600; }
.lp-faq__answer p { margin: 0; color: var(--lp-text); line-height: 1.6; font-size: 15px; }

/* Leistungstabelle: Marken-Akzent für die ganze Sektion */
.lp-leistungen { background: color-mix(in srgb, var(--lp-brand) 4%, white); }
.lp-leistungen .lp-acc { background: #fff; }

.lp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.lp-table th, .lp-table td {
  padding: 12px 10px;
  text-align: left;
  border-bottom: 1px solid var(--lp-border);
  vertical-align: top;
}
.lp-table thead tr {
  background: var(--lp-brand);
}
.lp-table th {
  font-weight: 700;
  font-size: 12px;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: none;
}
.lp-table tbody tr:nth-child(even) { background: color-mix(in srgb, var(--lp-brand) 4%, white); }
.lp-table td:first-child { font-weight: 500; }
.lp-table td:not(:first-child) { color: var(--lp-text); white-space: normal; font-weight: 600; }
@media (max-width: 540px) {
  .lp-table th, .lp-table td { padding: 9px 8px; font-size: 13px; }
  .lp-table td:first-child { padding-right: 4px; }
}

/* ── Extras ─────────────────────────────────────────────── */
.lp-extras__grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 600px) { .lp-extras__grid { grid-template-columns: 1fr 1fr; } }
.lp-extras__item {
  border-left: 3px solid var(--lp-brand);
  padding: 12px 16px;
  background: var(--lp-bg-soft);
  border-radius: 0 10px 10px 0;
}
.lp-extras__item h3 { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.lp-extras__item p { margin: 0; font-size: 14px; color: var(--lp-muted); line-height: 1.55; }

/* ── PDF download CTA (within Leistungsübersicht section) ─── */
.lp-pdf-cta-wrap { display: flex; justify-content: center; margin-top: 28px; }
.lp-pdf-cta { padding: 14px 28px; }
.lp-pdf-cta__icon { width: 20px; height: 20px; color: currentColor; }

/* ── Final CTA ─────────────────────────────────────────── */
.lp-final-cta { background: var(--lp-bg-soft); text-align: center; padding-top: 48px; padding-bottom: 48px; }
.lp-final-cta__h2 { margin-bottom: 12px; }
.lp-final-cta__btns { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }

/* ── Embedded chat at end of landing ────────────────────── */
.lp-chat-embed {
  background: var(--lp-bg-soft);
  padding-top: 24px;
  padding-bottom: 24px;
}
.lp-chat-embed > .view-chat--embedded {
  /* Override the standalone-chat layout: no 100vh, no fixed flex height. */
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
  background: transparent;
}
.lp-chat-embed .container--chat {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 16px;
  flex: 0 0 auto;
}
.lp-chat-embed .chat-wrapper {
  flex: 0 0 auto;
  min-height: 0;
  border-radius: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}
.lp-chat-embed .chat-messages {
  /* Limit height inside the embed so the page doesn't explode for long chats. */
  max-height: 70vh;
  overflow-y: auto;
}
.lp-chat-embed .chat-titlebar__back { display: none; }
.lp-chat-embed .site-header { display: none !important; }
.lp-chat-embed .chat-footer { display: none; }
.lp-chat-embed .chat-bubble--assistant {
  border-left: 3px solid var(--lp-brand);
}

/* ── Sticky mobile CTA ─────────────────────────────────── */
.lp-sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0;
  padding: 12px 16px env(safe-area-inset-bottom, 12px);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(10px);
  border-top: 1px solid var(--lp-border);
  z-index: 50;
  display: flex;
}
.lp-sticky-cta__btn { width: 100%; }
@media (min-width: 768px) { .lp-sticky-cta { display: none; } }
@media (max-width: 767px) {
  /* leave room for the sticky CTA */
  .lp-final-cta { padding-bottom: 96px; }
}

/* ── Responsive H2 ─────────────────────────────────────── */
@media (min-width: 768px) {
  .lp-h2 { font-size: 34px; }
  .lp-section { padding: 44px 0; }
}
