:root {
  --gold:          #2b2b2b;
  --dark:          #111111;
  --light:         #f4f4f4;
  --bs-nav-link-color: #2b2b2b;
  --primary-color: #2b2b2b;
  --hover-color:   #000000;
  --text-muted:    #555555;
  --gold-dark:     #000000;
  --bg-creme:      #f7f7f7;
  --text-brown:    #2b2b2b;
}

body {
  margin: 0;
  font-family: 'Lato', sans-serif;
  background: #fff;
  overflow-x: hidden;
}

a { text-decoration: none; color: #2b2b2b; }

/* Linki w głównym menu (topbar ciemny) — jasny tekst, nie ciemnoszary domyślny "a" */
.navbar-custom .nav-link {
  color: #ffffff;
  text-transform: uppercase;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: .03em;
}
.navbar-custom .nav-link:hover,
.navbar-custom .nav-link:focus,
.navbar-custom .nav-link.active {
  color: #ffffff;
  opacity: .75;
}
.navbar-custom .dropdown-menu {
  background: #1a1a1a;
  border: 1px solid #333;
}
.navbar-custom .dropdown-item {
  color: #ffffff;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .02em;
}
.navbar-custom .dropdown-item:hover,
.navbar-custom .dropdown-item:focus {
  background: #333;
  color: #ffffff;
}

.hero-section2 {
  position: relative;
  min-height: 420px;
  background: url('../img/winieta-glowna.jpg') center top no-repeat, #111111;
  background-size: cover, auto;
  overflow: hidden;
}

.subpage-header {
  background: var(--dark);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1050;
  padding: 18px 0;
  background: black;
  transition: padding .25s ease, box-shadow .25s ease;
}

/* Menu "zaczepione" po przewinięciu strony — węższy pasek, cień odróżniający od treści */
.topbar.przyklejony {
  padding: 8px 0;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-toggler {
  color: #ffffff;
  font-size: 32px;
  line-height: 1;
}

.social-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 400px;
}

.social-links a {
  color: #ffffff;
  font-size: 18px;
  transition: .25s;
  flex: 1;
  text-align: center;
  opacity: .85;
}

.social-links a:hover {
  color: #fff;
  transform: translateY(-2px);
}

@media (max-width: 991px) {
  .social-links { width: 80%; }
  .social-links a { font-size: 25px; }

  /* przycisk hamburgera */
  .navbar-toggler {
    position: fixed;
    top: 15px;
    right: 15px;
    z-index: 1200;
    background-color: #000000;
    border: 1px solid #ffffff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 10px rgba(0,0,0,.2);
    padding-left: 8px;
  }
  .navbar-toggler:active { transform: scale(0.9); }

  /* nakładka pełnoekranowa */
  .navbar-collapse {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100vh;
    overflow-y: auto;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;        /* pozycje na pełną szerokość */
    justify-content: flex-start; /* od góry, nie wycentrowane */
    padding-top: 70px;
    padding-bottom: 24px;
    backdrop-filter: blur(5px);
    z-index: 1100;
    transition: transform 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
    transform: translateX(100%);
    background: #1a1a1aee;
    text-shadow: 1px 1px 2px rgba(0,0,0,.45);
  }
  .navbar-collapse.show { transform: translateX(0); }

  /* logo SVG na dole menu mobilnego */
  .navbar-logo-bottom {
    display: block;
    margin: auto auto 0;
    padding: 24px 0 16px;
    text-align: center;
    flex-shrink: 0;
  }
  .navbar-logo-bottom img {
    width: 138px;
    height: auto;
    opacity: .85;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,.4));
  }

  /* lista główna */
  .navbar-nav {
    text-align: left;
    padding: 0;
    width: 100%;
  }

  /* każda pozycja — separator */
  .navbar-nav > li {
    margin: 0;
    border-bottom: 1px solid rgba(255,255,255,.15);
  }
  .navbar-nav > li:first-child {
    border-top: 1px solid rgba(255,255,255,.15);
  }

  /* linki pierwszego poziomu */
  .navbar-nav .nav-link {
    font-size: 1rem !important;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff !important;
    padding: 14px 24px !important;
    transition: background .2s, color .2s;
  }
  .navbar-nav .nav-link:hover,
  .navbar-nav .nav-link:focus {
    background: rgba(255,255,255,.08);
    color: #fff !important;
  }

  /* strzałka dropdown */
  .navbar-nav .dropdown-toggle::after {
    float: right;
    margin-top: 6px;
  }

  /* podmenu — przyciemnione, lekko wcięte */
  .navbar-nav .dropdown-menu {
    position: static !important;
    float: none;
    background-color: rgba(0,0,0,.25) !important;
    border: none;
    border-radius: 0;
    margin: 0;
    padding: 0;
    box-shadow: none;
  }
  .navbar-nav .dropdown-menu .dropdown-item {
    font-size: .85rem !important;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgba(255,255,255,.8) !important;
    padding: 11px 24px 11px 40px !important;
    border-bottom: 1px solid rgba(255,255,255,.08);
  }
  .navbar-nav .dropdown-menu .dropdown-item:last-child {
    border-bottom: none;
  }
  .navbar-nav .dropdown-menu .dropdown-item:hover {
    background: rgba(255,255,255,.1) !important;
    color: #fff !important;
  }
}

body.menu-open { overflow: hidden; }

/* ── Modal panelu CMS — bez podwójnego paska przewijania ── */
#cms-panel-modal .modal-dialog {
  max-height: 92vh;
  margin-top: 4vh;
  margin-bottom: 4vh;
}
#cms-panel-modal .modal-content {
  max-height: 92vh;
  display: flex;
  flex-direction: column;
}
#cms-panel-modal .modal-body {
  flex: 1 1 auto;
  overflow: hidden;
  padding: 0;
}
#cms-panel-modal .modal-body iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.feature-text {
  font-size: .9rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 30px;
  text-align: justify;
  text-justify: inter-word;
}

