/*
Theme Name: Parafia Wyszyny Kościelne
Theme URI: https://parafiawyszyny.eu
Author: Parafia Wyszyny
Description: Nowoczesny, przejrzysty motyw WordPress dla Parafii w Wyszynach Kościelnych. Zawiera 4 kafelki informacyjne (w tym kompaktowy podgląd Facebooka), wyszukiwarkę na stronie, pełną konfigurację kolorów, przypinane posty pod kafelkami, obsługę widgetów z indywidualną widocznością, sekcję na kody śledzące (Analytics, AdSense), inteligentne ukrywanie zdublowanego obrazka wyróżniającego, zakładki (Ogłoszenia, Intencje), sekcję Życie Parafii i Blog oraz rozwijane menu.
Version: 1.0.10
License: GNU General Public License v2 or later
Text Domain: parafia-wyszyny
*/

:root {
  --primary: #1e293b;
  --primary-light: #334155;
  --accent: #b48a3e;
  --accent-hover: #96702d;
  --bg-body: #faf8f5;
  --bg-alt: #f2efe9;
  --bg-card: #ffffff;
  --text-main: #1f2937;
  --text-muted: #6b7280;
  --border: #e5e2dc;
  --radius: 12px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

html.font-small { font-size: 14px; }
html.font-large { font-size: 19px; }

body {
  font-family: var(--font-sans);
  background-color: var(--bg-body);
  color: var(--text-main);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Top Bar */
.top-bar {
  background-color: var(--primary);
  color: #e2e8f0;
  font-size: 0.85rem;
  padding: 8px 0;
}

.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* Top Bar Search Form */
.top-search-form {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  overflow: hidden;
  transition: background 0.2s, border-color 0.2s;
}

.top-search-form:focus-within {
  background: rgba(255, 255, 255, 0.2);
  border-color: var(--accent);
}

.top-search-input {
  background: transparent;
  border: none;
  color: #ffffff;
  padding: 4px 12px;
  font-size: 0.82rem;
  width: 185px;
  outline: none;
  font-family: inherit;
}

.top-search-input::placeholder {
  color: rgba(226, 232, 240, 0.78);
}

.top-search-btn {
  background: transparent;
  border: none;
  color: #ffffff;
  padding: 4px 10px 4px 4px;
  cursor: pointer;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.top-search-btn:hover {
  color: var(--accent);
}

/* Search Page Big Form */
.search-page-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow);
}

.search-page-form {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.search-page-input {
  flex: 1;
  min-width: 220px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text-main);
  background: var(--bg-body);
  outline: none;
}

.search-page-input:focus {
  border-color: var(--accent);
  background: #ffffff;
}

.font-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}

.font-btn {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 0.8rem;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.2s;
}

.font-btn:hover,
.font-btn.active {
  background: var(--accent);
  border-color: var(--accent);
}

/* Header & Navigation */
.site-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  gap: 20px;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  max-width: 340px;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.32rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  display: block;
}

.site-tagline {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Top-level navigation */
.main-nav > ul {
  list-style: none;
  display: flex;
  gap: 10px 20px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.main-nav li {
  position: relative;
  list-style: none;
}

.main-nav > ul > li > a {
  color: var(--primary);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 8px 0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  position: relative;
}

.main-nav > ul > li > a:hover,
.main-nav > ul > li.current-menu-item > a,
.main-nav > ul > li.current-menu-ancestor > a {
  color: var(--accent);
}

/* Indicator arrow for items with dropdowns */
.main-nav > ul > li.menu-item-has-children > a::after,
.main-nav > ul > li.page_item_has_children > a::after {
  content: "▾";
  font-size: 0.78rem;
  color: var(--accent);
  transition: transform 0.2s ease;
}

.main-nav > ul > li.menu-item-has-children:hover > a::after,
.main-nav > ul > li.page_item_has_children:hover > a::after {
  transform: rotate(180deg);
}

/* Dropdown Submenu (Desktop) */
.main-nav ul.sub-menu,
.main-nav ul.children {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 230px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: 0 0 10px 10px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
  padding: 8px 0;
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}

.main-nav li:hover > ul.sub-menu,
.main-nav li:focus-within > ul.sub-menu,
.main-nav li:hover > ul.children,
.main-nav li:focus-within > ul.children {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.main-nav ul.sub-menu li,
.main-nav ul.children li {
  width: 100%;
}

.main-nav ul.sub-menu a,
.main-nav ul.children a {
  display: block;
  padding: 10px 18px;
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease;
}

.main-nav ul.sub-menu a:hover,
.main-nav ul.children a:hover,
.main-nav ul.sub-menu .current-menu-item > a,
.main-nav ul.children .current_page_item > a {
  background: var(--bg-body);
  color: var(--accent);
}

/* Third-level nested submenu */
.main-nav ul.sub-menu ul.sub-menu,
.main-nav ul.children ul.children {
  top: 0;
  left: 100%;
  border-radius: 10px;
}

.main-nav ul.sub-menu li.menu-item-has-children > a::after,
.main-nav ul.children li.page_item_has_children > a::after {
  content: "▸";
  float: right;
  margin-left: 10px;
  color: var(--accent);
}

.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 1rem;
  cursor: pointer;
  color: var(--primary);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.88), rgba(30, 41, 59, 0.72)),
              var(--hero-bg, var(--primary)) center/cover no-repeat;
  color: #ffffff;
  padding: 72px 0 96px;
  text-align: center;
}

