body {
  margin: 0;
  font-family: 'Segoe UI', sans-serif;
  background-color: #fefefe;
  color: #2d2d2d;
}
html {
  scroll-behavior: smooth;
}  

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

.page-wrapper {
  min-height: 65vh;
  display: flex;
  flex-direction: column;
}

:root {
  --primary-dark: #1a2a4f;
  --primary: #20507F;
  --accent: #F5A623;
  --gradient-main: linear-gradient(-45deg, var(--primary-dark), var(--primary));
  --gradient-submenu: linear-gradient(-45deg, #243f6b, #2e5a8c);
}

/* Header i Footer */
.header,
.footer {
  background: var(--gradient-main);
  color: #fff;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}

.logo-box {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.logo {
  max-height: 120px;
}

.company-name {
  font-size: 1.3rem;
  font-weight: bold;
}

.company-name .highlight {
  color: #4b94ff;
}

/* Hamburger button */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 1000;
}

/* === MENU NAVIGATION === */
.main-nav {
  width: 100%;
  text-align: center;
}

/* MENU – WSPÓLNE */
.menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.menu li {
  position: relative;
  transition: background 0.3s ease;
}

.menu li:hover {
  background: rgba(255, 255, 255, 0.07);
}

.menu a {
  color: white;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  display: block;
  transition: color 0.3s ease;
}

/* Content Section */
.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  width: 100%;
  box-sizing: border-box;
}
.content-full-width {
  max-width: 100%;
  /*padding: 3rem 2rem;  zachowaj padding, jeśli go potrzebujesz */
}

.section-title {
  font-size: 2rem;
  color: #1a2a4f;
  text-align: center;
  margin-bottom: 1rem;
}

.hero {
  display: flex;
  align-items: center;       /* środek w pionie */
  padding: 0rem 1rem;
  /*background-color: #f4f6fa;*/
  text-align: center;
}

.hero-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 1000px;
  width: 100%;
}

.hero-text h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* Footer */
.footer {
  background-color: #1a2a4f;
  color: white;
  padding: 1rem;
}

.footer-content {
  max-width: 1200px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-left {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.footer-logo {
  max-height: 50px;
}

.footer-contact {
  font-size: 0.95rem;
  line-height: 1.6;
}

.footer-contact a {
  color: #ffffff;
  text-decoration: underline;
}

.footer-right {
  font-size: 0.85rem;
  opacity: 0.7;
  text-align: right;
}

/* Przycisk domyślny (np. ze strony mieszkań) */
.button-primary {
  background: var(--gradient-main);
  color: #fff;
  border: none;
}

/* Przycisk akcentujący (np. ze wspólnoty) */
.button-accent {
  background-color: var(--accent);
  color: #fff;
  border: none;
}

.button-accent:hover {
  background-color: #d48d1e;
}

 /*dokumenty*/
h2 { margin-bottom: 1rem; }

      .shortcut-list {
      list-style: none;
      padding: 0;
      margin: 0 0 1.5rem 0;
      display: flex;
      flex-direction: column;
      gap: 0.4rem;
    }

    .shortcut-list li a {
      text-decoration: none;
      color: #1a2a4f;
      font-weight: bold;
      font-size: 1rem;
      transition: color 0.2s ease;
    }

    .shortcut-list li a:hover {
      color: #0056b3;
    }
    .shortcut-list a.active {
      color: #0056b3;
      text-decoration: underline;
    }

    .documents {
      margin-top: 1rem;
      max-width: 960px;
      margin-left: auto;
      margin-right: auto;
    }

    .document {
      display: flex;
      border-bottom: 1px solid #ddd;
      padding: 1rem 0;
      gap: 1rem;
    } 

    .document.hidden {
     display: none !important;
    }
    
    .document.visible {
      display: block;
      opacity: 1;
    }

    .left-col {
      flex: 100%;
    }

    .right-col {
      width: 150px;
      text-align: center;
    }

    .right-col img {
      width: 30px;
      height: auto;
      margin-top: 0.2rem;
    }

    .document-title {
      font-weight: bold;
      font-size: 1.05rem;
      margin-bottom: 0.3rem;
      color: #000;
      flex: 1 1 auto;
      min-width: 0;
    }

    .document-desc {
      font-size: 0.95rem;
      color: #444;
      margin-bottom: 0.6rem;
      line-height: 1.45;
    }
    
    .document-head {
      display: flex;
      justify-content: space-between;
      align-items: flex-start;
      gap: 1rem;
      margin-bottom: 0.5rem;
      flex-wrap: nowrap;
    }

    .document-title {
      font-weight: bold;
      font-size: 1.05rem;
      color: #000;
      flex: 1 1 auto;
      max-width: calc(100% - 50px);
    }

    .document-icon {
      width: 26px;
      height: auto;
      flex-shrink: 0;
    }

    .file-entries {
      display: flex;
      flex-direction: column;
      gap: 0.25rem;
      margin-top: 0.5rem;
    }

    .file-entry {
      display: flex;
      justify-content: space-between;
      align-items: center;
      font-size: 0.93rem;
    }

    .file-entry .label {
      color: #333;
    }

    .file-entry a img {
      width: 18px;
      height: auto;
    }

    .file-entry a:hover img {
      transform: scale(1.05);
    }
 .documents .document [id] {
  display: block;
  position: relative;
  top: -60px; /* dostosuj do wysokości nagłówka */
  height: 0;
  visibility: hidden;
}   
       
 .kotwica-anchor {
  display: block;
  position: relative;
  top: -60px;
  height: 0;
  visibility: hidden;
}  

/*przycisk do powrotu na górę strony*/
.powrot-container {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 1000; /* Upewnia się, że przycisk jest na wierzchu */
}

#powrot a img {
    width: 20px; /* Dostosuj rozmiar ikony */
    height: 20px;
    /*opacity: 0.8;
    transition: opacity 0.3s; 
    border-radius: 50%; */
    /*background-color: #007bff;*/ /* Niebieskie tło */
    padding: 10px; 
    /*box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    transition: background-color 0.2s, transform 0.2s  */
}

#powrot a img:hover {
    /*opacity: 1;    
    background-color: #0056b3;*/ /* Ciemniejszy niebieski przy najechaniu */
    transform: scale(1.1);
} 

.pdf-icon {
  width: 16px;
  height: 16px;
  vertical-align: middle;
  margin-right: 0.5em;
}

.download-list {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  justify-content: center;
  max-width: 1000px;
  margin: 2rem auto;
}

.download-item {
  flex: 1 1 300px;
  background-color: #ffffff;
  border: 1px solid #d0d5dc;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  text-align: left;
}

.download-item h3 {
  font-size: 1.1rem;
  color: #20507F;
  margin-bottom: 0.5rem;
}

