const isIOS = /iP(ad|hone|od)/.test(navigator.userAgent);
const isFirefox = /FxiOS/.test(navigator.userAgent);

if (isIOS && isFirefox) {
// Statt Video nur das Posterbild zeigen und einen Play-Button einblenden
document.querySelector(‚.hero-video video‘).style.display = ’none‘;
const posterDiv = document.createElement(‚div‘);
posterDiv.style.backgroundImage = ‚url(https://michaelaklaehn.de/wp-content/uploads/2025/08/HG_mobil_standbild.jpg)‘;
posterDiv.style.position = ‚fixed‘;
posterDiv.style.top = ‚0‘;
posterDiv.style.left = ‚0‘;
posterDiv.style.width = ‚100vw‘;
posterDiv.style.height = ‚100vh‘;
posterDiv.style.backgroundSize = ‚cover‘;
posterDiv.style.backgroundPosition = ‚center‘;
posterDiv.style.zIndex = ‚0‘;
document.querySelector(‚.hero-video‘).appendChild(posterDiv);

// Play-Button hinzufügen (optional)
const btn = document.createElement(‚button‘);
btn.textContent = ‚Play Video‘;
btn.style.position = ‚fixed‘;
btn.style.top = ‚50%‘;
btn.style.left = ‚50%‘;
btn.style.transform = ‚translate(-50%, -50%)‘;
btn.style.zIndex = ’10‘;
btn.style.padding = ‚1rem 2rem‘;
btn.style.fontSize = ‚1.2rem‘;
btn.style.cursor = ‚pointer‘;
posterDiv.appendChild(btn);

btn.onclick = () => {
posterDiv.style.display = ’none‘;
const video = document.querySelector(‚.hero-video video‘);
video.style.display = ‚block‘;
video.play();
};
}