.hero h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.1rem);
  margin-bottom: 14px;
  line-height: 1.2;
}

.hero p {
  font-size: 1.1rem;
  max-width: 680px;
  margin: 0 auto 28px;
  color: #e2e8f0;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 14px;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
}

.btn-primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.btn-secondary {
  background: var(--bg-card);
  color: var(--primary);
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* Quick Info Cards (supports 1 to 4 cards cleanly) */
.quick-cards {
  margin-top: -54px;
  margin-bottom: 40px;
  position: relative;
  z-index: 10;
}

.quick-cards--standalone {
  margin-top: 36px;
}

.cards-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 20px;
}

.info-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  display: flex;
  flex-direction: column;
}

.info-card--fb {
  border-top-color: #1877f2;
}

.info-card h3 {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-card p, .info-card li {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.fb-card-frame {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #ffffff;
  margin-bottom: 10px;
  flex: 1;
}

.fb-card-frame iframe {
  width: 100%;
  display: block;
}

.fb-card-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: #1877f2;
  color: #ffffff;
  font-size: 0.84rem;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 7px;
  text-align: center;
  transition: background 0.2s ease;
}

.fb-card-link:hover {
  background: #145dbf;
  color: #ffffff;
}

.copy-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  margin-top: 10px;
  font-size: 0.8rem;
  font-family: monospace;
  gap: 6px;
  word-break: break-all;
}

.copy-btn {
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 0.76rem;
  cursor: pointer;
  white-space: nowrap;
}

.copy-btn:hover {
  background: var(--accent);
}

/* Pinned / Sticky Posts Section (Right below Quick Cards) */
.pinned-section {
  padding: 16px 0 36px;
}

.pinned-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.pinned-single-card {
  display: grid;
  grid-template-columns: 380px 1fr;
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  border-left: 5px solid var(--accent);
}

.pinned-single-card.no-thumb {
  grid-template-columns: 1fr;
}

.pinned-single-thumb {
  min-height: 240px;
  background: #e5e7eb;
}

