/*
 * ZTBS 2026 - odswiezenie wygladu pod nowa identyfikacje (granat + zloto).
 * Laduje sie po main.css (lib/setup.php), nadpisuje stary zielony motyw.
 * Wycofanie: usunac wp_enqueue_style('ztbs/refresh') z lib/setup.php.
 */

:root {
  --navy: #1e2551;
  --navy-dark: #141a3d;
  --navy-light: #2c3670;
  --gold: #a8804f;
  --gold-light: #d8b880;
  --gold-soft: #f4ede3;
  --bg: #f4f5f8;
  --card: #fff;
  --text: #3a3f55;
  --muted: #6b7086;
  --line: #e1e3ea;
  --radius: 10px;
  --shadow: 0 2px 6px rgba(20, 26, 61, .06), 0 8px 24px rgba(20, 26, 61, .06);
}

/* ---------- Podstawy ---------- */
body {
  background-color: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--navy); }
a:hover, a:focus { color: var(--gold); }

::selection { background: var(--gold-light); color: var(--navy-dark); }

.background-green { background: var(--navy); }

.seperator, .seperator--grey { background: var(--line); height: 1px; }

/* ---------- Naglowek ---------- */
header.banner {
  background: #fff;
  box-shadow: 0 1px 0 var(--line), 0 6px 20px rgba(20, 26, 61, .05);
  position: relative;
}

header.banner .header-top-container {
  color: var(--gold);
  letter-spacing: .06em;
}

header.banner .header-top-container a {
  color: var(--navy);
  font-weight: 700;
}
header.banner .header-top-container a:hover { color: var(--gold); text-decoration: none; }

header.banner .header-top-container img:not(.img-fluid) {
  transition: transform .2s ease;
}
header.banner .header-top-container a:hover img { transform: translateY(-2px); }

/* Pasek menu: caly granatowy, zamiast szaro-zielonego podzialu */
header.banner .header-navbar-container,
header.banner .header-navbar-container[class] {
  background: var(--navy);
  filter: none;
}

header.banner .navbar-nav > li,
header.banner .navbar-nav #menu-item-399,
header.banner .navbar-nav #menu-item-26,
header.banner .navbar-nav #menu-item-25 {
  background: transparent;
  padding: 0;
}

header.banner .navbar-nav .nav-link {
  font-size: .9375rem;
  letter-spacing: .01em;
  padding: 1.05rem .75rem;
  color: rgba(255, 255, 255, .92);
}

header.banner .navbar-nav > li > .nav-link {
  box-shadow: inset 0 -3px 0 transparent;
  transition: box-shadow .2s ease, color .2s ease, background .2s ease;
}

header.banner .navbar-nav > li > .nav-link:hover,
header.banner .navbar-nav > li.show > .nav-link,
header.banner .navbar-nav > li.active > .nav-link,
header.banner .navbar-nav > li.current-menu-item > .nav-link,
header.banner .navbar-nav > li.current-menu-ancestor > .nav-link,
header.banner .navbar-nav > li.current-menu-parent > .nav-link {
  background: var(--navy-light);
  color: #fff;
  box-shadow: inset 0 -3px 0 var(--gold);
}

/* Strefy (wykonawcy / klienta) wyroznione zlotem */
header.banner .navbar-nav #menu-item-399 > .nav-link,
header.banner .navbar-nav #menu-item-26 > .nav-link,
header.banner .navbar-nav #menu-item-25 > .nav-link {
  color: var(--gold-light);
}
header.banner .navbar-nav #menu-item-399 > .nav-link:hover,
header.banner .navbar-nav #menu-item-26 > .nav-link:hover,
header.banner .navbar-nav #menu-item-25 > .nav-link:hover {
  color: #fff;
}

