/* Parafia Siemowo – nowoczesny wygląd (szablon potomny Cassiopeia) */
:root {
	--sm-navy: #13294b;
	--sm-navy-2: #1c3a66;
	--sm-blue: #1e6fc0;
	--sm-gold: #d6a94a;
	--sm-gold-soft: #f3e3b8;
	--sm-bg: #f5f3ee;
	--sm-card: #ffffff;
	--sm-text: #26303d;
	--sm-muted: #5d6877;
	--sm-line: #e6e1d6;
	--sm-radius: 16px;
	--sm-shadow: 0 1px 2px rgba(19, 41, 75, .06), 0 8px 28px rgba(19, 41, 75, .08);
	--sm-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
	--sm-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--cassiopeia-color-primary: var(--sm-navy);
	--cassiopeia-color-link: var(--sm-blue);
	--cassiopeia-color-hover: var(--sm-navy);
	--link-color: var(--sm-blue);
}

html { scroll-behavior: smooth; }
body.sm-site {
	margin: 0;
	background: var(--sm-bg);
	color: var(--sm-text);
	font-family: var(--sm-sans);
	font-size: 1.0625rem;
	line-height: 1.65;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}
.sm-site a { color: var(--sm-blue); text-underline-offset: 3px; }
.sm-site a:hover { color: var(--sm-navy); }
.sm-site :focus-visible { outline: 3px solid var(--sm-gold); outline-offset: 2px; }

.sm-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; box-sizing: border-box; }

.sm-skip { position: absolute; left: -9999px; top: 8px; z-index: 1000; background: var(--sm-gold); color: var(--sm-navy) !important; padding: 8px 14px; border-radius: 8px; font-weight: 600; }
.sm-skip:focus { left: 8px; }

/* ---------- Nagłówek ---------- */
.sm-header {
	position: sticky; top: 0; z-index: 50;
	background: linear-gradient(120deg, var(--sm-navy) 0%, var(--sm-navy-2) 60%, #234b82 100%);
	box-shadow: 0 2px 18px rgba(10, 22, 42, .25);
	border-bottom: 3px solid var(--sm-gold);
}
.sm-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 84px; }
.sm-brand { display: inline-flex; align-items: center; flex: 0 1 auto; min-width: 0; }
.sm-brand img { display: block; height: auto; max-height: 64px; width: auto; max-width: 100%; }
.sm-nav { flex: 0 1 auto; display: flex; justify-content: flex-end; }

/* DJ-MegaMenu – poziome menu w nagłówku */
.sm-header .dj-megamenu-wrapper { background: transparent; }
.sm-header #dj-megamenu110, .sm-header #dj-megamenu110sticky { background: transparent !important; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.sm-header #dj-megamenu110 > li { height: auto !important; align-self: center; }
.sm-header #dj-megamenu110 li a.dj-up_a {
	background: transparent !important; border: 0 !important;
	color: #fff !important; font-weight: 600; letter-spacing: .04em; font-size: .8rem;
	padding: 10px 16px !important; border-radius: 999px; line-height: 1.3; transition: background .2s, color .2s;
	height: auto !important; min-height: 0 !important; display: flex !important; align-items: center;
}
.sm-header #dj-megamenu110 li:hover a.dj-up_a,
.sm-header #dj-megamenu110 li.hover a.dj-up_a { background: rgba(255, 255, 255, .12) !important; color: #fff !important; }
.sm-header #dj-megamenu110 li.active a.dj-up_a { background: var(--sm-gold) !important; color: var(--sm-navy) !important; }
.sm-header #dj-megamenu110 li a.dj-up_a > span { padding: 0 !important; }
.sm-header #dj-megamenu110 li a.dj-up_a span { line-height: 1.3 !important; height: auto !important; }

