/* Minimal: Nur Anpassungen, die die Kirby-Struktur (layout-row) erfordern.
   Alles andere kommt aus styles.css wie in der Vorlage. */

/* Smooth Scrolling für Anker-Links (Hauptnavigation etc.) */
html {
  scroll-behavior: smooth;
}

/* Header Logo: Desktop vs. Mobile – ab 1080px Standard-Logo, darunter Logo Mobile aus Panel */
.header__logo-desktop {
  display: none;
}
.header__logo-mobile {
  display: block;
}
@media (max-width: 1079.98px) {
  .header__logo {
    margin-top: 4px;
  }
}
@media (min-width: 1080px) {
  .header__logo-desktop {
    display: block;
  }
  .header__logo-mobile {
    display: none;
  }
  .header__logo {
    margin-top: 6px;
  }
}

/* Telefon: auf Desktop unsichtbar; im mobilen Menü einblenden */
.header__contacts {
  visibility: hidden;
  pointer-events: none;
}
@media (max-width: 1079.98px) {
  .header__menu .header__meta {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: 1rem;
  }
  .header__menu .header__contacts {
    visibility: visible !important;
    pointer-events: auto !important;
    width: 100%;
    margin-bottom: 0;
  }
  /* Telefon, Sprache und Button grösser im mobilen Menü; Texte links ausrichten */
  .header__menu .header__contacts a,
  .header__menu .language__toggler,
  .header__menu .language__current,
  .header__menu .btn {
    font-size: 1.25rem !important;
  }
  .header__menu .header__contacts a,
  .header__menu .language__toggler {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-start;
  }
  .header__menu .btn {
    padding: 0 24px 0 28px;
    height: 50px;
    font-size: 1.25rem !important;
    width: 100%;
    margin-top: 1rem;
  }
}

/* Header-Navigation: zentriert, Nav-Links und CTA vergrössert; Telefon + Sprachwahl auf ursprüngliche Grösse */
@media (min-width: 1080px) {
  .header__menu-main {
    flex: 1;
    margin-left: 0;
    margin-right: 0;
    justify-content: center;
  }
  .header__menu-main,
  .header__menu-main li a,
  .header__meta .btn {
    font-size: 1.0625rem !important;
  }
  .header__contacts a,
  .header__meta .language__toggler,
  .header__meta .language__current {
    font-size: 0.9375rem !important;
  }
}

/* Header unter 1400px: mehr Abstand nach oben, Hauptmenu zentriert */
@media (min-width: 1080px) and (max-width: 1399.98px) {
  .header__wrapper {
    padding-top: 20px !important;
    padding-bottom: 20px !important;
  }
  .header__wrapper .container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
  }
  .header__menu {
    display: contents;
  }
  .header__menu-main {
    justify-self: center;
  }
  .header__meta {
    justify-self: end;
  }
}

/* s-full-width-columns: Bild füllt rechte Hälfte – 50vw mit overflow ab 768px */
@media (min-width: 768px) {
  .s-full-width-columns {
    overflow-x: clip;
  }
  .s-full-width-columns__visual {
    flex: 1;
    min-width: 0;
    display: flex;
  }
  .s-full-width-columns__visual figure {
    width: 50vw;
    height: 100%;
    margin: 0;
    min-height: 0;
    flex-shrink: 0;
  }
  .s-full-width-columns__visual figure img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }
}

.layout-row.colum_padding_bottom_none {
  padding-bottom: 0;
}

/* Footer-Navigation: horizontal mit roten Trennpunkten wie Vorlage */
.footer__menu ul {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem 0;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer__menu ul li {
  display: flex;
  align-items: center;
  font-weight: 700;
}
.footer__menu ul li:not(:first-child)::before {
  content: "";
  display: block;
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  margin: 0 10px;
  background: var(--base-color, #e70a00);
  border-radius: 50%;
}
.footer__menu ul li a {
  text-decoration: none;
  color: inherit;
}
@media (min-width: 1080px) {
  .footer__menu ul li:not(:first-child)::before {
    margin: 0 30px;
  }
}

/* Footer Logo Animation */
.footer {
  background-size: 100% auto;
  background-size: cover;
}

.footer__logo-link {
  display: inline-block;
  line-height: 0;
}
.footer__logo-svg {
  display: block;
  width: 211px;
  height: auto;
}
#footer-logo-arrow {
  transform-origin: 185.343px 29.2162px;
}

/* Header Logo Animation */
#header-logo-arrow-desktop {
  transform-origin: 107.701px 16.979px;
}
#header-logo-arrow-mobile {
  transform-origin: 94.7px 16.98px;
}
.header__logo-link {
  display: inline-block;
  line-height: 0;
}
.header__logo .header__logo-desktop {
  width: 192px;
  height: auto;
}
.header__logo .header__logo-mobile {
  width: 110px;
  height: auto;
}

