/* ==========================================================================
   Rovideal efekty – styly animací. Barvy webu bere z proměnných Elementoru (--c-*).
   ========================================================================== */

/* Barvy ilustrací v animacích (čte je scenes.js) */
:root {
  --illu-sky-top: #E4EFE6;
  --illu-sky-bottom: #FBF9F2;
  --illu-grass-back: #8DAE5E;
  --illu-grass-tip: #A9CB72;
  --illu-seed: #BFA86A;
  --illu-soil: #6B4F2E;
  --illu-soil-dark: #4A3520;
  --illu-mulch: #7A4A2A;
  --illu-bark: #5A4128;
  --illu-metal: #9AA3A8;
  --illu-blossom: #F6E3E8;
  --illu-apple: #C8452F;
  --illu-flower-1: #E8B83A;
  --illu-flower-2: #B985C9;
  --illu-flower-3: #F2F0E6;
  --illu-flower-4: #D9604A;
  --illu-leaf-1: #D9822B;
  --illu-leaf-2: #C2552A;
  --illu-leaf-3: #E3B341;
  --illu-leaf-4: #9C6B2F;
  --illu-critter-dark: #1D1D14;
  --illu-critter-light: #D8C7A0;
  --illu-shell: #A87C4F;
}

/* ---------- Zvýrazněné slovo v nadpisu (v Elementoru stačí slovo obalit <span>) ---------- */
.e-heading-base span { color: var(--c-accent, #2898A0); }
.page-hero .e-heading-base span,
.e-background-video .e-heading-base span,
.section-dark .e-heading-base span,
.cta-band .e-heading-base span { color: var(--c-accent-light, #8ED3D8); }

/* ---------- Živá tráva (třída fx-grass na sekci) ---------- */
.fx-grass { position: relative; overflow: hidden; }
.fx-grass .hero-grass {
  position: absolute; left: 0; right: 0; bottom: 0; width: 100%;
  height: clamp(110px, 14vw, 220px); z-index: 3; pointer-events: none; display: block;
}
/* Scény s ilustrací přes celou sekci */
.fx-grass .hero-grass[data-scene="lawn"],
.fx-grass .hero-grass[data-scene="clippings"],
.fx-grass .hero-grass[data-scene="blossom"],
.fx-grass .hero-grass[data-scene="leaves"] { top: 0; height: 100%; }
/* Úvodní fotka podstránek vyplní celou šířku i na širokém monitoru (bez opakování) */
.page-hero {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
/* Místo dole, aby tráva nepřekrývala tlačítka */
.fx-grass.page-hero { padding-bottom: clamp(150px, 17vw, 250px) !important; }
@media (max-width: 767px) { .fx-grass.page-hero { padding-bottom: 190px !important; } }
/* Úvod s videem: tráva pod ovládáním videa */
.e-background-video.fx-grass .hero-grass { z-index: 1; }
.e-background-video.fx-grass .e-background-video-controls { z-index: 4 !important; }

/* ---------- Před a po (třída fx-compare na prvku se dvěma fotkami) ---------- */
.fx-compare-on {
  position: relative !important; display: block !important; width: 100% !important;
  aspect-ratio: 16 / 9; overflow: hidden; border-radius: 32px; padding: 0 !important;
  background: #22301a; user-select: none; touch-action: pan-y; cursor: ew-resize; --pos: 50%;
}
.fx-compare-on > .e-con, .fx-compare-on > div:not(.fx-handle) {
  position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important;
  max-width: none !important; margin: 0 !important; padding: 0 !important; flex: none !important;
}
.fx-compare-on img {
  width: 100% !important; height: 100% !important; aspect-ratio: auto !important;
  object-fit: cover !important; border-radius: 0 !important; max-width: none !important;
  pointer-events: none; -webkit-user-drag: none; user-select: none;
}
.fx-compare-on > :nth-child(2) { clip-path: inset(0 0 0 var(--pos)); }
.fx-compare-on > :nth-child(2) p { left: auto !important; right: 18px !important; }
.fx-compare-on p { z-index: 2; }
.fx-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 0; z-index: 3; pointer-events: none; }
.fx-handle::before { content: ""; position: absolute; top: 0; bottom: 0; left: -1.5px; width: 3px; background: #fff; }
.fx-handle::after {
  content: "\2039  \203A"; position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%);
  width: 58px; height: 58px; border-radius: 50%; background: #fff; color: var(--c-secondary, #304020);
  display: flex; align-items: center; justify-content: center; font: 700 1.3rem/1 Inter, sans-serif;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
.fx-range { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; margin: 0; z-index: 4; cursor: ew-resize; pointer-events: none; }
.fx-range:focus-visible + .fx-handle::after { outline: 3px solid var(--c-accent, #2898A0); outline-offset: 3px; }
@media (max-width: 767px) { .fx-compare-on { aspect-ratio: 4 / 3; } }

/* ---------- Běžící pás (třída fx-marquee na řádku položek) ---------- */
.fx-marquee-on { flex-wrap: nowrap !important; justify-content: flex-start !important; overflow: hidden !important; }
.fx-marquee__track { display: flex; flex-wrap: nowrap; align-items: center; width: max-content; flex: none; will-change: transform; }
.fx-marquee__track > * { flex: none; white-space: nowrap; }

/* ---------- Mapka oblasti (třída fx-map na kartě s obcemi) ---------- */
.fx-map-on { display: block !important; padding: 0 !important; min-height: 0 !important; overflow: hidden; position: relative; }
.fx-map-on > p { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.fx-map__stage { position: relative; width: 100%; aspect-ratio: 4 / 3; }
.fx-map__stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.fx-place {
  position: absolute; transform: translate(-50%, calc(-100% + 8px)); display: flex; flex-direction: column;
  align-items: center; gap: 6px; font: 700 .95rem/1.1 Inter, sans-serif; color: var(--c-secondary, #304020);
  text-align: center; white-space: nowrap; z-index: 2;
}
.fx-place small { display: block; font-size: .72rem; font-weight: 600; color: var(--c-muted, rgba(56,48,24,.72)); letter-spacing: .04em; }
.fx-place::after { content: ""; width: 16px; height: 16px; border-radius: 50%; background: #fff; border: 3px solid var(--c-secondary, #304020); box-sizing: border-box; }
.fx-place--home { transform: translate(-50%, calc(-100% + 11px)); font-size: 1.05rem; }
.fx-place--home::after { width: 22px; height: 22px; background: var(--c-primary, #608830); border-color: #fff; box-shadow: 0 0 0 5px rgba(96, 136, 48, .25); }
.fx-place--small { font-size: .8rem; font-weight: 600; color: var(--c-muted, rgba(56,48,24,.72)); gap: 4px; transform: translate(-50%, calc(-100% + 5px)); z-index: 1; }
.fx-place--small::after { width: 10px; height: 10px; border-width: 2px; border-color: var(--c-accent-dark, #1F7A81); }
.fx-map__note { position: absolute; left: 16px; bottom: 12px; margin: 0; font: .78rem Inter, sans-serif; color: var(--c-muted, rgba(56,48,24,.72)); z-index: 2; }

/* ---------- Zvětšení fotek z galerie ---------- */
.gallery-img { cursor: zoom-in; transition: transform .6s ease; }
.gallery-item:hover .gallery-img { transform: scale(1.04); }
.fx-lightbox { position: fixed; inset: 0; z-index: 99999; background: rgba(20, 26, 14, .94); display: flex; align-items: center; justify-content: center; gap: 12px; padding: 60px 16px; }
.fx-lightbox[hidden] { display: none; }
.fx-lightbox figure { margin: 0; max-width: min(1400px, 100%); max-height: 100%; display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 0; }
.fx-lightbox img { max-width: 100%; max-height: calc(100vh - 160px); object-fit: contain; border-radius: 12px; }
.fx-lightbox figcaption { color: rgba(255, 255, 255, .85); font: 600 1rem Inter, sans-serif; text-align: center; }
.fx-lightbox button { flex: none; width: 52px; height: 52px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .12); color: #fff; font: 400 2rem/1 Inter, sans-serif; cursor: pointer; padding: 0; }
.fx-lightbox button:hover { background: var(--c-accent-dark, #1F7A81); }
.fx-lightbox .fx-lb-close { position: absolute; top: 14px; right: 14px; }
@media (max-width: 640px) {
  .fx-lightbox .fx-lb-prev, .fx-lightbox .fx-lb-next { position: absolute; bottom: 16px; }
  .fx-lightbox .fx-lb-prev { left: calc(50% - 64px); }
  .fx-lightbox .fx-lb-next { right: calc(50% - 64px); }
}
body.fx-noscroll { overflow: hidden; }

/* ---------- Schovaní živočichové ---------- */
.fx-frog, .fx-lizard { position: relative; }
.fx-lizard { overflow: hidden; }
.fx-critter { position: absolute; z-index: 1; pointer-events: none; }
.fx-critter svg { display: block; width: 100%; height: auto; }
.fx-critter--frog { top: -27px; right: 9%; width: 52px; pointer-events: auto; cursor: pointer; }
.fx-critter--frog .frog-lid { transform-box: fill-box; transform-origin: center top; transform: scaleY(0); animation: fx-frog-blink 6s infinite; }
.fx-critter--frog:hover svg, .fx-critter--frog:active svg { animation: fx-frog-hop .7s ease-out; }
@keyframes fx-frog-blink { 0%, 92%, 100% { transform: scaleY(0); } 95% { transform: scaleY(1); } }
@keyframes fx-frog-hop { 0% { transform: none; } 30% { transform: translateY(-22px) scaleY(1.08); } 60% { transform: translateY(0) scaleY(.92); } 100% { transform: none; } }
.fx-critter--lizard { bottom: 14px; left: 0; right: 0; height: 28px; }
.fx-critter--lizard svg { position: absolute; top: 0; left: -90px; width: 74px; }
.fx-critter--lizard.is-visible svg { animation: fx-lizard-run 11s 1.2s ease-in-out forwards; }
.fx-critter--lizard .lizard-tail { transform-box: fill-box; transform-origin: right center; animation: fx-lizard-tail .35s ease-in-out infinite alternate; }
@keyframes fx-lizard-run { 0% { left: -90px; } 22% { left: 32%; } 38% { left: 32%; } 58% { left: 61%; } 72% { left: 61%; } 100% { left: calc(100% + 90px); } }
@keyframes fx-lizard-tail { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }

@media (prefers-reduced-motion: reduce) {
  .fx-critter, .fx-critter * { animation: none !important; }
  .fx-critter--lizard { display: none; }
  .gallery-img { transition: none; }
}
