/* dsg-schiri.at – Template dsgschiri (auf Joomla-Core Bootstrap 5)
   Werte gemessen an der Helix-Ultimate-Seite (Preset 3 + Custom-CSS), Stand 10/2026. */

:root {
  --bs-body-color: #252525;
  --bs-body-color-rgb: 37, 37, 37;
  --bs-link-color: #2c5f24;
  --bs-link-color-rgb: 44, 95, 36;
  --bs-link-hover-color: #0d1a0c;
  --bs-link-hover-color-rgb: 13, 26, 12;
  --dsg-menu: #03a83a;
  --dsg-menu-hover: #030000;
  --dsg-menu-active: #063803;
  --dsg-footer: #2c5f25;
  --dsg-header-h: 60px;
}

/* --- Basis (Helix-Abweichungen zu Bootstrap 5.3) --- */
body {
  text-rendering: auto;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a {
  text-decoration: none;
  transition: color .4s, background-color .4s;
}
a:hover, a:focus, a:active { text-decoration: none; }
label { font-weight: normal; }
img { display: block; max-width: 100%; height: auto; }
iframe { max-width: 100%; }
.container { padding-left: 15px; padding-right: 15px; }
.row { --bs-gutter-x: 1.875rem; }

.dsg-skip {
  position: absolute;
  left: 15px;
  top: 10px;
  z-index: 2000;
  padding: 8px 14px;
  background: #fff;
  color: #252525;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .25);
}

/* --- Header --- */
#sp-header {
  position: relative;
  z-index: 99;
  height: var(--dsg-header-h);
  background: #fff;
  box-shadow: 0 0 4px 0 rgba(0, 0, 0, .1);
}
.dsg-header-row {
  display: flex;
  align-items: center;
  height: var(--dsg-header-h);
}
#sp-logo .logo {
  display: inline-flex;
  align-items: center;
  height: var(--dsg-header-h);
}
#sp-logo .logo-image { height: 36px; width: auto; }
#sp-menu { margin-left: 45px; }
.sp-megamenu-parent {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
}
.sp-megamenu-parent > li > a,
.sp-megamenu-parent > li > span {
  display: inline-block;
  padding: 0 15px;
  font-family: Arial, sans-serif;
  font-size: 14px;
  line-height: var(--dsg-header-h);
  color: var(--dsg-menu);
}
.sp-megamenu-parent > li:last-child > a { padding-right: 0; }
.sp-megamenu-parent > li > a:hover,
.sp-megamenu-parent > li > a:focus { color: var(--dsg-menu-hover); }
.sp-megamenu-parent > li.active > a {
  color: var(--dsg-menu-active);
  font-weight: 500;
}

/* Burger: Icon 25 px wie live, Tippfläche 44 px; rechte Icon-Kante bündig mit der Containerkante */
.dsg-burger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  margin: 0 -9.5px 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.dsg-burger span,
.dsg-close span {
  display: block;
  width: 25px;
  height: 2px;
  background: #000;
  border-radius: 1px;
}
.dsg-burger:focus-visible,
.dsg-close:focus-visible {
  outline: 2px solid var(--dsg-menu-active);
  outline-offset: 2px;
}

@media (max-width: 991.98px) {
  #sp-menu { display: none; }
}