.btn-outline-custom {
  color: var(--primary-color);
  border: 1.5px solid var(--primary-color);
  border-radius: 20px;
  padding: 8px 45px;
  font-size: .85rem;
  font-weight: 600;
  letter-spacing: 1px;
  background: transparent;
  transition: all 0.4s ease;
}

.feature-item:hover .feature-icon { fill: var(--hover-color); transform: scale(1.08); }
.feature-item:hover .feature-title { color: var(--hover-color); }
.feature-item:hover .feature-title::after { background-color: var(--hover-color); width: 100px; }
.feature-item:hover .btn-outline-custom {
  color: #fff;
  background-color: var(--hover-color);
  border-color: var(--hover-color);
  box-shadow: 0 4px 15px rgba(211,155,57,.3);
}

@media (max-width: 767.98px) {
  .feature-item { margin-bottom: 30px; border-bottom: 1px dashed #eee; padding-bottom: 40px; }
  .feature-item:last-child { border-bottom: none; }
}

.virtual-tour {
  background-color: var(--bg-creme);
  border-bottom: solid 2px white;
  border-top: solid 2px var(--gold-dark);
  box-shadow: inset 0 4px 0 0 white;
}

.virtual-tour__header {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.virtual-tour__header .section-title {
  flex: 1 1 auto;
}

.icon-360-wrapper {
  flex-shrink: 0;
}

.icon-360 { width: 70px; height: 73px; fill: var(--gold-dark); }

.viewer-container {
  height: 500px;
  overflow: hidden;
  
}

.virtual-tour__bg {
  background-color: var(--gold-dark);
  width: 100%;
}

.panorama-year-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.panorama-year-label {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-brown);
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
}

.panorama-year-select {
  appearance: none;
  -webkit-appearance: none;
  background-color: #fff;
  border: 1.5px solid var(--gold-dark);
  border-radius: 20px;
  padding: 4px 32px 4px 14px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-brown);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23b8860b'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  outline: none;
  transition: border-color .2s ease;
}

.panorama-year-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(184,134,11,.15);
}

@media (max-width: 576px) {
  .virtual-tour__header { flex-wrap: wrap; }
  .virtual-tour__header .section-title { flex-basis: 100%; }
  .panorama-year-bar { gap: 8px; }
  .panorama-year-select {
    font-size: .8rem;
    padding: 4px 28px 4px 12px;
  }
  .thumbnails-grid {
    gap: 10px;
  }
  .thumb-item {
    width: 120px;
  }
  .thumb-img {
    height: 68px;
  }
}

#panorama-viewer { width: 100%; height: 100%; }

#static-preview {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background-size: cover;
  background-position: center;
  display: none;
  z-index: 5;
  cursor: pointer;
}

#static-preview.active { display: block; }

.play-overlay {
  width: 100%; height: 100%;
  background: rgba(0,0,0,.2);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background 0.3s ease;
}

#static-preview:hover .play-overlay { background: rgba(0,0,0,.4); }

.play-btn {
  background: rgba(211,155,57,.9);
  color: white;
  padding: 12px 30px;
  border-radius: 25px;
  font-weight: 600;
  letter-spacing: 1px;
  font-size: .9rem;
  box-shadow: 0 4px 15px rgba(0,0,0,.3);
  transition: transform 0.3s ease;
}

#static-preview:hover .play-btn { transform: scale(1.05); }

.thumbnails-grid {
	display: flex;
	gap: 15px;
 
	padding: 10px 0;
	overflow: hidden;
	overflow-x: auto;
}

.thumb-item {
  width: 160px;
  flex-shrink: 0;
  cursor: pointer;
  text-align: center;
  opacity: 0.6;
  transition: all 0.3s ease;
}

.thumb-item:hover,
.thumb-item.active { opacity: 1; }

.thumb-img {
  height: 90px;
  background-size: cover;
  background-position: center;
  border: 2px solid transparent;
  border-radius: 4px;
  transition: border-color 0.3s ease;
}

.thumb-item.active .thumb-img { border-color: var(--gold-dark); }

.thumb-caption {
  font-size: .75rem;
  color: var(--text-brown);
  margin-top: 8px;
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1.2;
}

