/* Kinderclowns: Gestaltung aus der Verwaltung (Animationen, Hover-Effekte). Nur CSS, keine Fremdquellen. */
[data-kc-in], [data-kc-loop] { animation: var(--kc-a1, kc-none 0s), var(--kc-a2, kc-none 0s); }
[data-kc-in].kc-play { --kc-a1: var(--kc-in-name) var(--kc-dur, .8s) cubic-bezier(.16, 1, .3, 1) var(--kc-delay, 0s) both; }
[data-kc-loop] { --kc-a2: var(--kc-loop-name) var(--kc-loop-dur, 2.4s) ease-in-out var(--kc-delay, 0s) infinite; }
.kc-js [data-kc-in]:not(.kc-play) { opacity: 0 !important; }
.js .reveal[data-kc-in] { transform: none; transition: none; }
.js .reveal[data-kc-in].kc-play { opacity: 1; }

[data-kc-in="fade"] { --kc-in-name: kc-in-fade; }
[data-kc-in="up"] { --kc-in-name: kc-in-up; }
[data-kc-in="down"] { --kc-in-name: kc-in-down; }
[data-kc-in="left"] { --kc-in-name: kc-in-left; }
[data-kc-in="right"] { --kc-in-name: kc-in-right; }
[data-kc-in="zoom"] { --kc-in-name: kc-in-zoom; }
[data-kc-in="pop"] { --kc-in-name: kc-in-pop; }
[data-kc-in="flip"] { --kc-in-name: kc-in-flip; }
[data-kc-in="spin"] { --kc-in-name: kc-in-spin; }
[data-kc-in="blur"] { --kc-in-name: kc-in-blur; }
[data-kc-in="drop"] { --kc-in-name: kc-in-drop; }
@keyframes kc-in-fade { from { opacity: 0; } }
@keyframes kc-in-up { from { opacity: 0; transform: translateY(60px); } }
@keyframes kc-in-down { from { opacity: 0; transform: translateY(-60px); } }
@keyframes kc-in-left { from { opacity: 0; transform: translateX(-80px); } }
@keyframes kc-in-right { from { opacity: 0; transform: translateX(80px); } }
@keyframes kc-in-zoom { from { opacity: 0; transform: scale(.6); } }
@keyframes kc-in-pop { 0% { opacity: 0; transform: scale(.3); } 60% { opacity: 1; transform: scale(1.12); } 80% { transform: scale(.96); } }
@keyframes kc-in-flip { from { opacity: 0; transform: perspective(800px) rotateY(80deg); } }
@keyframes kc-in-spin { from { opacity: 0; transform: rotate(-200deg) scale(.4); } }
@keyframes kc-in-blur { from { opacity: 0; filter: blur(14px); } }
@keyframes kc-in-drop { 0% { opacity: 0; transform: translateY(-120px); } 60% { opacity: 1; transform: translateY(12px); } 80% { transform: translateY(-6px); } }

[data-kc-loop="float"] { --kc-loop-name: kc-loop-float; }
[data-kc-loop="wobble"] { --kc-loop-name: kc-loop-wobble; }
[data-kc-loop="pulse"] { --kc-loop-name: kc-loop-pulse; }
[data-kc-loop="swing"] { --kc-loop-name: kc-loop-swing; transform-origin: top center; }
[data-kc-loop="spin"] { --kc-loop-name: kc-loop-spin; --kc-loop-dur: 8s; }
[data-kc-loop="bounce"] { --kc-loop-name: kc-loop-bounce; }
[data-kc-loop="heartbeat"] { --kc-loop-name: kc-loop-heart; }
[data-kc-loop="jelly"] { --kc-loop-name: kc-loop-jelly; }
[data-kc-loop="shake"] { --kc-loop-name: kc-loop-shake; }
@keyframes kc-loop-float { 50% { transform: translateY(-12px); } }
@keyframes kc-loop-wobble { 25% { transform: rotate(-4deg); } 75% { transform: rotate(4deg); } }
@keyframes kc-loop-pulse { 50% { transform: scale(1.07); } }
@keyframes kc-loop-swing { 25% { transform: rotate(6deg); } 75% { transform: rotate(-6deg); } }
@keyframes kc-loop-spin { to { transform: rotate(360deg); } }
@keyframes kc-loop-bounce { 0%, 100% { transform: translateY(0); animation-timing-function: cubic-bezier(.3, 0, .7, .5); } 50% { transform: translateY(-22px); animation-timing-function: cubic-bezier(.3, .5, .7, 1); } }
@keyframes kc-loop-heart { 0%, 40%, 100% { transform: scale(1); } 10%, 30% { transform: scale(1.1); } 20% { transform: scale(.98); } }
@keyframes kc-loop-jelly { 0%, 100% { transform: scale(1, 1); } 30% { transform: scale(1.12, .88); } 50% { transform: scale(.92, 1.08); } 70% { transform: scale(1.04, .96); } }
@keyframes kc-loop-shake { 0%, 100% { transform: none; } 10%, 30%, 50% { transform: translateX(-4px) rotate(-1deg); } 20%, 40% { transform: translateX(4px) rotate(1deg); } 60% { transform: none; } }

