/* Millimeter-paper grid overlay — fixed full-viewport, drifts slowly,
   reveals brighter grid under the cursor. Lives BELOW interactive UI
   (header, scrollbar, modals) but visually on top of the body image. */

.mm-paper-bg,
.mm-paper-cursor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  mix-blend-mode: screen;
}

.mm-paper-bg {
  background-image:
    /* major: 50px (1 cm) */
    linear-gradient(to right,  rgba(125, 211, 252, 0.13) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(125, 211, 252, 0.13) 1px, transparent 1px),
    /* minor: 10px (2 mm) */
    linear-gradient(to right,  rgba(125, 211, 252, 0.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(125, 211, 252, 0.045) 1px, transparent 1px);
  background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;
  background-position: 0 0;
}

.mm-paper-cursor {
  background-image:
    linear-gradient(to right,  rgba(56, 189, 248, 0.95) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.95) 1px, transparent 1px),
    linear-gradient(to right,  rgba(56, 189, 248, 0.55) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(56, 189, 248, 0.55) 1px, transparent 1px);
  background-size: 50px 50px, 50px 50px, 10px 10px, 10px 10px;
  background-position: 0 0;
  --mm-cx: 50vw;
  --mm-cy: 50vh;
  -webkit-mask-image: radial-gradient(360px circle at var(--mm-cx) var(--mm-cy), #000 30%, transparent 80%);
  mask-image: radial-gradient(360px circle at var(--mm-cx) var(--mm-cy), #000 30%, transparent 80%);
  opacity: 0;
}

.mm-paper-cursor.is-active { opacity: 1; }

/* Lift the site navbar (and logo) and the footer above the mm-paper grid overlay
   on every page. */
.navbar {
  position: relative;
  z-index: 1050;
}
/* wow.js initializes .wow elements as visibility:hidden until intersection.
   When wow init misses (e.g. some sub-pages), content stays invisible. Force visible. */
.wow.animate { visibility: visible !important; }
.site-footer {
  position: relative;
  z-index: 2;
  isolation: isolate;
}

/* Hide the original GTranslate float widget (replaced by an inline navbar widget). */
.gtranslate_wrapper, #gt-wrapper-57584320 { display: none !important; }

/* Visible flag buttons in the navbar (drive Google Translate via cookies). */
.nacrti-translate-li {
  display: flex;
  align-items: center;
  margin-left: 14px;
}
.nacrti-lang-buttons {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 999px;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 4px 14px rgba(26, 115, 232, 0.10);
}
.nacrti-lang-btn {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 50%;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.55;
  transition: opacity 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.nacrti-lang-btn img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.nacrti-lang-btn:hover {
  opacity: 1;
  transform: scale(1.08);
}
.nacrti-lang-btn.is-active {
  opacity: 1;
  box-shadow:
    0 0 0 2px #ffffff,
    0 0 0 3px #1a73e8;
}
.nacrti-lang-btn:focus { outline: none; }
.nacrti-lang-btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 2px #ffffff,
    0 0 0 4px rgba(26, 115, 232, 0.7);
}
/* Hide the Google Translate top banner and prevent the body shift. */
body { top: 0 !important; position: static !important; }
.goog-te-banner-frame, .skiptranslate iframe.goog-te-banner-frame { display: none !important; }

/* Mobile: bigger flag buttons & spacing (added 2026-06-08) */
@media (max-width: 480px) {
  .nacrti-translate-li { margin-left: 8px; padding: 2px; }
  .nacrti-lang-buttons { gap: 6px; padding: 3px; }
  .nacrti-lang-btn { width: 30px; height: 30px; }
  .nacrti-lang-btn img { width: 24px; height: 24px; }
}
