/**
 * Warstwa nadpisująca nad template.css — spójny, lżejszy wygląd bez zmiany struktury HTML.
 */
:root {
  --hfs-green: #50ad39;
  --hfs-green-dark: #3d8b2f;
  --hfs-ink: #1a2e1f;
  --hfs-ink-muted: #3d4f42;
  --hfs-surface: #f4f7f5;
  --hfs-header-glass: rgba(255, 255, 255, 0.92);
  --hfs-radius-sm: 6px;
  --hfs-radius-md: 12px;
  --hfs-shadow-soft: 0 1px 0 rgba(0, 40, 20, 0.06);
  --hfs-shadow-card: 0 8px 24px rgba(0, 40, 20, 0.08);
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  background-color: var(--hfs-surface);
  color: var(--hfs-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ——— Wspólne klasy zamiast inline (stary CMS): tła sekcji, wyrównanie tekstu ——— */
.section-row.hfs-row-banner {
  height: 100%;
  background-image: url("../../file/e012/slider.jpg");
  background-size: cover;
}

.section-row.hfs-row-fill {
  height: 100%;
  background-size: cover;
}

.section-row.hfs-row-services {
  height: auto;
  background-size: cover;
}

.section-row.hfs-row-bank {
  height: 100%;
  background-image: url("../../file/14b2/bank_bg-min.png");
  background-size: cover;
}

#content .text-widget.hfs-prose-justify > p,
#content p.hfs-prose-justify {
  text-align: justify;
}

#content .hfs-text-left p,
#content .hfs-text-left ul,
#content p.hfs-text-left,
#content ul.hfs-text-left {
  text-align: left;
}

#content .main-button p {
  text-align: center;
}

/* ——— Nagłówek: jasny „glass”, ciemna typografia menu ——— */
#header {
  background-color: var(--hfs-header-glass);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid rgba(0, 40, 20, 0.08);
  box-shadow: var(--hfs-shadow-soft);
}

#header .menu-container .header-menu-bar .menu-widget ul.nav li a {
  color: var(--hfs-ink);
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0.04em;
}

#header .menu-container .header-menu-bar .menu-widget ul.nav li a:hover {
  color: var(--hfs-green);
}

@media only screen and (min-width: 992px) {
  #header .menu-container .header-menu-bar .menu-widget ul.nav li a:hover {
    color: var(--hfs-green);
  }
}

#header .menu-container .header-menu-bar .menu-widget ul.nav li a:focus-visible {
  outline: 2px solid var(--hfs-green);
  outline-offset: 3px;
}

#header button svg rect {
  fill: var(--hfs-green-dark);
}

body.menu-active #header button svg rect {
  fill: var(--hfs-ink);
}

/* ——— Treść: czytelność ——— */
#content .text-widget p,
#content .text-widget li {
  line-height: 1.65;
  color: var(--hfs-ink-muted);
}

#content .text-widget h1,
#content .text-widget h2 {
  color: var(--hfs-ink);
  letter-spacing: -0.02em;
}

#content .text-widget a:not(.box-button) {
  color: var(--hfs-green-dark);
  text-decoration: underline;
  text-decoration-color: rgba(80, 173, 57, 0.35);
  text-underline-offset: 2px;
}

#content .text-widget a:not(.box-button):hover {
  color: var(--hfs-green);
  text-decoration-color: var(--hfs-green);
}

/* Sekcja usług na stronie głównej */
.home-services > .section-row {
  border-radius: var(--hfs-radius-md) var(--hfs-radius-md) 0 0;
}

.home-services .box-widget {
  background-color: #fafcfb;
  border-radius: var(--hfs-radius-md);
  overflow: hidden;
  box-shadow: var(--hfs-shadow-card);
  transition: box-shadow 0.25s ease, transform 0.25s ease;
  align-items: stretch;
}

/* Na desktopie ikona jest ukryta — karta w kolumnie z większym paddingiem */
@media only screen and (min-width: 992px) {
  .home-services .box-widget {
    flex-direction: column;
  }

  .home-services .box-widget .box-title-container {
    flex: 0 0 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 1.35rem 1.5rem 0.65rem;
  }

  .home-services .box-widget .box-content-container {
    flex: 1 1 auto;
    width: 100%;
    box-sizing: border-box;
    padding: 0 1.5rem 1.5rem;
  }
}