.download-item p {
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.download-item a.button-primary {
  font-size: 0.95rem;
  text-decoration: none;
  background-color: #f5a623;
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: 5px;
  display: inline-block;
  transition: background 0.3s ease;
}

.download-item a.button-primary:hover {
  background-color: #d1871d;
}

.filter-row {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  margin-top: 2rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.filter-group label {
  font-size: 1rem;
  color: #1a2a4f;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.filter-group select {
  padding: 0.6rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
  min-width: 250px;
  transition: border-color 0.3s ease;
}

.filter-group select:focus {
  outline: none;
  border-color: #1a2a4f;
  box-shadow: 0 0 0 3px rgba(26, 42, 79, 0.15);
}

/* BLOK TYLKO DLA AKTÓW */
input.budynek-input {
  width: 100%;
  padding: 0.6rem 1rem;
  padding-right: 2rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  height: 42px;
  box-sizing: border-box;
}

ul.suggestions-list {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 0.5rem 0.5rem;
  margin-top: -1px;
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  box-sizing: border-box;
  display: none;
  list-style: none;
}

ul.suggestions-list.visible {
  display: block;
}

ul.suggestions-list li {
  position: relative;
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-size: 0.95rem;
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  list-style: none;
}

ul.suggestions-list li:hover,
ul.suggestions-list li.active {
  background-color: #f5faff;
}

ul.suggestions-list li::before {
  content: none !important;
}

ul.suggestions-list li.active {
  background-color: #e6f3ff;
  font-weight: 500;
}

/* .akty-input-wrapper {
  position: relative;
  max-width: 260px;
  margin: 1rem auto;
} */

/*button.clear-akty {
  position: absolute;
  top: 52%;
  right: 0.2rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #d00;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  margin: 0;
  line-height: 1;
  height: 1rem;
  width: 1rem;
  display: none;
  z-index: 10;
}   */

/*button.clear-akty.show {
  display: flex;
  align-items: center;
  justify-content: center;
} */

/*button.clear-akty:hover {
  color: #000;
}    */

button.clear-akty {
  position: absolute;
  top: 70%;
  right: 0.3rem;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #666;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  margin: 0;
  line-height: 1;
  width: 1.5rem;
  height: 1.5rem;
  display: none;
  z-index: 10;
  transition: color 0.2s ease;
}

button.clear-akty.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

button.clear-akty:hover {
  color: #c00;
}

.akty-blok {
  background-color: #f7f9fc;
  border-left: 4px solid var(--primary-dark, #1a2a4f);
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
  border-radius: 0.5rem;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.akty-blok p {
  margin-bottom: 0.8rem;
  line-height: 1.6;
}

.akty-blok ul {
  margin: 0.5rem 0 1rem 1rem;
  padding-left: 1.2rem;
  list-style-type: disc;
}

.akty-blok li {
  margin-bottom: 0.5rem;
}

.akty-blok a {
  color: var(--primary, #20507F);
  text-decoration: underline;
}

.akty-blok a:hover {
  color: #4b94ff;
  text-decoration: none;
}

#akty-wynik {
  margin-top: 1rem;
  /*max-width: 900px; */
  margin-left: auto;
  margin-right: auto;
  padding: 1rem 1rem;
  /*background-color: #f9f9f9;*/
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  min-height: 200px;
  transition: all 0.3s ease;
}
#akty-wynik:empty { display:none; }

.akty-hint{ margin-top:.4rem; font-size:.95rem; opacity:.85; }

.akty-naglowek {
  font-size: 1.25rem;
  margin-bottom: 0.8rem;
  color: #1a2a4f;
}

.dzialka-nr {
  font-weight: 500;
  font-size: 1rem;
  color: #2d2d2d;
  font-family: inherit;
}

.podkreslenie {
  font-weight: bold;
  margin-top: 1rem;
  margin-bottom: 0.5rem;
  border-bottom: 2px solid #1a2a4f;
  display: inline-block;
  padding-bottom: 0.2rem;
}

.drukuj-akty-btn {
  margin-top: 1.5rem;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  background: #20507F;
  color: white;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
}

.drukuj-akty-btn:hover {
  background-color: #4b94ff;
}

/* BLOK TYLKO DLA AWARII */
 .emergency-card {
  border: 1px solid #ddd;
  border-left: 5px solid #1a2a4f;
  border-radius: 10px;
  padding: 1.2rem;
  margin-bottom: 1rem;
  background-color: #f9f9f9;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  width: calc(20% - 1rem);
  display: flex;
  flex-direction: column;
  min-width: 150px;
}

.emergency-title {
  font-size: 1.1rem;
  color: #1a2a4f;
  margin-bottom: 0.5rem;
}

.emergency-info div {
  margin: 0.3rem 0;
  font-size: 0.95rem;
}

.emergency-info a {
  color: #1a2a4f;
  text-decoration: underline;
}

.emergency-instalacja-elektryczna {
  border-left-color: #F5C518;
}
.emergency-bramy-garazowe {
  border-left-color: #66BB6A;
}
.emergency-bramy-wjazdowe {
  border-left-color: #88C057;
}
.emergency-instalacji-videodomofonowej {
  border-left-color: #BA68C8;
}
.emergency-dzwigu-osobowego {
  border-left-color: #26A69A;
}
.emergency-instalacji-telewizyjnej {
  border-left-color: #FF7043;
}
.emergency-instalacji-domofonowej {
  border-left-color: #9575CD;
}
.emergency-instalacja-wod-kan-gazowej-i-co {
  border-left-color: #42A5F5;
}

#mawaria-wynik {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
  margin-top: 2rem;
}

/*.btn {
  display: inline-block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  background-color: #0d2b5b;
  color: white;
  border: none;
  border-radius: 0.25rem;
  cursor: pointer;
  text-decoration: none;
  box-sizing: border-box;
  transition: background-color 0.2s ease-in-out;
} */

.btn:hover {
  background-color: #15408a;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  justify-content: space-between;
}

.btn-row .btn {
  min-width: 200px;
  flex: 1 1 0;
  text-align: center;
  white-space: nowrap;
}

.pdfBtn {
  background-color: #1a2a4f;
  color: white;
  padding: 0.6rem 1.2rem;
  border-radius: 8px;
  font-weight: bold;
  text-transform: uppercase;
  display: inline-block;
  margin: 0 0.5rem;
  transition: 0.3s ease;
}

.pdfBtn:hover {
  background-color: #4b94ff;
}

.pdfBtn img {
  height: auto;
  width: auto;
}

.pdfBtn.btn {
  white-space: nowrap;
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

/* 💡 Wyrównanie szerokości pól */
.awaria-filter {
  flex: 1;
  min-width: 220px;
  max-width: 300px;
}

.filter-group label {
  margin-bottom: 0.25rem;
}

#drukZbiorczyBtn.btn {
  background: #20507F;
  color: white;
  border: none;
  border-radius: 0.5rem;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  font-weight: 600;
  text-align: center;
  display: inline-block;
  text-decoration: none;
  white-space: nowrap;
  box-sizing: border-box;
  transition: background-color 0.3s ease;
}

#drukZbiorczyBtn.btn:hover {
  background-color: #4b94ff;
}

.mawaria-input-wrapper {
  position: relative;
  width: 55%;
}

/* Pole input */
input.budynek-input-awaria {
  width: 100%;
  padding: 0.6rem 1rem;
  padding-right: 2rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 0.5rem;
  height: 42px;
  box-sizing: border-box;
}

button.clear-awaria {
  position: absolute;
  top: 70%;
  right: 0.3rem;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #666;
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0;
  margin: 0;
  line-height: 1;
  width: 1.5rem;
  height: 1.5rem;
  display: none;
  z-index: 10;
  transition: color 0.2s ease;
}

button.clear-awaria.show {
  display: flex;
  align-items: center;
  justify-content: center;
}

button.clear-awaria:hover {
  color: #c00;
}

.mawaria-input-wrapper {
  position: relative;
}

ul.suggestions-list-awaria {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  border: 1px solid #ccc;
  border-top: none;
  border-radius: 0 0 0.5rem 0.5rem;
  margin-top: -1px;
  padding: 0;
  max-height: 240px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  box-sizing: border-box;
  display: none;
  list-style: none;
}

ul.suggestions-list-awaria.visible {
  display: block;
}

ul.suggestions-list-awaria li {
  position: relative;
  padding: 0.6rem 1rem;
  cursor: pointer;
  font-size: 0.95rem;
  border-bottom: 1px solid #f0f0f0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  list-style: none;
}

ul.suggestions-list-awaria li:hover,
ul.suggestions-list-awaria li.active {
  background-color: #f5faff;
}

ul.suggestions-list-awaria li::before {
  content: none !important;
}

ul.suggestions-list-awaria li.active {
  background-color: #e6f3ff;
  font-weight: 500;
}

@media print {
  body * {
    visibility: hidden;
  }

  #akty-wynik,
  #akty-wynik * {
    visibility: visible;
  }

  #akty-wynik {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background: white;
    color: black;
    padding: 2rem;
  }

  .hero-wrapper,
  #clear-akty,
  .suggestions-list,
  #budynek-input,
  .drukuj-akty-btn {
    display: none !important;
  }
}

 /*oferta wynajmu*/