@media (hover: hover) {
  [data-kc-hover] { transition: transform .35s cubic-bezier(.16, 1, .3, 1), box-shadow .35s, filter .35s; }
  [data-kc-hover="grow"]:hover { transform: scale(1.07); }
  [data-kc-hover="lift"]:hover { transform: translateY(-8px); box-shadow: 8px 12px 0 var(--shadow, #1b1c22); }
  [data-kc-hover="tilt"]:hover { transform: rotate(-3deg) scale(1.03); }
  [data-kc-hover="wiggle"]:hover { animation: kc-loop-shake .6s ease-in-out; }
  [data-kc-hover="glow"]:hover { filter: drop-shadow(0 0 14px rgba(245, 197, 24, .9)); }
}
@media (prefers-reduced-motion: reduce) {
  [data-kc-in], [data-kc-loop], [data-kc-hover]:hover { animation: none !important; }
  .kc-js [data-kc-in]:not(.kc-play) { opacity: 1 !important; }
}

/* Kachelgröße aus der Verwaltung (Raster/Galerie); schmale Bildschirme fallen sicher auf eine Spalte zurück */
[data-kc-w="1"] { grid-column: auto !important; }
[data-kc-w="2"] { grid-column: span 2 !important; }
[data-kc-w="3"] { grid-column: span 3 !important; }
[data-kc-w="full"] { grid-column: 1 / -1 !important; column-span: all; margin-bottom: 18px; }
[data-kc-h="1"] { grid-row: auto !important; }
[data-kc-h="2"] { grid-row: span 2 !important; }
[data-kc-h="3"] { grid-row: span 3 !important; }
[data-kc-h="2"] .media, [data-kc-h="3"] .media, [data-kc-w="full"] .media { aspect-ratio: auto !important; flex: 1; min-height: 320px; }
[data-kc-w="full"] .media { min-height: 420px; }
@media (max-width: 900px) { [data-kc-w="3"] { grid-column: 1 / -1 !important; } }
@media (max-width: 640px) {
  [data-kc-w="2"], [data-kc-w="3"] { grid-column: auto !important; }
  [data-kc-h] { grid-row: auto !important; }
  [data-kc-h] .media, [data-kc-w="full"] .media { min-height: 0; aspect-ratio: 4 / 3 !important; }
}

/* Lücken im Raster automatisch auffüllen, sobald Kacheln vergrößert wurden */
:not(.strip):has(> [data-kc-w], > [data-kc-h]) { grid-auto-flow: row dense; }

/* Formen aus der Verwaltung (nur auf Wunsch): Foto als Herz, Stern, Luftballon … */
img[data-kc-shape="heart"] { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 92C22 72 2 54 2 31 2 14 14 3 29 3c9 0 16 5 21 12C55 8 62 3 71 3c15 0 27 11 27 28 0 23-20 41-48 61z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 92C22 72 2 54 2 31 2 14 14 3 29 3c9 0 16 5 21 12C55 8 62 3 71 3c15 0 27 11 27 28 0 23-20 41-48 61z'/%3E%3C/svg%3E") center / contain no-repeat; }
img[data-kc-shape="star"] { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 3l13.6 30.4 33.1 3.4-24.8 22.3 7 32.6L50 75.3 21.1 91.7l7-32.6L3.3 36.8l33.1-3.4z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 3l13.6 30.4 33.1 3.4-24.8 22.3 7 32.6L50 75.3 21.1 91.7l7-32.6L3.3 36.8l33.1-3.4z'/%3E%3C/svg%3E") center / contain no-repeat; }
img[data-kc-shape="balloon"] { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 2c25 0 41 19 41 41 0 23-18 40-35 42l5 11H39l5-11C27 83 9 66 9 43 9 21 25 2 50 2z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 2c25 0 41 19 41 41 0 23-18 40-35 42l5 11H39l5-11C27 83 9 66 9 43 9 21 25 2 50 2z'/%3E%3C/svg%3E") center / contain no-repeat; }
img[data-kc-shape="circle"] { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='49'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='50' r='49'/%3E%3C/svg%3E") center / contain no-repeat; }
img[data-kc-shape="cloud"] { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M26 82C12 82 2 72 2 59c0-12 9-22 21-23 2-16 15-27 31-27 13 0 24 8 28 20 10 1 16 10 16 21 0 3 0 5-1 7 1 2 1 4 1 6 0 11-9 19-20 19z'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M26 82C12 82 2 72 2 59c0-12 9-22 21-23 2-16 15-27 31-27 13 0 24 8 28 20 10 1 16 10 16 21 0 3 0 5-1 7 1 2 1 4 1 6 0 11-9 19-20 19z'/%3E%3C/svg%3E") center / contain no-repeat; }
img[data-kc-shape="flower"] { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='22' r='21'/%3E%3Ccircle cx='76' cy='38' r='21'/%3E%3Ccircle cx='70' cy='70' r='21'/%3E%3Ccircle cx='30' cy='70' r='21'/%3E%3Ccircle cx='24' cy='38' r='21'/%3E%3Ccircle cx='50' cy='50' r='24'/%3E%3C/svg%3E") center / contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Ccircle cx='50' cy='22' r='21'/%3E%3Ccircle cx='76' cy='38' r='21'/%3E%3Ccircle cx='70' cy='70' r='21'/%3E%3Ccircle cx='30' cy='70' r='21'/%3E%3Ccircle cx='24' cy='38' r='21'/%3E%3Ccircle cx='50' cy='50' r='24'/%3E%3C/svg%3E") center / contain no-repeat; }
img[data-kc-shape] { object-fit: cover; aspect-ratio: 1 / 1; height: auto !important; }
*:has(> img[data-kc-shape]) { border-color: transparent !important; box-shadow: none !important; background: transparent !important; }

/* Handy: Platz unter dem Fuß, damit die feste WhatsApp/Anrufen-Leiste die Signatur nicht verdeckt */
@media (max-width: 700px) {
  .site-footer { padding-bottom: calc(28px + 50px + 24px + env(safe-area-inset-bottom, 0px)) !important; }
}