.pinned-single-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pinned-single-body {
  padding: 28px 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pinned-single-body .post-title {
  font-size: 1.55rem;
  margin-bottom: 12px;
}

.pinned-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.post-card--pinned {
  border-top: 4px solid var(--accent);
}

/* Sections */
.section {
  padding: 52px 0;
}

.section-alt {
  background-color: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.section-title {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  color: var(--primary);
}

.section-actions {
  margin-top: 32px;
  text-align: center;
}

.tab-more-wrap {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 12px;
}

/* Tabs Section (Ogłoszenia / Intencje) */
.tabs-nav {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 12px;
  flex-wrap: wrap;
}

.tab-btn {
  background: transparent;
  border: 1px solid var(--border);
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn.active,
.tab-btn:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.tab-panel {
  display: none;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.tab-panel.active {
  display: block;
}

/* WordPress Content & Mass Intentions Tables */
.entry-content h2,
.entry-content h3 {
  font-family: var(--font-serif);
  color: var(--primary);
  margin: 20px 0 12px;
}

.entry-content p {
  margin-bottom: 14px;
}

.entry-content ol,
.entry-content ul {
  margin: 0 0 18px 22px;
}

.entry-content li {
  margin-bottom: 8px;
}

.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 0.95rem;
  overflow-x: auto;
  display: block;
}

@media (min-width: 768px) {
  .entry-content table {
    display: table;
  }
}

.entry-content thead th {
  background: var(--primary);
  color: #ffffff;
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
}

.entry-content tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.entry-content tbody tr:nth-child(even) {
  background: var(--bg-body);
}

/* Posts Grid */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.post-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
}

.post-card:hover {
  transform: translateY(-4px);
}

.post-thumb {
  aspect-ratio: 16 / 10;
  background: #e5e7eb;
  overflow: hidden;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.post-meta {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.post-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 10px;
  line-height: 1.35;
}

.post-excerpt {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 16px;
  flex: 1;
}

.read-more {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--primary);
}

.read-more:hover {
  color: var(--accent);
}

/* Widgets Areas (Homepage Grid & Sidebar) */
.widgets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.widget-box {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
}

.widget-title {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.widget-box ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget-box li {
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.93rem;
}

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

/* Two-column layout with sidebar (Single / Archive) */
.content-with-sidebar {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  align-items: start;
  margin: 40px auto;
}

.content-with-sidebar .single-container {
  margin: 0;
  max-width: 100%;
}

.content-with-sidebar .posts-grid {
  grid-template-columns: repeat(2, 1fr);
}

.site-sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* Single Post / Page */
.single-container {
  max-width: 860px;
  margin: 40px auto;
  background: var(--bg-card);
  padding: 40px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.single-header {
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border);
}

.single-header h1 {
  font-family: var(--font-serif);
  font-size: 2.1rem;
  color: var(--primary);
  margin-top: 8px;
}

.single-featured {
  margin-bottom: 28px;
  border-radius: var(--radius);
  overflow: hidden;
}

/* Footer */
.site-footer {
  background: var(--primary);
  color: #cbd5e1;
  padding: 56px 0 28px;
  margin-top: 48px;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-bottom: 36px;
}

.site-footer h4 {
  font-family: var(--font-serif);
  color: #ffffff;
  font-size: 1.2rem;
  margin-bottom: 14px;
}

.site-footer ul {
  list-style: none;
}

.site-footer li {
  margin-bottom: 8px;
}

.site-footer a {
  color: #cbd5e1;
}

.site-footer a:hover {
  color: var(--accent);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 20px;
  text-align: center;
  font-size: 0.85rem;
  color: #94a3b8;
}

/* Pagination */
.pagination {
  margin-top: 36px;
  display: flex;
  justify-content: center;
  gap: 8px;
}

.pagination .page-numbers {
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--primary);
  font-weight: 600;
}

.pagination .page-numbers.current {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Responsive */
@media (max-width: 960px) {
  .content-with-sidebar {
    grid-template-columns: 1fr;
  }

  .pinned-single-card {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .posts-grid,
  .content-with-sidebar .posts-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .menu-toggle {
    display: block;
  }

  .main-nav {
    display: none;
    width: 100%;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    margin-top: 8px;
  }

  .main-nav.open {
    display: block;
  }

  .main-nav > ul {
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
  }

  .main-nav > ul > li > a {
    display: flex;
    justify-content: space-between;
    width: 100%;
    padding: 10px 4px;
  }

  /* Mobile accordion submenus */
  .main-nav ul.sub-menu,
  .main-nav ul.children {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    border-left: 3px solid var(--accent);
    border-radius: 0;
    background: var(--bg-body);
    padding: 4px 0 4px 12px;
    margin: 4px 0 8px 8px;
    display: none;
    min-width: auto;
  }

  .main-nav li.submenu-open > ul.sub-menu,
  .main-nav li.submenu-open > ul.children {
    display: block;
  }

  .main-nav li.submenu-open > a::after {
    transform: rotate(180deg);
  }

  .main-nav ul.sub-menu a,
  .main-nav ul.children a {
    white-space: normal;
    padding: 8px 12px;
  }

  .header-inner {
    flex-wrap: wrap;
  }

  .single-container,
  .tab-panel {
    padding: 22px;
  }

  .top-search-input {
    width: 140px;
  }
}


/* Desktop: give the 4th card (Facebook) extra width so the embed is never clipped */
@media (min-width: 1024px) {
  .cards-grid-3.cards-grid--4-fb {
    grid-template-columns: 1fr 1fr 1fr 1.38fr;
    gap: 18px;
  }
}

.info-card--fb {
  padding: 20px 18px;
}

.fb-card-frame iframe {
  width: 100% !important;
  max-width: 100%;
}

/* Mobile: transform tables (e.g. Mass Intentions) into clean stacked cards */
@media (max-width: 640px) {
  .entry-content table,
  .entry-content tbody,
  .entry-content tr,
  .entry-content td {
    display: block;
    width: 100%;
  }

  .entry-content table {
    border: none;
    overflow: visible;
  }

  .entry-content thead {
    display: none;
  }

  .entry-content tbody tr {
    background: var(--bg-card) !important;
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  }

  .entry-content tbody td {
    border-bottom: 1px solid var(--border);
    padding: 11px 14px;
    text-align: left;
    word-break: normal;
    overflow-wrap: break-word;
  }

  .entry-content tbody td[data-label]::before {
    content: attr(data-label) ": ";
    font-weight: 700;
    color: var(--primary);
  }

  .entry-content tbody td:first-child {
    background: var(--primary);
    color: #ffffff;
    font-weight: 600;
    font-size: 0.95rem;
    padding: 10px 14px;
    border-bottom: none;
  }

  .entry-content tbody td:first-child::before {
    content: none;
  }

  .entry-content tbody td:first-child strong,
  .entry-content tbody td:first-child em {
    color: #ffffff;
  }

  .entry-content tbody td:last-child {
    border-bottom: none;
  }
}


/* =====================================================
   v1.0.8 POLISH: Admin bar offset, Back-to-top, 404, Print
   ===================================================== */

/* Fix WP Admin Bar overlapping sticky header */
body.admin-bar .site-header {
  top: 32px;
}

@media (max-width: 782px) {
  body.admin-bar .site-header {
    top: 46px;
  }
}

@media (max-width: 600px) {
  body.admin-bar .site-header {
    top: 0;
  }
}

/* Back to top button */
.back-to-top {
  position: fixed;
  right: 22px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  border: 2px solid var(--accent);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  z-index: 300;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background 0.2s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* Print button in tabs & single post */
.btn-print {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-body);
  color: var(--primary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-print:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

/* 404 Page */
.error-404-box {
  max-width: 720px;
  margin: 48px auto;
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 48px 36px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
}

.error-404-code {
  font-family: var(--font-serif);
  font-size: 4.2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
}

.error-404-box h1 {
  font-family: var(--font-serif);
  font-size: 1.85rem;
  color: var(--primary);
  margin-bottom: 12px;
}

.error-404-box p {
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* Print Stylesheet (@media print) */
@media print {
  @page {
    margin: 1.5cm;
  }

  body {
    background: #ffffff !important;
    color: #000000 !important;
    font-size: 11pt !important;
    line-height: 1.45 !important;
  }

  .top-bar,
  .site-header,
  .hero,
  .quick-cards,
  .pinned-section,
  .tabs-nav,
  .tab-more-wrap,
  .section-actions,
  .site-sidebar,
  .site-footer,
  .back-to-top,
  .btn-print,
  .no-print,
  #zycie-parafii,
  #blog-parafialny,
  #widgety-parafialne,
  #aktualnosci-tabs .section-header,
  #wpadminbar {
    display: none !important;
  }

  .container,
  .section,
  .single-container,
  .content-with-sidebar {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    box-shadow: none !important;
    border: none !important;
    background: #ffffff !important;
  }

  .tab-panel {
    display: none !important;
    box-shadow: none !important;
    border: none !important;
    padding: 0 !important;
    background: #ffffff !important;
  }

  .tab-panel.active {
    display: block !important;
  }

  .entry-content table {
    display: table !important;
    width: 100% !important;
    border-collapse: collapse !important;
    font-size: 10pt !important;
  }

  .entry-content thead {
    display: table-header-group !important;
  }

  .entry-content tbody {
    display: table-row-group !important;
  }

  .entry-content tr {
    display: table-row !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    border: none !important;
    box-shadow: none !important;
    margin: 0 !important;
  }

  .entry-content th,
  .entry-content td {
    display: table-cell !important;
    width: auto !important;
    border: 1px solid #888888 !important;
    padding: 6px 10px !important;
    color: #000000 !important;
    background: #ffffff !important;
  }

  .entry-content thead th {
    background: #eeeeee !important;
    color: #000000 !important;
    font-weight: 700 !important;
  }

  .entry-content tbody td:first-child,
  .entry-content tbody td:first-child strong,
  .entry-content tbody td:first-child em {
    background: #ffffff !important;
    color: #000000 !important;
  }

  a {
    color: #000000 !important;
    text-decoration: none !important;
  }
}