/* --- Offcanvas (Bootstrap) --- */
.dsg-offcanvas {
  --bs-offcanvas-width: 300px;
  --bs-offcanvas-border-width: 0;
  --bs-offcanvas-bg: #fff;
}
.offcanvas-backdrop {
  background: rgba(0, 0, 0, .5);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.offcanvas-backdrop.show { opacity: 1; }
.dsg-close {
  position: absolute;
  top: 18px;
  right: 10px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.dsg-close span { position: absolute; left: 9.5px; top: 21px; }
.dsg-close span:first-child { transform: rotate(45deg); }
.dsg-close span:last-child { transform: rotate(-45deg); }
.dsg-offcanvas .offcanvas-body { padding: 81px 25px 25px; }
.dsg-offcanvas .menu {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0 0 15px;
  padding: 0;
}
.dsg-offcanvas .menu > li { font-weight: 600; }
.dsg-offcanvas .menu > li > a {
  display: block;
  padding: 10px 0;
  font-size: 18px;
  line-height: 18px;
  color: #252525;
  opacity: .7;
  transition: opacity .3s;
}
.dsg-offcanvas .menu > li > a:hover,
.dsg-offcanvas .menu > li > a:focus { opacity: 1; }
.dsg-offcanvas .menu > li.active > a { color: var(--dsg-menu-active); }

/* --- Seitenkopf (Rasenbild) --- */
#sp-section-1 {
  padding: 200px 0 0;
  background-color: transparent;
  background-image: var(--dsg-hero);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: 50% 100%;
}
.sp-page-title {
  padding: 30px 0;
  text-align: center;
  color: #fff;
}
.sp-page-title .hero-title,
.sp-page-title h1 {
  margin: 0;
  font-size: 50px;
  font-weight: 500;
  line-height: 1;
  color: #fff;
}
.sp-page-title .hero-subtitle {
  margin: 10px 0 0;
  font-size: 29px;
  font-weight: 700;
  line-height: 1;
  color: #fff;
}

/* --- Inhalt --- */
#sp-main-body {
  padding: 100px 0;
  background-image: var(--dsg-pattern);
}
#sp-component { padding-top: 10px; }

/* Beitragsnavigation (Helix-Maße) */
.pagenavigation {
  clear: both;
  display: flex;
  justify-content: space-between;
  padding: 2rem 0;
}
.pagenavigation .btn {
  padding: 5px 15px;
  font-size: 14px;
  border-radius: 4px;
}
.pagenavigation .next { margin-left: auto; }
.dsg-chevron {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-style: solid;
  border-color: currentColor;
  border-width: 0 2px 2px 0;
  vertical-align: 1px;
}
.dsg-chevron-left { transform: rotate(135deg); margin-right: 3px; }
.dsg-chevron-right { transform: rotate(-45deg); margin-left: 3px; }

/* Systemmeldungen wie Helix: unten rechts */
#system-message-container {
  position: fixed;
  right: 15px;
  bottom: 0;
  z-index: 9999;
  max-width: 350px;
}
#system-message-container joomla-alert { font-size: 13px; }

/* --- Footer --- */
#sp-footer {
  padding: 30px 0;
  background: var(--dsg-footer);
  border-top: 1px solid rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 14px;
}
#sp-footer a { color: #fff; }