.oferta-blok {
  background-color: #ffffff;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  padding: 0.8rem 1rem;
  margin-bottom: 1rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.oferta-blok h2 {
  color: #1a2a4f;
  font-size: 1.4rem;
  margin-bottom: 0.55rem;
}

.garage-table table {
  font-size: 1rem;
  border-collapse: collapse;
  width: 55%;
}

.garage-table th,
.garage-table td {
  padding: 0.25rem 0.25rem;
  border: 1px solid #ccc;
  text-align: center;
  vertical-align: middle;
}

.garage-table th {
  background-color: #1a2a4f;
  color: white;
  font-size: 0.95rem;
}

.garage-table tr td {
  background-color: #fdfdfd;
}

.garage-table tr:nth-child(even) td {
  background-color: #f4f6fa;
}

.last-updated {
  font-size: 0.85rem;
  color: #555;
  text-align: right;
  margin-top: 0.8rem;
  opacity: 0.9;
}

.garage-plan {
  text-align: center;
  margin-top: 2rem;
}

.garage-plan img.garage-img {
  cursor: zoom-in;
  transition: transform 0.2s ease;
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.garage-plan a:hover img {
  transform: scale(1.02);
}

.modal-img {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.8);
  justify-content: center;
  align-items: center;
}

.modal-img img {
  max-width: 95%;
  max-height: 90%;
  border-radius: 10px;
}
/* ========== GLOBALNE ========== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* ========== NAGŁÓWEK I TYTUŁY ========== */
.section-title {
  font-size: 2rem;
  color: #1a2a4f;
  text-align: center;
  margin-bottom: 2rem;
}

/* ========== KONTENER TREŚCI (SPÓJNA SZEROKOŚĆ) ========== */
.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 0rem;
  box-sizing: border-box;
}

/* Mobile: ciaśniejszy padding */

/* ========== OGÓLNY STYL KART ========== */
.card {
  background-color: #ffffff;
  border: 1px solid #e2e6ec;
  border-radius: 1rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  width: 100%;
  margin: 0;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.1);
}

/* ========== NAGŁÓWEK KARTY ========== */
.card-header {
  background-color: #f4f6fa;
  color: #1a2a4f;
  font-weight: bold;
  padding: 0.75rem 1rem;
  font-size: 1.05rem;
  border-top-left-radius: 1rem;
  border-top-right-radius: 1rem;
  border-bottom: 1px solid #e0e6ec;
}

.card-header h3 {
  font-size: 1.1rem;
  margin: 0;
}

/* ========== TREŚĆ KARTY ========== */
.card-body {
  padding: 1.2rem 1.5rem;
  word-wrap: break-word;
  overflow-wrap: break-word;
  line-height: 1.5;
}

.card-body p {
  margin-bottom: 0.75rem;
}

.card-body p strong {
  display: block;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.card-body a {
  display: inline-block;
  word-break: break-word;
  overflow-wrap: anywhere;
  color: #1a2a4f;
  text-decoration: underline;
}

/* Mobile: ciaśniejsze karty */

/* ========== UKŁAD KART ADMINISTRACJI ========== */
.cards.admin-karty {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  width: 100%;
  margin-top: 2rem;
  padding: 0;
}

@media (min-width: 768px) {
  .cards.admin-karty {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .cards.admin-karty {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* ========== UKŁAD POZIOMY – SIEDZIBA + GODZINY ========== */
.card-horizontal {
  background-color: #fff;
  border: 1px solid #e2e6ec;
  border-radius: 1rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
  padding: 1.5rem;
  margin: 1.5rem 0;
  width: 100%;
  box-sizing: border-box;
}

.card-half p {
  word-break: break-word;
  overflow-wrap: anywhere;
}

/*.card-horizontal .card-half {
  flex: 1 1 100%;
  min-width: 0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}   */

@media (min-width: 768px) {
  .card-horizontal .card-half {
    flex: 1 1 48%;
  }
}

@media (min-width: 1100px) {
  .card-horizontal {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .card-horizontal .card-half {
    flex: 1 1 calc(33.333% - 1rem);
    max-width: calc(33.333% - 1rem);
  }
}

/* ========== GODZINY OTWARCIA ========== */
.hours {
  list-style: none;
  padding: 0;
  margin-top: 0.5rem;
}

.hours li {
  margin: 0.25rem 0;
  padding-left: 1.5rem;
  position: relative;
  font-size: 0.9rem;
}

.hours li::before {
  content: none;
  position: absolute;
  left: 0;
  color: #999;
}

.hours li.today {
  font-weight: bold;
  color: #1a2a4f;
}

/* ========== INFO BOX ========== */
.info-box {
  background-color: #fff3cd;
  border-left: 4px solid #ff9800;
  padding: 1rem;
  margin: 2rem 0;
}

.tel {
  display: inline-block;
  margin-bottom: 0.3rem;
  word-break: break-word;
}

/* ===== INFO BOX: BRAK PRZETARGÓW ===== */
.info-box.no-tenders {
  display: flex;
  align-items: center;
  gap: 1rem;
  background-color: #f4f6fa;
  border: 1px solid #cbd5e0;
  border-left: 5px solid #1a2a4f;
  padding: 1.5rem;
  margin-top: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  font-size: 1rem;
  color: #333;
}

.info-box .info-icon {
  font-size: 2rem;
}

.info-box .info-text {
  flex: 1;
  line-height: 1.5;
}

.news-link {
  color: #1a2a4f;
  text-decoration: none;
}

.news-link:hover {
  color: #4b94ff;
  text-decoration: none;
}

/* === Karty map osiedli === */
.map-card {
  background-color: #ffffff;
  border: 1px solid #e0e6ec;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.06);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.map-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.1);
}

.map-img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid #eee;
}

.map-card-body {
  padding: 1.2rem;
  text-align: center;
}

.map-card-body h3 {
  font-size: 1.1rem;
  color: #1a2a4f;
  margin-bottom: 0.5rem;
}

.map-card-body p {
  font-size: 0.9rem;
  color: #666;
  margin: 0;
}

.map-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* ===== KARTA SPRZĄTANIA ===== */
/* ===== Sprzątanie – karta firmy ===== */
.sprz-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.5rem;
  margin: 1rem auto;
  box-shadow: 0 6px 16px rgba(0,0,0,.05);
  max-width: 700px;                 /* domyślna szerokość karty */
  border-left: 6px solid #1a2a4f;   /* domyślny kolor paska */
  transition: transform .2s ease, box-shadow .2s ease;
  width: 100%;
}
.sprz-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,.1);
}

.sprz-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: #1a2a4f;
  margin-bottom: .8rem;
}

