/*
 * Efekty pri skrolovani (scroll-effects.js vedla) - zakladne efekty. Skryte su len s html.scroll-fx (prida ju skript
 * na zaciatku HeadJs webu), bez JS je obsah viditelny. Vzdialenosti a zvacsenie ako v AOS, aby demá po prechode vyzerali rovnako.
 * Sila selektorov je rovnaka ako v AOS (html.scroll-fx je v :where, nepocita sa): pravidla webu, ktore prvku po nabehnuti
 * vratia vlastny transform (napr. pootocenie) silnejsim selektorom, platia dalej. Tento subor je pred styles.min.css webu.
 * Konecny stav bez transformu - prvok potom nepokazi position: fixed / sticky potomkov (lepkavy panel, odznak reCAPTCHA).
 */

/* pocas nabiehania (.scroll-run) - prechod; dlzku a krivku nastavi ScrollEffects.init; silnejsie ako vlastny transition prvku */
html.scroll-fx [data-scroll-fx].scroll-run {
	transition-property: opacity, transform, filter, clip-path;
	transition-duration: var(--scroll-duration, .6s);
	transition-timing-function: var(--scroll-easing, cubic-bezier(.215, .61, .355, 1));
}

/* pred nabehnutim */
:where(html.scroll-fx) [data-scroll-fx^="fade"][data-scroll-fx^="fade"],
:where(html.scroll-fx) [data-scroll-fx^="zoom"][data-scroll-fx^="zoom"],
:where(html.scroll-fx) [data-scroll-fx="blur-in"][data-scroll-fx="blur-in"] { opacity: 0; }

:where(html.scroll-fx) [data-scroll-fx="fade-up"]    { transform: translate3d(0, 100px, 0); }
:where(html.scroll-fx) [data-scroll-fx="fade-down"]  { transform: translate3d(0, -100px, 0); }
:where(html.scroll-fx) [data-scroll-fx="fade-left"]  { transform: translate3d(100px, 0, 0); }
:where(html.scroll-fx) [data-scroll-fx="fade-right"] { transform: translate3d(-100px, 0, 0); }
:where(html.scroll-fx) [data-scroll-fx="zoom-in"]    { transform: scale(.6); }
:where(html.scroll-fx) [data-scroll-fx="zoom-out"]   { transform: scale(1.2); }
:where(html.scroll-fx) [data-scroll-fx="blur-in"]    { filter: blur(12px); } /* len jednotlive prvky - filter na zozname / galerii brzdi */

/* odkrytie (fotky, farebne plochy) - prvok sa odkryje od jedneho okraja */
:where(html.scroll-fx) [data-scroll-fx="wipe-up"]    { clip-path: inset(100% 0 0 0); }
:where(html.scroll-fx) [data-scroll-fx="wipe-down"]  { clip-path: inset(0 0 100% 0); }
:where(html.scroll-fx) [data-scroll-fx="wipe-left"]  { clip-path: inset(0 0 0 100%); }
:where(html.scroll-fx) [data-scroll-fx="wipe-right"] { clip-path: inset(0 100% 0 0); }

/* po nabehnuti */
:where(html.scroll-fx) [data-scroll-fx^="fade"][data-scroll-fx^="fade"].in-view,
:where(html.scroll-fx) [data-scroll-fx^="zoom"][data-scroll-fx^="zoom"].in-view,
:where(html.scroll-fx) [data-scroll-fx="blur-in"][data-scroll-fx="blur-in"].in-view {
	opacity: 1;
	transform: none;
	filter: none;
}

/* orez sa prechodom otvori do inset(0), po dobehnuti zmizne uplne (inak by orezaval tien) */
:where(html.scroll-fx) [data-scroll-fx^="wipe"][data-scroll-fx^="wipe"].in-view.scroll-run { clip-path: inset(0 0 0 0); }
:where(html.scroll-fx) [data-scroll-fx^="wipe"][data-scroll-fx^="wipe"].in-view:not(.scroll-run) { clip-path: none; }

/* ---------------- stary atribut data-scroll (verzia pred 3. 12. 2026) - este elorinks.sk na live; nove weby data-scroll-fx ---------------- */

/* pocas nabiehania (.scroll-run) - prechod; dlzku a krivku nastavi ScrollEffects.init; silnejsie ako vlastny transition prvku */
html.scroll-fx [data-scroll].scroll-run {
	transition-property: opacity, transform, filter, clip-path;
	transition-duration: var(--scroll-duration, .6s);
	transition-timing-function: var(--scroll-easing, cubic-bezier(.215, .61, .355, 1));
}

/* pred nabehnutim */
:where(html.scroll-fx) [data-scroll^="fade"][data-scroll^="fade"],
:where(html.scroll-fx) [data-scroll^="zoom"][data-scroll^="zoom"],
:where(html.scroll-fx) [data-scroll="blur-in"][data-scroll="blur-in"] { opacity: 0; }

:where(html.scroll-fx) [data-scroll="fade-up"]    { transform: translate3d(0, 100px, 0); }
:where(html.scroll-fx) [data-scroll="fade-down"]  { transform: translate3d(0, -100px, 0); }
:where(html.scroll-fx) [data-scroll="fade-left"]  { transform: translate3d(100px, 0, 0); }
:where(html.scroll-fx) [data-scroll="fade-right"] { transform: translate3d(-100px, 0, 0); }
:where(html.scroll-fx) [data-scroll="zoom-in"]    { transform: scale(.6); }
:where(html.scroll-fx) [data-scroll="zoom-out"]   { transform: scale(1.2); }
:where(html.scroll-fx) [data-scroll="blur-in"]    { filter: blur(12px); } /* len jednotlive prvky - filter na zozname / galerii brzdi */

/* odkrytie (fotky, farebne plochy) - prvok sa odkryje od jedneho okraja */
:where(html.scroll-fx) [data-scroll="wipe-up"]    { clip-path: inset(100% 0 0 0); }
:where(html.scroll-fx) [data-scroll="wipe-down"]  { clip-path: inset(0 0 100% 0); }
:where(html.scroll-fx) [data-scroll="wipe-left"]  { clip-path: inset(0 0 0 100%); }
:where(html.scroll-fx) [data-scroll="wipe-right"] { clip-path: inset(0 100% 0 0); }

/* po nabehnuti */
:where(html.scroll-fx) [data-scroll^="fade"][data-scroll^="fade"].in-view,
:where(html.scroll-fx) [data-scroll^="zoom"][data-scroll^="zoom"].in-view,
:where(html.scroll-fx) [data-scroll="blur-in"][data-scroll="blur-in"].in-view {
	opacity: 1;
	transform: none;
	filter: none;
}

/* orez sa prechodom otvori do inset(0), po dobehnuti zmizne uplne (inak by orezaval tien) */
:where(html.scroll-fx) [data-scroll^="wipe"][data-scroll^="wipe"].in-view.scroll-run { clip-path: inset(0 0 0 0); }
:where(html.scroll-fx) [data-scroll^="wipe"][data-scroll^="wipe"].in-view:not(.scroll-run) { clip-path: none; }
