/* 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;
}
