/* Abschlussgestaltung: handgezeichnete Doppel-Unterstreichungen */
.dsm_text_notation .dsm-text-notation-middle,
.legal-shell h1 {
  position: relative;
  display: inline-block;
  border-bottom: 0 !important;
  padding-bottom: 10px;
}

.dsm_text_notation .dsm-text-notation-middle::before,
.dsm_text_notation .dsm-text-notation-middle::after,
.legal-shell h1::before,
.legal-shell h1::after {
  content: "";
  position: absolute;
  z-index: 1;
  left: -1%;
  width: 102%;
  height: 7px;
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.15s cubic-bezier(.22,.72,.18,1);
}

.dsm_text_notation .dsm-text-notation-middle::before,
.legal-shell h1::before {
  bottom: 3px;
  background: center / 100% 100% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 8' preserveAspectRatio='none'%3E%3Cpath d='M3 4 C88 1 143 7 220 4 S372 1 455 5 S548 2 597 4' fill='none' stroke='%235e5e4e' stroke-width='1.35' stroke-linecap='round'/%3E%3C/svg%3E");
}

.dsm_text_notation .dsm-text-notation-middle::after,
.legal-shell h1::after {
  bottom: -2px;
  background: center / 100% 100% no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 600 8' preserveAspectRatio='none'%3E%3Cpath d='M5 4 C77 1 151 7 231 4 S388 2 468 5 S554 2 595 4' fill='none' stroke='%235e5e4e' stroke-width='1.15' stroke-linecap='round'/%3E%3C/svg%3E");
  transition-delay: .72s;
}

.dsm_text_notation .dsm-text-notation-middle.underline-drawn::before,
.dsm_text_notation .dsm-text-notation-middle.underline-drawn::after,
.legal-shell h1.underline-drawn::before,
.legal-shell h1.underline-drawn::after {
  clip-path: inset(0 0 0 0);
}

/* Der Footer folgt exakt der normalen 80-Prozent-Inhaltsbreite der Seite. */
.canicanum-footer-inner {
  width: 80% !important;
  max-width: 1920px !important;
}

@media (max-width: 767px) {
  .canicanum-footer-inner { width: 88% !important; }
}

/* Mobile Darstellung */
@media (max-width: 980px) {
  html body #page-container { padding-top: 64px !important; }
  html body header#main-header,
  html body header#main-header.et-fixed-header {
    position: fixed !important;
    top: 0 !important;
    width: 100% !important;
    height: 64px !important;
    min-height: 64px !important;
    background: #d1d1ba !important;
  }
  #main-header .container.et_menu_container {
    width: 90% !important;
    height: 64px !important;
    min-height: 64px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
  }
  #main-header .logo_container {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    width: 46px !important;
    height: 58px !important;
  }
  #main-header .logo_container a { display: flex !important; align-items: center !important; }
  #main-header #logo {
    display: block !important;
    width: 44px !important;
    height: 44px !important;
    max-width: 44px !important;
    max-height: 44px !important;
    object-fit: contain !important;
  }
  #main-header #et-top-navigation {
    position: static !important;
    float: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-end !important;
    width: auto !important;
    height: 64px !important;
    padding: 0 !important;
  }
  #main-header #et_mobile_nav_menu { margin: 0 !important; }
  #main-header .mobile_nav { width: 44px !important; height: 52px !important; }
  #main-header .mobile_menu_bar {
    position: static !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 44px !important;
    height: 52px !important;
    padding: 0 !important;
  }
  #main-header .mobile_menu_bar::before { font-size: 29px !important; }
  #main-header .select_page { display: none !important; }
  #main-header .et_mobile_menu {
    position: fixed !important;
    top: 64px !important;
    left: auto !important;
    right: 0 !important;
    width: min(90vw, 370px) !important;
    max-height: calc(100vh - 64px) !important;
    padding: 12px 0 !important;
    background: #f7f5ef !important;
    border-top: 2px solid #5e5e4e !important;
    box-shadow: 0 10px 25px rgba(0,0,0,.18) !important;
  }
  #main-header .et_mobile_menu li a {
    padding: 12px 20px !important;
    font-size: 14px !important;
    line-height: 1.35 !important;
  }
}

