/*
 * Designsystem „Schulheft + Marktplatz“ – Impressum und Datenschutz (body.gsr-sh-rechtstext, Familie „seite“).
 * Eingebunden von gsr-restseiten.php nach gsr-schulheft-seiten.css (29.09.2026, Wunsch Alex: lange Texte aufs
 * geknitterte Blatt, links Ringbindung). Löst dort „ruhiges Papier ohne Deko“ ab; Aufbau aus seiten.css bleibt:
 * Kopf = h1.gsr-modern-legal-title, Text = das nächste Element, beide zusammen ein Blatt.
 */

.gsr-sh-rechtstext #wp--skip-link--target#wp--skip-link--target > .entry-content > :is(h1.gsr-modern-legal-title, h1.gsr-modern-legal-title + *) {
  background-color: var(--sh-paper) !important;
  background-image:
    linear-gradient(90deg, transparent calc(var(--sh-margin) - 14px), var(--sh-margin-line) calc(var(--sh-margin) - 14px), var(--sh-margin-line) calc(var(--sh-margin) - 12px), transparent calc(var(--sh-margin) - 12px)),
    linear-gradient(rgba(255, 253, 251, .8), rgba(255, 253, 251, .8)),
    url("motive/papier-knitter.webp") !important;
  background-position: 0 0, 0 0, -40px -24px !important;
  background-repeat: no-repeat, no-repeat, repeat !important;
  background-size: 100% 100%, 100% 100%, 1200px 800px !important;
  background-blend-mode: normal, normal, multiply !important;
  overflow: visible !important;
  position: relative !important;
}

/* Ringheft wie in den Blogbeiträgen: Lochung mit Drahtschlaufen über die linke Kante, durchgehend über Kopf und Text */
.gsr-sh-rechtstext #wp--skip-link--target#wp--skip-link--target > .entry-content > :is(h1.gsr-modern-legal-title, h1.gsr-modern-legal-title + *)::before {
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='30' viewBox='0 0 40 30'%3E%3Cdefs%3E%3CclipPath id='l'%3E%3Ccircle cx='28' cy='15' r='3.6'/%3E%3C/clipPath%3E%3C/defs%3E%3Cpath d='M20 23.5C9 24 3.5 19.5 4 15S10 7 20 7.5' fill='none' stroke='rgba(63,52,54,.2)' stroke-width='2.6' transform='translate(1.2 1.6)'/%3E%3Cpath d='M20 23.5C9 24 3.5 19.5 4 15S10 7 20 7.5' fill='none' stroke='%2365575a' stroke-width='2.4'/%3E%3Cpath d='M18.5 22.2C10 22.5 5.3 19 5.5 15' fill='none' stroke='%23fff' stroke-opacity='.6' stroke-width='.8' stroke-linecap='round'/%3E%3Ccircle cx='28' cy='15' r='3.6' fill='%23e6dfd9' stroke='%233f3436' stroke-width='1.2'/%3E%3Cpath d='M23.5 15.9Q26 15.4 28.6 15.1' fill='none' stroke='%2365575a' stroke-width='2.4' stroke-linecap='round' clip-path='url(%23l)'/%3E%3Cpath d='M25.2 13.2a3.6 3.6 0 0 1 3.4-1.8' fill='none' stroke='rgba(63,52,54,.35)' stroke-width='1.2'/%3E%3C/svg%3E") 0 0 / 40px 30px repeat-y;
  bottom: 0;
  content: "";
  left: -20px;
  pointer-events: none;
  position: absolute;
  top: 0;
  width: 40px;
}

.gsr-sh-rechtstext #wp--skip-link--target#wp--skip-link--target > .entry-content > h1.gsr-modern-legal-title::before {
  top: 22px;
}

.gsr-sh-rechtstext #wp--skip-link--target#wp--skip-link--target > .entry-content > h1.gsr-modern-legal-title + *::before {
  bottom: 22px;
}

@media (max-width: 959px) {
  .gsr-sh-rechtstext #wp--skip-link--target#wp--skip-link--target > .entry-content > :is(h1.gsr-modern-legal-title, h1.gsr-modern-legal-title + *) {
    --sh-margin: 44px;
    padding-left: 52px !important;
    padding-right: 14px !important;
  }

  .gsr-sh-rechtstext #wp--skip-link--target#wp--skip-link--target > .entry-content > :is(h1.gsr-modern-legal-title, h1.gsr-modern-legal-title + *)::before {
    background-size: 32px 24px;
    left: -16px;
    width: 32px;
  }
}