/* Menu mobilne (DJ-MegaMenu accordion) – spójne z nagłówkiem */
.sm-header { --sm-header-h: 72px; }
.sm-header .dj-megamenu-accordion { position: static !important; text-align: right; }
.sm-header .dj-megamenu-accordion .dj-mobile-open-btn {
	display: inline-flex !important; align-items: center; gap: 10px;
	width: auto !important; height: 44px !important; min-width: 44px; padding: 0 16px 0 14px !important; margin: 0 !important;
	background: rgba(255, 255, 255, .1) !important; color: #fff !important;
	border: 1px solid rgba(255, 255, 255, .3) !important; border-radius: 999px !important;
	font: 600 .85rem/1 var(--sm-sans) !important; letter-spacing: .06em; text-transform: uppercase;
	box-shadow: none !important; cursor: pointer; transition: background .2s, color .2s, border-color .2s;
}
.sm-header .dj-megamenu-accordion .dj-mobile-open-btn:hover,
.sm-header .dj-megamenu-accordion .dj-mobile-open-btn:focus-visible { background: rgba(255, 255, 255, .18) !important; border-color: var(--sm-gold) !important; }
.sm-header .dj-megamenu-accordion .dj-mobile-open-btn.active { background: var(--sm-gold) !important; border-color: var(--sm-gold) !important; color: var(--sm-navy) !important; }
.sm-header .dj-mobile-open-btn .dj-mobile-open-icon { display: none !important; }
.sm-burger { position: relative; width: 18px; height: 12px; display: inline-block; flex: none; }
.sm-burger::before, .sm-burger::after, .sm-burger span { content: ""; position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: currentColor; transition: transform .2s, opacity .2s, top .2s; }
.sm-burger::before { top: 0; }
.sm-burger span { top: 5px; }
.sm-burger::after { top: 10px; }
.dj-mobile-open-btn.active .sm-burger::before { top: 5px; transform: rotate(45deg); }
.dj-mobile-open-btn.active .sm-burger::after { top: 5px; transform: rotate(-45deg); }
.dj-mobile-open-btn.active .sm-burger span { opacity: 0; }

/* Panel menu: rozwijany pod nagłówkiem, na całą szerokość */
.sm-header .dj-accordion { position: absolute !important; left: 0; right: 0; top: calc(100% + 3px); margin: 0 !important; z-index: 60; }
.sm-header .dj-accordion .dj-accordion-in {
	margin: 0 !important; padding: 8px 0 16px !important; width: auto !important;
	background: var(--sm-navy) !important; border-top: 1px solid rgba(255, 255, 255, .08);
	border-bottom: 3px solid var(--sm-gold); box-shadow: 0 18px 30px rgba(10, 22, 42, .35);
	max-height: calc(100vh - var(--sm-header-h) - 3px); max-height: calc(100dvh - var(--sm-header-h) - 3px);
	overflow-y: auto; overscroll-behavior: contain; text-align: left;
}
.sm-header ul.dj-mobile-nav { margin: 0 auto !important; padding: 0 20px !important; max-width: 1200px; list-style: none; background: transparent !important; }
.sm-header ul.dj-mobile-nav > li { border: 0 !important; border-bottom: 1px solid rgba(255, 255, 255, .1) !important; background: transparent !important; }
.sm-header ul.dj-mobile-nav > li:last-child { border-bottom: 0 !important; }
.sm-header ul.dj-mobile-nav li a {
	display: flex !important; align-items: center; min-height: 48px; padding: 12px 14px !important; margin: 4px 0;
	background: transparent !important; border: 0 !important; border-radius: 12px;
	color: #fff !important; font: 600 1rem/1.35 var(--sm-sans) !important; letter-spacing: .01em; text-transform: none !important; text-decoration: none;
}
.sm-header ul.dj-mobile-nav li a:hover, .sm-header ul.dj-mobile-nav li a:focus-visible { background: rgba(255, 255, 255, .08) !important; }
.sm-header ul.dj-mobile-nav > li.active > a, .sm-header ul.dj-mobile-nav > li.current > a {
	background: rgba(214, 169, 74, .16) !important; color: var(--sm-gold) !important; box-shadow: inset 3px 0 0 var(--sm-gold);
}
.sm-header ul.dj-mobile-nav li a .title, .sm-header ul.dj-mobile-nav li a .name { color: inherit !important; font: inherit !important; line-height: inherit !important; }
.sm-header ul.dj-mobile-nav ul { list-style: none; margin: 0 0 8px 14px !important; padding: 0 0 0 12px !important; border-left: 2px solid rgba(214, 169, 74, .45); background: transparent !important; }
.sm-header ul.dj-mobile-nav ul li a { min-height: 44px; font-size: .95rem !important; font-weight: 500 !important; color: #dfe7f3 !important; }
.sm-header ul.dj-mobile-nav .toggler { margin-left: auto; color: var(--sm-gold) !important; }
.sm-menu-close {
	display: flex; align-items: center; justify-content: center; gap: 8px; margin: 12px auto 0; min-height: 44px; padding: 0 22px;
	background: transparent; color: #dfe7f3; border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px;
	font: 600 .85rem/1 var(--sm-sans); letter-spacing: .06em; text-transform: uppercase; cursor: pointer;
}
.sm-menu-close:hover, .sm-menu-close:focus-visible { border-color: var(--sm-gold); color: var(--sm-gold); }

/* Blokada przewijania + przyciemnienie strony, gdy menu otwarte */
html.sm-menu-open, html.sm-menu-open body { overflow: hidden !important; }
html.sm-menu-open .sm-page::before { content: ""; position: fixed; inset: 0; z-index: 45; background: rgba(8, 18, 36, .45); }
html.sm-menu-open .sm-top { display: none; }

/* ---------- Układ ---------- */
.sm-page { flex: 1 0 auto; padding: 40px 0 56px; }
.sm-layout { display: grid; gap: 32px; align-items: start; }
.sm-layout--left { grid-template-columns: 320px minmax(0, 1fr); }
.sm-layout--right { grid-template-columns: minmax(0, 1fr) 300px; }
.sm-layout--both { grid-template-columns: 280px minmax(0, 1fr) 260px; }
.sm-main { min-width: 0; }
.sm-row { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); margin-bottom: 32px; }
.sm-row--bottom { margin: 32px 0 0; }

