/* =========================
   KAFELKI MAGII
========================= */

/* Płynny ruch całego kafelka */
.kafelek-magii {
  transition: transform 0.35s ease;
}

/* Uniesienie kafelka po najechaniu */
.kafelek-magii:hover {
  transform: translateY(-5px);
}

/* Płynne powiększanie ilustracji */
.kafelek-magii .obrazek-kafelka img {
  transition: transform 0.35s ease;
}

/* Powiększenie ilustracji */
.kafelek-magii:hover .obrazek-kafelka img {
  transform: scale(1.05);
}

/* Płynna zmiana koloru nagłówka */
.kafelek-magii .tytul-kafelka .elementor-heading-title {
  transition: color 0.35s ease;
}

/* Granatowy nagłówek po najechaniu */
.kafelek-magii:hover .tytul-kafelka .elementor-heading-title {
  color: #24335A !important;
}


/* =========================
   ŚCIEŻKI MAGII
========================= */

.magic-path img {
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
  border: 2px solid transparent;
  border-radius: 50%;
  box-shadow: none;
}

.magic-path:hover img {
  transform: scale(1.03) rotate(1deg);
  border-color: #c8a44d;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.18);
}


/* =========================
   MENU DESKTOPOWE
========================= */

@media (min-width: 922px) {

  .main-header-menu .sub-menu {
    background: #2F427D !important;
    border: none !important;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    padding: 8px 0;
  }

  .main-header-menu .sub-menu a {
    color: #ffffff !important;
    padding: 12px 20px !important;
    transition: background-color 0.2s ease, color 0.2s ease;
  }

  .main-header-menu .sub-menu a:hover,
  .main-header-menu .sub-menu a:focus {
    background: #4358A0 !important;
    color: #ffffff !important;
  }
}


/* =========================
   MENU MOBILNE — ASTRA
========================= */

@media (max-width: 921px) {

  /* Tło całego panelu mobilnego */
  .ast-mobile-popup-drawer,
  .ast-mobile-popup-drawer .ast-mobile-popup-inner,
  .ast-mobile-popup-drawer .ast-mobile-popup-content,
  .ast-builder-menu-mobile,
  .ast-builder-menu-mobile .main-navigation,
  .ast-builder-menu-mobile .main-header-menu {
    background: #2F427D !important;
  }

  /* Usunięcie białych teł i wielkich odstępów */
  .ast-builder-menu-mobile .main-header-menu,
  .ast-builder-menu-mobile .main-header-menu > .menu-item,
  .ast-builder-menu-mobile .main-header-menu .menu-item {
    margin: 0 !important;
    padding: 0 !important;
    min-height: 0 !important;
    height: auto !important;
    background: transparent !important;
  }

  /* Linki głównego poziomu */
  .ast-builder-menu-mobile .main-header-menu .menu-link {
    display: flex !important;
    align-items: center;
    width: 100%;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 16px 24px !important;
    color: #ffffff !important;
    background: transparent !important;
    border: none !important;
  }

  /* Kontener podmenu */
  .ast-builder-menu-mobile .main-header-menu .sub-menu {
    position: static !important;
    display: none;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    background: #26386F !important;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    overflow: visible !important;
  }

  /* Pokazuj podmenu tylko po rozwinięciu */
  .ast-builder-menu-mobile .main-header-menu .menu-item.ast-submenu-expanded > .sub-menu,
  .ast-builder-menu-mobile .main-header-menu .menu-item.menu-item-has-children.open > .sub-menu,
  .ast-builder-menu-mobile .main-header-menu .menu-item.menu-item-has-children.focus > .sub-menu {
    display: block !important;
  }

  /* Linki w podmenu */
  .ast-builder-menu-mobile .main-header-menu .sub-menu .menu-link {
    padding: 14px 24px 14px 42px !important;
    color: #ffffff !important;
    background: transparent !important;
  }

  /* Hover i aktywna pozycja */
  .ast-builder-menu-mobile .main-header-menu .menu-link:hover,
  .ast-builder-menu-mobile .main-header-menu .menu-link:focus,
  .ast-builder-menu-mobile .main-header-menu .current-menu-item > .menu-link,
  .ast-builder-menu-mobile .main-header-menu .current-menu-ancestor > .menu-link {
    color: #ffffff !important;
    background: #4358A0 !important;
  }

  /* Przycisk rozwijania podmenu */
  .ast-builder-menu-mobile .ast-menu-toggle {
    color: #ffffff !important;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
  }

  /* Ikona zamykania menu */
  .ast-mobile-popup-drawer .ast-mobile-popup-header .menu-toggle-close,
  .ast-mobile-popup-drawer .ast-mobile-popup-header .menu-toggle-close .ast-mobile-svg {
    color: #ffffff !important;
    fill: #ffffff !important;
    background: transparent !important;
    border: none !important;
  }
}
/* Hamburger mobilny — domyślnie czarny na podstronach */
@media (max-width: 921px) {
  .ast-header-break-point .main-header-menu-toggle,
  .ast-header-break-point .menu-toggle,
  .ast-header-break-point .ast-mobile-menu-trigger-minimal {
    color: #111111 !important;
    fill: #111111 !important;
    border-color: #111111 !important;
  }

  .ast-header-break-point .main-header-menu-toggle svg,
  .ast-header-break-point .menu-toggle svg,
  .ast-header-break-point .ast-mobile-menu-trigger-minimal svg {
    fill: #111111 !important;
  }

  /* Tylko strona główna — biały hamburger */
  body.home .main-header-menu-toggle,
  body.home .menu-toggle,
  body.home .ast-mobile-menu-trigger-minimal {
    color: #ffffff !important;
    fill: #ffffff !important;
    border-color: #ffffff !important;
  }

  body.home .main-header-menu-toggle svg,
  body.home .menu-toggle svg,
  body.home .ast-mobile-menu-trigger-minimal svg {
    fill: #ffffff !important;
  }
}
@media (min-width: 922px) {
  .main-header-menu > .menu-item > .menu-link {
    position: relative;
  }

  .main-header-menu > .menu-item > .menu-link::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: 6px;
    width: 0;
    height: 1px;
    background: currentColor;
    transform: translateX(-50%);
    transition: width 0.25s ease;
  }

  .main-header-menu > .menu-item > .menu-link:hover::after,
  .main-header-menu > .current-menu-item > .menu-link::after {
    width: calc(100% - 24px);
  }
}
.elementor-button {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background-color 0.25s ease;
}