@media only screen and (max-width: 991px) {
  .home-services .box-widget .box-image-container {
    padding: 1.1rem 1.25rem 0;
    box-sizing: border-box;
  }

  .home-services .box-widget .box-title-container {
    padding: 0.65rem 1.35rem 0.35rem;
    box-sizing: border-box;
  }

  .home-services .box-widget .box-content-container {
    padding: 0 1.35rem 1.35rem;
    box-sizing: border-box;
  }
}

@media (hover: hover) {
  .home-services .box-widget:hover {
    box-shadow: 0 12px 32px rgba(0, 40, 20, 0.12);
  }
}

/* Kadra: lista województw + miniatura mapy regionu (bez interakcji) */
#content .hfs-page-kadra .hfs-kadra-region-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 1rem 1.75rem;
  margin: 0.5rem 0 1.25rem;
}

#content .hfs-page-kadra .hfs-kadra-region-list {
  flex: 1 1 14rem;
  min-width: min(100%, 12rem);
  max-width: 100%;
}

#content .hfs-page-kadra .hfs-kadra-region-list ul {
  margin: 0;
  padding-left: 1.25rem;
}

#content .hfs-page-kadra .hfs-kadra-region-map-wrap {
  flex: 0 1 260px;
  width: 260px;
  max-width: min(100%, 320px);
}

#content .hfs-page-kadra .hfs-kadra-region-map-svg {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--hfs-radius-md);
  box-shadow: var(--hfs-shadow-card);
  border: 1px solid rgba(0, 40, 20, 0.08);
  pointer-events: none;
}

@media only screen and (max-width: 639px) {
  #content .hfs-page-kadra .hfs-kadra-region-map-wrap {
    flex: 1 1 100%;
    width: 100%;
    max-width: 280px;
    margin-left: auto;
    margin-right: auto;
  }
}

/* Kadra: komórki tabeli jak karty usług (#content + klasa sekcji wygrywa ze zwykłymi tabelami) */
#content .hfs-page-kadra .text-widget table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 1rem 1.25rem;
  margin: 0.5rem 0 1rem;
  background: transparent;
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}

#content .hfs-page-kadra .text-widget table td {
  background-color: #fafcfb;
  border-radius: var(--hfs-radius-md);
  box-shadow: var(--hfs-shadow-card);
  padding: 1.35rem 1.5rem;
  vertical-align: top;
  border: none;
}

#content .hfs-page-kadra .text-widget table h3 {
  color: var(--hfs-green-dark);
  font-size: 1.15em;
  margin-top: 0;
  margin-bottom: 0.35em;
}

#content .hfs-page-kadra .text-widget table h4 {
  color: var(--hfs-ink);
  margin-top: 0.25em;
  margin-bottom: 0.5em;
}

@media only screen and (max-width: 767px) {
  #content .hfs-page-kadra .text-widget table,
  #content .hfs-page-kadra .text-widget table tbody,
  #content .hfs-page-kadra .text-widget table tr,
  #content .hfs-page-kadra .text-widget table td {
    display: block;
    width: 100%;
  }

  #content .hfs-page-kadra .text-widget table {
    border-spacing: 0 1rem;
  }
}

/* Przyciski CTA pod banerem */
#content .main-button a {
  border-radius: 999px;
  transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

/* Tabele ogólne — na Kadra nadpisuje blok wyżej (#content .hfs-page-kadra …) */
#content .text-widget table {
  border-radius: var(--hfs-radius-sm);
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(0, 40, 20, 0.08);
}

#content .text-widget table th,
#content .text-widget table td {
  padding: 0.65em 0.85em;
}

/* Stopka: głębszy odcień, bez utraty kontrastu */
#footer-section {
  background: linear-gradient(180deg, #3a3f3d 0%, #2e3230 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

#footer-section .text-widget p {
  line-height: 1.6;
  opacity: 0.95;
}

/* ——— Kontakt: mapa województw + popover koordynatorów ——— */
.hfs-page-kontakt .hfs-pl-map-section.kontakt-map-col {
  margin-top: 0;
  padding-top: 0;
}

.hfs-page-kontakt .hfs-pl-map-intro {
  max-width: none;
}

.hfs-page-kontakt .hfs-pl-map-wrap {
  position: relative;
  margin-top: 1rem;
}

.hfs-page-kontakt .hfs-pl-map-svg {
  width: 100%;
  max-width: 100%;
}

.hfs-page-kontakt .hfs-pl-map-svg-inner {
  width: 100%;
  height: auto;
  display: block;
}

.hfs-page-kontakt .hfs-woj {
  cursor: pointer;
  transition: fill 0.15s ease, filter 0.15s ease;
}