.google-link { color: #a8a8a8; font-size: .8rem; }
.google-link:hover { color: var(--text-brown); }

.panorama-pagination {
  font-size: .9rem;
  color: #a8a8a8;
  user-select: none;
  padding: 10px 0;
}

.page-num {
  display: inline-block;
  cursor: pointer;
  padding: 0 4px;
  transition: all 0.2s ease;
  color: #bfa68f;
}

.page-sep { color: #dcd0c4; margin: 0 2px; }
.page-num:hover { color: var(--gold-dark); }

.page-num.active {
  color: var(--gold-dark);
  font-weight: 700;
  font-size: 1.4rem;
  position: relative;
  top: 1px;
}

@media (max-width: 767.98px) {
  .viewer-container { height: 300px; }
  .virtual-tour__header { gap: 10px; }
  .icon-360 { width: 50px; height: 52px; }
  .thumbnails-grid {
    justify-content: flex-start;
    overflow-x: auto;
    white-space: nowrap;
    padding: 0 15px;
    -webkit-overflow-scrolling: touch;
  }
  .thumbnails-grid::-webkit-scrollbar { display: none; }
}

.contact-section {
  padding: 56px 0;
  position: relative;
  background: #fafafa;
  border-top: 1px solid #eee;
  color: var(--gold);
}

.contact-section .kosciol {}

.parafia-title {
  display: block;
  font-size: 1.5rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -.01em;
  line-height: 1.25;
  margin-bottom: 24px;
  color: #111;
}

.address      { margin-bottom: 50px; }
.konto-title  { font-weight: 700; text-transform: uppercase; margin-bottom: 1px; }
.konto-number { margin-bottom: 50px; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 9px;
}

.contact-item i { width: 40px; }
div.pod_kreska { border-bottom: dotted 2px var(--gold); }

.msze-column { max-width: 640px; }

.msze-box  { margin-top: 40px; }
.msze-title { font-weight: 700; text-transform: uppercase; margin-bottom: 15px; }
.msze-content { line-height: 1.5; word-spacing: 8px; }

@media (max-width: 767px) {
  .msze-column strong { display: block; margin-top: 30px; }
}

@media (max-width: 768px) {
  .contact-section { padding: 40px 0; }
}

/* ============================================================
   STOPKA — korporacyjny, minimalistyczny styl.
   Duże paddingi + mała czcionka w menu, żeby lista podstron nie
   dominowała wizualnie nad resztą stopki. Mobile-first: kolumny
   domyślnie w jednej szerokości (col-12), od md (≥768px) w rzędzie po 4.
   ============================================================ */
.footer-section {
  padding: 72px 0 32px;
  color: var(--gold) !important;
  background: #fff;
  margin-top: 0;
}

/* Linia kropkowana na szerokość tekstu (jak na dole stopki) */
.footer-section > .container {
  border-top: 1px dotted #ccc;
  padding-top: 40px;
}

/* Strona główna (art_id=5) — stopka bez górnego marginesu */
body#art_5 .footer-section {
  margin-top: 0px;
}

.footer-menu-row {
  row-gap: 40px;
}

.footer-column {
  padding: 0 24px;
}

@media (max-width: 767px) {
  .footer-column {
    padding: 0 12px;
    margin-bottom: 24px;
  }
}

.footer-title {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  margin-bottom: 20px;
  text-transform: uppercase;
  color: #111;
}

.footer-links  { padding: 0; margin: 0; list-style: none; }
.footer-links__top { margin-bottom: 14px; }

.footer-links a {
  color: #495057;
  font-size: 12.5px;
  letter-spacing: .02em;
  line-height: 1.5;
  transition: 0.2s;
  text-transform: uppercase;
}

.footer-links a:hover { color: #000; padding-left: 3px; }

.footer-links__sub {
  list-style: none;
  margin: 8px 0 0;
  padding: 0 0 0 14px;
  border-left: 1px solid #e6e6e6;
}
.footer-links__sub li { margin-bottom: 8px; }
.footer-links__sub a { font-size: 11.5px; color: #868e96; }
.footer-links__sub a:hover { color: #000; }

/* Mapa dojazdu w stopce — uniwersalna, na każdej stronie */
.footer-mapa {
  position: relative;
  margin-top: 48px;
  text-align: center;
}
.footer-mapa #footer-map {
  width: 100%;
  height: 320px;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(0,0,0,.15);
}
.footer-mapa-nawiguj {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  background: var(--gold-dark);
  color: #fff;
  padding: 14px 28px;
  border-radius: 50px;
  font-weight: 700;
  font-size: 13px;
  transition: .3s;
}
.footer-mapa-nawiguj:hover { background: #000; color: #fff; }

/* Zostań z nami — social w 4. kolumnie */
.footer-column--social .footer-title { margin-bottom: 20px; }
.footer-social-links { display: flex; gap: 14px; flex-wrap: wrap; }
.footer-social-links a {
  width: 38px; height: 38px;
  border: 1px solid #ccc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #495057;
  font-size: 15px;
  transition: .2s;
}
.footer-social-links a:hover { background: #111; border-color: #111; color: #fff; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 50px;
  padding: 20px 0;
  border-top: 1px dotted #ccc;
}

.footer-copy {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  font-size: 14px;
}

.footer-copy a { color: var(--gold-dark); }

/* Znak wykonawcy — dyskretny na jasnym tle stopki (bez invert, bo tło tutaj
   jest białe, nie ciemne jak w oryginalnym wzorze Ofiarowania Pańskiego) */
.footer-logo img {
  height: 40px;
  display: block;
  filter: brightness(0);
  opacity: .3;
}

@media (max-width: 768px) {
  .footer-bottom { flex-direction: column; gap: 15px; text-align: center; }
  .footer-copy   { gap: 15px; }
  .footer-copy span:nth-child(even) { display: none; } 
}

.tlo_z_gradient {
  margin: 0;
  padding: 32px 0 20px;
  border-bottom: 2px solid var(--gold-dark);
}

.guter_prawy {
  border-right: 1px solid #e0e0e0;
  padding-right: 28px;
}

.tlo_z_gradient .col-lg-9 {
  padding-left: 36px;
}

.ikony_g { display: none; }

/* ============================================================
   BELKA NAWIGACJI POZIOMEJ (breadcrumb)
   ============================================================ */
.breadcrumb-bar {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 11px;
	padding: 8px 0 10px;
	margin-top: 57px;
	margin-bottom: 20px;
	font-size: 0.82rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	border-bottom: 1px solid #e0e0e0;
}

.breadcrumb-bar::-webkit-scrollbar { display: none; }

.breadcrumb-bar__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border: 1px solid var(--gold-dark);
  border-radius: 20px;
  color: var(--gold-dark);
  background: transparent;
  white-space: nowrap;
  transition: background .2s, color .2s;
  flex-shrink: 0;
}

.breadcrumb-bar__btn:hover {
  background: var(--gold-dark);
  color: #fff;
}

.breadcrumb-bar__sep {
  color: #ddd;
  padding: 0 4px;
  flex-shrink: 0;
  user-select: none;
}

.breadcrumb-bar__crumb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
  transition: color .2s;
}

.breadcrumb-bar__crumb:hover { color: var(--gold-dark); }

.breadcrumb-bar__arrow {
  color: #ccc;
  font-size: 0.75rem;
  flex-shrink: 0;
}

@media (max-width: 991px) {
  .breadcrumb-bar {
    margin-top: 10px;
    margin-bottom: 14px;
    gap: 2px;
  }
  .breadcrumb-bar__btn { padding: 3px 10px; font-size: 0.78rem; }
}

/* ============================================================
   WIDOK ARTYKUŁU (newsy.tpl)
   ============================================================ */
.article-title {
	font-size: 1.8rem;
	font-weight: initial;
	color: var(--primary-color);
	margin: 24px 0 16px;
	line-height: 1.3;
	margin-top: 66px;
}
.pas_daty {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 0.82rem;
  color: #999;
  margin: 6px 0 22px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.pas_daty span { display: flex; align-items: center; gap: 4px; }

.pas_daty__btn {
  margin-left: auto;
  color: var(--gold-dark);
  font-size: 1rem;
  transition: color .2s;
}
.pas_daty__btn:hover { color: var(--primary-color); }

.article-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 32px;
  padding: 12px 0;
  border-top: 1px solid #eee;
}

.article-footer__left,
.article-footer__right { display: flex; align-items: center; gap: 10px; }

.article-footer__btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border: 1px solid var(--gold-dark);
  border-radius: 4px;
  color: var(--gold-dark);
  font-size: 0.85rem;
  background: transparent;
  transition: background .2s, color .2s;
  cursor: pointer;
  text-decoration: none;
}
.article-footer__btn:hover { background: var(--gold-dark); color: #fff; }

.article-footer__meta { border-color: #ddd; color: #999; cursor: default; }
.article-footer__meta:hover { background: transparent; color: #999; }

/* Przycisk "Wróć" ukryty na mobile */
@media (max-width: 991px) {
  .article-footer__left { display: none; }
}

.article-lead {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-brown);
  margin-bottom: 16px;
  line-height: 1.7;
}

.article-body {
  font-size: 0.97rem;
  line-height: 1.8;
  color: #333;
  margin-bottom: 28px;
}

.article-body img { max-width: 100%; height: auto; border: 1px solid #ddd; }

.article-body a {
  color: var(--primary-color);
  text-decoration: underline;
  text-decoration-color: var(--gold);
  text-underline-offset: 3px;
  font-weight: 500;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.article-body a:hover {
  color: var(--gold-dark);
  text-decoration-color: var(--gold-dark);
}

.article-body ul,
.article-body ol {
  padding-left: 1.5rem;
  margin: 0.75rem 0 1rem;
}
.article-body ul {
  list-style: none;
  padding-left: 0;
}
.article-body ul li {
  padding: 0.25rem 0 0.25rem 1.6rem;
  position: relative;
}
.article-body ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gold);
  flex-shrink: 0;
}
.article-body ol {
  list-style: none;
  counter-reset: article-counter;
  padding-left: 0;
}
.article-body ol li {
  counter-increment: article-counter;
  padding: 0.25rem 0 0.25rem 2rem;
  position: relative;
}
.article-body ol li::before {
  content: counter(article-counter) '.';
  position: absolute;
  left: 0;
  top: 0.15em;
  min-width: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
  font-size: 0.9em;
}
.article-body li + li {
  border-top: 1px solid #e6e6e6;
}

/* ============================================================
   HERO PODSTRONY — prosta winieta, bez slidera
   ============================================================ */
.hero-subpage {
  position: relative;
  background: url('../img/winieta-glowna.jpg') center top no-repeat, #111111;
  background-size: cover, auto;

  max-height: 380px;
}

.hero-subpage-inner {
  position: relative;
  z-index: 2;
}

.hero-subpage::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 60px;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,.5));
  pointer-events: none;
}