.elementor-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 22px rgba(36, 51, 90, 0.22);
}

.elementor-button:active {
  transform: translateY(-1px);
}
::selection {
  background: #4358A0;
  color: #ffffff;
}
.entry-content a:not(.elementor-button) {
  color: #31488D;
  text-decoration-color: rgba(49, 72, 141, 0.35);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition:
    color 0.2s ease,
    text-decoration-color 0.2s ease;
}

.entry-content a:not(.elementor-button):hover {
  color: #24335A;
  text-decoration-color: #24335A;
}
html {
  scroll-behavior: smooth;
}
a:focus-visible,
button:focus-visible,
.elementor-button:focus-visible {
  outline: 3px solid #c8a44d;
  outline-offset: 4px;
  border-radius: 4px;
}
.wpforms-container input,
.wpforms-container textarea,
.wpforms-container select {
  border: 1px solid rgba(36, 51, 90, 0.25) !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wpforms-container input:focus,
.wpforms-container textarea:focus,
.wpforms-container select:focus {
  border-color: #4358A0 !important;
  box-shadow: 0 0 0 3px rgba(67, 88, 160, 0.14) !important;
  outline: none !important;
}

.wpforms-container button[type="submit"] {
  background: #24335A !important;
  color: #ffffff !important;
  border-radius: 999px !important;
  padding: 12px 28px !important;
  border: none !important;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.wpforms-container button[type="submit"]:hover {
  background: #4358A0 !important;
  transform: translateY(-2px);
}
.ast-sticky-active {
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(10px);
}
/* =========================
   PŁYNNE PRZEJŚCIA MIĘDZY STRONAMI
========================= */

/* Włączenie natywnych przejść między podstronami */
@view-transition {
  navigation: auto;
}

/* Stara strona delikatnie znika */
::view-transition-old(root) {
  animation: page-out 0.22s ease both;
}

/* Nowa strona płynnie się pojawia */
::view-transition-new(root) {
  animation: page-in 0.32s ease both;
}

@keyframes page-out {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes page-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* =========================
   MNIEJ SKAKANIA UKŁADU
========================= */

/* Zachowuje miejsce na pasek przewijania */
html {
  scrollbar-gutter: stable;
  scroll-behavior: smooth;
}

/* Zapobiega przypadkowemu przewijaniu strony na boki */
html,
body {
  max-width: 100%;
  overflow-x: clip;
}


/* =========================
   DOSTĘPNOŚĆ
========================= */

@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}
/* =========================
   TECHNICZNE DOPIESZCZENIE STRONY
========================= */

/* Nagłówki układają się w estetyczniejsze linie */
h1,
h2,
h3 {
  text-wrap: balance;
}

/* Akapity unikają pojedynczych słów w ostatniej linii */
p {
  text-wrap: pretty;
}

/* Kotwice nie chowają się pod nagłówkiem strony */
[id] {
  scroll-margin-top: 110px;
}

/* Przyciski i ważne linki są wygodniejsze do dotknięcia na telefonie */
.elementor-button,
button,
input[type="submit"] {
  min-height: 44px;
}

/* Długie adresy i wyrazy nie rozwalają szerokości strony */
.entry-content,
.elementor-widget-text-editor {
  overflow-wrap: anywhere;
}

/* Obrazy nie wychodzą poza kontener */
img {
  max-width: 100%;
  height: auto;
}

/* Płynniejsze przewijanie na urządzeniach dotykowych */
body {
  -webkit-overflow-scrolling: touch;
}

/* Bezpieczne odsunięcie treści od dolnej krawędzi iPhone'a */
.ast-mobile-popup-content {
  padding-bottom: env(safe-area-inset-bottom);
}

/* Wyraźniejsze, ale eleganckie zaznaczenie pól formularza */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 2px solid #c8a44d;
  outline-offset: 2px;
}
/* =========================
   STOPKA UCZ SIĘ MAGII
========================= */

.custom-site-footer {
  width: 100%;
  padding: 56px 32px 34px;
  background: #24335A;
  color: #ffffff;
}

.custom-site-footer .footer-columns {
  width: min(1200px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1.1fr 1.5fr;
  gap: 48px;
}

.custom-site-footer h3 {
  margin: 0 0 18px;
  color: #ffffff;
  font-size: 15px;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.custom-site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 15px;
  line-height: 1.8;
}

.custom-site-footer .footer-links {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.custom-site-footer .footer-links a {
  display: inline-block;
  margin-bottom: 11px;
  color: rgba(255, 255, 255, 0.86);
  font-size: 15px;
  line-height: 1.5;
  text-decoration: none;
  transition:
    color 0.2s ease,
    transform 0.2s ease;
}

.custom-site-footer .footer-links a:hover,
.custom-site-footer .footer-links a:focus {
  color: #c8a44d;
  transform: translateX(4px);
}

.custom-site-footer .footer-links a:focus-visible {
  outline: 2px solid #c8a44d;
  outline-offset: 4px;
  border-radius: 2px;
}

@media (max-width: 767px) {
  .custom-site-footer {
    padding: 42px 24px 30px;
  }

  .custom-site-footer .footer-columns {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .custom-site-footer h3 {
    margin-bottom: 12px;
  }

  .custom-site-footer .footer-links a {
    margin-bottom: 13px;
  }
}
/* =========================
   DOPRACOWANIE STOPKI
========================= */

/* Stopka na pełną szerokość */
.custom-site-footer {
  width: 100vw;
  max-width: none;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

/* Wyłączenie niebieskiego automatycznego linkowania numerów na iPhone */
.custom-site-footer a[x-apple-data-detectors],
.custom-site-footer a[href^="tel:"] {
  color: inherit !important;
  text-decoration: none !important;
}

/* Delikatnie bardziej zwarta wersja mobilna */
@media (max-width: 767px) {
  .custom-site-footer {
    padding: 36px 26px 28px;
  }

  .custom-site-footer .footer-columns {
    gap: 28px;
  }

  .custom-site-footer h3 {
    font-size: 14px;
    margin-bottom: 10px;
  }

  .custom-site-footer p,
  .custom-site-footer .footer-links a {
    font-size: 16px;
    line-height: 1.65;
  }

  .custom-site-footer .footer-links a {
    margin-bottom: 9px;
  }
}
/* Usunięcie białego paska pod stopką */
.elementor-location-footer,
.site-footer,
footer,
.hfe-footer,
.hfe-before-footer-wrap {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  background-color: #24335A !important;
}

/* Brak przerwy pod ostatnim elementem stopki */
.elementor-location-footer > *:last-child,
.site-footer > *:last-child,
footer > *:last-child {
  margin-bottom: 0 !important;
}

.custom-site-footer {
  margin-bottom: 0 !important;
}
/* Ukrycie dużej ikony SureCookie podczas ładowania */
.surecookie-public-banner img,
.surecookie-banner img,
.surecookie-public-banner svg,
.surecookie-banner svg {
  max-width: 24px !important;
  max-height: 24px !important;
  width: 24px !important;
  height: 24px !important;
}