/*
Theme Name: Parafia 2026
Theme URI: https://parafiasuchybor.pl
Description: Nowoczesny motyw dla Parafii pw. Krzyża Świętego w Suchym Borze
Version: 1.7.2
Author: Parafia Suchy Bór
Author URI: https://parafiasuchybor.pl
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: parafia2026
Domain Path: /languages
*/

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --color-primary: #8B0000;
  --color-secondary: #c91c1c;
  --color-dark: #1a1a1a;
  --color-light: #f5f5f5;
  --color-text: #333;
  --color-border: #ddd;
  --spacing-unit: 1rem;
  /* aliasy używane w części reguł */
  --border: #ddd;
  --border-strong: #bbb;
  --radius: 8px;
  --surface-1: #f5f5f5;
  --surface-2: #ffffff;
}

html, body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background-color: #fff;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-secondary);
}

button, input[type="submit"] {
  cursor: pointer;
  background-color: var(--color-primary);
  color: white;
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  font-size: 1rem;
  transition: background-color 0.2s ease;
}

button:hover, input[type="submit"]:hover {
  background-color: var(--color-secondary);
}

/* HEADER — biały, jedna linia: logo | menu | wyszukiwarka */
#header {
  background: #fff;
  border-bottom: 1px solid var(--color-border);
  padding: 0.75rem 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem 2rem;
}
#logo { flex: 0 0 auto; line-height: 0; }
#logo a { display: block; }
#logo img { height: 52px; width: auto; display: block; }

#nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  min-width: 0;
}
#nav .main-menu > ul,
#nav .menu > ul,
#nav > ul,
#nav ul.menu {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 1.4rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
  row-gap: 0;
}
#nav li { position: relative; white-space: nowrap; }
#nav a {
  color: var(--color-text);
  font-weight: 500;
  font-size: 0.98rem;
  text-decoration: none;
  padding: 0.5rem 0;
  display: inline-block;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
#nav a:hover,
#nav li.current-menu-item > a,
#nav li.current_page_item > a,
#nav li.current-menu-ancestor > a { color: var(--color-primary); border-bottom-color: var(--color-primary); }
#nav li.menu-item-has-children > a::after { content: " ▾"; font-size: 0.75em; opacity: .7; }

/* wyszukiwarka — kompaktowa */
.search-form { display: flex; gap: 0.35rem; align-items: center; flex: 0 0 auto; }
.search-field {
  width: 150px; height: 36px; padding: 0 0.7rem;
  border: 1px solid var(--color-border); border-radius: 4px; font: inherit; font-size: 0.9rem;
}
.search-field:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; border-color: var(--color-primary); }
.search-submit {
  width: 36px; height: 36px; border: 0; border-radius: 4px; background: var(--color-primary); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.search-submit:hover { background: var(--color-secondary); }

#menu_toggle {
  display: none; cursor: pointer; font: inherit; font-weight: 600; font-size: 1rem;
  color: var(--color-primary); background: #fff; border: 1.5px solid var(--color-primary); border-radius: 6px; padding: 0.45rem 0.9rem;
}
#menu_toggle.active, #menu_toggle:hover { background: var(--color-primary); color: #fff; }

/* przy węższych ekranach komputerowych — ciaśniej, zanim przejdzie na menu ☰ */
@media (max-width: 1100px) {
  .header-inner { gap: 1.25rem; }
  #nav { gap: 1rem; }
  #nav .main-menu > ul, #nav .menu > ul, #nav > ul, #nav ul.menu { gap: 1rem; }
  #nav a { font-size: 0.9rem; }
  .search-field { width: 120px; }
}
@media (max-width: 900px) {
  .search-form { display: none; }
}

/* MAIN CONTAINER */
.page-width {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1rem;
}

main {
  flex: 1;
}

.container {
  display: flex;
  gap: 2rem;
  margin: 2rem 0;
}

.content {
  flex: 1;
  min-width: 0;
}

#sidebar {
  width: 300px;
  background-color: var(--color-light);
  padding: 1.5rem;
  border-radius: 8px;
}

/* INFO PASEK POD BANNEREM */
.banner-info-strip {
  background-color: #f9f9f9;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: 1rem;
  font-size: 0.95rem;
}

.banner-info-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  align-items: center;
}

.banner-info-item {
  text-align: center;
  color: var(--color-text);
  padding: 0.5rem 0;
}

.banner-info-item strong {
  color: var(--color-primary);
  font-weight: 500;
  margin-right: 0.5rem;
}

/* GRID POSTS */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0 2rem;
}

.post-card {
  border: 1px solid var(--color-border);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: white;
}

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

.post-card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.post-card-content {
  padding: 1.5rem;
}