/* Rozwijane podmenu */
.dropdown-menu {
  border: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 12px 30px rgba(20, 26, 61, .18);
  padding: .4rem 0;
  border-top: 3px solid var(--gold);
  min-width: 15rem;
}
.dropdown-menu .dropdown-item {
  color: var(--text);
  font-size: .9rem;
  padding: .55rem 1.25rem;
}
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus,
.dropdown-menu .dropdown-item.active,
.dropdown-menu .dropdown-item:active {
  color: var(--navy);
  background: var(--gold-soft);
}

/* ---------- Slider ---------- */
.section-slider .slide-content {
  background: rgba(255, 255, 255, .92);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  box-shadow: var(--shadow);
}
.section-slider .slide-content__title,
.section-slider .slide-content__button { color: var(--navy); }

.section-slider .slider-nav-container-holder .slider-nav-container .owl-dot span {
  background: rgba(255, 255, 255, .85);
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25);
}
.section-slider .slider-nav-container-holder .slider-nav-container .owl-dot.active span,
.section-slider .slider-nav-container-holder .slider-nav-container .owl-dot:hover span {
  background: var(--gold);
}

/* ---------- Naglowki sekcji ---------- */
.section__heading,
.section__heading h1, .section__heading h2, .section__heading h3,
.section__heading .h1, .section__heading .h2, .section__heading .h3 {
  color: var(--navy);
}

.section__heading {
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 2.25rem;
}
.section__heading::after,
.section__heading[class]::after {
  content: '';
  display: block;
  position: static;
  width: 48px;
  height: 3px;
  margin-top: .85rem;
  background: var(--gold);
  border-radius: 2px;
}

.section__subheading { color: var(--navy); }

/* ---------- Aktualnosci / ogloszenia (strona glowna i listy) ---------- */
.section-latest-posts { padding-top: 3.5rem; }

.latest-posts__item-title,
.latest-posts__item-title a { color: var(--navy); }
.latest-posts__item-title a:hover { color: var(--gold); }

.latest-posts__item-date {
  color: var(--gold);
  font-weight: 700;
  letter-spacing: .04em;
  margin-top: .35rem;
}

.latest-posts__item-excerpt {
  color: var(--muted);
  font-weight: 400;
  line-height: 1.55;
}

.latest-posts__item-more {
  color: var(--navy);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.latest-posts__item-more:hover { color: var(--gold); text-decoration: none; }

/* Karty aktualnosci na glownej */
.section-latest-posts .latest-posts:not(.latest-posts--green) .first-col-post,
.section-latest-posts .latest-posts:not(.latest-posts--green) .rest-col-post {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  height: 100%;
}
.section-latest-posts .first-col-post .latest-posts__item-title { margin-top: 0; }
.section-latest-posts .first-col-post .latest-posts__item-thumb img { border-radius: 6px; margin-bottom: 1.25rem; }
.section-latest-posts .latest-posts__item:not(:last-child) {
  border-bottom: 1px solid var(--line);
  margin-top: 0;
}
.section-latest-posts .latest-posts { margin-bottom: 1.75rem; }
.section-latest-posts .latest-posts > [class*="col-"] { margin-bottom: 1rem; }

/* Ogloszenia: granatowy panel zamiast zielonego */
.latest-posts--green {
  background: var(--navy);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin-bottom: 1.75rem;
}
.latest-posts--green .latest-posts__item:not(:last-child) { border-bottom-color: rgba(255, 255, 255, .15); }
.latest-posts--green .latest-posts__item-title,
.latest-posts--green .latest-posts__item-excerpt,
.latest-posts--green .latest-posts__item-more { color: #fff; }
.latest-posts--green .latest-posts__item-excerpt { color: rgba(255, 255, 255, .8); }
.latest-posts--green .latest-posts__item-date { color: var(--gold-light); }
.latest-posts--green .latest-posts__item-more:hover { color: var(--gold-light); }

/* Przyciski */
.btn-grey {
  background: var(--navy);
  border-radius: 999px;
  padding: .8rem 1.75rem;
  letter-spacing: .02em;
}
.btn-grey:hover, .btn-grey:focus {
  background: var(--gold);
  color: #fff;
}

.btn-primary, .wpcf7-submit {
  background: var(--navy);
  border-color: var(--navy);
}
.btn-primary:hover, .wpcf7-submit:hover {
  background: var(--gold);
  border-color: var(--gold);
}

/* ---------- Napis "Zarzadzamy wspolnotami" pod sliderem (panorama usunieta) ---------- */
.section-tagline {
  background: #fff;
  border-bottom: 1px solid var(--line);
  color: var(--navy);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.35;
  padding: 1.5rem 0;
  text-align: center;
}

/* ---------- Tresci podstron ---------- */
.section__content { color: var(--text); line-height: 1.65; }
.section__content a { color: var(--navy); text-decoration: underline; text-decoration-color: var(--gold-light); text-underline-offset: 3px; }
.section__content a:hover { color: var(--gold); }
.section__content ol li::before { color: var(--gold); }

/* Kolumna z tlem (np. Historia spolki) - granatowa nakladka na stare zielone zdjecie */
.section .background-green.background-image {
  position: relative;
  background-color: var(--navy);
}
.section .background-green.background-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(30, 37, 81, .96), rgba(20, 26, 61, .9));
}
.section .background-green.background-image > * { position: relative; z-index: 1; }
.section .background-green .section__subheading,
.section .background-green .section__subheading strong { color: var(--gold-light); }