.sm-card, .sm-site .card {
	background: var(--sm-card); border: 1px solid var(--sm-line);
	border-radius: var(--sm-radius); box-shadow: var(--sm-shadow);
}
.sm-content { padding: 40px 48px; }

/* ---------- Treść artykułu ---------- */
.sm-content h1, .sm-content h2, .sm-content .page-header h1, .sm-content .page-header h2 {
	font-family: var(--sm-serif); color: var(--sm-navy); font-weight: 700; line-height: 1.25;
}
.sm-content .page-header { margin: 0 0 24px; padding-bottom: 16px; border-bottom: 1px solid var(--sm-line); position: relative; }
.sm-content .page-header::after { content: ""; position: absolute; left: 0; bottom: -2px; width: 72px; height: 3px; border-radius: 3px; background: var(--sm-gold); }
.sm-content .page-header h1, .sm-content .page-header h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.15rem); margin: 0; }
.sm-content h3, .sm-content h4 { font-family: var(--sm-serif); line-height: 1.3; }
.sm-content p, .sm-content li { max-width: 78ch; }
.sm-content ol, .sm-content ul { padding-left: 1.4em; }
.sm-content li { margin-bottom: .6em; }
.sm-content li::marker { color: var(--sm-gold); font-weight: 700; }
.sm-content { overflow-wrap: break-word; }
.sm-content img { max-width: 100%; height: auto; border-radius: 10px; }
.sm-content iframe { max-width: 100%; }

/* Tabele (np. intencje mszalne) – czytelne i przewijane na telefonie */
.sm-content table {
	width: 100% !important; max-width: 100%; border-collapse: separate !important; border-spacing: 0;
	border: 1px solid var(--sm-line) !important; border-radius: 12px; overflow: hidden;
	margin: 12px 0 24px; font-size: .97rem; background: #fff;
}
.sm-content table td, .sm-content table th { border: 0 !important; border-bottom: 1px solid var(--sm-line) !important; padding: 10px 14px !important; vertical-align: top; }
.sm-content table td + td, .sm-content table th + th { border-left: 1px solid var(--sm-line) !important; }
.sm-content table tr:last-child td { border-bottom: 0 !important; }
.sm-content table td[colspan] { letter-spacing: .01em; }