.post-card h3 {
  margin-bottom: 0.5rem;
  color: var(--color-dark);
}

.post-meta {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 1rem;
}

.post-excerpt {
  color: #555;
  font-size: 0.95rem;
  line-height: 1.5;
}

/* INFO BOX */
.info-box {
  background-color: var(--color-light);
  border-left: 4px solid var(--color-primary);
  padding: 1.5rem;
  margin: 2rem 0;
  border-radius: 4px;
}

.info-box h3 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

/* FOOTER — jasny, spójny z nagłówkiem */
#footer {
  background-color: #f7f7f7;
  color: #555;
  border-top: 1px solid var(--color-border);
  padding: 2.5rem 1rem 1.25rem;
  margin-top: 3rem;
}
#footer a { color: var(--color-primary); }
#footer a:hover { color: var(--color-secondary); }

#footer-content {
  max-width: 1200px;
  margin: 0 auto 2rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  text-align: left;
}
#footer-content h3,
#footer-media-rss h3 {
  font-size: 1.05rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  font-weight: 600;
}
#footer-content ul { list-style: none; margin: 0; padding: 0; }
#footer-content li { margin: 0.35rem 0; font-size: 0.95rem; }
#footer-content p { font-size: 0.95rem; }
#footer-content a { text-decoration: none; }
#footer-content a:hover { text-decoration: underline; }
#footer-content .widget-title { display: inline-block; background: #2b93d1; color: #fff; }

#footer-media-rss { max-width: 1200px; margin: 0 auto; }

#footer-bottom {
  max-width: 1200px;
  margin: 1.5rem auto 0;
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
  font-size: 0.85rem;
  text-align: center;
  color: #888;
}

/* SIDEBAR WIDGETS */
.widget {
  margin-bottom: 2rem;
}

.widget-title {
  color: var(--color-primary);
  border-bottom: 2px solid var(--color-primary);
  padding-bottom: 0.5rem;
  margin-bottom: 1rem;
  font-size: 1.1rem;
}

.widget ul {
  list-style: none;
}

.widget li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border);
}

.widget li:last-child {
  border-bottom: none;
}

/* SINGLE POST */
.post-header {
  margin-bottom: 2rem;
  border-bottom: 2px solid var(--color-border);
  padding-bottom: 1.5rem;
}

.post-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.post-header .meta {
  color: #666;
  font-size: 0.95rem;
}

.post-thumbnail {
  max-width: 100%;
  height: auto;
  margin: 2rem 0;
  border-radius: 8px;
}

.post-content {
  font-size: 1rem;
  line-height: 1.8;
  margin: 2rem 0;
}

.post-content p {
  margin-bottom: 1rem;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .header-inner { flex-wrap: wrap; justify-content: space-between; gap: 0.75rem; }
  #logo img { height: 40px; }
  #menu_toggle { display: inline-block; }

  #nav {
    display: none;
    flex: 1 1 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: 0.5rem;
    border-top: 1px solid var(--color-border);
  }
  #nav.active { display: flex; }
  #nav .main-menu > ul, #nav .menu > ul, #nav > ul, #nav ul.menu { flex-direction: column; align-items: stretch; gap: 0; }
  #nav li { white-space: normal; border-bottom: 1px solid #eee; }
  #nav li:last-child { border-bottom: 0; }
  #nav a { display: block; padding: 0.75rem 0.25rem; border-bottom: 0; font-size: 1rem; }
  #nav li ul { position: static; box-shadow: none; padding: 0 0 0.5rem 1rem; background: transparent; }
  #nav li ul li { border-bottom: 0; }
  #nav li ul a { padding: 0.45rem 0.25rem; font-size: 0.95rem; color: #555; }
  .search-form { display: flex; margin: 0.5rem 0 0.75rem; }
  .search-field { flex: 1; width: auto; }

  .banner-info-content {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .banner-info-item {
    text-align: left;
    font-size: 0.9rem;
  }

  .home-info-cards {
    grid-template-columns: 1fr;
  }

  .info-card {
    padding: 1rem;
  }

  .info-card h3 {
    font-size: 1rem;
  }

  .info-card li,
  .info-card p {
    font-size: 0.9rem;
  }

  .search-form {
    width: 100%;
  }

  .search-field {
    min-width: 100%;
  }

  .container {
    flex-direction: column;
  }

  #sidebar {
    width: 100%;
  }


  .posts-grid {
    grid-template-columns: 1fr;
  }

  #footer-content {
    grid-template-columns: 1fr;
  }
}

/* ACCESSIBILITY */
a:focus, button:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

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