.section--full-width-image,
.section--full-width-image[class] {
  background: linear-gradient(to right, var(--bg) 0%, var(--bg) 50%, var(--navy) 50%, var(--navy) 100%);
  filter: none;
}

.section--society:nth-child(even) { background: #eaecf2; }
.section--control .col-bordered-green { border-color: var(--line); }

/* Ikony-linki (zielone PNG z mediow) przebarwione na granat */
.icon-links__item-icon img {
  filter: brightness(0) saturate(100%) invert(12%) sepia(27%) saturate(3000%) hue-rotate(214deg) brightness(92%) contrast(95%);
  transition: transform .25s ease;
}
.icon-links__item:hover .icon-links__item-icon img { transform: translateY(-4px); }
.icon-links__item-title, .icon-links__item-title:hover { color: var(--navy); text-decoration: none; }
.icon-links__item-title:hover { color: var(--gold); }

.chevron-right--green {
  /* zielona strzalka (PNG) -> zlota */
  filter: brightness(0) saturate(100%) invert(54%) sepia(31%) saturate(560%) hue-rotate(353deg) brightness(92%) contrast(88%);
}

/* Pojedynczy wpis, listy, tabele, pliki PDF */
.single .main .entry-content, .page .section-page .section__content { max-width: 920px; }
.section__content table { border-collapse: collapse; width: 100%; background: #fff; }
.section__content table td, .section__content table th { border: 1px solid var(--line); padding: .5rem .75rem; }
.section__content table tr:nth-child(even) td { background: #fafbfc; }

.pdf-link__title { color: var(--navy); }

/* Formularze */
.form-control, input[type="text"], input[type="email"], input[type="tel"], textarea {
  border-radius: 8px;
  border-color: var(--line);
}
.form-control:focus, input:focus, textarea:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(168, 128, 79, .18);
  outline: 0;
}

/* ---------- Kontakt w stopce ---------- */
.section-contact {
  background: var(--navy);
  font-weight: 400;
}
.section-contact .section__heading,
.section-contact .section__heading[class] { color: #fff; }
.section-contact .section__heading::after { background: var(--gold); }
.section-contact .contact-heading {
  color: var(--gold-light);
  font-size: 1.15rem;
  letter-spacing: .01em;
}
.section-contact p { color: rgba(255, 255, 255, .88); line-height: 1.55; }
.section-contact .col-border::before { background: rgba(255, 255, 255, .15); }

.section-contact .contact-address {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}
.section-contact .contact-address-box {
  background: rgba(20, 26, 61, .88);
  border-left: 3px solid var(--gold);
  border-radius: 0 6px 6px 0;
}
.section-contact .contact-address .contact-heading { color: #fff; }

/* ---------- Kontakt: nowoczesniejsza czcionka (Inter, pliki na serwerze) ---------- */
@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/inter-latin-400-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal; font-display: swap; src: url(../fonts/inter-latin-ext-400-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal; font-display: swap; src: url(../fonts/inter-latin-600-normal.woff2) format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal; font-display: swap; src: url(../fonts/inter-latin-ext-600-normal.woff2) format("woff2"); unicode-range: U+0100-02AF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF; }

.section-contact,
.section-contact p,
.section-contact .section__heading,
.section-contact .contact-heading,
.section-contact-footer,
.section-contact-footer p,
.section-contact-footer .contact-heading {
  font-family: 'Inter', 'Segoe UI', Arial, sans-serif;
}
.section-contact .section__heading,
.section-contact .contact-heading,
.section-contact strong, .section-contact b,
.section-contact-footer strong, .section-contact-footer b,
.section-contact-footer .contact-heading { font-weight: 600; }

/* Zdjecie siedziby od klientki zamiast wiezy kosciola */
.section-contact .contact-address {
  background-image: url(../images/kontakt-ztbs.jpg);
  background-position: center 62%;
}

/* Pasek awarii */
.section-contact-footer {
  background: var(--navy-dark);
  border-top: 1px solid rgba(255, 255, 255, .08);
  font-weight: 400;
}
.section-contact-footer strong, .section-contact-footer b { color: var(--gold-light); }
.section-contact-footer .contact-heading { color: var(--gold-light); }

/* Stopka */
.footer {
  background: #fff;
  border-top: 3px solid var(--gold);
  color: var(--muted);
}
.footer a:hover, .footer a:focus { color: var(--navy); }

/* ---------- Tablet / telefon ---------- */
@media (max-width: 991.98px) {
  header.banner .header-top-container { padding-top: .75rem; padding-bottom: .5rem; }

  /* logo po lewej, ikony BIP itd. mniejsze i w jednym rzedzie */
  header.banner .header-top-container .col-md-4:first-child { text-align: center; }
  header.banner .header-top-container .logo img { max-width: 260px; height: auto; }

  header.banner .header-top-container .text-right { text-align: center !important; }
  header.banner .header-top-container .text-right p { line-height: 1.6; }

  header.banner .header-top-container .text-center img { height: 36px; width: auto; margin: 0 .35rem; }

  header.banner .header-navbar-container { padding-top: .1rem; padding-bottom: .1rem; }

  header.banner .menu-toggler { margin: 12px 0; width: 30px; }
  header.banner .menu-toggler .icon-bar { height: 3px; margin: 3px 0; background: #fff; }

  /* Menu mobilne (slicknav) */
  header.banner .slicknav_menu .slicknav_nav {
    border-radius: 0;
    margin: 0 -15px .5rem;
    padding: .25rem 0 .5rem;
    background: var(--navy);
  }
  header.banner .slicknav_menu .slicknav_nav li a {
    margin: 0;
    padding: .85rem 1.25rem;
    font-size: 1rem;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
    border-radius: 0;
  }
  header.banner .slicknav_menu .slicknav_nav li a:hover,
  header.banner .slicknav_menu .slicknav_nav li a:focus {
    background: var(--navy-light);
  }
  header.banner .slicknav_menu .slicknav_nav li.current-menu-item > a,
  header.banner .slicknav_menu .slicknav_nav li.current-menu-item a {
    color: var(--gold-light);
    background: var(--navy-light);
    border-radius: 0;
    box-shadow: inset 3px 0 0 var(--gold);
  }
  header.banner .slicknav_menu .slicknav_nav ul { margin: 0; background: var(--navy-dark); }
  header.banner .slicknav_menu .slicknav_nav ul li a { padding-left: 2.25rem; font-size: .95rem; }
  header.banner .slicknav_menu .slicknav_arrow { float: right; color: var(--gold-light); }
  /* Pozycje z podmenu: link wewnatrz wiersza bez wlasnych odstepow, w jednej linii z reszta */
  header.banner .slicknav_menu .slicknav_nav li .slicknav_row > a {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
  }

  .section__heading,
  .section__heading[class] { align-items: flex-start; justify-content: flex-start; text-align: left; }
  .section__heading h1, .section__heading h2, .section__heading .h1 { text-align: left; }

  .first-col-post .latest-posts__item { border-bottom: 0; margin-bottom: 0; padding-bottom: 0; }

  .section-latest-posts .latest-posts:not(.latest-posts--green) .first-col-post,
  .section-latest-posts .latest-posts:not(.latest-posts--green) .rest-col-post { padding: 1.25rem; }
}

/* Tablet pionowo: waskie kolumny kontaktu, bez wciec, zeby adresy e-mail miescily sie na ekranie */
@media (min-width: 768px) and (max-width: 991.98px) {
  .section-contact p { padding-left: 0; font-size: .875rem; overflow-wrap: anywhere; }
  .section-contact .contact-heading { margin-left: 0; font-size: 1.05rem; }
  .section-contact .contact-address { padding: .75rem; background-position: 45% center; }
  .section-contact .contact-address-box { padding: .6rem .75rem; }
  .section-contact .contact-address .contact-heading { font-size: .95rem; margin-bottom: .5rem; }
}

@media (max-width: 767.98px) {
  body { font-size: 16px; }

  .section { padding-top: 2.25rem; padding-bottom: 2.25rem; }

  header.banner .header-top-container .logo img { max-width: 220px; }
  header.banner .header-top-container .col-md-8 > .row > [class*="col-"] { margin-top: .4rem !important; margin-bottom: .2rem !important; }

  .latest-posts__item-title { font-size: 1.2rem; line-height: 1.3; }
  .latest-posts__item-excerpt { font-size: 1rem; }

  .latest-posts--green { padding: 1.25rem; }

  .section-tagline { font-size: 1.1rem; padding: 1.1rem 0; }

  /* Slider: podpis mniejszy i w calosci na ekranie */
  .section-slider .slide-content {
    max-width: calc(100vw - 2rem);
    padding: .6rem .9rem;
    margin-bottom: 1rem;
  }
  .section-slider .slide-content__title { font-size: 1.25rem; letter-spacing: 0; line-height: 1.2; }
  .section-slider .slide-content__button { font-size: .85rem; padding: .4rem 0 0; }
  .section-slider .slider-nav-container-holder { margin-top: .25rem; }

  /* Kontakt: wiekszy, wygodny tekst, odstepy */
  .section-contact p { padding-left: 0; }
  .section-contact .contact-heading { margin-left: 0; font-size: 1.1rem; }
  /* Wyzsze zdjecie i ramka przy dolnej krawedzi: drzwi i tablica ZTBS zostaja widoczne */
  .section-contact .contact-address { height: 480px; padding: .75rem; background-position: center 30%; }
  .section-contact .contact-address-box { padding: .6rem .85rem; }
  .section-contact .contact-address .contact-heading { font-size: 1rem; margin-bottom: .5rem; }
  .section-contact .contact-address-box p { font-size: .9375rem; line-height: 1.4; }
  .section-contact .col-12 + .col-12 { margin-top: .5rem; }

  .section-contact-footer { text-align: center; }
  .section-contact-footer [class*="col-"] + [class*="col-"] { margin-top: .75rem; }

  .footer { text-align: center; }
  .footer .nav { float: none !important; justify-content: center; padding-right: 0 !important; }
  .footer .d-flex { flex-direction: column; }

  .icon-links__item { margin-bottom: 1.5rem; }

  .section__content { text-align: left; }
}

/* Dostepnosc: widoczny fokus z klawiatury */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
