/* =================================================================
   SEITEN-THEMES (per Admin-Dashboard schaltbar)
   Klassen am <body>:  theme-weihnachten | theme-weihnachten-schnee
                       theme-schnee | theme-herbst
   Dekoration ist rein optisch (pointer-events:none) und klein gehalten.
   Die Zierleisten (.theme-decor) setzt js/theme.js oben in Karten ein.
   ================================================================= */

.theme-decor{
  position:absolute; left:0; right:0; top:0;
  pointer-events:none; z-index:3;
  background-repeat:repeat-x; background-position:left top;
}

/* ---------- Girlande (Weihnachten) ---------- */
body.theme-weihnachten .theme-decor,
body.theme-weihnachten-schnee .theme-decor,
.theme-preview-stage.theme-weihnachten .theme-decor,
.theme-preview-stage.theme-weihnachten-schnee .theme-decor{
  height:30px;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='30' viewBox='0 0 120 30'><path d='M0 4 Q30 24 60 4 Q90 24 120 4' fill='none' stroke='%232f5d3a' stroke-width='2.2'/><g stroke='%23ffffff' stroke-opacity='.35' stroke-width='.6'><circle cx='15' cy='14.5' r='3.4' fill='%23c0392b'/><circle cx='30' cy='17' r='3.4' fill='%23e3b341'/><circle cx='45' cy='14.5' r='3.4' fill='%232e8b57'/><circle cx='75' cy='14.5' r='3.4' fill='%232f6fb0'/><circle cx='90' cy='17' r='3.4' fill='%23c0392b'/><circle cx='105' cy='14.5' r='3.4' fill='%23e3b341'/></g></svg>");
}

/* Girlande unter dem fixen Header */
body.theme-weihnachten .site-header::after,
body.theme-weihnachten-schnee .site-header::after,
.theme-preview-stage.theme-weihnachten .preview-header::after,
.theme-preview-stage.theme-weihnachten-schnee .preview-header::after{
  content:""; position:absolute; left:0; right:0; top:100%;
  height:30px; pointer-events:none; background-repeat:repeat-x;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='30' viewBox='0 0 120 30'><path d='M0 4 Q30 24 60 4 Q90 24 120 4' fill='none' stroke='%232f5d3a' stroke-width='2.2'/><g stroke='%23ffffff' stroke-opacity='.35' stroke-width='.6'><circle cx='15' cy='14.5' r='3.4' fill='%23c0392b'/><circle cx='30' cy='17' r='3.4' fill='%23e3b341'/><circle cx='45' cy='14.5' r='3.4' fill='%232e8b57'/><circle cx='75' cy='14.5' r='3.4' fill='%232f6fb0'/><circle cx='90' cy='17' r='3.4' fill='%23c0392b'/><circle cx='105' cy='14.5' r='3.4' fill='%23e3b341'/></g></svg>");
}

/* ---------- Schneehauben (Schnee) ---------- */
body.theme-schnee .theme-decor,
.theme-preview-stage.theme-schnee .theme-decor{
  height:14px; top:-6px;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='14' viewBox='0 0 160 14'><path d='M0 0 H160 V6 Q150 14 138 7 Q126 2 116 8 Q104 15 92 7 Q80 1 68 8 Q56 14 44 6 Q32 1 20 8 Q10 13 0 6 Z' fill='%23ffffff' stroke='%23c9d8e6' stroke-width='.8'/></svg>");
}

/* ---------- Ostern (Frühlingsranke & Ostereier) ---------- */
body.theme-ostern .theme-decor,
body.theme-ostern .site-header::after,
.theme-preview-stage.theme-ostern .theme-decor,
.theme-preview-stage.theme-ostern .preview-header::after{
  height:30px;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='30' viewBox='0 0 140 30'><path d='M0 4 Q35 22 70 4 Q105 22 140 4' fill='none' stroke='%233e7a46' stroke-width='2'/><g stroke='%23ffffff' stroke-opacity='.45' stroke-width='.6'><ellipse cx='18' cy='14' rx='4.5' ry='6' fill='%23f9b4ab'/><ellipse cx='42' cy='17' rx='4.5' ry='6' fill='%23fde28e'/><ellipse cx='65' cy='14' rx='4.5' ry='6' fill='%23a8d8ea'/><ellipse cx='92' cy='14' rx='4.5' ry='6' fill='%23bbf1c8'/><ellipse cx='116' cy='17' rx='4.5' ry='6' fill='%23d8b4e2'/></g><circle cx='30' cy='10' r='2' fill='%23ffffff'/><circle cx='80' cy='9' r='2' fill='%23ffffff'/><circle cx='130' cy='9' r='2' fill='%23ffffff'/></svg>");
}
body.theme-ostern .site-header::after{
  content:""; position:absolute; left:0; right:0; top:100%;
  pointer-events:none; background-repeat:repeat-x;
}