/* s-news Kacheln: gleiche Höhe */
.s-news .swiper-wrapper {
  align-items: stretch;
}
.s-news .swiper-slide {
  height: auto;
  display: flex;
}
.s-news .card--news {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}
.s-news .card--news .card__image {
  flex-shrink: 0;
}
.s-news .card--news .card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.s-news .card--news .card__body p {
  flex: 1;
}

/* s-slider-views: Bilder vollständig sichtbar (kein Abschneiden oben/unten) */
.s-slider-views figure img {
  object-fit: contain;
}

/*
 * Hero: Mobile-Breakpoint überschreiben – einheitliche Desktop-Ansicht auf allen Bildschirmgrössen.
 * styles.css hat ab 767px eine andere Ansicht (width:768px, overflow:hidden, etc.) – wird hier neutralisiert.
 */
@media (max-width: 767.98px) {
  /* Hero: Keine Bewegung beim Scrollen auf Mobile.
     height: 100svh statt 100dvh verhindert Verschiebung durch Browser-Chrome (Adresszeile). */
  .s-hero {
    height: 100svh !important;
    background-attachment: scroll !important;
  }
  .s-hero,
  .s-hero__visual {
    transform: none !important;
  }
  .s-hero .container {
    padding-left: calc(2rem * 0.5);
    padding-right: calc(2rem * 0.5);
  }
  .s-hero__visual {
    padding: 0 1.5%;
    height: auto;
  }
  .s-hero__visual-main {
    position: static !important;
    overflow: visible !important;
    transform: none !important;
    will-change: auto !important;
  }
  .s-hero__visual-main img,
  .s-hero__visual picture img {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    object-fit: contain;
    transform: none !important;
    will-change: auto !important;
  }
  .s-hero__visual-over {
    display: none !important;
  }
}

/* Hero-Titel: Zeilenumbruch nach Highlight-Wort (z.B. "Bringt Bewegung" | "ins Leben") */
.hero-title-br-mobile {
  display: block;
}

/* Sprachauswahl: 9px nach unten verschieben */
.header__meta .language {
  margin-top: 9px;
}

/* Sprach-Popup im mobilen Menü: innerhalb des Fensters positionieren */
@media (max-width: 1079.98px) {
  .header__menu .language__menu {
    right: auto;
    left: 0;
    bottom: 100%;
    top: auto;
    transform: none;
    margin-bottom: 8px;
  }
}