.sprz-info { font-size: .95rem; color: #333; line-height: 1.6; }
.sprz-info a { color: #1a2a4f; text-decoration: none; }
.sprz-info a:hover { text-decoration: underline; }

/* ===== Kolor lewego paska wg firmy ===== */
.sprz-card[data-firma*="BŁYSK"],
.sprz-card[data-firma*="BLYSK"] { border-left-color: #4caf50; }
.sprz-card[data-firma*="MUSI"],
.sprz-card[data-firma*="Międzywojewódzka"],
.sprz-card[data-firma*="Miedzywojewodzka"] { border-left-color: #2196f3; }
.sprz-card[data-firma*="STANBEST"] { border-left-color: #ff9800; }

/* ===== Karty w sekcji wyników: pełna szerokość kontenera ===== */
#sprzatanie-wynik .sprz-card {
  max-width: none;   /* nadpisuje 700px, karta na całą szerokość kontenera */
  margin: 0;
}

/* ===== Lista budynków (kolumny wewnątrz karty) ===== */
#sprzatanie-wynik .adresy-list {
  margin: .5rem 0 0;
  padding-left: 1.2rem;
  list-style: disc;
  column-gap: 20px;
  column-fill: balance;
}
#sprzatanie-wynik .adresy-list li {
  break-inside: avoid;
  margin-bottom: .2rem;
}

/* Wymuszenie 1 kolumny dla krótkich list */
#sprzatanie-wynik .adresy-list.cols-1 {
  columns: 1; -webkit-columns: 1; -moz-columns: 1;
}

/* Responsywne kolumny: 2 ≥ 992px, 3 ≥ 1280px */
#sprzatanie-wynik .adresy-list.cols-auto { columns: 1; } /* mobile */
@media (min-width: 992px) {
  #sprzatanie-wynik .adresy-list.cols-auto { columns: 2; -webkit-columns: 2; -moz-columns: 2; }
}
@media (min-width: 1280px) {
  #sprzatanie-wynik .adresy-list.cols-auto { columns: 3; -webkit-columns: 3; -moz-columns: 3; }
}

/* ===== KAFELKI DOKUMENTÓW e-BOK ===== */
.ebok-documents {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.ebok-item {
  background: #ffffff;
  border: 1px solid #e2e6ec;
  border-radius: 1rem;
  padding: 1.5rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.2s ease;
}

.ebok-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.ebok-item .title {
  font-weight: 600;
  font-size: 1rem;
  color: #1a2a4f;
  margin-bottom: 1rem;
}

.ebok-item .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  padding: 0.5rem 1rem;
}

.serwisant-box {
  border-top: 1px dashed #ccc;
  padding: 0.75rem 0;
  margin-top: 0.75rem;
}

.serwisant-box:first-of-type {
  border-top: none;
  margin-top: 0;
}

.card.kotly {
  padding: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #ddd;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  background-color: #fff;
}

.card.kotly .card-header {
  background-color: #f4f6fa;
  font-weight: bold;
  padding: 0.9rem 1.2rem;
  font-size: 1.1rem;
  color: #1a2a4f;
  border-bottom: 1px solid #ddd;
}

.card.kotly .card-body {
  padding: 1rem 1.2rem;
  font-size: 0.95rem;
}

.card.kotly .serwisant-box {
  padding: 0.6rem 0;
  border-top: 1px dashed #ccc;
}

.card.kotly .serwisant-box:first-of-type {
  border-top: none;
  padding-top: 0;
}

.card.kotly.vaillant .card-header {
  background-color: #dad4ff;
}

.card.kotly.ariston .card-header {
  background-color: #ffdfb3;
}

.card.kotly.ferroli .card-header {
  background-color: #ffd6e0;
}

.card.kotly.saunier .card-header {
  background-color: #d7fcd4; 
}

.card.kotly.diet .card-header {
  background-color :#cceeff;
}

.card.kotly.bosch .card-header {
  background-color: #f0ccff;
}

.card.kotly.herz .card-header {
  background-color: #cfe2ff;
}

.cards.cards-narrow {
  max-width: 300px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

/* responsywna siatka */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.uwaga-box {
  background-color: #fff3cd;
  border-left: 4px solid #ff9800;
  padding: 1rem 1.5rem;
  margin: 2rem 0;
  font-size: 0.95rem;
  line-height: 1.6;
  border-radius: 8px;
}

.oferta-link {
  text-decoration: none;
  color: inherit;
  display: block;
  margin-bottom: 30px;
  transition: transform 0.2s ease;
}

.oferta-link:hover {
  transform: scale(1.02);
}

.oferta-box {
  border: 1px solid #ddd;
  padding: 10px;
  border-radius: 8px;
  background: #f9f9f9;
  text-align: center;
}

.oferta-box h3 {
  font-size: 1.1rem;
  margin-bottom: 10px;
  color: #003366;
}

.baner-image {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
}

.insurance-section {
  max-width: 1100px;
  margin: 1rem auto;
  padding: 2rem;
  background-color: #f4f6fa;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.insurance-box {
  font-size: 1rem;
  color: #333;
  line-height: 1.7;
}

.insurance-box p {
  margin-bottom: 1rem;
}

.insurance-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  justify-content: space-between;
  margin-top: 2rem;
}

.insurance-provider {
  flex: 1 1 450px;
  max-width: 500px;
}

.insurance-provider h3 {
  font-size: 1.2rem;
  color: #1a2a4f;
  margin-bottom: 0.8rem;
}

.insurance-banner {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-top: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.insurance-banner:hover {
  transform: scale(1.02);
}

.faq-section {
  max-width: 900px;
  margin: 3rem auto;
  padding: 1rem;
}

#faq-search {
  width: 100%;
  padding: 0.8rem 1rem;
  margin-bottom: 2rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 8px;
}

.faq-category {
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: #1a2a4f;
  border-bottom: 2px solid #e0e0e0;
  padding-bottom: 0.5rem;
}

.faq-item {
  border-bottom: 1px solid #ccc;
  padding: 1rem 0;
}

.faq-question {
  background: none;
  border: none;
  color: #1a2a4f;
  font-size: 1.1rem;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
  text-align: left;
  position: relative;
  padding-right: 1.5rem;
}

.faq-question::after {
  content: '+';
  position: absolute;
  right: 0;
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.faq-question.active::after {
  content: '−';
}

.faq-answer {
  display: none;
  padding-top: 0.75rem;
  color: #444;
  font-size: 0.95rem;
  line-height: 1.5;
}
/* Pytania FAQ bez pogrubienia i w delikatniejszym kolorze */
.faq-question {
  background: none;
  border: none;
  color: #2d2d2d; /* ciemny szary zamiast granatu */
  font-size: 1.05rem;
  font-weight: normal; /* usuwa pogrubienie */
  cursor: pointer;
  width: 100%;
  text-align: left;
  position: relative;
  padding-right: 1.5rem;
}

.faq-question:hover {
  color: #1a2a4f; /* efekt hover w kolorze nagłówków */
}

/* Karty komisji i prezydium */
.commission-card {
  background: #ffffff;
  border: 1px solid #e2e6ec;
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.commission-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.commission-card h4 {
  color: #1a2a4f;
  margin-bottom: 1rem;
  font-size: 1.2rem;
  border-bottom: 2px solid #f0f2f6;
  padding-bottom: 0.5rem;
}

.commission-card ul {
  list-style: none;
  padding-left: 0;
  margin: 0;
}

.commission-card ul li {
  padding: 0.4rem 0 0.4rem 1.6rem;
  position: relative;
  font-size: 0.95rem;
}

.commission-card ul li::before {
  content: "👤";
  position: absolute;
  left: 0;
  top: 0.35rem;
  font-size: 1rem;
  color: #4b94ff;
}

.commission-card em {
  color: #555;
  font-style: normal;
}
/* Siatka komisji: 1 / 2 / 3 kolumny zależnie od szerokości */
.commissions-grid{
  display: grid;
  gap: 1.5rem;
  margin-top: 1rem;
}
@media (min-width: 768px){
  .commissions-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (min-width: 1200px){
  .commissions-grid{ grid-template-columns: repeat(3, minmax(0,1fr)); }
}

/* Ujednolicenie wysokości kart w gridzie */
.commission-card{
  height: 100%;
  display: flex;
  flex-direction: column;
}
.commission-card ul{ margin-top: .5rem; }
.commission-card ul li{ line-height: 1.6; }

/* Drobna poprawka nagłówków długich komisji */
.commission-card h4{
  line-height: 1.25;
  word-break: break-word;     /* zapobiega rozjeżdżaniu */
  hyphens: auto;
}
/* ---- Widoczny link zarządzania cookies ---- */
.footer-right a,
.footer-right a:visited {
  color: #ffffff;                 /* biały na granatowym tle */
  text-decoration: underline;
  font-weight: 600;
}
.footer-right a:hover,
.footer-right a:focus {
  color: #4b94ff;                 /* akcent po najechaniu */
  outline: none;
}

/* wariant w treści (polityka) */
.content a.manage-cookies {
  color: #1a2a4f;                 /* firmowy granat */
  text-decoration: underline;
  font-weight: 600;
}
.content a.manage-cookies:hover,
.content a.manage-cookies:focus {
  color: #4b94ff;
}

/* AKTUALNOŚCI — układ desktop */
.aktualnosci-section .aktualnosci-grid{
  display: grid;
  grid-template-columns: minmax(0,1fr) 380px;
  gap: 2rem;
  margin-top: 1rem;
}
@media (max-width: 1100px){
  .aktualnosci-section .aktualnosci-grid{
    grid-template-columns: 1fr;
  }
}

/* prawa kolumna wypełnia swoją kolumnę; żadnego centrowania */
.aktualnosci-section .aktualnosci-right{
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  align-items: stretch;
}
.aktualnosci-section .aktualnosci-right > *{ width: 100%; }

/* obrazy w prawej kolumnie nie rozszerzają layoutu */
.aktualnosci-section .baner-image{
  width:100%; height:auto; max-width:100%; display:block;
}


.baner-link {
  display: block;
  max-width: 100%;
}

.baner-image {
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.3s ease;
}

.baner-image:hover {
  transform: scale(1.03);
}

.oferta-box {
  border: 1px solid #e2e6ec;
  /*background: #fff; */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,0.05);
}
.oferta-box-head {
  padding: 1rem 1rem 0.5rem;
}
.oferta-box h3 {
  margin: 0 0 0.5rem 0;
  font-size: 1.1rem;
  color: #1a2a4f;
}
.oferta-cta {
  display: inline-block;
  font-size: 0.9rem;
  color: #555;
}
.baner-image {
  width: 100%;
  display: block;
}

/* === Widget inwestycji === */
.oferta-widget {
  border: 1px solid #e2e6ec;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0,0,0,0.05);
  margin-bottom: 1.25rem;
}
.oferta-widget-head {
  padding: 1rem 1rem 0.5rem;
}
.oferta-widget-head h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #1a2a4f;
}
.oferta-widget-head .muted {
  color: #777;
}
.oferta-mini-list {
  list-style: none;
  margin: 0;
  padding: 0.5rem 0.75rem 0.75rem;
}
.oferta-mini-item + .oferta-mini-item {
  border-top: 1px solid #f0f2f6;
}
.oferta-mini-link {
  display: block;
  padding: 0.75rem;
  text-decoration: none;
  color: inherit;
}
.oferta-mini-title {
  font-weight: 600;
  color: #1a2a4f;
}
.oferta-mini-sub {
  font-size: 0.9rem;
  color: #555;
  margin: 0.25rem 0 0.5rem;
}

/* Badże liczb wolnych */
.oferta-badges {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  border: 1px solid #e2e6ec;
  background: #f7f9fb;
}
.badge strong { font-weight: 700; }
.badge-flat { /* mieszkania */
  background: #e8f5e9;
  border-color: #c8e6c9;
}
.badge-spot { /* miejsca */
  background: #e3f2fd;
  border-color: #bbdefb;
}
.badge-cell { /* komórki */
  background: #fff8e1;
  border-color: #ffe0b2;
}

/* Stopka widgetu */
.oferta-widget-footer {
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid #f0f2f6;
  text-align: right;
}
.btn.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
}

.oferta-mini-title { line-height:1.25; }
.oferta-badges { gap:.4rem .5rem; }

/* Stany listy */
.oferta-mini-list .loading,
.oferta-mini-list .empty,
.oferta-mini-list .error {
  padding: 0.75rem 1rem;
  color: #666;
  font-size: 0.95rem;
}
.oferta-mini-list .error { color: #b00020; }

/* === Nagłówek widgetu: tytuł pełna szerokość, pod spodem data i tag === */
.oferta-widget-head{
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas:
    "title"
    "update"
    "tag";
  row-gap: .4rem;
  column-gap: .5rem;
  padding: 1rem 1rem .5rem;
}

.oferta-widget-head h3{
  grid-area: title;
  margin: 0;
  font-size: 1.1rem;
  color: #1a2a4f;
}

#inwestycje-updated{
  grid-area: update;
  color: #6b7280;
  font-size: .85rem;
}

.osiedle-tag{
  grid-area: tag;          /* klucz: zawsze pod aktualizacją */
  justify-self: start;     /* do lewej */
  margin: 0;               /* bez przesunięcia w bok */
  padding: .2rem .6rem;
  font-size: .85rem;
  line-height: 1;
  border-radius: 999px;
  background: #eef2ff;
  border: 1px solid #dbeafe;
  color: #334155;
  white-space: nowrap;
}

/* opcjonalnie: na bardzo wąskich ekranach pozwól zawijać tag pod datę */

/* Stałe ogłoszenia pod aktualnościami */
.ogloszenia-stale {
  margin-top: 1rem;
}

.ogloszenia-stale .notice {
  background: #f7f9fc;
  border: 1px solid #d0d5dc;
  border-radius: 8px;
  padding: 1rem 1.2rem;
  margin-top: 1rem;
  font-size: 0.95rem;
  line-height: 1.45;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}

.ogloszenia-stale .notice h4 {
  margin: 0 0 .4rem;
  font-size: 1rem;
  color: #1a2a4f;
}

.ogloszenia-stale .notice-ebok {
  border-left: 4px solid #4b94ff; /* wyróżnienie e-BOK */
}

.ogloszenia-stale .notice .btn {
  display: inline-block;
  width: auto;
  margin-top: .6rem;
  padding: .4rem .9rem;
  font-size: .9rem;
}

/* === HOME: fix banera — brak ograniczenia 520px === */
.baner-image{ max-width: 100%; } /* nadpisuje wcześniejsze 520px, jeśli gdzieś zostało */

/* === Interakcje: hover/focus === */
.aktualnosci-section .akt-link:hover,
.aktualnosci-section .oferta-mini-link:hover{
  background:#f7f9fc;
  border-radius:8px;
}
.aktualnosci-section a:focus-visible{
  outline:3px solid #4b94ff;
  outline-offset:2px;
  border-radius:6px;
}

/* === e-BOK: dwa CTA, wariant secondary === */
.ebok-actions .btn{ margin-right:.5rem; }
.btn.btn-secondary{
  background:#e7ecf6;
  color:#0f1f44;
}
.btn.btn-secondary:hover{ background:#dbe3f4; }

/* === Ikony w stałych ogłoszeniach (CSS only) === */
.ogloszenia-stale .notice h4{
  position:relative;
  padding-left:1.5rem;
}
.ogloszenia-stale .notice h4::before{
  content:"🔧";
  position:absolute; left:0; top:0; line-height:1;
}
.ogloszenia-stale .notice-ebok h4::before{ content:"💻"; }

/* === Widżet inwestycji przyklejony na desktopie === */
@media (min-width:1101px){
  #inwestycje-top{ position: sticky; top: 1rem; }
}

/* === „Brak przetargów” – delikatniejszy wygląd === */
.aktualnosci-list .empty{
  color:#6b7280;
  font-style:italic;
  display:flex;
  align-items:center;
  gap:.35rem;
}
.aktualnosci-list .empty::before{ content:"ℹ️"; }

/* === WCAG: Skip link, SR-only, Focus, Kontrasty, Motion, Scroll margin === */
.skip-link{
  position:absolute; left:-9999px; top:auto; width:auto; height:auto;
}
.skip-link:focus{
  left:1rem; top:1rem; background:#fff; color:#000; padding:.5rem .75rem;
  border:2px solid #000; z-index:10000; border-radius:6px;
}
.sr-only{
  position:absolute !important; width:1px !important; height:1px !important;
  margin:-1px !important; padding:0 !important; overflow:hidden !important;
  clip:rect(0 0 0 0) !important; white-space:nowrap !important; border:0 !important;
}

/* Widoczny focus dla klawiatury */
:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; border-radius: 4px; }

/* Nagłówki/sekcje niech nie chowają fokusa pod sticky header */
:target, [tabindex="-1"]:focus { scroll-margin-top: 100px; }

/* Preferencje ograniczonego ruchu */
@media (prefers-reduced-motion: reduce){
  *{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* Minimalny rozmiar celu dotykowego */
.menu a, .menu-toggle, button { min-height: 24px; min-width: 24px; }

/* Non-text contrast (obramowania/ikony) */
.card, .garage-table th, .garage-table td { border-color: #8a8f9a; }

/* Kotwice dla pozycji absolutnych (hamburger / menu mobilne) */
.header,
.main-nav { position: relative; }

/* Submenu – desktop: domyślnie ukryte, pokazuj na hover i focus-within i .open */
.submenu { display: none; }
.menu li:hover > .submenu,
.menu li:focus-within > .submenu,
.menu li.open > .submenu { display: block; }

/* === DESKTOP SUBMENU (≥769px) — wyrównanie pod rodzicem + mini-akcent === */
@media (min-width: 769px){
  :root{
    /* spójne kolory – używamy istniejących zmiennych lub fallbacków */
    --submenu-bg: var(--gradient-submenu, linear-gradient(180deg,#142448 0%,#12203f 100%));
    --submenu-link: #fff;
    --submenu-link-hover: rgba(255,255,255,.08);
    --submenu-ring: rgba(255,255,255,.10);  /* obrys */
    --submenu-divider: rgba(255,255,255,.08);
  }

  .header, .main-nav { position: relative; z-index: 1000; }
  #main-menu { position: relative; z-index: 1001; }

  /* KLUCZ: li musi być relative, żeby submenu „trzymało się” rodzica */
  #main-menu > li { position: relative; }  /* <- poprawka (nie static!) */
  #main-menu > li > a { position: relative; z-index: 1; }

  #main-menu > li > .submenu{
    position: absolute;
    top: calc(100% + var(--submenu-gap, 0px)); /* zero przerwy domyślnie */
    left: var(--submenu-offset-x, 0px);        /* opcjonalny subtelny offset */
    min-width: 220px;
    display: none;
    padding: .5rem 0;
    background: var(--submenu-bg);
    color: var(--submenu-link);
    border-radius: .5rem;
    border: 1px solid var(--submenu-ring);     /* mini-akcent obramowania */
    box-shadow:
      0 12px 28px rgba(0,0,0,.20),
      0 2px 8px rgba(0,0,0,.12);
    z-index: 100000;                            /* zawsze nad linkami */
    pointer-events: auto;
  }

  /* pokaż w sensownych stanach */
  #main-menu li:hover > .submenu,
  #main-menu li:focus-within > .submenu,
  #main-menu li.open > .submenu,
  #main-menu li[aria-expanded="true"] > .submenu{
    display: block;
  }

  /* stan rodzica */
  #main-menu > li:hover > a,
  #main-menu > li.open > a,
  #main-menu > li[aria-expanded="true"] > a{
    color: var(--accent);
  }

  /* elementy w środku */
  #main-menu .submenu li + li { border-top: 1px solid var(--submenu-divider); }
  #main-menu .submenu a{
    display: block;
    padding: .55rem 1rem;
    color: var(--submenu-link);
    white-space: nowrap;
  }
  #main-menu .submenu a:hover,
  #main-menu .submenu a:focus{
    background: var(--submenu-link-hover);
  }
}

/* =========================================================
   WCAG APPEND PATCH — add to the END of sstyle.css
   - Focus visible styles
   - Skip link visibility
   - Desktop submenu (unified look, no gaps, proper stacking)
   - Touch target sizes
   - Reduced motion
   - Screen-reader only helper
   ========================================================= */

/* --- Focus visible for all interactive controls --- */
:where(a, button, [role="button"], input, select, textarea, summary):focus-visible{
  outline: 3px solid #7dd3fc;
  outline-offset: 2px;
  border-radius: .375rem;
}
:where(.menu a, #main-menu a):focus-visible{
  outline: 2px solid #fbbf24;
  outline-offset: 3px;
}

/* --- Skip link (already in HTML) — make it visible on focus --- */
.skip-link{ 
  position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{
  left: 1rem; top: 1rem; width:auto; height:auto; z-index: 100000;
  padding:.5rem .75rem; border-radius:.5rem;
  background:#111827; color:#fff; box-shadow:0 6px 18px rgba(0,0,0,.25);
}

/* --- Anchor jumps won't hide behind sticky header --- */
:target{ scroll-margin-top: 80px; }

/* === DESKTOP SUBMENU (≥769px) — aligned under parent + accent === */
@media (min-width: 769px){
  :root{
    --submenu-bg: var(--gradient-submenu, linear-gradient(180deg,#142448 0%,#12203f 100%));
    --submenu-link: #fff;
    --submenu-link-hover: rgba(255,255,255,.08);
    --submenu-ring: rgba(255,255,255,.10);
    --submenu-divider: rgba(255,255,255,.08);
  }

  .header, .main-nav { position: relative; z-index: 1000; }
  #main-menu { position: relative; z-index: 1001; }
  #main-menu > li { position: relative; }
  #main-menu > li > a { position: relative; z-index: 1; }

  #main-menu > li > .submenu{
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 220px;
    display: none;
    padding: .5rem 0;
    background: var(--submenu-bg);
    color: var(--submenu-link);
    border-radius: .5rem;
    border: 1px solid var(--submenu-ring);
    box-shadow: 0 12px 28px rgba(0,0,0,.20), 0 2px 8px rgba(0,0,0,.12);
    z-index: 100000;
    pointer-events: auto;
  }

  #main-menu li:hover > .submenu,
  #main-menu li:focus-within > .submenu,
  #main-menu li.open > .submenu,
  #main-menu li[aria-expanded="true"] > .submenu{
    display: block;
  }

  #main-menu > li:hover > a,
  #main-menu > li.open > a,
  #main-menu > li[aria-expanded="true"] > a{
    color: var(--accent);
  }

  #main-menu .submenu li + li { border-top: 1px solid var(--submenu-divider); }
  #main-menu .submenu a{
    display: block;
    padding: .55rem 1rem;
    color: var(--submenu-link);
    white-space: nowrap;
  }
  #main-menu .submenu a:hover,
  #main-menu .submenu a:focus{
    background: var(--submenu-link-hover);
  }
}