.subpage-title-bar {
 padding: 0px 0 136px;
  text-align: center;
}

.subpage-title-bar .parafia-title {
  display: inline-block;
  color: var(--gold);
  font-size: 1.1rem;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  opacity: .75;
}

@media (max-width: 768px) {
  .subpage-title-bar .parafia-title {
    background: none;
    width: auto; height: auto;
    font-size: 0.85rem;
    margin-top: 0;
  }
}

#newsTab { border-bottom: 2px solid var(--gold-dark); margin-bottom: 24px; }
#newsTab .nav-link {
  color: #555;
  font-weight: 600;
  letter-spacing: .5px;
  border: none;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 10px 18px;
}
#newsTab .nav-item:first-child .nav-link { padding-left: 0; }
#newsTab .nav-link.active,
#newsTab .nav-link:hover { color: var(--primary-color); border-bottom-color: var(--gold-dark); background: transparent; }

.artykul { margin: 40px 0 10px; }
.artykul h1 { font-size: 19px; font-weight: 500; margin: 7px 0 12px; line-height: 1.3; }
.artykul h1 a {
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2em;
}
.artykul h1 a:hover { color: var(--primary-color); text-decoration: none; }
.artykul span.data { color: #999; font-size: 13px; display: block; margin-bottom: 4px; }
.artykul .text {
  font-size: 14px;
  color: #4A4A49;
  line-height: 1.6;
  
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
}
.artykul .ramka_foto { height: 200px; background: #eeeeee; margin-bottom: 8px; }

/* Wrapper zdjęcia — przycina powiększenie przy hover, żeby nie wystawało poza kartę */
.artykul > a:has(> img.img-fluid) {
  display: block;
  overflow: hidden;
  margin-bottom: 8px;
  border: 1px solid #ddd;
}
.artykul img.img-fluid {
  margin-bottom: 0;
  width: 100%;
  object-fit: cover;
  max-height: 200px;
  border: none;
  transition: transform .35s ease;
}
.artykul > a:hover > img.img-fluid { transform: scale(1.08); }

.artykul-video-thumb { position: relative; display: block; }
.artykul-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  color: rgba(255,255,255,.85);
  background: rgba(0,0,0,.25);
  transition: background .2s, color .2s;
}
.artykul-video-thumb:hover .artykul-play { background: rgba(0,0,0,.45); color: #ff0000; }

a.wiecej { display: inline-block; margin-top: 8px; color: var(--gold-dark); font-size: 18px; }
a.wiecej:hover { color: var(--primary-color); }
a.wiec { display: inline-block; margin: 32px 0; color: var(--primary-color); font-size: 14px; }
a.wiec:hover { opacity: .7; }

@media (max-width: 991px) {
  a.wiec {
    display: flex;
    justify-content: center;
    margin: 24px auto;
    padding: 6px 20px;
    border: 1.5px solid var(--gold-dark);
    border-radius: 4px;
    font-weight: 600;
    font-size: 12px;
    color: var(--primary-color);
    width: fit-content;
    transition: background .2s, color .2s;
  }
  a.wiec:hover { background: var(--gold-dark); color: #fff; opacity: 1; }
}
hr.braz { border-color: var(--gold-dark); opacity: .4; }

.data1 { font-size: 17px; line-height: 1.5; color: var(--gold-dark); padding-top: 10px; }
.data2 { font-weight: 400; font-size: 14px; color: #868A8B; padding-top: 8px; }
.swieci { padding-top: 16px;  font-weight: 300; font-size: 17px; }

div.sticky { position: sticky; top: 26px; margin-right: 20px; margin-top: 60px; }

#kalendarz_boczny .naglowek { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin: 46px 0 12px; }
#kalendarz_boczny .naglowek .miesiac { font-weight: 200; font-size: 32px; line-height: 1.2; color: var(--gold-dark); flex: 1; }
#kalendarz_boczny .naglowek .rok { font-size: 14px; color: #aaa; }
#kalendarz_boczny .naglowek a { color: var(--gold-dark); font-size: 18px; }
#kalendarz_boczny .dz { font-size: 32px; color: var(--gold-dark); width: 50px; display: inline-block; }
#kalendarz_boczny .swieto .dzs { color: #ffd350; }
#kalendarz_boczny .linia_k { display: flex; align-items: flex-start; margin-bottom: 6px; }
#kalendarz_boczny .kalendarium { width: 56px; flex-shrink: 0; text-align: center; }
#kalendarz_boczny .dzs { font-size: 11px; color: #aaa; }
#kalendarz_boczny .eventy { flex: 1; padding-left: 10px; }
.event { font-size: 13px; border-bottom: 1px solid #4895db24; padding: 4px 0 6px; }
.event .hour { font-size: 11px; color: var(--gold-dark); }
.event .caption { line-height: 1.4; }

.rzymskie { display: flex; flex-wrap: wrap; gap: 4px; margin: 16px 0; }
.rzymskie a { color: #6c757d; font-size: 11px; }
.rzymskie .zaznaczone a { color: var(--gold-dark); font-weight: bold; }

/* ── Galeria artykułu ── */
.gallery-block {
  /* wyrównanie do krawędzi kolumny — niweluje padding col-lg-9 */
  margin-left: calc(var(--bs-gutter-x, 1.5rem) * -.5);
  margin-right: calc(var(--bs-gutter-x, 1.5rem) * -.5);
  padding-bottom: 32px;
}

/* Główne zdjęcie — pełna szerokość bloku */
.gallery-hero {
  line-height: 0;
}

.gallery-hero__img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 4px solid var(--gold-dark);
}

/* Miniatury — jQuery Masonry (plugins/masonry-site) pozycjonuje kafle
   absolutnie po załadowaniu obrazów. Każda miniatura ma naturalną wysokość
   (height:auto, brak object-fit:cover) — zdjęcie pionowe ZOSTAJE pionowe,
   zamiast być przycięte do kwadratu/panoramy.
   Mobile-first: 2 kolumny (min-width kafla ~ połowa kontenera - gap). */
.gallery-mozaika {
  position: relative; /* kontener pozycjonowania absolutnego masonry */
}

.gallery-thumb-link {
  display: block;
  overflow: hidden;
  border-radius: 4px;
  width: calc(50% - 3px); /* mobile: 2 kolumny w wierszu */
  margin-bottom: 6px;
}
@media (min-width: 576px) {
  .gallery-thumb-link { width: calc(33.333% - 4px); }
}
@media (min-width: 992px) {
  .gallery-thumb-link { width: calc(20% - 5px); }
}

.gallery-thumb__img {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #fff;
  transition: opacity .2s, filter .2s;
}

.gallery-thumb-link:hover .gallery-thumb__img {
  opacity: .8;
  filter: brightness(1.1);
}

.gallery-thumb-link:hover .gallery-thumb__img {
  opacity: .8;
  filter: brightness(1.1);
}

/* Przycisk pokaż/ukryj */
.gallery-toggle {
  text-align: center;
  padding: 6px 0 2px;
}

.gallery-toggle__btn {
  background: none;
  border: none;
  color: var(--primary-color);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 12px;
  border-bottom: 1px dashed var(--gold-dark);
  transition: color .2s;
}

.gallery-toggle__btn:hover {
  color: var(--gold-dark);
}

.gallery-thumbs__more {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s ease;
}

.sticky h1.tytul {
	font-size: 25px;
	font-weight: bold;
	color: var(--gold-dark);
	margin: 60px 0 16px;
	text-transform: uppercase;
	letter-spacing: 2px;
}
.sticky .bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 12px;
}
.sticky .bottom a { color: var(--primary-color); transition: color .2s; }
.sticky .bottom a.linkPost {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-dark);
}
.sticky .bottom a.linkPost .text-edit { font-size: 18px; }
.sticky .bottom .rightPos {
  display: flex;
  align-items: center;
  gap: 4px;
}
.sticky .bottom .rightPos a {
  font-size: 13px;
  color: #aaa;
  padding: 2px 5px;
  transition: color .2s;
}
.sticky .bottom .rightPos a.active { color: var(--gold-dark); font-weight: bold; }
.sticky .bottom .rightPos a::after { content: ""; }
.sticky .bottom .rightPos a:not(:last-child)::after { content: "/"; margin-left: 4px; color: #ddd; }
/* ── Galeria boczna (belka_prawa) ── */
.gallery {
  width: 100%;
  overflow: hidden;
}
.gallery .album {
  width: 100%;
  overflow: hidden;
  border-radius: 6px;
}
.gallery .album a.thumbnail {
  display: block;
  overflow: hidden;
  border-radius: 6px 6px 0 0;
  line-height: 0;
}
.gallery .album a.thumbnail img {
  width: 100%;
  height: auto;
  max-width: 100%;
  display: block;
  object-fit: cover;
  transition: transform .3s;
}
.gallery .album a.thumbnail:hover img {
  transform: scale(1.04);
}
.gallery .album p.title {
  font-size: .85rem;
  margin: 8px 0 4px;
  line-height: 1.3;
  color: var(--dark);
  font-weight: 600;
}
.gallery .album .bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 4px;
}
.gallery .bottom .linkPost {
  font-size: .8rem;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 5px;
}
.gallery .bottom .linkPost:hover { color: var(--gold-dark); }
.gallery .bottom .linkPost .text-edit {
  font-weight: 700;
  font-size: .9rem;
}
.gallery > .bottom {
	margin-top: -41px;
	justify-content: flex-end;
	margin-bottom: 64px;
}

/* ── Strona galerii — siatka albumów ── */
.galeria-page {
  padding-top: 28px;
  padding-bottom: 48px;
}

.galeria-filtr {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Karta albumu */
.album-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  transition: box-shadow .25s, transform .25s;
  height: 100%;
}
.album-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.15);
  transform: translateY(-3px);
  color: inherit;
}

/* Miniatura */
.album-card__thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: var(--dark);
}
.album-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s;
}
.album-card:hover .album-card__thumb img {
  transform: scale(1.05);
}

