
  /* Фон страницы при загрузке */
  html, body {
    background-color: #111111 !important;
  }

  /* Оверлей для плавного перехода */
  .page-transition {
    position: fixed;
    inset: 0;
    background: #111111;
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
  }

  .page-transition.active {
    opacity: 1;
    pointer-events: all;
  }





document.addEventListener("DOMContentLoaded", function () {
    const overlay = document.getElementById("pageTransition");

    document.addEventListener("click", function (e) {
        const link = e.target.closest("a");
        if (!link) return;

        // Исключения
        const href = link.getAttribute("href");
        if (
            link.target === "_blank" ||
            !href ||
            href.startsWith("#") ||
            href.startsWith("tel:") ||
            href.startsWith("mailto:")
        ) return;

        e.preventDefault();

        overlay.classList.add("active");

        setTimeout(() => {
            window.location.href = link.href;
        }, 300);
    });
});

