/* ==========================================================================
   Seba Haustechnik – projekteigene Ergänzungen zu site.css
   ========================================================================== */

/* --- Schrift: Open Sans, lokal eingebunden (SIL Open Font License) --- */
@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-weight: 300 800;
  font-display: swap;
  src: url('fonts/opensans-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Open Sans';
  font-style: italic;
  font-weight: 300 800;
  font-display: swap;
  src: url('fonts/opensans-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('fonts/opensans-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Open Sans';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url('fonts/opensans-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* --- Theme-Variablen (werden von site.css ausgewertet) --- */
:root {
  --color-primary: 62 132 224;
  --color-tint: 231 41 35;
  --font-family: 'Open Sans';
}

body {
  font-family: var(--font-family), "Segoe UI", Helvetica, Arial, sans-serif;
}

/* Anker nicht unter dem Header verstecken */
[id]:not(body) {
  scroll-margin-top: 6rem;
}

/* --- Einheitliche Zeilenhöhe ---
   Die Seite mischte Werte von ~1.4 (text-xl) bis ~1.78 (prose-xl), je nach
   verwendeter Utility-Klasse. Fließtext bekommt hier durchgehend denselben
   Wert; Überschriften bleiben unangetastet, damit der Hero nicht verrutscht. */
body {
  line-height: 1.65;
}

.prose p,
.prose li,
.tint-text p,
.title p,
.info-panel__body p,
.modal__content p,
.modal__content li {
  line-height: 1.7;
}

/* Leere Absätze aus dem CMS-Export nehmen sonst echten Platz ein */
.tint-text p:empty,
.prose p:empty,
.title p:empty,
.modal__content p:empty {
  display: none;
}

/* --- Sektionsüberschriften ---
   Tailwinds Preflight setzt margin:0 auf h2 und p, dadurch klebte der
   Untertitel direkt an der Überschrift. Leere Untertitel (z. B. "Über uns")
   bleiben per :not(:empty) außen vor, damit dort keine Lücke entsteht. */
.title p:not(:empty) {
  margin-top: 1rem;
}

@media (min-width: 768px) {
  .title p:not(:empty) {
    margin-top: 1.5rem;
  }
}

/* --- Hilfsklassen, die im ausgelieferten Tailwind-Build fehlen --- */

/* Alpine.js: Elemente vor dem Start des Frameworks ausblenden */
[x-cloak] {
  display: none !important;
}

/* Nur für Screenreader – wird bei Tastaturfokus sichtbar (Skip-Link) */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sr-only:focus {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 100;
  width: auto;
  height: auto;
  margin: 0;
  padding: .75rem 1.25rem;
  overflow: visible;
  clip: auto;
  color: #fff;
  font-weight: 700;
  background: rgb(var(--color-primary));
  border-radius: .5rem;
}

@media (min-width: 640px) {
  .sm\:hidden {
    display: none;
  }
}

/* --- Hauptnavigation (Desktop) --- */
.main-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.main-nav a {
  position: relative;
  display: inline-block;
  padding: .25rem 0;
  font-weight: 600;
  letter-spacing: .02em;
  color: #fff;
  text-decoration: none;
  transition: opacity .2s;
}
.main-nav a:hover {
  opacity: .75;
}
.main-nav a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: rgb(var(--color-primary));
  transition: width .25s ease;
}
.main-nav a:hover::after,
.main-nav li.active > a::after {
  width: 100%;
}

/* --- Mobile Navigation --- */
.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  color: #fff;
  background: rgba(0, 0, 0, .25);
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: .5rem;
  cursor: pointer;
  transition: background .2s;
}
.nav-toggle:hover {
  background: rgba(0, 0, 0, .4);
}

.mobile-nav {
  position: absolute;
  top: 100%;
  left: 1rem;
  right: 1rem;
  z-index: 30;
  padding: .5rem;
  background: rgba(17, 24, 39, .95);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: .75rem;
  box-shadow: 0 20px 40px -12px rgba(0, 0, 0, .6);
}
.mobile-nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
}
.mobile-nav a {
  display: block;
  padding: .875rem 1rem;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  border-radius: .5rem;
  transition: background .2s;
}
.mobile-nav a:hover {
  background: rgba(255, 255, 255, .1);
}

@media (min-width: 640px) {
  .nav-toggle,
  .mobile-nav {
    display: none !important;
  }
}

/* --- Drei Spalten oben (Bäder / Heiztechnik / Kundendienst) ---
   Jeder Stichpunkt ist ein eigenes <p>; über prose ergab das 1.25em Abstand
   oben UND unten und damit sehr luftige, auseinandergezogene Listen. */
