/* === Kostenrechner – Master CSS === */

/* --- Basislayout & Typografie --- */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  color: #000;
  font-family: Arial, Helvetica, Verdana, sans-serif;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  background: #fff;
}

/* Container */
#seite { max-width: 990px; margin: 0 auto; background: #F2F5F7; }
#inhalt { padding: 0 4% 40px 5%; }

/* Headings & spacing */
h2 { margin: 15px 0; }
h3 { margin: 10px 0 3px; }
p { margin: 0.2em 0; }
ul { margin: 0; padding-left: 20px; }

/* Tabellen-Basis */
table.contenttable {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95em;
  line-height: 1.5;
}
table.contenttable tr { border-bottom: 1px solid silver; }
table.contenttable th,
table.contenttable td { padding: 0 5px; text-align: left; }

/* Preis-Tabelle */
table.preistabelle { table-layout: auto; line-height: 1.2; }
#inhalt table.preistabelle ul { padding: 0; }
.preistabelle td { vertical-align: top; }

.preistabelle li,
.preistabelle .klein {
  list-style: none;
  font-size: 0.92em;
  line-height: 1.25;
  margin: 3px 0 8px;
}

/* Headings etwas kleiner */
.preistabelle h3 {
  font-size: 1.15rem;
  margin: 10px 0 6px;
}
.preistabelle h4 {
  font-size: 1rem;
  margin: 10px 0 6px;
  font-weight: 600;
  color: #6b6f76;
}

/* --- Modernisierte Klassen-Auswahl --- */
table.preistabelle select,
.js-klassenwahl select {
  width: 100%;
  height: 40px;
  margin: 5px 0 15px;
  padding: 6px 14px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  border: 2px solid #99cc00;
  border-radius: 8px;
  background: #fdfdfd
              url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23669900' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>")
              no-repeat right 12px center/16px 16px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  transition: all .2s ease;
  cursor: pointer;
}

/* Fokus-Effekt */
table.preistabelle select:focus,
.js-klassenwahl select:focus {
  outline: none;
  border-color: #6a9900;
  box-shadow: 0 0 5px rgba(153,204,0,.5);
}




/* Summenzeile übersichtlicher */
.preistabelle .summe-row {
  background: #f4f8ef;
  border-top: 2px solid #99cc00;
  border-bottom: 2px solid #99cc00;
}
.preistabelle .summe-row h3 {
  margin: 8px 0;
  font-size: 1.1em;
  font-weight: 600;
  color: #333;
}
.preistabelle .summe-row .preis h3 {
  margin: 8px 0;
  font-size: 1.3em;
  font-weight: 700;
  color: #000;
}

/* --- Table Fixes --- */
.preistabelle tr > td {
  vertical-align: bottom;
  padding-top: 8px;
  padding-bottom: 10px;
}
.preistabelle tr > td.preis {
  text-align: right;
  white-space: nowrap;
}
.preistabelle .sub {
  font-size: 0.92em;
  color: #555;
  margin: 2px 0 0;
  line-height: 1.25;
}

/* Fahrstunden-Zeile */
.preistabelle .row-fahrstunden {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 6px;
}
.preistabelle .row-fahrstunden .titel {
  font-weight: 700;
  font-size: 1.1em;
}
/* Subtext (á 45 Minuten) – kleiner, schwarz */
.preistabelle .row-fahrstunden .titel .sub,
.preistabelle h3 .sub {
  font-weight: 400;
  font-size: 0.85em;
  color: #000;
  margin-left: 6px;
}
.preistabelle .row-fahrstunden .kosten {
  white-space: nowrap;
  font-weight: 700;
}

/* --- Slider Layout --- */
.preistabelle .sliderbox {
  display: grid;
  grid-template-columns: 2.5ch 1fr 2.5ch;
  gap: 10px;
  align-items: center;
}
.preistabelle .sliderbox span { text-align: center; }

/* --- Moderner Slider Design --- */
.kostenrechner .sliderbox input[type=range] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 24px;
  background: transparent;
  margin: 8px 0 0 0 !important;
  padding: 0;
  cursor: pointer;
}

/* Track – Chrome/Edge/Safari */
.kostenrechner .sliderbox input[type=range]::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 9999px;
  background: linear-gradient(to right, #a6d608, #99cc00);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.2);
  border: 1px solid rgba(0,0,0,.35);
}
/* Thumb – Chrome/Edge/Safari */
.kostenrechner .sliderbox input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #99cc00;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  margin-top: -7px;
  cursor: grab;
  transition: transform .2s ease, border-color .2s ease;
}
.kostenrechner .sliderbox input[type=range]::-webkit-slider-thumb:hover {
  border-color: #669900;
  transform: scale(1.1);
}
.kostenrechner .sliderbox input[type=range]::-webkit-slider-thumb:active {
  cursor: grabbing;
}