@media (max-width: 767px) {
  /* Die Linie richtet sich nur nach dem sichtbaren Text, niemals nach der Zeile. */
  .dsm_text_notation .dsm-text-notation-main { width: 100% !important; }
  .dsm_text_notation .dsm-text-notation-middle,
  .legal-shell h1 {
    width: fit-content !important;
    max-width: calc(100vw - 48px) !important;
    font-size: 28px !important;
    line-height: 1.18 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
  }

  /* Kompakter Einstieg und Willkommensbereich der Startseite. */
  .home .et_pb_section_0.et_pb_section {
    padding-top: 20px !important;
    margin-bottom: 0 !important;
  }
  .home .et_pb_section_0 .et_pb_row_0 {
    margin-top: 0 !important;
    padding: 8px 0 24px !important;
  }
  .home .et_pb_section_0 .et_pb_image_0 {
    width: 64% !important;
    max-width: 310px !important;
    margin: 0 auto -14px !important;
  }
  .home .et_pb_section_0 .et_pb_text_0 {
    margin: 4px 0 0 !important;
    padding-bottom: 12px !important;
  }
  .home .et_pb_section_0 .et_pb_text_1 {
    margin: 0 !important;
    padding-top: 5px !important;
  }
  .home .et_pb_section_0 .et_pb_text_1 h2 {
    font-size: 15px !important;
    line-height: 1.45 !important;
    letter-spacing: .6px !important;
  }
  .home .et_pb_section_1.et_pb_section { padding: 22px 0 24px !important; }
  .home .et_pb_section_1 .et_pb_row_1 {
    width: 88% !important;
    margin: 0 auto !important;
    padding: 0 !important;
  }
  .home .et_pb_section_1 .et_pb_text_2 {
    margin: 0 0 12px !important;
    padding: 0 !important;
  }
  .home .et_pb_section_1 .et_pb_text_2 h2 {
    font-size: 25px !important;
    line-height: 1.25 !important;
  }
  .home .et_pb_section_1 .et_pb_text_3 {
    min-height: 0 !important;
    margin: 0 0 18px !important;
    line-height: 1.4em !important;
  }
  .home .et_pb_section_1 .et_pb_text_3 .et_pb_text_inner {
    display: block !important;
  }
  .home .et_pb_section_1 .et_pb_text_3 p { padding: 0 !important; }
  .home .et_pb_section_1 .et_pb_text_4,
  .home .et_pb_section_1 .et_pb_text_5 {
    margin: 0 0 14px !important;
    font-size: 16px !important;
    line-height: 1.55em !important;
  }
  .home .et_pb_section_2 .et_pb_row_2 {
    width: 88% !important;
    padding: 36px 0 12px !important;
  }

  /* Servicekarten auf dem Handy ruhiger, kompakter und vollständig sichtbar. */
  .home .et_pb_section_3 .et_pb_row_3 { width: 88% !important; padding: 14px 0 !important; }
  .home .et_pb_section_3 .et_pb_column_5,
  .home .et_pb_section_3 .et_pb_column_6,
  .home .et_pb_section_3 .et_pb_column_7,
  .home .et_pb_section_3 .et_pb_column_8 {
    min-height: 0 !important;
    margin-bottom: 24px !important;
  }
  .home .et_pb_section_3 .et_pb_blurb_0,
  .home .et_pb_section_3 .et_pb_blurb_1,
  .home .et_pb_section_3 .et_pb_blurb_2,
  .home .et_pb_section_3 .et_pb_blurb_3 {
    min-height: 0 !important;
    padding: 20px 18px 10px !important;
  }
  .home .et_pb_section_3 .et_pb_main_blurb_image .et_pb_image_wrap,
  .home .et_pb_section_3 .et_pb_main_blurb_image img {
    width: 112px !important;
    height: 112px !important;
  }

  /* Dozentenboxen: kleinere Bilder und ausgewogene Innenabstände. */
  .home .et_pb_section_5 .et_pb_row_5 { width: 90% !important; padding: 44px 0 22px !important; }
  .home .et_pb_section_5 .et_pb_testimonial { padding: 20px !important; }
  .home .et_pb_section_5 .et_pb_testimonial_portrait {
    width: 112px !important;
    height: 112px !important;
    margin: 0 auto 16px !important;
  }
  .home .et_pb_section_5 .et_pb_testimonial_content { font-size: 15px !important; line-height: 1.5 !important; }

  /* Anbieterlogos bleiben in kompakten Zweiergruppen statt einer langen Spalte. */
  .provider-logo-grid,
  .provider-logo-grid.logos-2,
  .provider-logo-grid.logos-3 {
    grid-template-columns: repeat(2, minmax(0, 116px)) !important;
    justify-content: center !important;
    gap: 18px 14px !important;
    width: 100% !important;
    max-width: 260px !important;
    margin: 0 auto 24px !important;
  }
  .provider-logo-grid.logos-1 { grid-template-columns: 116px !important; }
  .provider-logo-card { width: 116px !important; }
  .provider-logo-card > a:first-child,
  .provider-logo-card img { width: 98px !important; height: 98px !important; }
  .provider-logo-link {
    max-width: 116px !important;
    margin-top: 9px !important;
    padding: 6px 8px !important;
    font-size: 12px !important;
    line-height: 1.25 !important;
  }

  .et_pb_scroll_top { right: 8px !important; transform: scale(.82); transform-origin: right center; }
}

@media (prefers-reduced-motion: reduce) {
  .dsm_text_notation .dsm-text-notation-middle::before,
  .dsm_text_notation .dsm-text-notation-middle::after,
  .legal-shell h1::before,
  .legal-shell h1::after {
    clip-path: inset(0 0 0 0);
    transition: none;
  }
}

