/* Client-requested additions on top of the captured WordPress pages (served by lib/render.ts). */

/* Back-to-top arrow (every page) */
.rf4eu-totop {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9990;
  width: 48px;
  height: 48px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #3c6e91 0%, #7fa38c 60%, #edd98e 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(60, 110, 145, 0.28);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s linear 0.25s, box-shadow 0.2s ease;
}
.rf4eu-totop.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0s, box-shadow 0.2s ease;
}
.rf4eu-totop:hover { box-shadow: 0 8px 24px rgba(60, 110, 145, 0.42); }
.rf4eu-totop:focus-visible { outline: 3px solid #3c6e91; outline-offset: 3px; }
.rf4eu-totop svg { width: 22px; height: 22px; }
@media (max-width: 767px) {
  .rf4eu-totop { right: 16px; bottom: 16px; width: 42px; height: 42px; }
}

/* Home BLOG: prev/next arrows instead of the 1, 2 pagination */
.rf4eu-slider { position: relative; }
.rf4eu-slider nav.elementor-pagination { display: none !important; }
.rf4eu-slider .elementor-loop-container { transition: opacity 0.22s ease; }
.rf4eu-slider.is-loading .elementor-loop-container { opacity: 0; }
.rf4eu-arrows { position: absolute; inset: 0; pointer-events: none; }
.rf4eu-arrow {
  position: absolute;
  pointer-events: auto;
  top: var(--rf4eu-arrow-top, 162px);
  z-index: 5;
  width: 46px;
  height: 46px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1.5px solid #3c6e91;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #3c6e91;
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 0.2s ease, color 0.2s ease;
}
.rf4eu-arrow:hover { background: #3c6e91; color: #fff; }
.rf4eu-arrow:focus-visible { outline: 3px solid #3c6e91; outline-offset: 3px; }
.rf4eu-arrow svg { width: 22px; height: 22px; }
.rf4eu-arrow--prev { left: -62px; }
.rf4eu-arrow--next { right: -62px; }
@media (max-width: 1366px) {
  .rf4eu-arrow--prev { left: -8px; }
  .rf4eu-arrow--next { right: -8px; }
}
@media (max-width: 767px) {
  /* One column on phones: arrows sit in a row under the posts, clear of the floating widgets. */
  .rf4eu-arrows { position: static; display: flex; justify-content: center; gap: 20px; margin-top: 28px; }
  .rf4eu-arrow { position: static; transform: none; }
}
/* Post-list pagination (1 2 3 4): brand circles like the slider arrows, clear of the articles */
nav.elementor-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 56px !important;
  padding-bottom: 24px;
}
nav.elementor-pagination .page-numbers {
  min-width: 42px;
  height: 42px;
  margin: 0 !important;
  padding: 0 10px;
  display: inline-grid;
  place-items: center;
  border: 1.5px solid #3c6e91;
  border-radius: 999px;
  background: #fff;
  color: #3c6e91 !important;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
}
nav.elementor-pagination a.page-numbers:hover,
nav.elementor-pagination .page-numbers.current {
  background: #3c6e91;
  color: #fff !important;
}
nav.elementor-pagination .page-numbers.dots { border-color: transparent; background: none; }
nav.elementor-pagination a.page-numbers:focus-visible { outline: 3px solid #3c6e91; outline-offset: 3px; }
@media (max-width: 767px) {
  nav.elementor-pagination { margin-top: 40px !important; gap: 8px; }
  nav.elementor-pagination .page-numbers { min-width: 38px; height: 38px; }
}
.rf4eu-sr {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
@media (prefers-reduced-motion: reduce) {
  .rf4eu-totop, .rf4eu-arrow, .rf4eu-slider .elementor-loop-container { transition: none; }
}

/* Blog posts: the theme's ".single-post a { color: #3c6e91 }" outranks Elementor's white button text, so
   buttons without their own text colour (footer "Subscribe") showed blue text on a blue button. Same on the
   old WordPress site; restored to Elementor's default white. Buttons with their own colour/hover rules win. */
.single-post a.elementor-button { color: #fff; }