/* --- Bigger touch targets --- */
:where(a, button, .btn){ min-height: 44px; min-width: 44px; }

/* --- Screen-reader only helper --- */
.sr-only{ 
  position:absolute !important; width:1px; height:1px; padding:0; 
  margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce){
  html:focus-within { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Skip link: niewidoczny, widoczny po fokusie z klawiatury */
.skip-link{
  position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden;
}
.skip-link:focus{
  left:1rem; top:1rem; width:auto; height:auto; z-index:100000;
  padding:.5rem .75rem; border-radius:.5rem;
  background:#111827; color:#fff; box-shadow:0 6px 18px rgba(0,0,0,.25);
}

/* Ring tylko gdy ma sens dla użytkownika */
#dynamic-content:focus { outline: none; } /* domyślnie bez obramowania */
#dynamic-content:focus-visible{
  outline:3px solid var(--focus-ring, #7dd3fc);
  outline-offset:2px; border-radius:.5rem;
}
/* ukryj ring wyłącznie dla programowego fokusa po AJAX */
#dynamic-content[data-prog-focus]:focus { outline:none !important; }

/* === MOBILE FIX: spacing dla "X" + pełna szerokość SELECT + wyrównanie list === */
@media (max-width: 768px){

  /* 1) Więcej miejsca na "X" + większy tap-target */
  /*.akty-input-wrapper, */
  .awaria-filter,
  .with-clear { position: relative; }

  /*.akty-input-wrapper input, */
  .awaria-filter input,
  .with-clear input {
    padding-right: 2.75rem !important;        /* więcej miejsca na X (było ~2.25) */
    box-sizing: border-box;
  }

  /* sam "X" – odsuń od prawej i powiększ */
  #clear-akty,
  .awaria-filter .clear-btn,
  .with-clear .clear-btn {
    position: absolute;
    right: .9rem;                              /* było ~.6rem → dalej od krawędzi */
    top: 50%;
    transform: translateY(-50%);
    width: 1.5rem; height: 1.5rem;            /* min. 44px z paddingiem inputu */
    display: inline-flex;
    align-items: center; justify-content: center;
    font-size: 1.15rem;
    cursor: pointer; user-select: none;
  }

  /* 2) SELECT i pola filtrów zawsze na pełną szerokość */
  .awaria-filter,
  .filter-group,
  /*.akty-input-wrapper*/ { width: 100% !important; max-width: 100% !important; }

  .awaria-filter select,
  .filter-group select,
  select {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: block;
    box-sizing: border-box;
  }

  /* 3) Lista podpowiedzi = szerokość pola, bez kropek */
  .suggestions-list {
    width: 100% !important;
    box-sizing: border-box;
    list-style: none !important;
    margin-top: .25rem;
  }
  .suggestions-list li { padding: .75rem 1rem !important; }

  /* 4) Przyciski pod filtrami — pełna szerokość i nie obcinaj tekstu */
  .filter-row, .btn-row { display: flex; flex-direction: column; gap: .75rem; }
  .filter-row .btn, .filter-row button,
  .btn-row .btn, .btn-row button,
  #drukZbiorczyBtn, .pdfBtn {
    width: 100% !important;
    padding: .75rem 1rem !important;
    white-space: normal;
    text-align: center;
    margin-left: 0 !important;
  }
}

/* ===== Tablet: spójne wcięcia w headerze, środku i footerze ===== */
@media (min-width: 768px) and (max-width: 1180px){
  :root{
    /* jedna kontrola na szerokość „rynien” po bokach */
    --tablet-side-pad: clamp(24px, 5vw, 56px);
  }

  /* header + content + footer */
  .header, .site-header, header,
  .content, #dynamic-content,
  .footer, .site-footer, footer {
    padding-left:  calc(var(--tablet-side-pad) + env(safe-area-inset-left, 0px));
    padding-right: calc(var(--tablet-side-pad) + env(safe-area-inset-right, 0px));
  }
}

/* a11y: ukrycie tekstu tylko dla screenreaderów */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;border:0}