/* ===== ANNOUNCEMENTS / OGŁOSZENIA ===== */
.announcements-section {
  margin: var(--spacing-unit) 0 calc(var(--spacing-unit) * 2) 0;
  padding: var(--spacing-unit);
  background-color: #f9f9f9;
  border-left: 4px solid var(--color-primary);
  border-radius: 4px;
}

.section-title {
  font-size: 1.5rem;
  color: var(--color-primary);
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-primary);
}

.announcements-latest {
  background-color: #fff5f5;
}

.announcement-item {
  margin-bottom: 1.5rem;
}

.announcement-featured {
  display: flex;
  gap: 1.5rem;
  padding: 1.5rem;
  background-color: white;
  border: 2px solid var(--color-primary);
  border-radius: 8px;
}

.announcement-icon {
  flex-shrink: 0;
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.announcement-content {
  flex: 1;
}

.announcement-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
}

.announcement-title a {
  color: var(--color-primary);
  font-weight: 600;
}

.announcement-title a:hover {
  color: var(--color-secondary);
}

.announcement-date {
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 4px;
  font-weight: 500;
  transition: all 0.3s ease;
  text-decoration: none;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background-color: var(--color-primary);
  color: white;
}

.btn-primary:hover {
  background-color: var(--color-secondary);
  color: white;
}

.announcements-list {
  list-style: none;
}

.announcements-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid #eee;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.announcements-list li:last-child {
  border-bottom: none;
}

.announcements-list a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.announcements-list a:hover {
  color: var(--color-secondary);
  text-decoration: underline;
}

.announcement-placeholder {
  padding: 2rem;
  text-align: center;
  color: #999;
  font-size: 1rem;
}

.text-muted {
  color: #999;
  font-style: italic;
}

@media (max-width: 768px) {
  .announcement-featured {
    flex-direction: column;
    padding: 1rem;
  }

  .announcement-icon {
    justify-content: flex-start;
  }

  .section-title {
    font-size: 1.25rem;
  }
}

/* ===== MEDIA RSS FEEDS ===== */
#footer-media-rss {
  margin-top: 2rem !important;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}



.media-feeds-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.media-feed {
  padding: 1rem;
  background-color: #fff;
  border-left: 3px solid var(--color-primary);
  border-radius: 4px;
}

.media-feed-error {
  opacity: 0.7;
}

.feed-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
  color: var(--color-text);
  margin: 0 0 0.75rem 0;
}

.feed-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.feed-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.feed-items li {
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  line-height: 1.4;
}

.feed-items li:last-child {
  margin-bottom: 0;
}

.feed-items a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.feed-items a:hover {
  color: var(--color-secondary);
  text-decoration: underline;
}

.feed-status {
  font-size: 0.85rem;
  color: var(--color-border);
  font-style: italic;
  margin: 0;
  padding: 0.5rem 0;
}

/* ===== PAGE TEMPLATES ===== */
.fullwidth-wrapper {
  grid-template-columns: 1fr !important;
}

.fullwidth-content {
  grid-column: 1 / -1;
}

.media-sidebar {
  margin-top: 2rem;
}

.media-banners {
  background-color: var(--surface-1);
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 0.5px solid var(--border);
}