/* ---------- Herbst (Blätter-Girlande) ---------- */
body.theme-herbst .theme-decor,
body.theme-herbst .site-header::after,
.theme-preview-stage.theme-herbst .theme-decor,
.theme-preview-stage.theme-herbst .preview-header::after{
  height:30px;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='30' viewBox='0 0 140 30'><path d='M0 4 Q35 22 70 4 Q105 22 140 4' fill='none' stroke='%236e4b33' stroke-width='2'/><ellipse cx='18' cy='13' rx='7' ry='3.6' transform='rotate(40 18 13)' fill='%23c8641c'/><ellipse cx='38' cy='16' rx='7' ry='3.6' transform='rotate(-30 38 16)' fill='%23b8860b'/><ellipse cx='55' cy='13' rx='7' ry='3.6' transform='rotate(45 55 13)' fill='%23a23b1d'/><ellipse cx='88' cy='13' rx='7' ry='3.6' transform='rotate(-40 88 13)' fill='%23d9822b'/><ellipse cx='108' cy='16' rx='7' ry='3.6' transform='rotate(30 108 16)' fill='%23a23b1d'/><ellipse cx='125' cy='13' rx='7' ry='3.6' transform='rotate(-45 125 13)' fill='%23b8860b'/></svg>");
}
body.theme-herbst .site-header::after,
.theme-preview-stage.theme-herbst .preview-header::after{
  content:""; position:absolute; left:0; right:0; top:100%;
  pointer-events:none; background-repeat:repeat-x;
}

/* ---------- Halloween (Kürbisse & Fledermäuse) ---------- */
body.theme-halloween .theme-decor,
body.theme-halloween .site-header::after,
.theme-preview-stage.theme-halloween .theme-decor,
.theme-preview-stage.theme-halloween .preview-header::after{
  height:30px;
  background-image:url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='150' height='30' viewBox='0 0 150 30'><path d='M0 5 Q38 24 75 5 Q112 24 150 5' fill='none' stroke='%23381e11' stroke-width='2.2'/><g><ellipse cx='22' cy='15' rx='6' ry='5' fill='%23ff7518'/><path d='M22 10 L23 8' stroke='%232a150c' stroke-width='1.5'/><circle cx='20' cy='14' r='.8' fill='%232a150c'/><circle cx='24' cy='14' r='.8' fill='%232a150c'/><path d='M65 14 Q70 10 75 13 Q76 11 77 13 Q82 10 87 14 Q81 18 76 16 Q71 18 65 14 Z' fill='%231f130b'/><ellipse cx='105' cy='16' rx='6' ry='5' fill='%23e65c00'/><path d='M105 11 L106 9' stroke='%232a150c' stroke-width='1.5'/><circle cx='103' cy='15' r='.8' fill='%232a150c'/><circle cx='107' cy='15' r='.8' fill='%232a150c'/><circle cx='138' cy='13' r='2' fill='%23f39c12'/></g></svg>");
}
body.theme-halloween .site-header::after{
  content:""; position:absolute; left:0; right:0; top:100%;
  pointer-events:none; background-repeat:repeat-x;
}

/* Header-Girlande Übergänge */
.site-header::after{
  transition: opacity .35s ease, transform .35s ease;
}

/* Auf der Startseite: Bei durchsichtigem Header (oben über dem Hintergrund-Video)
   Girlande am Header ausblenden; erst beim Runterscrollen (.is-solid) sanft einblenden */
body.page-home .site-header:not(.is-solid)::after,
body:has(#hero) .site-header:not(.is-solid)::after{
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  pointer-events: none;
}

/* Auf kleinen Bildschirmen Header-Dekoration ausblenden */
@media (max-width:640px){
  body[class*="theme-"] .site-header::after{ display:none; }
}

/* Fallender Schnee / Laub (Canvas aus theme.js) */
#themeCanvas{
  position:fixed; inset:0; width:100%; height:100%;
  pointer-events:none; z-index:400;
}

@media print{
  #themeCanvas, .theme-decor{ display:none !important; }
  body[class*="theme-"] .site-header::after{ display:none !important; }
}