/* Zastępnik gdy brak zdjęcia */
.album-card__no-photo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  font-size: 2.5rem;
}

/* Licznik zdjęć */
.album-card__count {
  position: absolute;
  bottom: 7px;
  right: 9px;
  background: rgba(0,0,0,.55);
  color: #fff;
  font-size: .75rem;
  padding: 2px 8px;
  border-radius: 20px;
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  gap: 4px;
}

/* Treść pod miniaturą */
.album-card__body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.album-card__title {
  font-size: .92rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  color: var(--dark);
}
.album-card__date {
  font-size: .78rem;
  color: var(--gold-dark);
  font-weight: 500;
}

/* Paginacja */
.galeria-paginacja .page-link {
  color: var(--primary-color);
  border-color: #ddd;
}
.galeria-paginacja .page-item.active .page-link {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff;
}
.galeria-paginacja .page-link:hover {
  color: var(--gold-dark);
  background: var(--light);
}

/* ── Drag & drop — edytor ── */
.galeria-sort-info {
  font-size: .82rem;
  color: var(--primary-color);
  background: #f2f2f2;
  border: 1px dashed var(--gold);
  border-radius: 6px;
  padding: 7px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.album-drag-handle {
  position: absolute;
  top: 7px;
  left: 7px;
  z-index: 10;
  background: rgba(0,0,0,.45);
  color: #fff;
  border-radius: 4px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  font-size: 1rem;
  opacity: 0;
  transition: opacity .2s;
}
.col:hover .album-drag-handle { opacity: 1; }
.col .album-drag-handle:active { cursor: grabbing; }

/* karta podczas przeciągania */
.ui-sortable-helper {
  opacity: .85;
  box-shadow: 0 8px 24px rgba(0,0,0,.22) !important;
  transform: rotate(1.5deg) scale(1.03);
  z-index: 999;
}
/* placeholder — puste miejsce */
.album-card-placeholder {
  background: #f2f2f2;
  border: 2px dashed var(--gold);
  border-radius: 6px;
  opacity: .6;
}
.album-card-placeholder * { visibility: hidden; }

/* col musi być relative, żeby handle był absolutny */
.albumy-sortable .col { position: relative; }

/* ── Panel edycji — prawa strona ── */
.newsy-item div.edit_panel,
div.edit_panel {
  left:  auto !important;
  right: 0;
  top:   8px;
}

/* ── Lista artykułów (newsy_lista) ── */
.newsy-lista {
  list-style: none;
  padding: 0;
  margin: 0;
}

.newsy-item {
  position: relative;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 0 18px 0;
  border-bottom: 1px solid #ede5d8;
  transition: background .2s;
}
.newsy-item:last-child { border-bottom: none; }

/* Miniatura */
.newsy-item__thumb {
  flex-shrink: 0;
  width: 110px;
  height: 80px;
  overflow: hidden;
  border-radius: 5px;
  display: block;
}
.newsy-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.newsy-item:hover .newsy-item__thumb img { transform: scale(1.06); }

/* Treść */
.newsy-item__body {
  flex: 1;
  min-width: 0;
}
.newsy-item__title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 5px;
  line-height: 1.35;
  color: var(--dark);
}
.newsy-item__wstep {
  font-size: .88rem;
  color: #555;
  margin: 0 0 7px;
  line-height: 1.5;
}