/* =========================
   Downloads – karty bez białych plam, WCAG-ready
   ========================= */
.downloads{
  --card-bg: #fff;
  --card-fg: #111827;
  --card-border: #e5e7eb;
  --card-shadow: 0 6px 20px rgba(0,0,0,.06);

  --btn-bg: #f59e0b;        /* żółty „PDF” jak było */
  --btn-fg: #111;
  --btn-border: transparent;
}

.downloads-grid{
  list-style:none; margin:0; padding:0;
  display:grid; gap:1.25rem;
  grid-template-columns: repeat(3, minmax(0,1fr));
}
@media (max-width: 960px){
  .downloads-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px){
  .downloads-grid{ grid-template-columns: 1fr; }
}

.download-card{
  background:var(--card-bg);
  color:var(--card-fg);
  border:1px solid var(--card-border);
  border-radius:14px;
  padding:1.25rem 1.25rem 1rem;
  box-shadow: var(--card-shadow);
  text-align: center;
}

.download-title{
  font-size:1.05rem;
  margin:0 0 .9rem 0;
  line-height:1.35;
}

.btn{
  display:inline-flex; align-items:center; gap:.5rem;
  font-weight:600; text-decoration:none;
  border:2px solid var(--btn-border);
  color:var(--btn-fg); background:var(--btn-bg);
  border-radius:10px; padding:.55rem .9rem;
}
.btn:focus-visible{ outline:3px solid #0aa; outline-offset:2px; }

.btn.btn-pdf .pdf-ico{ font-size:1.05rem; }

/* === UNIFIKACJA PRZYCISKÓW (akty / mawaria / sprzątanie) === */
:root{
  --btn-bg: #1a2a4f;        /* granat bazowy */
  --btn-bg-hover: #20507F;  /* jaśniejszy na hover */
  --btn-radius: 10px;
  --btn-height: 40px;
  --btn-col-w: 220px;       /* szerokość 1 z 3 kolumn na desktopie */
  --btn-gap: 16px;
  --btn-row-max: calc(var(--btn-col-w) * 3 + var(--btn-gap) * 2); /* 3 kolumny */
}

/* rząd przycisków — wspólny layout, WYŚRODKOWANY */
.page-root[data-page="akty"] .btn-row,
.page-root[data-page="mawaria"] .btn-row,
.page-root[data-page="sprzatanie"] .btn-row{
  display:flex;
  flex-wrap:wrap;
  gap:var(--btn-gap);
  align-items:center;
  justify-content:center;                /* <— wyśrodkowanie */
  max-width: var(--btn-row-max);         /* szerokość na 3 kolumny */
  margin-left:auto;                      /* centrowanie kontenera */
  margin-right:auto;
}

/* WSZYSTKIE przyciski na trzech stronach — jeden wygląd */
.page-root[data-page="akty"] .btn,
.page-root[data-page="mawaria"] .btn,
.page-root[data-page="sprzatanie"] .btn{
  display:inline-flex; align-items:center; justify-content:center;
  height: var(--btn-height);
  padding: 0 16px;
  background: var(--btn-bg) !important;
  color:#fff !important;
  border:none !important;
  border-radius: var(--btn-radius);
  text-decoration:none;
  white-space:nowrap;
  box-shadow:none;
  transition: background .15s ease, transform .05s ease;
  /* kolumny 3x na desktopie */
  width: var(--btn-col-w);
  min-width: var(--btn-col-w);
  flex: 0 0 var(--btn-col-w) !important;
}

/* hover/active – tylko zmiana odcienia / subtelne „kliknięcie” */
.page-root[data-page="akty"] .btn:hover,
.page-root[data-page="mawaria"] .btn:hover,
.page-root[data-page="sprzatanie"] .btn:hover{
  background: var(--btn-bg-hover) !important;
}
.page-root[data-page="akty"] .btn:active,
.page-root[data-page="mawaria"] .btn:active,
.page-root[data-page="sprzatanie"] .btn:active{
  transform: translateY(1px);
}

/* AKTY: jeśli jest pojedynczy przycisk (Wyczyść), dalej ta sama kolumna */
.page-root[data-page="akty"] #resetBtn.btn{
  width: var(--btn-col-w);
  min-width: var(--btn-col-w);
  flex: 0 0 var(--btn-col-w) !important;
}