/* ---------- Pasek boczny: Msze święte ---------- */
.sm-aside { position: sticky; top: 112px; }
.sm-aside--left > * { margin-bottom: 24px; }
.sm-aside table {
	width: 100% !important; height: auto !important; border-collapse: collapse;
	background: linear-gradient(160deg, var(--sm-navy) 0%, var(--sm-navy-2) 70%, #25508a 100%) !important;
	border-radius: var(--sm-radius); overflow: hidden; box-shadow: var(--sm-shadow); color: #eef3fb;
}
.sm-aside table tr, .sm-aside table td { height: auto !important; }
.sm-aside table td { padding: 28px 26px !important; border-top: 4px solid var(--sm-gold); }
.sm-aside h3 { font-family: var(--sm-serif); font-size: 1.6rem; margin: 0 0 14px; }
.sm-aside h3, .sm-aside h3 span { color: #fff !important; }
.sm-aside h3::after { content: ""; display: block; width: 48px; height: 3px; margin-top: 10px; background: var(--sm-gold); border-radius: 3px; }
.sm-aside p { margin: 0 0 14px; font-size: .98rem; line-height: 1.7; }
.sm-aside strong { font-weight: 600; }
.sm-aside span[style*="color: #000000"], .sm-aside span[style*="color:#000000"] { color: #fff !important; }
.sm-aside span[style*="color: #ff0000"], .sm-aside span[style*="color:#ff0000"] {
	color: var(--sm-navy) !important; background: var(--sm-gold-soft); display: block;
	padding: 10px 12px; border-radius: 10px; font-size: .92rem; line-height: 1.5;
}
.sm-aside .custom p:last-child { overflow-wrap: anywhere; font-size: .9rem; font-variant-numeric: tabular-nums; background: rgba(255,255,255,.08); padding: 10px 12px; border-radius: 10px; }

/* ---------- Stopka ---------- */
.sm-footer { flex-shrink: 0; background: var(--sm-navy); color: #dfe7f3; border-top: 3px solid var(--sm-gold); }
.sm-footer__grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 40px; padding-top: 44px; padding-bottom: 36px; }
.sm-footer p { margin: 0; line-height: 1.8; }
.sm-footer span { font-family: var(--sm-sans) !important; }
.sm-footer__links .dj-megamenu-wrapper, .sm-footer__links #dj-megamenu116 { background: transparent !important; }
.sm-footer__links #dj-megamenu116 li { float: none; }
.sm-footer__links #dj-megamenu116 li a.dj-up_a {
	background: transparent !important; border: 0 !important; color: #dfe7f3 !important;
	padding: 6px 0 !important; font-size: .85rem; letter-spacing: .06em; font-weight: 600;
}
.sm-footer__links #dj-megamenu116 li a.dj-up_a:hover, .sm-footer__links #dj-megamenu116 li.active a.dj-up_a { background: transparent !important; color: var(--sm-gold) !important; }
.sm-footer__links #dj-megamenu116 li a.dj-up_a > span { padding: 0 !important; }
.sm-footer__links #dj-megamenu116 li a.dj-up_a span { line-height: 1.5 !important; height: auto !important; }
.sm-footer__bar { background: #0c1c35; color: #a9b6c9; font-size: .85rem; padding: 16px 0; }

/* Przycisk „do góry” */
.sm-top {
	position: fixed; right: 18px; bottom: 18px; z-index: 40; width: 44px; height: 44px; border-radius: 50%;
	display: grid; place-items: center; background: var(--sm-navy); color: #fff !important; text-decoration: none;
	box-shadow: var(--sm-shadow); opacity: .85; transition: opacity .2s, transform .2s;
}
.sm-top:hover { opacity: 1; transform: translateY(-2px); background: var(--sm-gold); color: var(--sm-navy) !important; }

/* Pasek cookies */
.sm-site .jb-cookie { font-family: var(--sm-sans); }

/* ---------- Responsywność ---------- */
@media (max-width: 1100px) {
	.sm-layout--left, .sm-layout--both { grid-template-columns: 280px minmax(0, 1fr); }
	.sm-layout--both .sm-aside--right { grid-column: 1 / -1; }
	.sm-content { padding: 32px; }
}
@media (max-width: 979px) {
	.sm-header__inner { min-height: 72px; gap: 12px; }
	.sm-brand img { max-height: 52px; }
	.sm-layout--left, .sm-layout--right, .sm-layout--both { grid-template-columns: minmax(0, 1fr); }
	.sm-aside { position: static; }
	.sm-aside--left { order: 2; }
	.sm-main { order: 1; }
	.sm-footer__grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 640px) {
	body.sm-site { font-size: 1rem; }
	.sm-container { padding: 0 14px; }
	.sm-page { padding: 20px 0 36px; }
	.sm-content { padding: 22px 16px; border-radius: 12px; }
	.sm-content p, .sm-content li { text-align: left !important; }
	.sm-content, .sm-content * { overflow-wrap: anywhere; }
	.sm-content [style*="margin-left"] { margin-left: 0 !important; }
	.sm-content [style*="text-indent"] { text-indent: 0 !important; }
	.sm-content table { font-size: .92rem; table-layout: auto; }
	.sm-content table td:first-child:not([colspan]) { width: 1%; white-space: nowrap; }
	.sm-content table td, .sm-content table th { padding: 8px 10px !important; }
	.sm-aside table td { padding: 22px 18px !important; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
@media print {
	.sm-header, .sm-footer, .sm-top, .sm-aside { position: static !important; box-shadow: none !important; }
	.sm-nav, .sm-top { display: none !important; }
	body.sm-site { background: #fff; }
}