/* Meta */
.newsy-item__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: .78rem;
  margin-top: 6px;
}
.newsy-item__date {
  color: var(--gold-dark);
  font-weight: 500;
}
.newsy-item__count,
.newsy-item__files,
.newsy-item__images {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 3px;
}
.newsy-item__level {
  color: #aaa;
  font-size: .72rem;
  margin-left: auto;
}

/* Uchwyt drag & drop */
.newsy-drag-handle {
  position: absolute;
  top: 50%;
  left: -28px;
  transform: translateY(-50%);
  background: rgba(0,0,0,.38);
  color: #fff;
  border-radius: 4px;
  width: 22px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  font-size: .95rem;
  opacity: 0;
  transition: opacity .2s;
}
.newsy-item:hover .newsy-drag-handle { opacity: 1; }
.newsy-drag-handle:active { cursor: grabbing; }

/* Placeholder podczas przeciągania */
.newsy-item--placeholder {
  background: #f2f2f2;
  border: 2px dashed var(--gold) !important;
  border-radius: 6px;
  opacity: .55;
}
.newsy-item--placeholder * { visibility: hidden; }

/* Karta podczas przeciągania */
.newsy-lista .ui-sortable-helper {
  background: #fff;
  box-shadow: 0 6px 22px rgba(0,0,0,.18);
  border-radius: 6px;
  padding: 12px 16px;
  opacity: .92;
}

/* Responsywność — telefon */
@media (max-width: 575px) {
  .newsy-drag-handle { left: -4px; top: 14px; transform: none; }
  .newsy-item { padding-left: 28px; }
  .newsy-item__thumb { width: 80px; height: 60px; }
  .newsy-item__title { font-size: .9rem; }
}

/* ── Karty video / youtube ── */
.video-card {
  display: flex;
  flex-direction: column;
  border-radius: 6px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
  cursor: pointer;
  transition: box-shadow .25s, transform .25s;
  height: 100%;
}
.video-card:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,.18);
  transform: translateY(-3px);
}