.features .tint-text p {
  margin-top: 0;
  margin-bottom: 0;
}

.features .tint-text p + p {
  margin-top: .3rem;
}

.features .tint-text {
  line-height: 1.6;
}

/* etwas Luft zwischen Überschrift und Stichpunkten bleibt erhalten */
.features .tint-title {
  margin-bottom: .75rem;
}

/* --- Zurück nach oben --- */
.to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  color: #fff;
  background: rgb(var(--color-primary));
  border: 0;
  border-radius: 50%;
  box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .55);
  cursor: pointer;
  /* bis zum Erscheinen unsichtbar und nicht anklickbar */
  opacity: 0;
  visibility: hidden;
  transform: translateY(.75rem);
  transition: opacity .25s ease, transform .25s ease, visibility .25s, filter .2s;
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.to-top:hover {
  filter: brightness(1.12);
}

.to-top svg {
  width: 1.5rem;
  height: 1.5rem;
}

@media (min-width: 768px) {
  .to-top {
    right: 2rem;
    bottom: 2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .to-top {
    transform: none;
    transition: opacity .2s ease, visibility .2s;
  }
}

/* --- Anruf-Schaltfläche im Hero ---
   Vorher standen dort zwei Schaltflächen mit identischem Ziel nebeneinander. */
.hero__call {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: .3rem .6rem;
}

.hero__call-icon {
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
}

.hero__call-label {
  font-weight: 500;
  opacity: .85;
}

.hero__call-number {
  font-weight: 700;
  letter-spacing: .01em;
  white-space: nowrap;
}

/* --- Bäder-Karten ---
   Die Karten hatten eine feste Höhe (h-64, ab lg h-112) und der Text war
   absolut am unteren Rand verankert. Längere Texte ragten dadurch über die
   Karte hinaus und wurden von overflow-hidden abgeschnitten – auf dem Handy
   war nur noch die Mitte des Textes zu sehen. Jetzt wächst die Karte mit. */
.bath-card {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: auto;
  min-height: 18rem;
}

/* Foto bleibt Hintergrund der gesamten Karte und wächst mit ihr mit */
.bath-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bath-card__text {
  position: relative;
  bottom: auto;
  /* reserviert oben Platz, damit vom Foto immer etwas frei sichtbar bleibt */
  padding-top: 7rem;
  color: #f4f4f5;
  /* Verlauf: unten dunkel für die Lesbarkeit, nach oben klar auslaufend */
  background: linear-gradient(to top,
    rgba(0, 0, 0, .88) 0%,
    rgba(0, 0, 0, .74) 42%,
    rgba(0, 0, 0, .38) 72%,
    rgba(0, 0, 0, 0) 100%);
}

.bath-card__text p {
  margin-top: 0;
  margin-bottom: .6rem;
  color: inherit;
}

.bath-card__text p:last-child {
  margin-bottom: 0;
}

/* Kartenüberschrift hervorheben */
.bath-card__text p:first-child {
  margin-bottom: .6rem;
  font-size: 1.05rem;
  color: #fff;
}

/* --- Über uns ---
   Die Textspalte begann oben, während die Bilder daneben vertikal zentriert
   sind; dadurch standen die beiden Hälften versetzt. Außerdem waren Einstieg,
   Fließtext und Grußformel typografisch nicht unterschieden. */
.about-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.about {
  max-width: 40rem;
}

/* Die Spalte war fest auf 50/50 geteilt; der Text bekommt etwas mehr Raum,
   die Bildcollage entsprechend weniger. */
@media (min-width: 768px) {
  .content .about-col {
    width: 57%;
  }

  .content .about-col + div {
    width: 43%;
  }
}

.about p {
  margin-top: 0;
  margin-bottom: 1.1rem;
}

.about p:last-child {
  margin-bottom: 0;
}

/* Einstiegssatz als Vorspann, abgesetzt vom Fließtext.
   Doppelte Klasse, damit die Abstände die Regel .about p überwiegen. */
.about .about__lead {
  font-size: 1.2em;
  font-weight: 600;
  line-height: 1.55;
  color: var(--tw-prose-headings);
  margin-bottom: 1.4rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid rgba(128, 128, 128, .25);
}

/* Grußformel als Signatur kennzeichnen */
.about .about__signature {
  margin-top: 1.75rem;
  padding-left: 1rem;
  border-left: 3px solid rgb(var(--color-primary));
  font-style: italic;
  font-weight: 700;
  color: var(--tw-prose-headings);
}

/* ersetzt das frühere my-9, das oben wie unten 2.25rem erzeugte */
.about__cta {
  margin-top: 2.25rem;
}

/* --- Kundendienst-Slider kompakter ---
   prose-xl setzte 1.2em Absatzabstand auf 20px Schrift (~24px) und die
   Listenpunkte hatten zusätzlich eigene Abstände. */
.testimonials .splide__slide .prose p,
.testimonials .splide__slide .prose ul,
.testimonials .splide__slide .prose li,
.testimonials .splide__slide .prose li p {
  margin-top: 0;
  margin-bottom: 0;
  line-height: 1.45;
}

.testimonials .splide__slide .prose p + p {
  margin-top: .5rem;
}

.testimonials .splide__slide .prose li + li {
  margin-top: .4rem;
}

/* Abstand zwischen Text und der Zeile mit Bild und Titel */
.testimonials .splide__slide .mt-6 {
  margin-top: 1.25rem;
}

@media (min-width: 768px) {
  .testimonials .splide__slide .md\:mt-12 {
    margin-top: 1.75rem;
  }
}

/* --- Infokasten (Fließtext am Ende der Heiztechnik-Sektion) ---
   Im Original hingen die Textklassen an einem leeren <p>; der eigentliche
   Text lief dadurch ungestylt über die volle Breite. */
.info-panel {
  max-width: 60rem;
  margin: 4rem auto 0;
  padding: 2rem;
  border-radius: .75rem;
  border-left: 4px solid rgb(var(--color-primary));
  background: rgba(0, 0, 0, .025);
}
.dark .info-panel {
  background: rgba(255, 255, 255, .04);
}
@media (min-width: 768px) {
  .info-panel {
    padding: 2.5rem 3rem;
  }
}

.info-panel__title {
  margin: 0 0 1.25rem;
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.45;
  color: rgb(var(--color-primary));
  /* verteilt die Zeilen gleichmäßig, statt ein einzelnes Wort abzuhängen */
  text-wrap: balance;
}
@media (min-width: 768px) {
  .info-panel__title {
    font-size: 1.3rem;
  }
}

.info-panel__body {
  max-width: none;
  font-size: .95rem;
  line-height: 1.75;
  opacity: .8;
}
.info-panel__body p + p {
  margin-top: 1rem;
}

/* --- Kontaktbereich (ersetzt das frühere Kontaktformular) --- */
.contact-card {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .contact-card {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Drei Kacheln im Blau der Seite – der frühere weiße Kasten auf grauem
   Grund ist entfallen, die Kacheln stehen jetzt direkt im Abschnitt. */
.contact-card__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .75rem;
  padding: 2.25rem 1.25rem;
  text-align: center;
  border-radius: .75rem;
  color: #fff;
  background: rgb(var(--color-primary));
  box-shadow: 0 14px 30px -14px rgb(var(--color-primary) / .75);
  transition: transform .25s ease, filter .25s ease;
}
.contact-card__item:hover {
  filter: brightness(1.08);
}
@media (prefers-reduced-motion: no-preference) {
  .contact-card__item:hover {
    transform: translateY(-3px);
  }
}

.contact-card__icon {
  width: 2.5rem;
  height: 2.5rem;
  color: #fff;
}
.contact-card__label {
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .75);
}
.contact-card__value {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  color: inherit;
  text-decoration: none;
  /* nur umbrechen, wenn es sonst überläuft – nicht mitten im Wort wie bei "anywhere" */
  overflow-wrap: break-word;
  hyphens: none;
}

/* Die E-Mail-Adresse ist der längste Wert; etwas kleiner gesetzt, damit sie
   in die Spalte passt. Muss sie doch umbrechen, geschieht das am <wbr>
   hinter dem @ statt irgendwo im Wort. */
.contact-card__value--mail {
  font-size: 1rem;
  letter-spacing: -0.01em;
}
/* auf blauem Grund wäre die Akzentfarbe unsichtbar */
a.contact-card__value:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: .2em;
}
.contact-card__note {
  font-size: .875rem;
  color: rgba(255, 255, 255, .8);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2rem;
}

/* --- Modale Fenster (Datenschutz / Impressum) --- */
.modal__quelle {
  margin-top: 2rem;
  font-size: .8125rem;
  opacity: .6;
}

/* --- Slider-Pfeile --- */
.splide__arrow {
  background: transparent;
  border: 0;
  cursor: pointer;
  opacity: .6;
  transition: opacity .2s;
}
.splide__arrow:hover:not(:disabled) {
  opacity: 1;
}
.splide__arrow--prev svg {
  transform: scaleX(-1);
}

/* Tastaturbedienung sichtbar machen */
a:focus-visible,
button:focus-visible {
  outline: 2px solid rgb(var(--color-primary));
  outline-offset: 3px;
}