/* Track – Firefox */
.kostenrechner .sliderbox input[type=range]::-moz-range-track {
  height: 10px;
  border-radius: 9999px;
  background: linear-gradient(to right, #a6d608, #99cc00);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.2);
  border: 1px solid rgba(0,0,0,.35);
}
/* Thumb – Firefox */
.kostenrechner .sliderbox input[type=range]::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #99cc00;
  box-shadow: 0 2px 6px rgba(0,0,0,.25);
  cursor: grab;
  transition: transform .2s ease, border-color .2s ease;
}
.kostenrechner .sliderbox input[type=range]::-moz-range-thumb:hover {
  border-color: #669900;
  transform: scale(1.1);
}

/* Fokus-Ring ausblenden */
.kostenrechner .sliderbox input[type=range]:focus { outline: none; }

/* --- Erste-Hilfe-Kurs Box --- */
.preistabelle .erstehilfe-box {
  margin-top: 15px;
  padding: 12px 14px;
  background: #f9f9f9;
  border-left: 4px solid #99cc00;
  font-size: 0.95em;
  line-height: 1.4;
}
.preistabelle .erstehilfe-box a {
  color: #cc5500; /* dunkelorange */
  font-weight: 700;
  text-decoration: underline;
}
.preistabelle .erstehilfe-box a:hover {
  text-decoration: none;
  color: #993d00;
}
/* Gutscheincode in Tipp-Box */
.preistabelle .erstehilfe-box .gutschein {
  display: inline-block;
  margin-top: 6px;
  color: #333;
  font-size: 0.9em;
}
.preistabelle .erstehilfe-box .gutschein b {
  color: #99cc00;
}

/* --- Responsive --- */
.js-responsive-table { overflow-x: auto; }
@media (max-width: 600px) {
  #inhalt { padding: 0 3% 30px 3%; }
  table.contenttable { font-size: 0.95em; }
}

/* Hinweisbox Gestaltung */
.hinweisbox {
  margin-top: 15px;
  padding: 15px 20px;
  border-left: 4px solid #99cc00;
  background: #f8f9f9;
  font-size: 0.95em;
  line-height: 1.5;
}
.hinweisbox strong {
  color: #99cc00;
  font-size: 1.05em;
}
.hinweisbox ul { margin: 8px 0 0 20px; padding: 0; }
.hinweisbox li { margin: 3px 0; }

/* Fahrstunden-Anzahl hervorheben */
.fs-anzahl {
  font-weight: 700;
  color: #99cc00;
  font-size: 1.15em;
  transition: transform .2s ease, color .2s ease;
}
.fs-anzahl.changed {
  transform: scale(1.25);
  color: #6a9900;
}

/* Hinweistext unter Slider */
.slider-hinweis {
  margin-top: 4px;
  font-size: 0.85em;
  color: #666;
  font-style: italic;
}

/* Collage "preise_b.jpg" ca. 20% kleiner über den Link-Container */
.portfolio-single-image p:first-child > a {
  display: block;
  max-width: 80% !important;   /* 20% kleiner */
  margin: 0 auto !important;   /* zentrieren */
}
.portfolio-single-image p:first-child > a > img {
  width: 100% !important;
  height: auto !important;
  display: block;
}

/* Druck-Button Gestaltung */
.print-button {
  margin-top: 15px;
  text-align: right;
}
.print-button button {
  background: #99cc00;
  color: #fff;
  border: none;
  padding: 8px 16px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.95em;
}
.print-button button:hover {
  background: #6a9900;
}


/* === PRINT STYLES – Kompakt & korrekt === */
@media print {
  @page {
    size: A4 portrait;
    margin: 10mm;
  }

  body {
    font-size: 11pt !important;
    line-height: 1.35 !important;
    color: #000 !important;
    background: #fff !important;
  }

  header,
  nav,
  #page-title,
  .js-klassenwahl,
  .sliderbox,
  .slider-hinweis,
  .portfolio-single-image,
  .print-button,
  footer,
  iframe,
  img.footer-logo {
    display: none !important;
    visibility: hidden !important;
  }

  p:has(+ .js-klassenwahl),
  .js-klassenwahl {
    display: none !important;
  }

  .box1,
  .box3,
  h1,
  #page-title {
    display: none !important;
  }

  .kostenrechner,
  .preistabelle,
  .erstehilfe-box,
  .hinweisbox,
  .summe-row {
    display: block !important;
    visibility: visible !important;
    width: 100% !important;
    margin: 0 0 10px 0 !important;
    page-break-inside: avoid !important;  /* <-- verhindert Seitenumbruch mittendrin */
  }

  .summe-row {
    background: #f4f4f4 !important;
    border-top: 2px solid #000 !important;
    border-bottom: 2px solid #000 !important;
    padding: 6px 0 !important;
  }

  /* Schülerbilder wirklich weg */
  .portfolio-single-image img.schueler-collage {
    display: none !important;
    visibility: hidden !important;
  }

  /* Container sichtbar halten */
  .portfolio-single-image {
    display: block !important;
    visibility: visible !important;
    height: auto !important;
    overflow: visible !important;
  }

  /* Hinweisbox explizit sichtbar */
  .portfolio-single-image .hinweisbox {
    display: block !important;
    visibility: visible !important;
    border: 1px solid #000;
    padding: 8px 10px;
    margin-top: 10px;
    background: #fff;
    font-size: 10pt;
    line-height: 1.3;
    color: #000 !important;
  }

}