/* miniatura */
.video-card__thumb {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  background: var(--dark);
  line-height: 0;
}
.video-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s;
}
.video-card:hover .video-card__thumb img { transform: scale(1.05); }

/* ikona play */
.video-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: rgba(255,255,255,.85);
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
  transition: color .2s, transform .2s;
}
.video-card:hover .video-card__play {
  color: var(--gold);
  transform: scale(1.12);
}

/* audio — zastępnik */
.video-card__thumb--audio {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--dark) 0%, #3a2510 100%);
  font-size: 3rem;
  color: var(--gold);
  cursor: default;
}
.video-card--audio { cursor: default; }
.video-card--audio:hover { transform: none; box-shadow: 0 2px 8px rgba(0,0,0,.08); }

.video-card__audio {
  width: 100%;
  margin-top: 6px;
}

/* treść */
.video-card__body {
  padding: 10px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}
.video-card__title {
  font-size: .88rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  color: var(--dark);
}
.video-card__edit {
  font-size: .75rem;
  color: var(--primary-color);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
}
.video-card__edit:hover { color: var(--gold-dark); }

/* ── Responsywność ── */

/* iPad pionowy (768–991 px) — 3 kolumny */
@media (max-width: 991px) and (min-width: 768px) {
  .albumy-grid {
    --bs-columns: 3;
  }
}

/* Telefon (do 575 px) — 2 kolumny, mniejsza czcionka */
@media (max-width: 575px) {
  .album-card__title { font-size: .82rem; }
  .album-card__body  { padding: 8px 10px 10px; }
  .galeria-page      { padding-top: 16px; padding-bottom: 32px; }
}

form#intencje { padding: 16px; background: #8080801a; margin-top: 16px; }
form#intencje textarea,
form#intencje input[type="text"],
form#intencje input[type="date"],
form#intencje input[type="time"] { width: 100%; margin-bottom: 4px; padding: 6px; border: 1px solid #ddd; }
form#intencje label { display: block; margin: 12px 0 3px; font-size: 13px; }
form#intencje input[type="submit"] { background: var(--gold-dark); padding: 10px 20px; border: none; color: white; border-radius: 24px; margin-top: 12px; cursor: pointer; }

@media (max-width: 991px) {
  .tlo_z_gradient { margin: 0; padding: 20px 0; }
  .guter_prawy { border-right: none; border-bottom: 2px solid var(--gold-dark); padding-right: 15px; }
  .tlo_z_gradient .col-lg-9 { padding-left: 15px; }
}

@media (max-width: 991px) {
  div.sticky {
    position: static;
    margin: 0 0 0;
    padding-bottom: 28px;
    border-bottom: 2px solid var(--gold-dark);
    margin-bottom: 32px;
  }
}

.social-share {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 16px 0 24px;
}

.social-share__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	background: transparent;
	border: 1.5px solid #fff;
	color: var(--primary-color);
	cursor: pointer;
	text-decoration: none;
	transition: background .2s, color .2s;
}

.social-share__btn:hover {
  background: var(--gold-dark);
  color: #fff;
  text-decoration: none;
}

.social-share--mini { margin: 10px 0 8px; gap: 5px; }
.social-share--mini .social-share__btn { padding: 4px 9px; font-size: 12px; }

#ikony_kategorii {
	margin: 53px 0 15px 0!important;
}

/* Belka prawa — na podstronach ukryta na mobile; widoczna tylko na stronie głównej */
@media (max-width: 991px) {
  .belka-podstrona { display: none; }
}

/* ── Kalendarz — nadpisanie globalnego --mocny (#b60000) na --gold-dark ── */

/* sterowanie: « dziś » (wyższa specyficzność — styl.css ładowany po ofiarowanie.css) */
.kalendarz div.sterowanie a.next,
.kalendarz div.sterowanie a.prev {
  border-color: var(--gold-dark) !important;
  color: var(--gold-dark) !important;
}

/* tryby: dzień / tydzień / miesiąc — aktywny */
.kalendarz div.tryby a.selected {
  background: var(--gold-dark) !important;
  color: #fff !important;
}

/* miniaturka — dzień świąteczny (wyższa specyficzność niż styl.css) */
.kalendarz .kalendarzyk td.swieto a { color: var(--gold-dark); }

/* miniaturka — dzień dzisiejszy */
.kalendarz .kalendarzyk td.dzis { border-bottom-color: var(--gold-dark); }

/* kartka — nagłówek niedzieli/święta (wyższa specyficzność niż styl.css) */
.kalendarz .kalendarz_karta .karta.swieto .naglowek { color: var(--gold-dark); }

/* button „+" dodaj wydarzenie — złoty, widoczny na każdym urządzeniu */
.kalendarz_karta .karta a.dodaj {
  position: absolute;
  right: 12px;
  top: 12px;
  font-size: 22px;
  line-height: 1;
  color: var(--gold-dark);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity .2s, color .2s;
  display: inline-block; /* visible na mobile (nadpisuje ewentualne hidden) */
}

.kalendarz_karta .karta a.dodaj:hover {
  opacity: 1;
  color: var(--primary-color);
}

/* ── Marginesy i responsywność kalendarza ── */
.kalendarz {
  padding-left: 15px;
  padding-right: 15px;
}

/* Karty jako kafle — tło, obramowanie, cień, bez zależności od kolejności
   ładowania arkuszy (globalny styl.css ładuje się PO tym pliku przez
   3.2.panel.tpl, więc selektor musi mieć wyższą wagę niż tam: dodajemy
   kwalifikator "div" i ".row" na kontenerze). Tekst godzin/intencji
   dotąd łamał się w wąskiej kolumnie — karta ma teraz stałą minimalną
   szerokość i nie kurczy się poniżej niej w gridzie. */
div.kalendarz_karta.row {
  overflow: visible !important; /* globalny styl.css ustawia hidden i obcina karty */
}

.kalendarz_karta .karta {
  padding: 14px 16px 18px;
  margin-bottom: 0;
  background: #fff;
  border: none;
  border-radius: 8px;
  box-shadow: none;
}