.hfs-page-kontakt .hfs-woj[data-region="nw"] {
  fill: #cfe8d4;
}

.hfs-page-kontakt .hfs-woj[data-region="se"] {
  fill: #d5e9dd;
}

.hfs-page-kontakt .hfs-woj[data-region="nc"] {
  fill: #d0e6da;
}

.hfs-page-kontakt .hfs-woj:hover,
.hfs-page-kontakt .hfs-woj:focus {
  filter: brightness(0.97);
}

.hfs-page-kontakt .hfs-woj[data-region="nw"]:hover,
.hfs-page-kontakt .hfs-woj[data-region="nw"]:focus {
  fill: #9fd4a8;
}

.hfs-page-kontakt .hfs-woj[data-region="se"]:hover,
.hfs-page-kontakt .hfs-woj[data-region="se"]:focus {
  fill: #a3d9b2;
}

.hfs-page-kontakt .hfs-woj[data-region="nc"]:hover,
.hfs-page-kontakt .hfs-woj[data-region="nc"]:focus {
  fill: #9ed1ae;
}

.hfs-page-kontakt .hfs-woj:focus {
  outline: none;
}

.hfs-page-kontakt .hfs-woj:focus-visible {
  outline: 2px solid var(--hfs-green);
  outline-offset: 1px;
}

.hfs-page-kontakt .hfs-pl-map-popover {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  left: auto;
  z-index: 5;
  max-width: min(280px, calc(100% - 1rem));
  max-height: min(70vh, 420px);
  overflow: auto;
  padding: 0.85rem 1rem;
  background-color: #fafcfb;
  border-radius: var(--hfs-radius-md);
  box-shadow: var(--hfs-shadow-card);
  border: 1px solid rgba(0, 40, 20, 0.1);
  pointer-events: auto;
  -webkit-overflow-scrolling: touch;
}

.hfs-page-kontakt .hfs-pl-map-popover[hidden] {
  display: none !important;
}

.hfs-page-kontakt .hfs-pl-pop-hint {
  margin: 0;
  font-size: 0.88rem;
  line-height: 1.4;
  color: var(--hfs-ink-muted);
}

.hfs-page-kontakt .hfs-pl-pop-woj {
  margin: 0 0 0.25rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--hfs-green-dark);
  line-height: 1.25;
}

.hfs-page-kontakt .hfs-pl-pop-region {
  margin: 0 0 0.65rem;
  font-size: 0.88rem;
  color: var(--hfs-ink-muted);
  line-height: 1.35;
}

.hfs-page-kontakt .hfs-pl-pop-people {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.hfs-page-kontakt .hfs-pl-pop-person {
  padding-top: 0.65rem;
  border-top: 1px solid rgba(0, 40, 20, 0.08);
}

.hfs-page-kontakt .hfs-pl-pop-person:first-of-type {
  padding-top: 0;
  border-top: none;
}

.hfs-page-kontakt .hfs-pl-pop-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--hfs-ink);
  line-height: 1.35;
}

.hfs-page-kontakt .hfs-pl-pop-phone {
  margin-top: 0.25rem;
  font-size: 0.86rem;
  line-height: 1.45;
  color: var(--hfs-ink-muted);
}

.hfs-page-kontakt .hfs-pl-pop-email {
  margin-top: 0.25rem;
  font-size: 0.86rem;
  line-height: 1.45;
  word-break: break-word;
}

.hfs-page-kontakt .hfs-pl-pop-email a {
  color: var(--hfs-green-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.hfs-page-kontakt .hfs-pl-pop-email a:hover {
  color: var(--hfs-green);
}

.hfs-page-kontakt .hfs-pl-map-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--hfs-ink-muted);
}

/* ——— Referencje: galeria skanów ——— */
.hfs-page-referencje .hfs-ref-intro {
  max-width: 48rem;
  margin-bottom: 1.25rem;
  color: var(--hfs-ink-muted);
}

.hfs-page-referencje .hfs-ref-gallery {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 600px) {
  .hfs-page-referencje .hfs-ref-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .hfs-page-referencje .hfs-ref-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.hfs-page-referencje .hfs-ref-item {
  margin: 0;
  padding: 0.75rem;
  background: #fff;
  border-radius: var(--hfs-radius-md);
  box-shadow: var(--hfs-shadow-card);
  border: 1px solid rgba(0, 40, 20, 0.07);
}

.hfs-page-referencje .hfs-ref-item img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--hfs-radius-sm);
}
