{"id":924,"date":"2025-11-17T21:46:13","date_gmt":"2025-11-17T21:46:13","guid":{"rendered":"https:\/\/kickass.fi\/mainostoimisto\/?page_id=924"},"modified":"2025-11-20T10:30:55","modified_gmt":"2025-11-20T10:30:55","slug":"referenssit","status":"publish","type":"page","link":"https:\/\/kickass.fi\/mainostoimisto\/referenssit\/","title":{"rendered":"Referenssit"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"924\" class=\"elementor elementor-924\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-5f6b710 e-flex e-con-boxed e-con e-parent\" data-id=\"5f6b710\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-2c9f8b7 elementor-widget elementor-widget-shortcode\" data-id=\"2c9f8b7\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">\n    <div id=\"wrapper-drive-gallery-5783\">\n        <div id=\"drive-gallery-5783\" class=\"custom-drive-gallery\">\n            <div class=\"gallery-loading\">Ladataan galleriaa...<\/div>\n        <\/div>\n        <button id=\"btn-drive-gallery-5783\" class=\"gallery-load-more\" style=\"display:none;\">Lataa lis\u00e4\u00e4<\/button>\n    <\/div>\n\n    <div id=\"lightbox-drive-gallery-5783\" class=\"drive-lightbox\">\n        <span class=\"lightbox-close\">&times;<\/span>\n        <div class=\"lightbox-content-wrapper\">\n            <img decoding=\"async\" class=\"lightbox-image\" src=\"\" alt=\"Suurennos\">\n            <div class=\"lightbox-caption\"><\/div>\n        <\/div>\n    <\/div>\n\n    <script>\n    (function() {\n        const config = {\n            scriptUrl: \"https:\/\/script.google.com\/macros\/s\/AKfycbxCd6vqMIEdgvO5cW03W7bak1KQCBIss54bE9p98dqM62lB_k3M1zKGajIFT4JAMLtd\/exec\",\n            folderId: \"1yn3TnwSdlL2PMsUhat5WJg2McCHI-iVm\",\n            batchSize: 50,\n            containerId: \"drive-gallery-5783\",\n            btnId: \"btn-drive-gallery-5783\",\n            lightboxId: \"lightbox-drive-gallery-5783\"\n        };\n\n        const container = document.getElementById(config.containerId);\n        const btn = document.getElementById(config.btnId);\n        const lightbox = document.getElementById(config.lightboxId);\n        const lightboxImg = lightbox.querySelector('.lightbox-image');\n        const lightboxClose = lightbox.querySelector('.lightbox-close');\n        \n        let allFiles = [];\n        let currentCount = 0;\n\n        function shuffleArray(array) {\n            for (let i = array.length - 1; i > 0; i--) {\n                const j = Math.floor(Math.random() * (i + 1));\n                [array[i], array[j]] = [array[j], array[i]];\n            }\n        }\n\n        \/\/ Lightboxin avaus\n        window.openDriveLightbox = function(fullUrl, type, videoUrl) {\n            \/\/ Jos video, avaa uuteen v\u00e4lilehteen (varmempi toiminta)\n            if (type.includes('video')) {\n                window.open(videoUrl, '_blank');\n                return;\n            }\n\n            \/\/ Jos kuva, avaa lightbox\n            \/\/ Muutetaan URL hakemaan j\u00e4ttikokoinen kuva (s2500 = 2500px leve\u00e4)\n            const hugeUrl = fullUrl.replace('=s600', '=s2500');\n            \n            lightboxImg.src = hugeUrl;\n            lightbox.style.display = \"flex\";\n            document.body.style.overflow = \"hidden\"; \/\/ Est\u00e4 taustan scrollaus\n        };\n\n        \/\/ Lightboxin sulkeminen\n        function closeLightbox() {\n            lightbox.style.display = \"none\";\n            lightboxImg.src = \"\"; \/\/ Tyhjenn\u00e4 jotta seuraava ei vilahda\n            document.body.style.overflow = \"auto\"; \/\/ Palauta scrollaus\n        }\n\n        lightboxClose.addEventListener('click', closeLightbox);\n        \n        \/\/ Sulje jos klikkaa kuvan ohi\n        lightbox.addEventListener('click', function(e) {\n            if (e.target === lightbox || e.target.classList.contains('lightbox-content-wrapper')) {\n                closeLightbox();\n            }\n        });\n\n        \/\/ Sulje ESC-n\u00e4pp\u00e4imell\u00e4\n        document.addEventListener('keydown', function(e) {\n            if (e.key === \"Escape\" && lightbox.style.display === \"flex\") {\n                closeLightbox();\n            }\n        });\n\n        function renderBatch() {\n            const nextBatch = allFiles.slice(currentCount, currentCount + config.batchSize);\n            \n            nextBatch.forEach(file => {\n                const item = document.createElement('div');\n                item.className = 'gallery-item';\n                \n                \/\/ Thumbnail gridiin\n                let thumbUrl = file.thumbnail || '';\n                let isVideo = file.type.includes('video');\n\n                \/\/ Luodaan elementti. HUOM: Ei en\u00e4\u00e4 <a href> vaan onclick\n                item.innerHTML = `\n                    <div class=\"gallery-link\" onclick=\"openDriveLightbox('${thumbUrl}', '${file.type}', '${file.full}')\">\n                        <img decoding=\"async\" src=\"${thumbUrl}\" alt=\"${file.name}\" loading=\"lazy\">\n                        ${isVideo ? '<div class=\"play-icon\">\u25b6<\/div>' : ''}\n                    <\/div>\n                `;\n                container.appendChild(item);\n            });\n\n            currentCount += nextBatch.length;\n\n            if (currentCount >= allFiles.length) {\n                btn.style.display = 'none';\n            } else {\n                btn.style.display = 'block';\n                const remaining = allFiles.length - currentCount;\n                btn.innerText = `Lataa lis\u00e4\u00e4 (${remaining} j\u00e4ljell\u00e4)`;\n            }\n        }\n\n        fetch(`${config.scriptUrl}?folderId=${config.folderId}`)\n        .then(response => response.json())\n        .then(data => {\n            container.innerHTML = ''; \n            \n            if(!Array.isArray(data) || data.length === 0) {\n                container.innerHTML = 'Ei kuvia.';\n                return;\n            }\n\n            allFiles = data;\n            shuffleArray(allFiles);\n            renderBatch();\n        })\n        .catch(err => {\n            console.error(err);\n            container.innerHTML = 'Virhe ladattaessa galleriaa.';\n        });\n\n        btn.addEventListener('click', renderBatch);\n\n    })();\n    <\/script>\n\n    <style>\n        \/* GRIDI *\/\n        .custom-drive-gallery {\n            display: grid;\n            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));\n            gap: 10px;\n            margin-bottom: 20px;\n        }\n        .gallery-loading { grid-column: 1 \/ -1; text-align: center; padding: 20px; color: #666; }\n        \n        .gallery-item {\n            position: relative;\n            border-radius: 6px;\n            background: transparent;\n            aspect-ratio: 1 \/ 1;\n            overflow: hidden;\n            cursor: pointer;\n        }\n        .gallery-item img {\n            width: 100%;\n            height: 100%;\n            object-fit: cover;\n            transition: transform 0.3s ease;\n            display: block;\n        }\n        @media (hover: hover) {\n            .gallery-item:hover img { transform: scale(1.05); }\n        }\n\n        \/* Play-ikoni videoille *\/\n        .play-icon {\n            position: absolute;\n            top: 50%; left: 50%;\n            transform: translate(-50%, -50%);\n            background: rgba(0,0,0,0.6);\n            color: white;\n            width: 40px; height: 40px;\n            border-radius: 50%;\n            display: flex; align-items: center; justify-content: center;\n            font-size: 20px;\n            pointer-events: none;\n        }\n\n        \/* LATAUSNAPPI *\/\n        .gallery-load-more {\n            display: block;\n            margin: 20px auto;\n            padding: 12px 30px;\n            background-color: #333;\n            color: #fff;\n            border: none;\n            border-radius: 50px;\n            cursor: pointer;\n            font-size: 16px;\n            font-weight: bold;\n        }\n        .gallery-load-more:hover { background-color: #555; }\n\n        \/* LIGHTBOX TYYLIT *\/\n        .drive-lightbox {\n            display: none; \/* Piilotettu oletuksena *\/\n            position: fixed;\n            z-index: 99999; \/* Aina p\u00e4\u00e4llimm\u00e4isen\u00e4 *\/\n            left: 0;\n            top: 0;\n            width: 100%;\n            height: 100%;\n            overflow: hidden;\n            background-color: rgba(0,0,0,0.9); \/* Musta l\u00e4pin\u00e4kyv\u00e4 tausta *\/\n            align-items: center;\n            justify-content: center;\n            flex-direction: column;\n        }\n        .lightbox-content-wrapper {\n            position: relative;\n            max-width: 90%;\n            max-height: 90%;\n            display: flex;\n            justify-content: center;\n            align-items: center;\n        }\n        .lightbox-image {\n            max-width: 100%;\n            max-height: 90vh;\n            object-fit: contain;\n            border-radius: 4px;\n            box-shadow: 0 0 20px rgba(0,0,0,0.5);\n            animation: zoomIn 0.3s ease;\n        }\n        .lightbox-close {\n            position: absolute;\n            top: 20px;\n            right: 30px;\n            color: #f1f1f1;\n            font-size: 40px;\n            font-weight: bold;\n            cursor: pointer;\n            z-index: 100000;\n            transition: 0.3s;\n        }\n        .lightbox-close:hover { color: #bbb; }\n\n        @keyframes zoomIn {\n            from {transform:scale(0.9); opacity:0;}\n            to {transform:scale(1); opacity:1;}\n        }\n    <\/style>\n\n    <\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-49c7c21 elementor-widget elementor-widget-shortcode\" data-id=\"49c7c21\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">\n    <div id=\"wrapper-drive-gallery-5901\">\n        <div id=\"drive-gallery-5901\" class=\"custom-drive-gallery\">\n            <div class=\"gallery-loading\">Ladataan galleriaa...<\/div>\n        <\/div>\n        <button id=\"btn-drive-gallery-5901\" class=\"gallery-load-more\" style=\"display:none;\">Lataa lis\u00e4\u00e4<\/button>\n    <\/div>\n\n    <div id=\"lightbox-drive-gallery-5901\" class=\"drive-lightbox\">\n        <span class=\"lightbox-close\">&times;<\/span>\n        <div class=\"lightbox-content-wrapper\">\n            <img decoding=\"async\" class=\"lightbox-image\" src=\"\" alt=\"Suurennos\">\n            <div class=\"lightbox-caption\"><\/div>\n        <\/div>\n    <\/div>\n\n    <script>\n    (function() {\n        const config = {\n            scriptUrl: \"https:\/\/script.google.com\/macros\/s\/AKfycbxCd6vqMIEdgvO5cW03W7bak1KQCBIss54bE9p98dqM62lB_k3M1zKGajIFT4JAMLtd\/exec\",\n            folderId: \"1m6gxoBpMPtLCLz-JRzhGu0GSQFhV_zSi\",\n            batchSize: 50,\n            containerId: \"drive-gallery-5901\",\n            btnId: \"btn-drive-gallery-5901\",\n            lightboxId: \"lightbox-drive-gallery-5901\"\n        };\n\n        const container = document.getElementById(config.containerId);\n        const btn = document.getElementById(config.btnId);\n        const lightbox = document.getElementById(config.lightboxId);\n        const lightboxImg = lightbox.querySelector('.lightbox-image');\n        const lightboxClose = lightbox.querySelector('.lightbox-close');\n        \n        let allFiles = [];\n        let currentCount = 0;\n\n        function shuffleArray(array) {\n            for (let i = array.length - 1; i > 0; i--) {\n                const j = Math.floor(Math.random() * (i + 1));\n                [array[i], array[j]] = [array[j], array[i]];\n            }\n        }\n\n        \/\/ Lightboxin avaus\n        window.openDriveLightbox = function(fullUrl, type, videoUrl) {\n            \/\/ Jos video, avaa uuteen v\u00e4lilehteen (varmempi toiminta)\n            if (type.includes('video')) {\n                window.open(videoUrl, '_blank');\n                return;\n            }\n\n            \/\/ Jos kuva, avaa lightbox\n            \/\/ Muutetaan URL hakemaan j\u00e4ttikokoinen kuva (s2500 = 2500px leve\u00e4)\n            const hugeUrl = fullUrl.replace('=s600', '=s2500');\n            \n            lightboxImg.src = hugeUrl;\n            lightbox.style.display = \"flex\";\n            document.body.style.overflow = \"hidden\"; \/\/ Est\u00e4 taustan scrollaus\n        };\n\n        \/\/ Lightboxin sulkeminen\n        function closeLightbox() {\n            lightbox.style.display = \"none\";\n            lightboxImg.src = \"\"; \/\/ Tyhjenn\u00e4 jotta seuraava ei vilahda\n            document.body.style.overflow = \"auto\"; \/\/ Palauta scrollaus\n        }\n\n        lightboxClose.addEventListener('click', closeLightbox);\n        \n        \/\/ Sulje jos klikkaa kuvan ohi\n        lightbox.addEventListener('click', function(e) {\n            if (e.target === lightbox || e.target.classList.contains('lightbox-content-wrapper')) {\n                closeLightbox();\n            }\n        });\n\n        \/\/ Sulje ESC-n\u00e4pp\u00e4imell\u00e4\n        document.addEventListener('keydown', function(e) {\n            if (e.key === \"Escape\" && lightbox.style.display === \"flex\") {\n                closeLightbox();\n            }\n        });\n\n        function renderBatch() {\n            const nextBatch = allFiles.slice(currentCount, currentCount + config.batchSize);\n            \n            nextBatch.forEach(file => {\n                const item = document.createElement('div');\n                item.className = 'gallery-item';\n                \n                \/\/ Thumbnail gridiin\n                let thumbUrl = file.thumbnail || '';\n                let isVideo = file.type.includes('video');\n\n                \/\/ Luodaan elementti. HUOM: Ei en\u00e4\u00e4 <a href> vaan onclick\n                item.innerHTML = `\n                    <div class=\"gallery-link\" onclick=\"openDriveLightbox('${thumbUrl}', '${file.type}', '${file.full}')\">\n                        <img decoding=\"async\" src=\"${thumbUrl}\" alt=\"${file.name}\" loading=\"lazy\">\n                        ${isVideo ? '<div class=\"play-icon\">\u25b6<\/div>' : ''}\n                    <\/div>\n                `;\n                container.appendChild(item);\n            });\n\n            currentCount += nextBatch.length;\n\n            if (currentCount >= allFiles.length) {\n                btn.style.display = 'none';\n            } else {\n                btn.style.display = 'block';\n                const remaining = allFiles.length - currentCount;\n                btn.innerText = `Lataa lis\u00e4\u00e4 (${remaining} j\u00e4ljell\u00e4)`;\n            }\n        }\n\n        fetch(`${config.scriptUrl}?folderId=${config.folderId}`)\n        .then(response => response.json())\n        .then(data => {\n            container.innerHTML = ''; \n            \n            if(!Array.isArray(data) || data.length === 0) {\n                container.innerHTML = 'Ei kuvia.';\n                return;\n            }\n\n            allFiles = data;\n            shuffleArray(allFiles);\n            renderBatch();\n        })\n        .catch(err => {\n            console.error(err);\n            container.innerHTML = 'Virhe ladattaessa galleriaa.';\n        });\n\n        btn.addEventListener('click', renderBatch);\n\n    })();\n    <\/script>\n\n    <style>\n        \/* GRIDI *\/\n        .custom-drive-gallery {\n            display: grid;\n            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));\n            gap: 10px;\n            margin-bottom: 20px;\n        }\n        .gallery-loading { grid-column: 1 \/ -1; text-align: center; padding: 20px; color: #666; }\n        \n        .gallery-item {\n            position: relative;\n            border-radius: 6px;\n            background: transparent;\n            aspect-ratio: 1 \/ 1;\n            overflow: hidden;\n            cursor: pointer;\n        }\n        .gallery-item img {\n            width: 100%;\n            height: 100%;\n            object-fit: cover;\n            transition: transform 0.3s ease;\n            display: block;\n        }\n        @media (hover: hover) {\n            .gallery-item:hover img { transform: scale(1.05); }\n        }\n\n        \/* Play-ikoni videoille *\/\n        .play-icon {\n            position: absolute;\n            top: 50%; left: 50%;\n            transform: translate(-50%, -50%);\n            background: rgba(0,0,0,0.6);\n            color: white;\n            width: 40px; height: 40px;\n            border-radius: 50%;\n            display: flex; align-items: center; justify-content: center;\n            font-size: 20px;\n            pointer-events: none;\n        }\n\n        \/* LATAUSNAPPI *\/\n        .gallery-load-more {\n            display: block;\n            margin: 20px auto;\n            padding: 12px 30px;\n            background-color: #333;\n            color: #fff;\n            border: none;\n            border-radius: 50px;\n            cursor: pointer;\n            font-size: 16px;\n            font-weight: bold;\n        }\n        .gallery-load-more:hover { background-color: #555; }\n\n        \/* LIGHTBOX TYYLIT *\/\n        .drive-lightbox {\n            display: none; \/* Piilotettu oletuksena *\/\n            position: fixed;\n            z-index: 99999; \/* Aina p\u00e4\u00e4llimm\u00e4isen\u00e4 *\/\n            left: 0;\n            top: 0;\n            width: 100%;\n            height: 100%;\n            overflow: hidden;\n            background-color: rgba(0,0,0,0.9); \/* Musta l\u00e4pin\u00e4kyv\u00e4 tausta *\/\n            align-items: center;\n            justify-content: center;\n            flex-direction: column;\n        }\n        .lightbox-content-wrapper {\n            position: relative;\n            max-width: 90%;\n            max-height: 90%;\n            display: flex;\n            justify-content: center;\n            align-items: center;\n        }\n        .lightbox-image {\n            max-width: 100%;\n            max-height: 90vh;\n            object-fit: contain;\n            border-radius: 4px;\n            box-shadow: 0 0 20px rgba(0,0,0,0.5);\n            animation: zoomIn 0.3s ease;\n        }\n        .lightbox-close {\n            position: absolute;\n            top: 20px;\n            right: 30px;\n            color: #f1f1f1;\n            font-size: 40px;\n            font-weight: bold;\n            cursor: pointer;\n            z-index: 100000;\n            transition: 0.3s;\n        }\n        .lightbox-close:hover { color: #bbb; }\n\n        @keyframes zoomIn {\n            from {transform:scale(0.9); opacity:0;}\n            to {transform:scale(1); opacity:1;}\n        }\n    <\/style>\n\n    <\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-28344c53 e-flex e-con-boxed e-con e-parent\" data-id=\"28344c53\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t<div class=\"elementor-element elementor-element-1d8ff25e e-con-full e-flex e-con e-child\" data-id=\"1d8ff25e\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t<div class=\"elementor-element elementor-element-17479abf elementor-widget elementor-widget-heading\" data-id=\"17479abf\" data-element_type=\"widget\" data-e-type=\"widget\" data-settings=\"{&quot;motion_fx_motion_fx_mouse&quot;:&quot;yes&quot;,&quot;motion_fx_tilt_effect&quot;:&quot;yes&quot;,&quot;motion_fx_tilt_speed&quot;:{&quot;unit&quot;:&quot;px&quot;,&quot;size&quot;:1,&quot;sizes&quot;:[]}}\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">TUOTEKUVIA<\/h2>\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-319ba99a e-flex e-con-boxed e-con e-child\" data-id=\"319ba99a\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-19e18e12 elementor-widget elementor-widget-heading\" data-id=\"19e18e12\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">KOTISIVUILLE - VERKKOKAUPPAAN - KALATALOGIIN<\/h3>\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2c472570 elementor-widget elementor-widget-shortcode\" data-id=\"2c472570\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\">\n    <div id=\"wrapper-drive-gallery-2873\">\n        <div id=\"drive-gallery-2873\" class=\"custom-drive-gallery\">\n            <div class=\"gallery-loading\">Ladataan galleriaa...<\/div>\n        <\/div>\n        <button id=\"btn-drive-gallery-2873\" class=\"gallery-load-more\" style=\"display:none;\">Lataa lis\u00e4\u00e4<\/button>\n    <\/div>\n\n    <div id=\"lightbox-drive-gallery-2873\" class=\"drive-lightbox\">\n        <span class=\"lightbox-close\">&times;<\/span>\n        <div class=\"lightbox-content-wrapper\">\n            <img decoding=\"async\" class=\"lightbox-image\" src=\"\" alt=\"Suurennos\">\n            <div class=\"lightbox-caption\"><\/div>\n        <\/div>\n    <\/div>\n\n    <script>\n    (function() {\n        const config = {\n            scriptUrl: \"https:\/\/script.google.com\/macros\/s\/AKfycbxCd6vqMIEdgvO5cW03W7bak1KQCBIss54bE9p98dqM62lB_k3M1zKGajIFT4JAMLtd\/exec\",\n            folderId: \"1TRJJJLE0hm3cfXMYzHR4_iDydjtwlVps\",\n            batchSize: 50,\n            containerId: \"drive-gallery-2873\",\n            btnId: \"btn-drive-gallery-2873\",\n            lightboxId: \"lightbox-drive-gallery-2873\"\n        };\n\n        const container = document.getElementById(config.containerId);\n        const btn = document.getElementById(config.btnId);\n        const lightbox = document.getElementById(config.lightboxId);\n        const lightboxImg = lightbox.querySelector('.lightbox-image');\n        const lightboxClose = lightbox.querySelector('.lightbox-close');\n        \n        let allFiles = [];\n        let currentCount = 0;\n\n        function shuffleArray(array) {\n            for (let i = array.length - 1; i > 0; i--) {\n                const j = Math.floor(Math.random() * (i + 1));\n                [array[i], array[j]] = [array[j], array[i]];\n            }\n        }\n\n        \/\/ Lightboxin avaus\n        window.openDriveLightbox = function(fullUrl, type, videoUrl) {\n            \/\/ Jos video, avaa uuteen v\u00e4lilehteen (varmempi toiminta)\n            if (type.includes('video')) {\n                window.open(videoUrl, '_blank');\n                return;\n            }\n\n            \/\/ Jos kuva, avaa lightbox\n            \/\/ Muutetaan URL hakemaan j\u00e4ttikokoinen kuva (s2500 = 2500px leve\u00e4)\n            const hugeUrl = fullUrl.replace('=s600', '=s2500');\n            \n            lightboxImg.src = hugeUrl;\n            lightbox.style.display = \"flex\";\n            document.body.style.overflow = \"hidden\"; \/\/ Est\u00e4 taustan scrollaus\n        };\n\n        \/\/ Lightboxin sulkeminen\n        function closeLightbox() {\n            lightbox.style.display = \"none\";\n            lightboxImg.src = \"\"; \/\/ Tyhjenn\u00e4 jotta seuraava ei vilahda\n            document.body.style.overflow = \"auto\"; \/\/ Palauta scrollaus\n        }\n\n        lightboxClose.addEventListener('click', closeLightbox);\n        \n        \/\/ Sulje jos klikkaa kuvan ohi\n        lightbox.addEventListener('click', function(e) {\n            if (e.target === lightbox || e.target.classList.contains('lightbox-content-wrapper')) {\n                closeLightbox();\n            }\n        });\n\n        \/\/ Sulje ESC-n\u00e4pp\u00e4imell\u00e4\n        document.addEventListener('keydown', function(e) {\n            if (e.key === \"Escape\" && lightbox.style.display === \"flex\") {\n                closeLightbox();\n            }\n        });\n\n        function renderBatch() {\n            const nextBatch = allFiles.slice(currentCount, currentCount + config.batchSize);\n            \n            nextBatch.forEach(file => {\n                const item = document.createElement('div');\n                item.className = 'gallery-item';\n                \n                \/\/ Thumbnail gridiin\n                let thumbUrl = file.thumbnail || '';\n                let isVideo = file.type.includes('video');\n\n                \/\/ Luodaan elementti. HUOM: Ei en\u00e4\u00e4 <a href> vaan onclick\n                item.innerHTML = `\n                    <div class=\"gallery-link\" onclick=\"openDriveLightbox('${thumbUrl}', '${file.type}', '${file.full}')\">\n                        <img decoding=\"async\" src=\"${thumbUrl}\" alt=\"${file.name}\" loading=\"lazy\">\n                        ${isVideo ? '<div class=\"play-icon\">\u25b6<\/div>' : ''}\n                    <\/div>\n                `;\n                container.appendChild(item);\n            });\n\n            currentCount += nextBatch.length;\n\n            if (currentCount >= allFiles.length) {\n                btn.style.display = 'none';\n            } else {\n                btn.style.display = 'block';\n                const remaining = allFiles.length - currentCount;\n                btn.innerText = `Lataa lis\u00e4\u00e4 (${remaining} j\u00e4ljell\u00e4)`;\n            }\n        }\n\n        fetch(`${config.scriptUrl}?folderId=${config.folderId}`)\n        .then(response => response.json())\n        .then(data => {\n            container.innerHTML = ''; \n            \n            if(!Array.isArray(data) || data.length === 0) {\n                container.innerHTML = 'Ei kuvia.';\n                return;\n            }\n\n            allFiles = data;\n            shuffleArray(allFiles);\n            renderBatch();\n        })\n        .catch(err => {\n            console.error(err);\n            container.innerHTML = 'Virhe ladattaessa galleriaa.';\n        });\n\n        btn.addEventListener('click', renderBatch);\n\n    })();\n    <\/script>\n\n    <style>\n        \/* GRIDI *\/\n        .custom-drive-gallery {\n            display: grid;\n            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));\n            gap: 10px;\n            margin-bottom: 20px;\n        }\n        .gallery-loading { grid-column: 1 \/ -1; text-align: center; padding: 20px; color: #666; }\n        \n        .gallery-item {\n            position: relative;\n            border-radius: 6px;\n            background: transparent;\n            aspect-ratio: 1 \/ 1;\n            overflow: hidden;\n            cursor: pointer;\n        }\n        .gallery-item img {\n            width: 100%;\n            height: 100%;\n            object-fit: cover;\n            transition: transform 0.3s ease;\n            display: block;\n        }\n        @media (hover: hover) {\n            .gallery-item:hover img { transform: scale(1.05); }\n        }\n\n        \/* Play-ikoni videoille *\/\n        .play-icon {\n            position: absolute;\n            top: 50%; left: 50%;\n            transform: translate(-50%, -50%);\n            background: rgba(0,0,0,0.6);\n            color: white;\n            width: 40px; height: 40px;\n            border-radius: 50%;\n            display: flex; align-items: center; justify-content: center;\n            font-size: 20px;\n            pointer-events: none;\n        }\n\n        \/* LATAUSNAPPI *\/\n        .gallery-load-more {\n            display: block;\n            margin: 20px auto;\n            padding: 12px 30px;\n            background-color: #333;\n            color: #fff;\n            border: none;\n            border-radius: 50px;\n            cursor: pointer;\n            font-size: 16px;\n            font-weight: bold;\n        }\n        .gallery-load-more:hover { background-color: #555; }\n\n        \/* LIGHTBOX TYYLIT *\/\n        .drive-lightbox {\n            display: none; \/* Piilotettu oletuksena *\/\n            position: fixed;\n            z-index: 99999; \/* Aina p\u00e4\u00e4llimm\u00e4isen\u00e4 *\/\n            left: 0;\n            top: 0;\n            width: 100%;\n            height: 100%;\n            overflow: hidden;\n            background-color: rgba(0,0,0,0.9); \/* Musta l\u00e4pin\u00e4kyv\u00e4 tausta *\/\n            align-items: center;\n            justify-content: center;\n            flex-direction: column;\n        }\n        .lightbox-content-wrapper {\n            position: relative;\n            max-width: 90%;\n            max-height: 90%;\n            display: flex;\n            justify-content: center;\n            align-items: center;\n        }\n        .lightbox-image {\n            max-width: 100%;\n            max-height: 90vh;\n            object-fit: contain;\n            border-radius: 4px;\n            box-shadow: 0 0 20px rgba(0,0,0,0.5);\n            animation: zoomIn 0.3s ease;\n        }\n        .lightbox-close {\n            position: absolute;\n            top: 20px;\n            right: 30px;\n            color: #f1f1f1;\n            font-size: 40px;\n            font-weight: bold;\n            cursor: pointer;\n            z-index: 100000;\n            transition: 0.3s;\n        }\n        .lightbox-close:hover { color: #bbb; }\n\n        @keyframes zoomIn {\n            from {transform:scale(0.9); opacity:0;}\n            to {transform:scale(1); opacity:1;}\n        }\n    <\/style>\n\n    <\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-49b7dcd3 elementor-widget elementor-widget-text-editor\" data-id=\"49b7dcd3\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t\t\t\t\t\t<p class=\"p1\">Kuvat &#8211; Videot &#8211; Mainokset<\/p><p class=\"p1\">L\u00e4het\u00e4 Whasappia, niin ruvetaan leipomaan sinulle sis\u00e4lt\u00f6\u00e4, <br \/>oli se sitten, Someen, Nettisivuille, Verkkokauppaan, Uutiskirjeeseen yms<br \/><br \/><\/p>\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-316fb1e6 elementor-widget elementor-widget-shortcode\" data-id=\"316fb1e6\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><div class=\"nta_wa_button\" data-id=\"692\" data-info=\"{&quot;name&quot;:&quot;Jyri Mustonen&quot;,&quot;info&quot;:{&quot;number&quot;:&quot;+358451434522&quot;,&quot;title&quot;:&quot;Jyri Mustonen&quot;,&quot;predefinedText&quot;:&quot;AI Teko\\u00e4ly\\r\\nwww.jyrimustonen.fi&quot;,&quot;willBeBackText&quot;:&quot;I will be back in [njwa_time_work]&quot;,&quot;dayOffsText&quot;:&quot;I will be back soon&quot;,&quot;isAlwaysAvailable&quot;:&quot;ON&quot;,&quot;daysOfWeekWorking&quot;:{&quot;sunday&quot;:{&quot;isWorkingOnDay&quot;:&quot;OFF&quot;,&quot;workHours&quot;:[{&quot;startTime&quot;:&quot;08:00&quot;,&quot;endTime&quot;:&quot;17:30&quot;}]},&quot;monday&quot;:{&quot;isWorkingOnDay&quot;:&quot;OFF&quot;,&quot;workHours&quot;:[{&quot;startTime&quot;:&quot;08:00&quot;,&quot;endTime&quot;:&quot;17:30&quot;}]},&quot;tuesday&quot;:{&quot;isWorkingOnDay&quot;:&quot;OFF&quot;,&quot;workHours&quot;:[{&quot;startTime&quot;:&quot;08:00&quot;,&quot;endTime&quot;:&quot;17:30&quot;}]},&quot;wednesday&quot;:{&quot;isWorkingOnDay&quot;:&quot;OFF&quot;,&quot;workHours&quot;:[{&quot;startTime&quot;:&quot;08:00&quot;,&quot;endTime&quot;:&quot;17:30&quot;}]},&quot;thursday&quot;:{&quot;isWorkingOnDay&quot;:&quot;OFF&quot;,&quot;workHours&quot;:[{&quot;startTime&quot;:&quot;08:00&quot;,&quot;endTime&quot;:&quot;17:30&quot;}]},&quot;friday&quot;:{&quot;isWorkingOnDay&quot;:&quot;OFF&quot;,&quot;workHours&quot;:[{&quot;startTime&quot;:&quot;08:00&quot;,&quot;endTime&quot;:&quot;17:30&quot;}]},&quot;saturday&quot;:{&quot;isWorkingOnDay&quot;:&quot;OFF&quot;,&quot;workHours&quot;:[{&quot;startTime&quot;:&quot;08:00&quot;,&quot;endTime&quot;:&quot;17:30&quot;}]}}},&quot;styles&quot;:{&quot;type&quot;:&quot;round&quot;,&quot;backgroundColor&quot;:&quot;#2DB742&quot;,&quot;textColor&quot;:&quot;#fff&quot;,&quot;label&quot;:&quot;L\\u00e4het\\u00e4 Whatsapp viesti&quot;,&quot;width&quot;:300,&quot;height&quot;:64},&quot;avatar&quot;:false,&quot;options&quot;:{&quot;display&quot;:{&quot;displayCondition&quot;:&quot;showAllPage&quot;,&quot;includePages&quot;:[],&quot;excludePages&quot;:[],&quot;includePosts&quot;:[],&quot;showOnDesktop&quot;:&quot;ON&quot;,&quot;showOnMobile&quot;:&quot;ON&quot;,&quot;time_symbols&quot;:&quot;h:m&quot;},&quot;styles&quot;:{&quot;title&quot;:&quot;L\\u00e4het\\u00e4 Whasapp viesti&quot;,&quot;responseText&quot;:&quot;Vastaan normaalisti muutamassa minuutissa&quot;,&quot;description&quot;:&quot;Tarvitsetko apua? Haluatko kysy\\u00e4 jotain? L\\u00e4het\\u00e4 viesti Whastapissa&quot;,&quot;backgroundColor&quot;:&quot;#2db742&quot;,&quot;textColor&quot;:&quot;#fff&quot;,&quot;titleSize&quot;:&quot;18&quot;,&quot;accountNameSize&quot;:&quot;14&quot;,&quot;descriptionTextSize&quot;:&quot;12&quot;,&quot;regularTextSize&quot;:&quot;11&quot;,&quot;scrollHeight&quot;:&quot;500&quot;,&quot;isShowScroll&quot;:&quot;OFF&quot;,&quot;isShowResponseText&quot;:&quot;OFF&quot;,&quot;btnLabel&quot;:&quot;Tarvitsetko apua? &lt;strong&gt;L\\u00e4het\\u00e4 viesti&lt;\\\/strong&gt;&quot;,&quot;btnLabelWidth&quot;:&quot;156&quot;,&quot;btnPosition&quot;:&quot;right&quot;,&quot;btnLeftDistance&quot;:&quot;30&quot;,&quot;btnRightDistance&quot;:&quot;30&quot;,&quot;btnBottomDistance&quot;:&quot;30&quot;,&quot;isShowBtnLabel&quot;:&quot;OFF&quot;,&quot;isShowGDPR&quot;:&quot;OFF&quot;,&quot;gdprContent&quot;:&quot;Please accept our &lt;a href=\\&quot;https:\\\/\\\/ninjateam.org\\\/privacy-policy\\\/\\&quot;&gt;privacy policy&lt;\\\/a&gt; first to start a conversation.&quot;},&quot;analytics&quot;:{&quot;enabledGoogle&quot;:&quot;OFF&quot;,&quot;enabledFacebook&quot;:&quot;OFF&quot;,&quot;enabledGoogleGA4&quot;:&quot;OFF&quot;}},&quot;gdprStatus&quot;:false,&quot;defaultAvatar&quot;:&quot;https:\\\/\\\/kickass.fi\\\/mainostoimisto\\\/wp-content\\\/plugins\\\/wp-whatsapp\\\/assets\\\/img\\\/whatsapp_logo.svg&quot;}\"><\/div><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>TUOTEKUVIA KOTISIVUILLE &#8211; VERKKOKAUPPAAN &#8211; KALATALOGIIN Kuvat &#8211; Videot &#8211; Mainokset L\u00e4het\u00e4 Whasappia, niin ruvetaan leipomaan sinulle sis\u00e4lt\u00f6\u00e4, oli se sitten, Someen, Nettisivuille, Verkkokauppaan, Uutiskirjeeseen yms<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":5,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-924","page","type-page","status-publish","hentry"],"acf":[],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/kickass.fi\/mainostoimisto\/wp-json\/wp\/v2\/pages\/924","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kickass.fi\/mainostoimisto\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/kickass.fi\/mainostoimisto\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/kickass.fi\/mainostoimisto\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kickass.fi\/mainostoimisto\/wp-json\/wp\/v2\/comments?post=924"}],"version-history":[{"count":19,"href":"https:\/\/kickass.fi\/mainostoimisto\/wp-json\/wp\/v2\/pages\/924\/revisions"}],"predecessor-version":[{"id":1221,"href":"https:\/\/kickass.fi\/mainostoimisto\/wp-json\/wp\/v2\/pages\/924\/revisions\/1221"}],"wp:attachment":[{"href":"https:\/\/kickass.fi\/mainostoimisto\/wp-json\/wp\/v2\/media?parent=924"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}