/* Fachseiten: Thema und Überschrift stehen zuerst, die beteiligten
   Fachbetriebe folgen als eigener, zurückhaltender Informationsbereich. */
:is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
  .et_pb_section_0 .et_pb_column_0 {
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
}

:is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
  .et_pb_section_0 .et_pb_column_0 > * { order: 4; }

:is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
  .et_pb_section_0 .et_pb_column_0 > .dsm_text_notation_0 { order: 1; }

:is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
  .et_pb_section_0 .et_pb_column_0 > .et_pb_text_0 { order: 2; }

:is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
  .et_pb_section_0 .et_pb_column_0 > .provider-logo-grid { order: 3; }

:is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
  .provider-logo-grid {
  display: grid !important;
  width: 100% !important;
  max-width: none !important;
  gap: 12px !important;
  margin: 30px 0 34px !important;
  padding: 20px !important;
  box-sizing: border-box !important;
  background: rgba(255,255,255,.52) !important;
  border: 1px solid rgba(94,94,78,.2) !important;
  border-radius: 16px !important;
  box-shadow: 0 6px 18px rgba(47,72,88,.10) !important;
}

:is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
  .provider-logo-grid.logos-1 { grid-template-columns: minmax(0, 1fr) !important; }
:is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
  .provider-logo-grid.logos-2 { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
:is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
  .provider-logo-grid.logos-3 { grid-template-columns: repeat(3,minmax(0,1fr)) !important; }

.provider-section-title {
  grid-column: 1 / -1;
  margin: 0 0 7px !important;
  padding: 0 0 9px !important;
  color: #5e5e4e !important;
  border-bottom: 1px solid rgba(94,94,78,.35);
  font-family: 'Aboreto','Nunito',Arial,sans-serif !important;
  font-size: 18px !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
}

:is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
  .provider-logo-card {
  display: grid !important;
  grid-template-columns: 66px minmax(0,1fr) !important;
  grid-template-rows: auto auto !important;
  align-items: center !important;
  column-gap: 12px !important;
  width: auto !important;
  min-width: 0 !important;
  padding: 11px !important;
  box-sizing: border-box !important;
  text-align: left !important;
  background: rgba(255,255,255,.76) !important;
  border: 1px solid rgba(94,94,78,.13) !important;
  border-radius: 12px !important;
}

:is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
  .provider-logo-card > a:first-child {
  grid-column: 1;
  grid-row: 1 / 3;
  display: block !important;
  width: 66px !important;
  height: 66px !important;
}

:is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
  .provider-logo-card img {
  width: 66px !important;
  height: 66px !important;
  object-fit: contain !important;
}

:is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
  .provider-logo-link {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  display: inline !important;
  width: fit-content !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #2f4858 !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.3 !important;
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 3px !important;
}

.provider-logo-role {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  margin: 3px 0 0 !important;
  padding: 0 !important;
  color: #5f6668;
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 1180px) and (min-width: 768px) {
  :is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
    .provider-logo-grid.logos-3 { grid-template-columns: 1fr !important; }
  :is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
    .provider-logo-grid.logos-2 { grid-template-columns: 1fr !important; }
}

@media (max-width: 767px) {
  :is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
    .provider-logo-grid,
  :is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
    .provider-logo-grid.logos-1,
  :is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
    .provider-logo-grid.logos-2,
  :is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
    .provider-logo-grid.logos-3 {
    grid-template-columns: 1fr !important;
    width: 100% !important;
    max-width: none !important;
    gap: 10px !important;
    margin: 22px 0 28px !important;
    padding: 15px !important;
  }
  .provider-section-title { font-size: 16px !important; }
  :is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
    .provider-logo-card {
    grid-template-columns: 58px minmax(0,1fr) !important;
    padding: 10px !important;
  }
  :is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
    .provider-logo-card > a:first-child,
  :is(.page-kynologie,.page-tiergestuetzte-foerderung,.page-therapiebegleithunde,.page-kopfruhe)
    .provider-logo-card img {
    width: 58px !important;
    height: 58px !important;
  }
}
/* Tastaturzugang: Sprunglink bleibt unsichtbar, bis er fokussiert wird. */
.canicanum-skip-link{
  position:fixed;
  left:16px;
  top:12px;
  z-index:100000;
  transform:translateY(-180%);
  padding:10px 16px;
  border-radius:8px;
  background:#fff;
  color:#2f423f;
  box-shadow:0 3px 16px rgba(0,0,0,.24);
  font-weight:700;
}
.canicanum-skip-link:focus{transform:translateY(0);outline:3px solid #71834f;outline-offset:3px}

/* Deutlich sichtbarer Fokus für Tastaturbedienung. */
a:focus-visible,button:focus-visible,[role="button"]:focus-visible,input:focus-visible{
  outline:3px solid #71834f!important;
  outline-offset:4px!important;
}