/* Sprachumschalter: aktuelle Sprache rot, Links zur gleichen Seite */
.language__menu ul li a {
  display: block;
  text-decoration: none;
  color: inherit;
}
.language__menu ul li.active a {
  color: var(--base-color, #e70a00);
}

/* Content- und Error-Seiten: grössere Schrift für bessere Lesbarkeit */
.template-content .block-text,
.template-content .block-list,
.template-error .block-text {
  font-size: 1.125rem;
  line-height: 1.6;
}
.template-content .block-text p,
.template-error .block-text p {
  margin-bottom: 1.2rem;
}

/* Text-Block: Ausrichtung zentriert */
.block-text.block-text--center {
  text-align: center;
}

/* s-text-image: Text auf Mobile zentrieren, Bilder ausblenden */
@media (max-width: 767.98px) {
  .s-text-image__text {
    text-align: center;
  }
  .s-text-image .container {
    gap: 40px;
  }
  .s-text-image__visual {
    display: none !important;
  }
}

/* Button-Block in Layout: Container, Zentrierung, grössere Schrift */
.block-button {
  margin-top: 1rem;
}
.block-button .container {
  display: flex;
  justify-content: flex-start;
}
.block-button.block-button--center .container {
  justify-content: center;
}
.block-button.block-button--right .container {
  justify-content: flex-end;
}
.template-content .block-button .btn,
.template-error .block-button .btn {
  font-size: 1.0625rem !important;
  padding: 0 20px 0 24px;
  height: 44px;
}

/* Content- und Error-Seiten: Abstand small auf die Hälfte reduzieren */
.template-content .colum_padding_top_small,
.template-error .colum_padding_top_small {
  padding-top: clamp(10px, 5vw, 50px);
}
.template-content .colum_padding_bottom_small,
.template-error .colum_padding_bottom_small {
  padding-bottom: clamp(10px, 5vw, 50px);
}

/* ========== Mobile-Optimierungen ========== */
@media (max-width: 767.98px) {
  /* 1. Gelber Balken oben ausblenden */
  .header__panel {
    display: none !important;
  }

  /* Sticky Navigation: Kein Transform beim Scrollen (Panel ist ausgeblendet, sonst wird Header oben abgeschnitten) */
  .header--scrolled {
    transform: none !important;
  }

  /* Navigation nicht abschneiden: Header mit Platz für Hamburger-Menü */
  .header {
    overflow: visible;
    width: 100%;
  }
  .header .container,
  .header__wrapper .container {
    padding-left: 1rem;
    padding-right: 1.25rem;
    box-sizing: border-box;
    max-width: 100%;
  }
  .header__wrapper .container .navbar-toggler {
    flex-shrink: 0;
    margin-right: 0;
  }

  /* 2. Testimonial-Zitat 10pt kleiner. Name und Rolle: Original beibehalten (nicht anpassen) */
  .s-banner__quote {
    font-size: calc(clamp(2.2rem, 2.8125vw, 3.375rem) - 10pt) !important;
  }

  /* 4. Testimonial: Mobile Ausrichtung links/rechts aus Panel – Statement (Quote) ebenfalls nach rechts */
  .s-banner--mobile-left .s-banner__text {
    text-align: left;
  }
  .s-banner--mobile-right .s-banner__text {
    text-align: right;
  }
  .s-banner--mobile-right .s-banner__quote,
  .s-banner--mobile-right .s-banner__author {
    margin-left: auto;
  }
}

/* 3. DSGVO-Balken: Schrift links, mehr Abstand links/rechts */
.strip .container {
  text-align: left;
  padding-left: 2rem;
  padding-right: 2rem;
}
.strip p {
  text-align: left;
}

/* Feine Linie nach Initiales-Setup-Block (vor Onboarding) */
.s-prices__col:not(:last-child)::after {
  background: linear-gradient(90deg, #f8f4ed 0%, #d9d9d9 50%, #f8f4ed 100%) !important;
}
@media (max-width: 767.98px) {
  .s-prices__col:not(:last-child)::after {
    display: none;
  }
}

/* 5. Abstand vor Lizenzgebühr verdoppeln */
.s-prices__ongoing-heading {
  margin-top: 2em;
}

/* 6. Pricing-Tabelle Mobile/Tablet: Preise einzeilig, Tabellentitel lesbar */
@media (max-width: 991.98px) {
  .s-prices__table {
    font-size: 0.75rem;
  }
  .s-prices__table table {
    min-width: 0;
    table-layout: fixed;
    width: 100%;
  }
  .s-prices__table th,
  .s-prices__table td {
    padding: 0.4rem 0.25rem;
    overflow: visible;
  }
  /* Spaltenbreiten */
  .s-prices__table th:nth-child(1),
  .s-prices__table td:nth-child(1) { width: 18%; }
  .s-prices__table th:nth-child(2),
  .s-prices__table td:nth-child(2) { width: 22%; }
  .s-prices__table th:nth-child(3),
  .s-prices__table td:nth-child(3) { width: 30%; }
  .s-prices__table th:nth-child(4),
  .s-prices__table td:nth-child(4) { width: 30%; }
  /* Tabellentitel: sehr kleine Schrift für einzeilige Darstellung */
  .s-prices__table th {
    font-size: calc(0.5rem + 1pt) !important;
    line-height: 1.15;
    letter-spacing: -0.02em;
  }
  /* Preise (CHF): nie umbrechen, immer eine Zeile */
  .s-prices__table .price-nowrap,
  .s-prices__table td:nth-child(2),
  .s-prices__table td:nth-child(4) {
    white-space: nowrap;
  }
}

/* Preis-Span nowrap (alle Bildschirmgrössen) */
.price-nowrap {
  white-space: nowrap;
}

/* Footer-Intro: mehr Abstand zu Titel und Kontaktblock */
.footer__intro {
  margin: 1.5rem 0 2.5rem;
}

/* FAQ-Filterleiste */
.s-faq__filter {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 40px;
}
.s-faq__filter + .s-faq__wrapper {
  margin-top: 24px;
}
.s-faq__filter-btn {
  font-family: "Brown Pro", sans-serif;
  font-weight: 700;
  font-size: 0.9375rem;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #191919;
  background: #fff;
  border: 1px solid #ede8de;
  border-radius: 100px;
  padding: 10px 20px;
  cursor: pointer;
  transition: color .25s linear, background-color .25s linear, border-color .25s linear;
}
.s-faq__filter-btn:hover {
  border-color: var(--base-color, #e70a00);
  color: var(--base-color, #e70a00);
}
.s-faq__filter-btn.is-active {
  background: var(--base-color, #e70a00);
  border-color: var(--base-color, #e70a00);
  color: #fff;
}

/* ========================================================================
   Lizenz-Rechner (prices: pricing_mode = calculator)
   ======================================================================== */
.s-prices__calc {
  --calc-red: var(--base-color, #e70a00);
  --calc-track: #e7e1d8;
  background: #fff;
  border: 1px solid #ebe7e1;
  border-radius: 24px;
  padding: 28px 22px;
  margin: 18px 0 21px;
  box-shadow: 0 4px 26px 0 rgba(0, 0, 0, .03), 0 4px 4px 0 rgba(0, 0, 0, .02);
}
@media (min-width: 1080px) {
  .s-prices__calc {
    margin-top: 24px;
  }
}

/* --- Kopfzeile: Titel/Untertitel + Toggle --- */
.s-prices__calc-head {
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: flex-start;
  justify-content: space-between;
}
.s-prices__calc-title {
  margin: 0 0 8px;
}
.s-prices__calc-subtitle {
  margin: 0;
  max-width: 24em;
  color: #6f6a64;
  font-size: 1rem;
  line-height: 1.4;
  letter-spacing: -0.01em;
}

/* --- Toggle Monatlich / Jährlich --- */
.s-prices__calc-toggle {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 6px;
  background: #f8f4ed;
  border: 1px solid #ebe7e1;
  border-radius: 100px;
  width: 100%;
  max-width: 360px;
}
.s-prices__calc-toggle-pill {
  position: absolute;
  top: 6px;
  bottom: 6px;
  left: 6px;
  width: calc(50% - 9px);
  background: var(--calc-red);
  border-radius: 100px;
  box-shadow: 0 4px 14px rgba(231, 10, 0, .28);
  transition: transform .28s cubic-bezier(.4, 0, .2, 1);
  pointer-events: none;
}
.s-prices__calc-toggle.is-yearly .s-prices__calc-toggle-pill {
  transform: translateX(calc(100% + 6px));
}
.s-prices__calc-toggle-btn {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 9px 10px;
  background: transparent;
  border: 0;
  border-radius: 100px;
  cursor: pointer;
  text-align: center;
  transition: opacity .25s linear;
}
.s-prices__calc-toggle-label {
  font-family: "Brown Pro", sans-serif;
  font-weight: 700;
  font-size: 1rem;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #191919;
}
.s-prices__calc-toggle-sub {
  font-size: .75rem;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: #a09c97;
}
.s-prices__calc-toggle-btn[data-calc-billing="yearly"] .s-prices__calc-toggle-sub {
  color: var(--calc-red);
  font-weight: 500;
}
/* Aktiver Bereich: weisse Schrift auf rotem Grund */
.s-prices__calc-toggle-btn.is-active .s-prices__calc-toggle-label,
.s-prices__calc-toggle-btn.is-active .s-prices__calc-toggle-sub {
  color: #fff;
}

/* --- Slider --- */
.s-prices__calc-slider {
  margin: 34px 0 6px;
}
.s-prices__calc-users {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-bottom: 22px;
}
.s-prices__calc-users-label {
  text-transform: uppercase;
  font-weight: 500;
  font-size: .8125rem;
  letter-spacing: .02em;
  color: #a09c97;
}
.s-prices__calc-users-value {
  font-family: "Brown Pro", sans-serif;
  font-weight: 700;
  letter-spacing: -0.05em;
  color: #191919;
}
.s-prices__calc-users-value strong {
  font-size: clamp(2.4rem, 4vw, 3rem);
  line-height: 1;
}
.s-prices__calc-users-unit {
  font-size: 1.15rem;
  color: #6f6a64;
  margin-left: 6px;
}

.s-prices__calc-range {
  padding: 0 2px;
}
.s-prices__calc-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 100px;
  background: linear-gradient(90deg,
    var(--calc-red) 0%,
    var(--calc-red) var(--calc-progress, 50%),
    var(--calc-track) var(--calc-progress, 50%),
    var(--calc-track) 100%);
  cursor: pointer;
  outline: none;
}
/* Thumb – WebKit */
.s-prices__calc-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--calc-red);
  box-shadow: 0 3px 10px rgba(231, 10, 0, .25);
  cursor: grab;
  transition: transform .12s ease;
  margin-top: -10px;
}
.s-prices__calc-input::-webkit-slider-thumb:active {
  cursor: grabbing;
  transform: scale(1.12);
}
.s-prices__calc-input::-webkit-slider-runnable-track {
  height: 6px;
  border-radius: 100px;
  background: transparent;
}
/* Thumb – Firefox */
.s-prices__calc-input::-moz-range-thumb {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--calc-red);
  box-shadow: 0 3px 10px rgba(231, 10, 0, .25);
  cursor: grab;
}
.s-prices__calc-input::-moz-range-track {
  height: 6px;
  border-radius: 100px;
  background: var(--calc-track);
}
.s-prices__calc-input::-moz-range-progress {
  height: 6px;
  border-radius: 100px;
  background: var(--calc-red);
}
.s-prices__calc-input:focus-visible {
  outline: 2px solid rgba(231, 10, 0, .35);
  outline-offset: 6px;
}

.s-prices__calc-ticks {
  display: flex;
  justify-content: space-between;
  margin-top: 14px;
  font-size: .8125rem;
  letter-spacing: -0.02em;
  color: #a09c97;
}
.s-prices__calc-ticks span {
  flex: 1;
  text-align: center;
}
.s-prices__calc-ticks span:first-child {
  text-align: left;
}
.s-prices__calc-ticks span:last-child {
  text-align: right;
}

/* --- Resultat --- */
.s-prices__calc-result {
  margin-top: 26px;
  padding: 24px 20px;
  background: var(--concrete-gray, #f8f4ed);
  border-radius: 18px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.s-prices__calc-result-label {
  text-transform: uppercase;
  font-weight: 500;
  font-size: .8125rem;
  letter-spacing: .02em;
  color: #a09c97;
}
.s-prices__calc-result-price {
  font-family: "Brown Pro", sans-serif;
  font-weight: 700;
  font-size: clamp(2.4rem, 4.2vw, 3.25rem);
  line-height: 1.02;
  letter-spacing: -0.05em;
  color: var(--calc-red);
  white-space: nowrap;
}
.s-prices__calc-result-detail {
  font-size: .9375rem;
  letter-spacing: -0.01em;
  color: #6f6a64;
}
.s-prices__calc-result-x {
  margin: 0 2px;
  color: #c4beb6;
}

@media (min-width: 768px) {
  .s-prices__calc {
    padding: 40px 44px;
  }
  .s-prices__calc-head {
    flex-direction: row;
    align-items: center;
  }
  .s-prices__calc-toggle {
    width: auto;
    min-width: 300px;
    flex-shrink: 0;
  }
}

@media (min-width: 1080px) {
  .s-prices__calc {
    padding: 48px 56px;
  }
  .s-prices__calc-slider {
    margin-top: 44px;
  }
  .s-prices__calc-result {
    margin-top: 34px;
    padding: 30px 24px;
  }
}