/* Data techniczna (np. "2026-08-23") wypisywana przed nagłówkiem karty —
   zbędna, bo dzień/liczba/miesiąc są już czytelnie w .naglowek poniżej. */
.kalendarz_karta .karta {
  font-size: 0;
}
.kalendarz_karta .karta > .naglowek,
.kalendarz_karta .karta a.dodaj {
  font-size: 1rem;
}

/* układ niemobilny: karty obok siebie w siatce o stałej liczbie kolumn */
@media (min-width: 576px) {
  div.kalendarz_karta.row {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(220px, 1fr));  /* tablet: 2 kolumny, nie węższe niż 220px */
    gap: 18px;
    align-items: start;
  }
  .kalendarz_karta .karta {
    position: relative;        /* dla przycisku „+” a.dodaj (absolute) */
    min-width: 0;              /* pozwala kartom się kurczyć w gridzie do minmax() */
  }
}

/* desktop (≥992px): stałe 3 kolumny, ale nigdy węższe niż 240px każda */
@media (min-width: 992px) {
  div.kalendarz_karta.row {
    grid-template-columns: repeat(3, minmax(240px, 1fr));
  }
}

/* Widok TYGODNIOWY: PHP generuje karty z klasą Bootstrap col-sm-3 (7 kart —
   dni tygodnia) zamiast col-sm-12 (miesiąc). Grid o 3 kolumnach z reguł
   powyżej ściska wtedy 7 kart do wąskich kolumn łamiących tekst — patrz
   zrzut zgłoszony przez użytkownika. Poprzednia próba (flex + overflow-x)
   rozpychała kontener poza kolumnę col-md-8, zasłaniając kalendarzyk
   boczny — dlatego układ pozostaje w gridzie (nie wychodzi poza rodzica),
   ale z 4 kolumnami: 4 karty w rzędzie, pozostałe zawijają się pod spód. */
div.kalendarz_karta.row:has(> .karta.col-sm-3) {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  overflow: visible;
}
div.kalendarz_karta.row:has(> .karta.col-sm-3) .karta {
  width: auto;
  min-width: 0;
}
@media (max-width: 991px) {
  div.kalendarz_karta.row:has(> .karta.col-sm-3) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 575px) {
  div.kalendarz_karta.row:has(> .karta.col-sm-3) {
    display: block !important;
  }
  div.kalendarz_karta.row:has(> .karta.col-sm-3) .karta {
    width: 100%;
    margin-bottom: 16px;
  }
}

/* układ mobilny (≤575px): jedna kolumna, zwykły flow */
@media (max-width: 575px) {
  div.kalendarz_karta.row {
    display: block !important;
  }
  .kalendarz_karta .karta {
    width: 100%;
    float: none;
    clear: both;
    margin-bottom: 16px;
  }

  /* sterowanie i tryby pod tytułem, nie obok */
  .kalendarz div.sterowanie,
  .kalendarz div.tryby {
    float: none;
    margin: 6px 0 0;
  }

  .kalendarz .belka h2 { float: none; }
}

/* kalendarzyk — zawsze widoczny (BS5 zastępuje hidden-sm z BS3) */
.kalendarz .modul_margines { margin-bottom: 20px; }

/* ===== Tagi artykułu (pod tekstem) ===== */
.article-tags {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 24px 0 8px;
  padding-top: 16px;
  border-top: 1px solid #eee;
}
.article-tags__label {
  color: var(--text-brown, #2b2b2b);
  font-weight: 700;
}
.article-tags__pill {
  display: inline-block;
  padding: 4px 14px;
  background: var(--bg-creme, #f7f7f7);
  border: 1px solid #ddd;
  border-radius: 16px;
  color: var(--text-brown, #2b2b2b);
  text-decoration: none;
  font-size: .9rem;
  transition: background .15s, color .15s, border-color .15s;
}
.article-tags__pill:hover {
  background: var(--gold, #2b2b2b);
  border-color: var(--gold, #2b2b2b);
  color: #fff;
}

/* ── Przycisk powrotu na górę ── */
#btn-top {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gold);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s, transform .3s;
  z-index: 900;
}
#btn-top.visible {
  opacity: 1;
  pointer-events: auto;
}
#btn-top:hover {
  background: var(--gold-dark);
  transform: translateY(-3px);
}

/* ── Przełącznik wysokiego kontrastu ── */
#btn-contrast {
  position: fixed;
  bottom: 36px;
  right: 20px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: #222;
  color: #fff;
  border: 2px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  cursor: pointer;
  z-index: 900;
  transition: background .2s, color .2s;
}
#btn-contrast:hover { background: #444; }

/* ── Tryb wysokiego kontrastu ── */
body.high-contrast {
  background: #000 !important;
  color: #fff !important;
}
body.high-contrast a { color: #ff0 !important; }
body.high-contrast a:hover { color: #fff !important; }
body.high-contrast .topbar,
body.high-contrast .subpage-header,
body.high-contrast .footer-section { background: #000 !important; border-top: 1px solid #fff; }
body.high-contrast .navbar-custom,
body.high-contrast .dropdown-menu { background: #000 !important; }
body.high-contrast .nav-link,
body.high-contrast .dropdown-item { color: #ff0 !important; }
body.high-contrast .nav-link:hover,
body.high-contrast .dropdown-item:hover { color: #fff !important; background: #333 !important; }
body.high-contrast .section-title,
body.high-contrast h1, body.high-contrast h2,
body.high-contrast h3, body.high-contrast h4 { color: #ff0 !important; }
body.high-contrast .btn,
body.high-contrast .btn-outline-custom { background: #000 !important; color: #ff0 !important; border-color: #ff0 !important; }
body.high-contrast .btn:hover,
body.high-contrast .btn-outline-custom:hover { background: #ff0 !important; color: #000 !important; }
body.high-contrast .footer-title,
body.high-contrast .footer-links a { color: #ff0 !important; }
body.high-contrast .footer-copy,
body.high-contrast .footer-copy a { color: #ccc !important; }
body.high-contrast #btn-contrast { background: #ff0; color: #000; border-color: #000; }