/* MOBILE: przyciski na pełną szerokość + kontener bez ograniczeń */
@media (max-width:640px){
  .page-root[data-page="akty"] .btn-row,
  .page-root[data-page="mawaria"] .btn-row,
  .page-root[data-page="sprzatanie"] .btn-row{
    max-width: 100%;
  }
  .page-root[data-page="akty"] .btn,
  .page-root[data-page="mawaria"] .btn,
  .page-root[data-page="sprzatanie"] .btn{
    width:100% !important;
    min-width:0 !important;
    flex:1 1 100% !important;
  }
}

/* specyficzne aliasy też w tym samym wyglądzie */
.page-root[data-page="mawaria"] #drukZbiorczyBtn.btn,
.page-root[data-page="mawaria"] .pdfBtn.btn{
  background: var(--btn-bg) !important;
  color:#fff !important;
  border:none !important;
}

/* ——— WSPÓLNY CLEAR „X” dla akt/awaria/sprzątanie (DESKTOP + MOBILE) ——— */
.input-with-clear,
.mawaria-input-wrapper,
.akty-input-wrapper { position: relative !important; }

.input-with-clear input,
.mawaria-input-wrapper input,
.akty-input-wrapper input {
  padding-right: 2.5rem !important;   /* miejsce na X */
  box-sizing: border-box;
}