/* --- Nach oben --- */
.sp-scroll-up {
  position: fixed;
  right: 30px;
  bottom: 60px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 100%;
  color: #fff;
  background: rgba(100, 100, 100, .4);
  transition: background-color .3s;
}
.sp-scroll-up[hidden] { display: none; }
.sp-scroll-up:hover,
.sp-scroll-up:focus { color: #fff; background: #000; }

/* --- Inhaltsbausteine aus den Beiträgen (vormals Helix-Custom-CSS) --- */
.b-btn-l {
  display: inline-block;
  margin-bottom: 20px;
  padding: 14px 32px;
  border: 1px solid #000;
}
.b-btn-l::before {
  content: url('/images/download.png');
  position: relative;
  top: 1px;
  padding-right: 10px;
}
.icon {
  float: left;
  width: 19px;
  height: 19px;
  margin: 7px 10px;
}
.icontext {
  position: relative;
  overflow: hidden;
  padding: 0 6px;
}
.mainbar {
  float: left;
  width: 65%;
  padding-right: 40px;
}
.sidebar {
  float: left;
  width: 35%;
}
.sidebar h4 { font-size: 17px; }
.mainbar::after, .item-page::after { content: ''; display: table; clear: both; }

/* Karte mit Zwei-Klick-Platzhalter (Plugin dsgkontakt, {dsgkarte}) */
.dsg-map {
  position: relative;
  height: 600px;
  background: #e5e3df;
}
.dsg-map iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}
.dsg-map-consent {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 100%;
  padding: 24px;
  text-align: center;
  color: #3c4043;
}
.dsg-map-consent svg { width: 40px; height: 40px; color: #c5221f; }
.dsg-map-consent p { max-width: 420px; margin: 0; font-size: 14px; }
.dsg-map-consent .btn {
  min-height: 44px;
  padding: 10px 22px;
  border: 0;
  border-radius: 4px;
  background: #e0e1e2;
  color: rgba(0, 0, 0, .6);
  font-size: 14px;
  font-weight: 700;
}
.dsg-map-consent .btn:hover { background: #cacbcd; color: rgba(0, 0, 0, .8); }

/* Kontaktformular (Optik wie bisher, Semantic-UI-Stil) */
.dsg-form { position: relative; margin: 0 0 14px; font-size: 14px; line-height: 21px; }
.dsg-form .dsg-field { margin: 0 0 14px; }
.dsg-form label {
  display: block;
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: rgba(0, 0, 0, .87);
}
.dsg-form input[type="text"],
.dsg-form input[type="email"],
.dsg-form select,
.dsg-form textarea {
  display: block;
  width: 100%;
  padding: 8px;
  font: inherit;
  font-size: 14px;
  line-height: 17px;
  color: rgba(0, 0, 0, .87);
  background: #fff;
  border: 1px solid rgba(34, 36, 38, .15);
  border-radius: 4px;
  box-shadow: none;
  transition: border-color .1s ease;
}
.dsg-form input[type="text"],
.dsg-form input[type="email"] { height: 35px; }
.dsg-form select { height: 38px; padding: 8px 32px 8px 12px; }
.dsg-form textarea { min-height: 114px; resize: vertical; }
.dsg-form input:focus,
.dsg-form select:focus,
.dsg-form textarea:focus {
  outline: 0;
  border-color: #85b7d9;
}
.dsg-form .dsg-invalid input,
.dsg-form .dsg-invalid select,
.dsg-form .dsg-invalid textarea { border-color: #e0b4b4; background: #fff6f6; }
.dsg-form .dsg-required label::after { content: ' *'; color: #db2828; }
.dsg-form .dsg-error { margin: 4px 0 0; font-size: 13px; color: #9f3a38; }
.dsg-form .dsg-privacy { margin: 0 0 14px; font-size: 13px; color: rgba(0, 0, 0, .6); }
.dsg-form .dsg-captcha { margin: 0 0 14px; }
.dsg-form button[type="submit"] {
  display: inline-block;
  min-height: 36px;
  padding: 11px 21px;
  border: 0;
  border-radius: 4px;
  background: #e0e1e2;
  color: rgba(0, 0, 0, .6);
  font-size: 14px;
  font-weight: 700;
  line-height: 14px;
  cursor: pointer;
}
.dsg-form button[type="submit"]:hover { background: #cacbcd; color: rgba(0, 0, 0, .8); }
.dsg-form .dsg-hp {
  position: absolute !important;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.dsg-form-success,
.dsg-form-failure {
  margin: 0 0 14px;
  padding: 14px 21px;
  border-radius: 4px;
  font-size: 14px;
}
.dsg-form-success { background: #fcfff5; color: #2c662d; box-shadow: inset 0 0 0 1px #a3c293; }
.dsg-form-failure { background: #fff6f6; color: #9f3a38; box-shadow: inset 0 0 0 1px #e0b4b4; }

/* --- Tablet / Mobil --- */
@media (max-width: 991.98px) {
  .mainbar, .sidebar {
    float: none;
    width: 100% !important;
    padding-right: 0;
  }
  .sidebar { margin-top: 30px; }
}

@media (max-width: 767.98px) {
  :root { --dsg-header-h: 50px; }
  #sp-section-1 {
    padding-top: 130px;
    background-image: var(--dsg-hero-sm);
  }
  .sp-page-title { padding: 24px 0 30px; text-shadow: 0 1px 4px rgba(0, 0, 0, .55); }
  .sp-page-title .hero-title,
  .sp-page-title h1 { font-size: clamp(34px, 10vw, 50px); line-height: 1.1; }
  .sp-page-title .hero-subtitle { margin-top: 8px; font-size: clamp(18px, 5.5vw, 29px); line-height: 1.2; }
  #sp-main-body { padding: 40px 0; }
  .dsg-map { height: 350px; }
  .b-btn-l {
    display: block;
    padding: 14px 20px;
    overflow-wrap: anywhere;
  }
  .pagenavigation .btn {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
  }
  .sp-scroll-up { right: 16px; bottom: 24px; width: 44px; height: 44px; }
  .dsg-form input[type="text"],
  .dsg-form input[type="email"],
  .dsg-form select,
  .dsg-form textarea { font-size: 16px; }
  .dsg-form input[type="text"],
  .dsg-form input[type="email"] { height: 44px; }
  .dsg-form select { height: 44px; }
  .dsg-form button[type="submit"] { min-height: 44px; width: 100%; }
  #system-message-container { left: 15px; max-width: none; }
}

@media (prefers-reduced-motion: reduce) {
  a, .sp-scroll-up, .dsg-offcanvas .menu > li > a { transition: none; }
}
.dsg-map-remember { display: flex; align-items: center; gap: 6px; font-size: 13px; cursor: pointer; }
.dsg-map-remember input { width: 18px; height: 18px; }

/* --- Feinabgleich nach Review (Helix-Werte) --- */
/* Platz des früheren Dropdown-Pfeils bei "Startseite" beibehalten, damit alle Einträge auf der Live-Position stehen */
.sp-megamenu-parent > li:first-child > a { padding-right: 31px; }
@media (min-width: 992px) and (max-width: 1199.98px) {
  .sp-megamenu-parent > li > a { padding: 0 10px; }
  .sp-megamenu-parent > li:first-child > a { padding-right: 26px; }
  .sp-megamenu-parent > li:last-child > a { padding: 0 0 0 15px; }
}

/* Footer bleibt unten, auch bei kurzen Seiten (z. B. Fehlerseite) */
body { display: flex; flex-direction: column; min-height: 100vh; }
#sp-main-body { flex: 1 0 auto; }

@media (max-width: 767.98px) {
  .b-btn-c > br { display: none; }
  .is-home .sp-page-title .hero-title { font-size: clamp(28px, 8.5vw, 50px); }
}

/* Touch-Geräte (auch Tablets): Tippflächen mindestens 44 px, Optik mit Maus unverändert */
@media (pointer: coarse) {
  .pagenavigation .btn { display: inline-flex; align-items: center; min-height: 44px; }
  .dsg-form input[type="text"],
  .dsg-form input[type="email"],
  .dsg-form select { height: 44px; }
  .dsg-form button[type="submit"] { min-height: 44px; }
  .dsg-offcanvas .menu > li > a { padding: 13px 0; }
  .dsg-map-remember { min-height: 44px; }
  .dsg-form altcha-widget { display: block; max-width: 100%; }
  .dsg-form altcha-widget label { padding: 12px 0; }
}

/* ======================================================================
 * Mobil-Optimierung (plan-mobil.md). Nur < 992 px bzw. Querformat –
 * Desktop bleibt unverändert. Hier nichts ohne max-width-Query ergänzen.
 * ==================================================================== */
@media (max-width: 991.98px) {
  /* Formular: 16 px gegen iOS-Zoom, 44 px Tippflächen, lesbare Beschriftungen */
  .dsg-form { font-size: 15px; }
  .dsg-form label { font-size: 15px; }
  .dsg-form .dsg-privacy,
  .dsg-form .dsg-error,
  .dsg-map-remember { font-size: 14px; }
  .dsg-form input[type="text"],
  .dsg-form input[type="email"],
  .dsg-form select,
  .dsg-form textarea { font-size: 16px; }
  .dsg-form input[type="text"],
  .dsg-form input[type="email"],
  .dsg-form select { height: 44px; }
  .dsg-form button[type="submit"] { min-height: 44px; width: 100%; font-size: 16px; }
  .dsg-form altcha-widget { display: block; max-width: none; }
  .dsg-form altcha-widget .altcha { max-width: none; width: 100%; }
  .dsg-map-wrap { margin-bottom: 24px; }
  .dsg-map { height: 360px; height: min(360px, 50svh); }
  #dsg-kontakt { scroll-margin-top: 16px; }

  /* Seitenkopf: Verlauf unter dem Titel, damit er auf der Kreidelinie lesbar bleibt */
  #sp-section-1 {
    background-image: linear-gradient(rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .45)), var(--dsg-hero);
    background-size: cover, cover;
    background-position: 50% 100%, 50% 100%;
  }
  .sp-page-title { text-shadow: 0 1px 4px rgba(0, 0, 0, .55); }

  /* Kontakt: Seitenverhältnis-Trick des alten Baukastens erzeugt ein Loch unter dem Bild; Logo zentrieren */
  .itemid-109 .b-img-c[style*="padding-bottom"] { padding-bottom: 0 !important; }
  .itemid-109 .sidebar .b-img-c img { margin-inline: auto; max-width: min(100%, 320px); }

  /* Startseite: leerer Claim-Absatz und Leer-Umbrüche vor Logo und Text; "Zurück" führt hier ins Leere */
  .is-home .h-c-b-i > p:first-child,
  .is-home .b-text-c > p > br:first-child,
  .is-home .b-text-c > p > span > br:first-child,
  .is-home .b-text-c span > br:last-child,
  .is-home .pagenavigation { display: none; }

  /* Team: Leerzeile nach jeder Funktion weg, Name/Funktion klar abgestuft */
  .itemid-102 .com-content-article__body h3 > br:nth-last-child(-n+2) { display: none; }
  .itemid-102 .com-content-article__body h2 + h3 {
    margin: 4px 0 1.5rem;
    font-size: 17px;
    font-weight: 400;
    line-height: 1.4;
    color: #555;
  }

  /* Datenschutz: Abschnitte erkennbar */
  .itemid-104 .com-content-article__body h2:not(:first-child) { margin-top: 1.75rem; }

  /* Infozone: Linkliste als Tippziele, Leerabsätze weg, keine Blocksatz-Überschrift */
  .itemid-103 .com-content-article__body ul { list-style: none; padding-left: 0; }
  .itemid-103 .com-content-article__body ul li a {
    display: block;
    padding: 11px 0;
    border-bottom: 1px solid #e6e6e6;
  }
  .itemid-103 .com-content-article__body > p:first-child,
  .itemid-103 .b-text-c > ul + p,
  .itemid-103 .com-content-article__body section > h2 + br { display: none; }
  .itemid-103 h2.wnd-align-justify { text-align: left; }
  .itemid-103 .com-content-article__body section + section > h2:first-child { margin-top: 2rem; }

  /* Menü (Offcanvas): aktive Seite deutlich, bei 320 px Rand zum Schließen */
  .dsg-offcanvas { --bs-offcanvas-width: min(300px, 85vw); }
  .dsg-offcanvas .menu > li.active > a {
    opacity: 1;
    font-weight: 700;
    padding-left: 12px;
    box-shadow: inset 3px 0 0 var(--dsg-menu-active);
  }

  /* Tippflächen */
  #sp-logo .logo { min-width: 44px; }
  .sp-scroll-up {
    right: 16px;
    bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    width: 44px;
    height: 44px;
  }
  .error-page .btn { display: inline-flex; align-items: center; min-height: 44px; }
}

/* Smartphone quer: Seitenkopf und Karte dürfen den Bildschirm nicht füllen */
@media (max-width: 991.98px) and (max-height: 500px) {
  #sp-section-1 { padding-top: 70px; }
  .sp-page-title { padding: 16px 0 20px; }
  #sp-main-body { padding-top: 30px; }
  .dsg-map { height: 300px; }
}

@media (max-width: 767.98px) {
  #sp-section-1 { background-image: linear-gradient(rgba(0, 0, 0, 0) 35%, rgba(0, 0, 0, .45)), var(--dsg-hero-sm); }
  .dsg-map { height: 340px; }
  .sp-page-title h1,
  .sp-page-title .hero-subtitle,
  .com-content-article__body h2 { hyphens: auto; overflow-wrap: break-word; }
}