.media-banners h3 {
  font-size: 1rem;
  color: var(--color-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.media-banners .widget {
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 0.5px solid var(--border);
}

.media-banners .widget:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.media-banners img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  transition: transform 0.2s ease;
}

.media-banners a:hover img {
  transform: scale(1.02);
}

/* ===== GALERIA ZDJĘĆ ===== */
.gallery-section {
  margin-top: 3rem;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1.5rem;
  margin: 2rem 0;
}

.gallery-item {
  background: var(--surface-2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.3s ease;
}

.gallery-item:hover {
  box-shadow: 0 4px 12px rgba(139, 0, 0, 0.15);
  transform: translateY(-4px);
}

.gallery-link {
  display: block;
  position: relative;
  overflow: hidden;
  background-color: #f0f0f0;
  aspect-ratio: 1 / 1;
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.gallery-link:hover .gallery-image {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(139, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-link:hover .gallery-overlay {
  opacity: 1;
}

.gallery-icon {
  font-size: 2rem;
}

.gallery-title {
  padding: 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-primary);
  margin: 0;
}

.gallery-description {
  padding: 0 1rem 1rem;
  font-size: 0.85rem;
  color: var(--color-text);
  margin: 0;
  line-height: 1.5;
}

.gallery-empty {
  text-align: center;
  padding: 3rem 1rem;
  background-color: #f9f9f9;
  border-radius: var(--radius);
  color: var(--color-border);
}

.gallery-pagination {
  margin-top: 2rem;
  text-align: center;
}

.gallery-pagination ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.gallery-pagination li {
  margin: 0;
}

.gallery-pagination a,
.gallery-pagination .page-numbers {
  padding: 0.5rem 1rem;
  border: 0.5px solid var(--border);
  border-radius: 4px;
  color: var(--color-primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

.gallery-pagination a:hover {
  background-color: var(--color-primary);
  color: white;
}

.gallery-pagination .current {
  background-color: var(--color-primary);
  color: white;
  border-color: var(--color-primary);
}

/* ===== ARCHIWUM ARTYKUŁÓW ===== */
.archive-header {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid var(--color-primary);
}

.archive-header h1 {
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.archive-posts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.archive-post-card {
  background: var(--surface-2);
  border: 0.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: all 0.2s ease;
  display: flex;
  flex-direction: column;
}

.archive-post-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.archive-post-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.archive-post-content {
  padding: 1.25rem;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.archive-post-title {
  font-size: 1rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.archive-post-title a {
  color: var(--color-primary);
}

.archive-post-title a:hover {
  color: var(--color-secondary);
}

.archive-post-meta {
  font-size: 0.85rem;
  color: var(--color-border);
  margin-bottom: 0.75rem;
}

.archive-post-excerpt {
  font-size: 0.9rem;
  color: var(--color-text);
  margin-bottom: 1rem;
  flex-grow: 1;
}

.archive-post-link {
  align-self: flex-start;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-primary);
}

.archive-post-link:hover {
  color: var(--color-secondary);
}

/* ===== HOME INFO CARDS ===== */
.home-info-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.info-card {
  background: linear-gradient(135deg, #fff5f5 0%, #f9f9f9 100%);
  border: 1px solid #f0e6e6;
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.info-card:hover {
  box-shadow: 0 4px 12px rgba(139, 0, 0, 0.1);
  transform: translateY(-2px);
}

.info-card h3 {
  color: var(--color-primary);
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-weight: 500;
}

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

.info-card li {
  padding: 0.4rem 0;
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.5;
}

.info-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.6;
}

@media (max-width: 1024px) {
  .home-info-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .home-info-cards {
    grid-template-columns: 1fr;
  }

  .info-card {
    padding: 1rem;
  }

  .info-card h3 {
    font-size: 1rem;
  }

  .info-card li,
  .info-card p {
    font-size: 0.9rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
  }

  .archive-posts {
    grid-template-columns: 1fr;
  }

  .banner-info-content {
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .banner-info-item {
    text-align: left;
    font-size: 0.9rem;
  }
}

/* =====================================================================
   ZGODNOŚĆ ZE STARĄ STRONĄ (parafia2015)
   Klasy używane w treści stron przez shortcode'y [col] [row] [wrap]
   oraz w edytorze (.tytul, .tytul-nieb, a.more)
   ===================================================================== */
.clearfix::after,
.row::after { content: ""; display: table; clear: both; }
.row { clear: both; }

.col1, .col2, .col3, .col3-2, .col4, .col4-2, .col4-3,
.col5, .col5-2, .col5-3, .col5-4 {
  float: left;
  padding: 0 15px;
  box-sizing: border-box;
}
.col1   { width: 100%; }
.col2   { width: 50%; }
.col3   { width: 33.333%; }
.col3-2 { width: 66.666%; }
.col4   { width: 25%; }
.col4-2 { width: 50%; }
.col4-3 { width: 75%; }
.col5   { width: 20%; }
.col5-2 { width: 40%; }
.col5-3 { width: 60%; }
.col5-4 { width: 80%; }

/* Nagłówki „paskowe" — dawne obrazki header_red.png / header_blue.png zastąpione kolorem */
.tytul,
h2.tytul span {
  display: inline-block;
  background: var(--color-primary);
  color: #fff;
  font-size: 0.9rem !important;
  font-weight: 500;
  line-height: 1.9;
  text-transform: uppercase;
  padding: 0 12px;
  margin-bottom: 1.2em;
  border-radius: 3px;
}
.tytul-nieb,
h1.tytul-nieb,
h3.widget-title {
  display: inline-block;
  background: #2b93d1;
  color: #fff;
  font-size: 0.9rem !important;
  font-weight: 500;
  line-height: 1.9;
  text-transform: uppercase;
  padding: 0 12px;
  margin-bottom: 1.2em;
  border-radius: 3px;
}

/* „czytaj więcej" — dawny obrazek readmore.png zastąpiony przyciskiem */
a.more,
.archive-post-link.more {
  display: inline-block;
  background: var(--color-primary);
  color: #fff !important;
  font-size: 0.85rem;
  font-weight: 500;
  padding: 0.35rem 0.9rem;
  border-radius: 3px;
  text-decoration: none !important;
  margin-top: 0.5rem;
}
a.more:hover { background: var(--color-secondary); }
.widget_rss .rssSummary a.more { display: block; width: max-content; margin-top: 0.4rem; }

/* Wyrównania i podpisy WordPressa (używane w treści wpisów) */
.alignleft  { float: left;  margin: 0.3rem 1.2rem 0.8rem 0; }
.alignright { float: right; margin: 0.3rem 0 0.8rem 1.2rem; }
.aligncenter { display: block; margin: 0.8rem auto; }
.wp-caption { max-width: 100%; }
.wp-caption img { max-width: 100%; height: auto; }
.wp-caption-text, figcaption { font-size: 0.85rem; color: #666; text-align: center; margin-top: 0.3rem; }
.post-content img, .entry-content img { max-width: 100%; height: auto; }
.post-content table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.post-content th, .post-content td { border: 1px solid var(--color-border); padding: 0.5rem 0.75rem; text-align: left; }
.post-content th { background: var(--color-light); }
.post-content blockquote { border-left: 4px solid var(--color-primary); margin: 1rem 0; padding: 0.5rem 1rem; color: #555; font-style: italic; }

/* Formularz kontaktowy (Contact Form 7) — dawne form_bg.png */
.wpcf7 form { background: var(--color-light); padding: 1.5rem; border-radius: 8px; border-left: 4px solid var(--color-primary); }
.wpcf7 label { display: block; font-weight: 500; margin-bottom: 0.25rem; }
.wpcf7 input[type="text"], .wpcf7 input[type="email"], .wpcf7 input[type="tel"], .wpcf7 textarea, .wpcf7 select {
  width: 100%; padding: 0.6rem 0.75rem; border: 1px solid var(--color-border); border-radius: 4px; font: inherit; margin-bottom: 1rem; background: #fff;
}
.wpcf7 input:focus, .wpcf7 textarea:focus { outline: 2px solid var(--color-primary); outline-offset: 1px; }
.wpcf7 input[type="submit"] { background: var(--color-primary); color: #fff; border: 0; padding: 0.75rem 1.5rem; border-radius: 4px; font-weight: 500; cursor: pointer; }
.wpcf7 input[type="submit"]:hover { background: var(--color-secondary); }
.wpcf7-not-valid-tip { color: #a32d2d; font-size: 0.85rem; }
.wpcf7-response-output { border-radius: 4px; padding: 0.75rem 1rem; }

/* Paginacja (wbudowana i WP-PageNavi) */
.pagination-wrap { margin: 2rem 0 1rem; }
.pagination-wrap .nav-links,
.pagination-wrap .wp-pagenavi,
.gallery-pagination ul { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem; list-style: none; padding: 0; margin: 0; }
.pagination-wrap .page-numbers,
.pagination-wrap .wp-pagenavi a,
.pagination-wrap .wp-pagenavi span,
.gallery-pagination .page-numbers {
  display: inline-block; min-width: 2.4rem; padding: 0.45rem 0.8rem; text-align: center;
  border: 1px solid var(--color-border); border-radius: 4px; color: var(--color-primary); text-decoration: none; background: #fff;
}
.pagination-wrap .page-numbers.current,
.pagination-wrap .wp-pagenavi .current,
.gallery-pagination .current { background: var(--color-primary); color: #fff; border-color: var(--color-primary); }
.pagination-wrap a.page-numbers:hover,
.pagination-wrap .wp-pagenavi a:hover,
.gallery-pagination a:hover { background: var(--color-primary); color: #fff; }
.pagination-wrap .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* Strona główna — sekcja „Polecane" (dawny sidebar 'rss') */
.home-polecane { margin-bottom: 2.5rem; }
.polecane-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.5rem; }
.polecane-grid .widget { background: var(--color-light); padding: 1.25rem; border-radius: 8px; border-left: 4px solid var(--color-primary); }
.polecane-grid .widget ul { list-style: none; padding: 0; margin: 0; }
.polecane-grid .widget li { padding: 0.4rem 0; border-bottom: 1px solid #e5e5e5; font-size: 0.95rem; }
.polecane-grid .widget li:last-child { border-bottom: 0; }
.widget_rss .rss-date { display: block; font-size: 0.8rem; color: #888; }
.widget_rss .rssSummary { font-size: 0.9rem; color: #555; margin-top: 0.2rem; }

/* Sidebar — bloki */
.sidebar-block + .sidebar-block { margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--color-border); }
#sidebar .widget { margin-bottom: 1.75rem; }
#sidebar .widget:last-child { margin-bottom: 0; }
#sidebar ul { padding-left: 1.1em; margin-bottom: 0.5em; }
#sidebar p strong { text-transform: uppercase; font-size: 0.95rem; }
.sidebar-media .widget img, .media-banners .widget img { display: block; max-width: 100%; height: auto; margin: 0 auto; border-radius: 4px; }

/* Header — logo fallback, baner ze zdjęciem */


/* Stopka — logo */
.footer-logo { display: block; margin-bottom: 0.75rem; width: 230px; max-width: 100%; height: auto; }

/* Menu — pozycje bez linku i podmenu na mobile */
#nav li.noclick > a { cursor: default; }
#nav li ul { display: none; }
#nav li:hover > ul, #nav li.open > ul { display: block; }
@media (min-width: 769px) {
  #nav li { position: relative; }
  #nav li ul { position: absolute; top: 100%; left: 0; min-width: 240px; background: #fff; border: 1px solid var(--color-border); border-top: 2px solid var(--color-primary); box-shadow: 0 8px 20px rgba(0,0,0,.10); padding: 0.4rem 0; z-index: 50; border-radius: 0 0 6px 6px; list-style: none; }
  #nav li ul li { white-space: normal; }
  #nav li ul li a { display: block; padding: 0.55rem 1rem; border-bottom: 0; font-size: 0.92rem; }
  #nav li ul li a:hover { background: #fff5f5; }
}
@media (max-width: 768px) {
  #nav li ul { padding-left: 1rem; }
}

/* Szablony */
.page-fullwidth { max-width: 100%; }
.archive-posts-full { grid-template-columns: 1fr; }
.archive-posts-full .archive-post-card { flex-direction: row; }
.archive-posts-full .archive-post-image-link { flex: 0 0 240px; }
.archive-posts-full .archive-post-image { height: 100%; }
.archive-description { color: #666; margin-top: 0.5rem; }
.announcement-embed { margin-top: 1.5rem; }
.error-404 { text-align: center; padding: 3rem 1rem; }
.error-404 .search-form { max-width: 420px; margin: 1.5rem auto 0; }

/* Mobile — kolumny ze shortcode'ów układają się jedna pod drugą */
@media (max-width: 768px) {
  .col2, .col3, .col3-2, .col4, .col4-2, .col4-3, .col5, .col5-2, .col5-3, .col5-4 { width: 100%; float: none; padding: 0; }
  .alignleft, .alignright { float: none; display: block; margin: 0.8rem auto; }
  .archive-posts-full .archive-post-card { flex-direction: column; }
  .archive-posts-full .archive-post-image-link { flex: none; }
}

/* =====================================================================
   BANER ZE ZDJĘCIEM KOŚCIOŁA
   Komputer: kadr poziomy (1439×760), napis po prawej na tle drzewa.
   Telefon:  kadr pionowy (900×882), napis u dołu.
   ===================================================================== */
#banner {
  position: relative;
  height: clamp(320px, 40vw, 600px);
  background-color: #4a0c0c;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 32%;
  color: #fff;
}
#banner::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(40,0,0,0) 40%, rgba(40,0,0,.35) 62%, rgba(40,0,0,.72) 100%);
}
.banner-inner {
  position: relative; z-index: 1;
  height: 100%;
  display: flex; align-items: center; justify-content: flex-end;
}
.banner-text {
  max-width: 38%;
  text-align: right;
  text-shadow: 0 2px 8px rgba(0,0,0,.55);
}
.banner-text h1 {
  font-size: clamp(1.6rem, 2.6vw, 2.6rem);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 .6rem;
  color: #fff;
}
.banner-text p {
  font-size: clamp(.95rem, 1.2vw, 1.15rem);
  opacity: .95;
  margin: 0;
}
@media (max-width: 768px) {
  #banner {
    height: auto;
    aspect-ratio: 900 / 882;
    max-height: 480px;
    background-position: center top;
  }
  #banner::before {
    background: linear-gradient(180deg, rgba(40,0,0,0) 45%, rgba(40,0,0,.45) 70%, rgba(40,0,0,.85) 100%);
  }
  .banner-inner { align-items: flex-end; justify-content: center; padding-bottom: 1.1rem; }
  .banner-text { max-width: 100%; text-align: center; }
  .banner-text h1 { font-size: 1.45rem; margin-bottom: .3rem; }
  .banner-text p { font-size: .9rem; }
}

/* --- Baner KLASYCZNY (grafika ze starej strony, 1920×415; cytat jest w grafice) --- */
#banner.banner-classic {
  height: auto;
  aspect-ratio: 1920 / 415;
  max-height: 415px;
  background-color: #fff;
  background-size: cover;
  background-position: center;
}
#banner.banner-classic::before { display: none; }          /* bez przyciemnienia — grafika jest jasna */
#banner.banner-classic .banner-text {                        /* napis ukryty wizualnie, zostaje dla czytników ekranu / SEO */
  position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
@media (min-width: 1921px) {                                /* na bardzo szerokich ekranach nie rozciągaj grafiki */
  #banner.banner-classic { background-size: auto 100%; background-repeat: no-repeat; }
}
@media (max-width: 768px) {
  #banner.banner-classic { aspect-ratio: 430 / 415; max-height: 380px; background-position: center top; }
}

/* --- Ogłoszenia na stronie głównej --- */
.announcements-home { margin: 0 0 2.5rem; }
.announcements-home-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 1.25rem; align-items: stretch; }
.announcements-home .announcement-featured { margin: 0; background: #fff5f5; border: 2px solid var(--color-primary); border-radius: 8px; padding: 1.25rem 1.5rem; display: flex; gap: 1.25rem; align-items: center; }
.announcement-kicker { display: inline-block; font-size: .75rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--color-primary); padding: .15rem .55rem; border-radius: 3px; margin-bottom: .5rem; }
.announcements-home .announcement-title { font-size: 1.15rem; margin: 0 0 .3rem; }
.announcements-home .announcement-date { margin: 0 0 .8rem; font-size: .85rem; color: #666; }
.announcements-archive-box { background: var(--color-light, #f7f7f7); border-left: 4px solid var(--color-primary); border-radius: 8px; padding: 1.1rem 1.25rem; }
.announcements-archive-title { font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; color: var(--color-primary); margin: 0 0 .6rem; font-weight: 600; }
.announcements-archive-box .announcements-list li { padding: .45rem 0; border-bottom: 1px solid #e6e6e6; font-size: .95rem; }
.announcements-archive-box .announcements-list li:last-child { border-bottom: 0; }
.announcements-archive-box .more { margin-top: .75rem; }
@media (max-width: 900px) { .announcements-home-grid { grid-template-columns: 1fr; } }
@media (max-width: 768px) { .announcements-home .announcement-featured { flex-direction: column; align-items: flex-start; padding: 1rem; } }

/* =====================================================================
   MINIATURY — jednolite kadry niezależnie od rozmiaru źródłowego zdjęcia
   ===================================================================== */
.thumb-link { display: block; }
.post-card .post-card-img,
.archive-post-card .archive-post-image {
  display: block; width: 100%; aspect-ratio: 16 / 9; height: auto; object-fit: cover; background: #eee;
}
.post-card img.post-card-img { height: auto; }             /* nadpisuje stare height:200px */
.thumb-placeholder {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
}
.thumb-placeholder img { width: 64px; height: 64px; opacity: .85; }
@supports not (aspect-ratio: 16 / 9) {
  .post-card .post-card-img, .archive-post-card .archive-post-image { height: 200px; }
}
/* pojedynczy wpis: zdjęcie w naturalnym rozmiarze, nie większe niż kolumna (stare, małe zdjęcia się nie rozmywają) */
.post-single .post-thumbnail { display: block; max-width: 100%; width: auto; height: auto; max-height: 520px; object-fit: contain; margin: 1.5rem 0; }

/* =====================================================================
   GALERIE WordPress [gallery] w treści wpisów (motyw ma html5 gallery → WP nie dodaje własnych stylów)
   ===================================================================== */
.gallery { display: grid; gap: 1rem; margin: 1.5rem 0; }
.gallery-columns-1 { grid-template-columns: 1fr; }
.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-columns-5 { grid-template-columns: repeat(5, 1fr); }
.gallery-columns-6 { grid-template-columns: repeat(6, 1fr); }
.gallery-columns-7 { grid-template-columns: repeat(7, 1fr); }
.gallery-columns-8 { grid-template-columns: repeat(8, 1fr); }
.gallery-columns-9 { grid-template-columns: repeat(9, 1fr); }
.gallery .gallery-item { margin: 0; }
.gallery .gallery-item img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 4px; display: block; }
.gallery .gallery-caption { font-size: .8rem; color: #666; text-align: center; margin-top: .3rem; }
.wp-block-gallery, .wp-block-image img { max-width: 100%; height: auto; }
@media (max-width: 768px) {
  .gallery-columns-4, .gallery-columns-5, .gallery-columns-6, .gallery-columns-7, .gallery-columns-8, .gallery-columns-9 { grid-template-columns: repeat(3, 1fr); }
  .gallery-columns-3 { grid-template-columns: repeat(2, 1fr); }
}
/* osadzenia (YouTube itp.) responsywne */
.post-content iframe, .entry-content iframe { max-width: 100%; }
.post-content .wp-video, .post-content video { max-width: 100%; height: auto; }

/* Teksty tylko dla czytników ekranu (np. nagłówek paginacji "Stronicowanie wpisów") */
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Wiadomości z mediów na stronie głównej (w miejscu dawnych „Polecanych") */
.home-media-news { margin: 0 0 2.5rem; }
.home-media-news .media-feeds-grid { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
.home-media-news .media-feed { background: #fafafa; padding: 1.1rem 1.25rem; border-radius: 6px; }
.home-media-news .feed-title { font-size: 1rem; }
.home-media-news .feed-items li { font-size: 0.95rem; margin-bottom: 0.6rem; }
@media (max-width: 768px) { .home-media-news .media-feeds-grid { grid-template-columns: 1fr; } }

/* Strona główna bez prawej kolumny — treść na pełną szerokość */
.home .posts-grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.home .home-media-news .media-feeds-grid { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.home .announcements-home-grid { grid-template-columns: 2fr 1fr; }
@media (max-width: 900px) { .home .announcements-home-grid { grid-template-columns: 1fr; } }

/* Stopka — obszar pełnej szerokości (banery / dofinansowania) */
#footer-wide { max-width: 1200px; margin: 0 auto 1.5rem; padding-top: 1.5rem; border-top: 1px solid var(--color-border); display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: center; align-items: center; }
#footer-wide .widget { flex: 0 1 auto; max-width: 100%; text-align: center; }
#footer-wide img { max-width: 100%; height: auto; max-height: 140px; width: auto; }
#footer-wide h3 { display: none; }
#footer-wide p { font-size: 0.85rem; color: #666; margin: 0.4rem 0 0; }

/* Paginacja WP-PageNavi na telefonie — bez napisu „Strona 1 z 19", mieści się w jednej linii */
@media (max-width: 600px) {
  .wp-pagenavi .pages { display: none; }
  .pagination-wrap .wp-pagenavi a, .pagination-wrap .wp-pagenavi span { min-width: 2.1rem; padding: 0.4rem 0.6rem; }
}

/* =====================================================================
   Siatki bez „sierot": karty informacyjne 3 w rzędzie (lub 1), kanały 4 / 2 / 1
   ===================================================================== */
.home-info-cards { grid-template-columns: repeat(3, 1fr) !important; }
@media (max-width: 1024px) and (min-width: 769px) {
  .home-info-cards { grid-template-columns: repeat(3, 1fr) !important; gap: 1rem; }
  .info-card { padding: 1.1rem; }
  .info-card li { font-size: 0.88rem; }
}
@media (max-width: 768px) { .home-info-cards { grid-template-columns: 1fr !important; } }

.home .home-media-news .media-feeds-grid,
.home-media-news .media-feeds-grid { grid-template-columns: repeat(4, 1fr) !important; }
@media (max-width: 1100px) { .home .home-media-news .media-feeds-grid, .home-media-news .media-feeds-grid { grid-template-columns: repeat(2, 1fr) !important; } }
@media (max-width: 600px)  { .home .home-media-news .media-feeds-grid, .home-media-news .media-feeds-grid { grid-template-columns: 1fr !important; } }

/* stopka: kanały też 4 / 2 / 1 */
#footer-media-rss .media-feeds-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { #footer-media-rss .media-feeds-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px)  { #footer-media-rss .media-feeds-grid { grid-template-columns: 1fr; } }

/* aktualności: 3 / 2 / 1 zamiast auto — równe rzędy */
.home .posts-grid { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .home .posts-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .home .posts-grid { grid-template-columns: 1fr; } }

/* Kafelki aktualności: równa wysokość w rzędzie, przycisk „czytaj więcej" przy dolnej krawędzi */
.post-card { display: flex; flex-direction: column; }
.post-card-content { display: flex; flex-direction: column; flex: 1 1 auto; }
.post-card .post-excerpt { flex: 1 1 auto; }
.post-card .more { margin-top: auto; align-self: flex-start; }
.archive-post-card .archive-post-link.more { margin-top: auto; }

/* =====================================================================
   v1.7 — bez prawej kolumny. Teksty stron i wpisów w kolumnie o czytelnej szerokości.
   ===================================================================== */
.single .site-main, .page:not(.home) .site-main { max-width: 880px; margin-left: auto; margin-right: auto; }
.page-template-page_gallery .site-main, .page-template-page_ogl .site-main, .archive .site-main, .search .site-main { max-width: none; }
.post-content, .entry-content { font-size: 1.05rem; line-height: 1.7; }
.post-content p, .entry-content p { margin-bottom: 1.1em; }

/* Stopka — linki prawne (RODO, standardy ochrony dzieci, kontakt) */
.footer-links { margin-bottom: 0.6rem; }
.footer-menu { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.5rem; }
.footer-menu a { color: #666; font-size: 0.85rem; text-decoration: none; }
.footer-menu a:hover { color: var(--color-primary); text-decoration: underline; }