/* sam krzyżyk (obsłuży też stare klasy) */
button.clear-btn,
button.clear-awaria,
button.clear-akty,
#clear-budynek {
  position: absolute !important;
  top: 50% !important;
  right: .6rem !important;
  transform: translateY(-50%) !important;
  width: 22px; height: 22px;
  display: none;
  align-items: center; justify-content: center;
  background: transparent; border: 0;
  font-size: 18px; line-height: 1;
  color: #666; cursor: pointer; z-index: 3;
}
button.clear-btn.show,
button.clear-awaria.show,
button.clear-akty.show,
#clear-budynek.show { display: inline-flex; }
button.clear-btn:hover,
button.clear-awaria:hover,
button.clear-akty:hover,
#clear-budynek:hover { color: #c00; }

/* ——— AKTY: usuń stare 120% szerokości ——— */
.page-root[data-page="akty"] .akty-input-wrapper input.budynek-input,
.page-root[data-page="akty"] ul.suggestions-list {
  width: 100% !important;
}

/* ——— PRZYCISKI: stała wysokość (żeby nie robiły wielkiego bloku na mobile) ——— */
.page-root[data-page] .btn,
.page-root[data-page] button.btn,
.page-root[data-page] #drukZbiorczyBtn,
.page-root[data-page] .pdfBtn {
  height: 44px; line-height: 44px; padding: 0 16px;
}
