/*
Theme Name: Boża Misja
Theme URI: https://bozamisja.pl
Author: Boża Misja
Description: Lekki, szybki motyw pod serwis modlitewny bozamisja.pl. Paleta z logotypu (granat i błękit nieba), nastawienie na czytelność tekstu modlitwy, SEO i Core Web Vitals. Wymaga wtyczki „Boża Misja – Rdzeń”.
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bozamisja
Tags: blog, one-column, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ---------- Paleta (z logo i banera kanału) ---------- */
:root {
	--bm-navy: #1d375c;        /* logo: góry i krzyż, nagłówki */
	--bm-navy-deep: #132641;   /* stopka, hover */
	--bm-blue: #5b89b4;        /* niebo, linki, akcenty */
	--bm-blue-light: #89b0d0;  /* obramowania, ikony */
	--bm-sky: #a5c5dd;         /* tła sekcji */
	--bm-sky-pale: #e7edf2;    /* tło kart */
	--bm-mist: #f5f8fb;        /* tło strony */
	--bm-white: #ffffff;
	--bm-gold: #c9a227;        /* akcent: modlitwa dnia, CTA wsparcia */
	--bm-gold-soft: #f6efd6;
	--bm-text: #1f2a37;
	--bm-text-muted: #5b6878;
	--bm-border: #d7e0ea;

	--bm-bg: var(--bm-mist);
	--bm-surface: var(--bm-white);
	--bm-surface-2: var(--bm-sky-pale);
	--bm-link: var(--bm-blue);
	--bm-heading: var(--bm-navy);
	--bm-prayer-bg: #fffdf7;    /* ciepłe tło pod tekst modlitwy */
	--bm-prayer-border: #e8dfc4;

	--bm-font-body: "Source Sans 3", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--bm-font-serif: "Merriweather", "Georgia", "Times New Roman", serif;
	--bm-radius: 12px;
	--bm-shadow: 0 2px 10px rgba(29, 55, 92, 0.08);
	--bm-max: 1180px;
	--bm-content: 760px;
}

@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--bm-bg: #0f1b2b;
		--bm-surface: #15243a;
		--bm-surface-2: #1c2f49;
		--bm-text: #e6edf5;
		--bm-text-muted: #a9b7c7;
		--bm-border: #2b4160;
		--bm-link: #9cc2e5;
		--bm-heading: #dbe7f3;
		--bm-prayer-bg: #1a2a40;
		--bm-prayer-border: #34507a;
		--bm-gold-soft: #3a3320;
	}
}
:root[data-theme="dark"] {
	--bm-bg: #0f1b2b;
	--bm-surface: #15243a;
	--bm-surface-2: #1c2f49;
	--bm-text: #e6edf5;
	--bm-text-muted: #a9b7c7;
	--bm-border: #2b4160;
	--bm-link: #9cc2e5;
	--bm-heading: #dbe7f3;
	--bm-prayer-bg: #1a2a40;
	--bm-prayer-border: #34507a;
	--bm-gold-soft: #3a3320;
}

/* ---------- Reset / baza ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
	margin: 0;
	background: var(--bm-bg);
	color: var(--bm-text);
	font-family: var(--bm-font-body);
	font-size: 1.0625rem;
	line-height: 1.65;
}
img { max-width: 100%; height: auto; }
a { color: var(--bm-link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--bm-navy); }
h1, h2, h3, h4 { color: var(--bm-heading); font-family: var(--bm-font-serif); line-height: 1.25; margin: 1.4em 0 0.5em; font-weight: 700; }
h1 { font-size: clamp(1.7rem, 2.2vw + 1rem, 2.5rem); margin-top: 0.3em; }
h2 { font-size: clamp(1.35rem, 1.2vw + 1rem, 1.7rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px,1px,1px,1px); }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--bm-navy); color: #fff; padding: 8px 12px; z-index: 1000; }
.skip-link:focus { left: 8px; top: 8px; }
.bm-wrap { max-width: var(--bm-max); margin: 0 auto; padding: 0 16px; }
.bm-content { max-width: var(--bm-content); }

/* ---------- Nagłówek ---------- */
.bm-header { background: var(--bm-surface); border-bottom: 1px solid var(--bm-border); position: sticky; top: 0; z-index: 50; }
.bm-header__inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.bm-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--bm-navy); font-family: var(--bm-font-serif); font-weight: 700; font-size: 1.25rem; letter-spacing: 0.02em; }
.bm-brand img { height: 44px; width: auto; }
.bm-brand small { display: block; font-family: var(--bm-font-body); font-weight: 400; font-size: 0.75rem; color: var(--bm-text-muted); letter-spacing: 0; }
.bm-nav { margin-left: auto; }
.bm-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; flex-wrap: wrap; }
.bm-nav a { display: block; padding: 10px 12px; color: var(--bm-text); text-decoration: none; border-radius: 8px; font-weight: 600; font-size: 0.95rem; }
.bm-nav a:hover, .bm-nav .current-menu-item > a, .bm-nav .current-menu-ancestor > a { background: var(--bm-surface-2); color: var(--bm-navy); }
.bm-nav .sub-menu { display: none; position: absolute; background: var(--bm-surface); border: 1px solid var(--bm-border); border-radius: 10px; padding: 6px; min-width: 220px; box-shadow: var(--bm-shadow); flex-direction: column; gap: 0; }
.bm-nav li { position: relative; }
.bm-nav li:hover > .sub-menu, .bm-nav li:focus-within > .sub-menu { display: flex; }
.bm-nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--bm-border); border-radius: 8px; padding: 8px 10px; color: var(--bm-navy); font-size: 1rem; cursor: pointer; }
.bm-search-toggle { background: none; border: 0; color: var(--bm-navy); cursor: pointer; padding: 8px; font-size: 1.1rem; }

@media (max-width: 900px) {
	.bm-nav-toggle { display: inline-block; }
	.bm-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--bm-surface); border-bottom: 1px solid var(--bm-border); padding: 8px 16px 16px; margin: 0; }
	.bm-nav.is-open { display: block; }
	.bm-nav ul { flex-direction: column; gap: 0; }
	.bm-nav .sub-menu { display: block; position: static; border: 0; box-shadow: none; padding: 0 0 0 16px; }
	.bm-brand small { display: none; }
}

/* ---------- Hero ---------- */
.bm-hero { background: linear-gradient(180deg, var(--bm-sky-pale) 0%, var(--bm-bg) 100%); border-bottom: 1px solid var(--bm-border); }
.bm-hero--image { background-image: linear-gradient(90deg, rgba(19,38,65,0.92) 0%, rgba(19,38,65,0.78) 55%, rgba(29,55,92,0.55) 100%), var(--bm-hero-img); background-size: cover; background-position: center center; color: #fff; }
.bm-hero--image h1 { text-shadow: 0 2px 12px rgba(0,0,0,0.35); }
.bm-hero--image h1, .bm-hero--image p { color: #fff; }
.bm-hero__inner { padding: clamp(32px, 6vw, 72px) 0; max-width: 820px; }
.bm-hero p { font-size: 1.15rem; color: var(--bm-text-muted); }
.bm-hero--image .bm-hero p { color: #e8eef5; }
.bm-hero .bm-search { margin-top: 20px; }

/* ---------- Wyszukiwarka ---------- */
.bm-search { display: flex; gap: 8px; max-width: 560px; }
.bm-search input[type="search"] { flex: 1; padding: 12px 14px; border: 1px solid var(--bm-border); border-radius: 10px; font-size: 1rem; background: var(--bm-surface); color: var(--bm-text); }
.bm-search button { padding: 12px 18px; border: 0; border-radius: 10px; background: var(--bm-navy); color: #fff; font-weight: 600; cursor: pointer; }
.bm-search button:hover { background: var(--bm-navy-deep); }

.bm-header .bm-search { max-width: 240px; }
.bm-header .bm-search input[type="search"] { padding: 8px 12px; font-size: 0.92rem; }
.bm-header .bm-search button { padding: 8px 12px; }
@media (max-width: 900px) { .bm-header .bm-search { display: none; } .bm-header .bm-search.is-open { display: flex; position: absolute; left: 16px; right: 16px; top: 100%; max-width: none; padding: 10px 0; background: var(--bm-surface); } }

/* ---------- Przyciski ---------- */
.bm-btn { display: inline-block; padding: 11px 20px; border-radius: 10px; background: var(--bm-navy); color: #fff !important; text-decoration: none; font-weight: 600; border: 1px solid var(--bm-navy); cursor: pointer; font-size: 0.98rem; }
.bm-btn:hover { background: var(--bm-navy-deep); }
.bm-btn--ghost { background: transparent; color: var(--bm-navy) !important; }
.bm-btn--ghost:hover { background: var(--bm-surface-2); }
.bm-btn--gold { background: var(--bm-gold); border-color: var(--bm-gold); color: #1f2a37 !important; }
.bm-btn--gold:hover { filter: brightness(0.95); }

/* ---------- Siatki i karty ---------- */
.bm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; margin: 20px 0; }
.bm-card { background: var(--bm-surface); border: 1px solid var(--bm-border); border-radius: var(--bm-radius); padding: 18px 18px 16px; box-shadow: var(--bm-shadow); display: flex; flex-direction: column; gap: 8px; transition: transform .15s ease, box-shadow .15s ease; }
.bm-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(29,55,92,0.14); }
.bm-card__kicker { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bm-blue); font-weight: 700; }
.bm-card__title { margin: 0; font-size: 1.12rem; font-family: var(--bm-font-serif); }
.bm-card__title a { color: var(--bm-heading); text-decoration: none; }
.bm-card__title a:hover { text-decoration: underline; }
.bm-card__excerpt { color: var(--bm-text-muted); font-size: 0.95rem; margin: 0; }
.bm-card__meta { margin-top: auto; display: flex; gap: 8px; flex-wrap: wrap; font-size: 0.82rem; color: var(--bm-text-muted); }
.bm-card__meta a { color: var(--bm-text-muted); }
.bm-card__video { font-size: 0.8rem; color: var(--bm-navy); font-weight: 600; }

.bm-sections { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; margin: 20px 0; }
.bm-section-card { display: flex; flex-direction: column; gap: 4px; padding: 18px; border-radius: var(--bm-radius); background: var(--bm-navy); color: #fff; text-decoration: none; min-height: 120px; }
.bm-section-card:nth-child(2n) { background: var(--bm-blue); }
.bm-section-card:hover { filter: brightness(1.08); color: #fff; }
.bm-section-card__title { font-family: var(--bm-font-serif); font-weight: 700; font-size: 1.15rem; }
.bm-section-card__count { font-size: 0.8rem; opacity: 0.85; }
.bm-section-card__desc { font-size: 0.85rem; opacity: 0.9; line-height: 1.4; }

.bm-termlist ul { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.bm-termlist a { display: inline-block; padding: 6px 12px; border-radius: 999px; background: var(--bm-surface-2); color: var(--bm-navy); text-decoration: none; font-size: 0.92rem; font-weight: 600; }
.bm-termlist a span { color: var(--bm-text-muted); font-weight: 400; }
.bm-termlist a:hover { background: var(--bm-sky); }

/* ---------- Okruszki ---------- */
.bm-breadcrumbs { font-size: 0.86rem; color: var(--bm-text-muted); margin: 14px 0 6px; }
.bm-breadcrumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.bm-breadcrumbs li + li::before { content: "›"; margin: 0 6px; color: var(--bm-blue-light); }
.bm-breadcrumbs a { color: var(--bm-text-muted); }

/* ---------- Strona modlitwy ---------- */
.bm-single { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; padding: 10px 0 48px; }
@media (max-width: 1000px) { .bm-single { grid-template-columns: 1fr; } }
.bm-article { min-width: 0; }
.bm-article__header { margin-bottom: 18px; }
.bm-article__meta { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--bm-text-muted); font-size: 0.88rem; margin: 6px 0 0; }
.bm-article__meta a { color: var(--bm-navy); font-weight: 600; text-decoration: none; }
.bm-lead { font-size: 1.2rem; color: var(--bm-text-muted); font-style: italic; border-left: 3px solid var(--bm-gold); padding-left: 14px; margin: 18px 0; }

.bm-modlitwa { background: var(--bm-prayer-bg); border: 1px solid var(--bm-prayer-border); border-radius: var(--bm-radius); padding: clamp(18px, 3vw, 34px); margin: 20px 0; }
.bm-modlitwa__heading { margin-top: 0; font-size: 1.05rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--bm-blue); font-family: var(--bm-font-body); }
.bm-modlitwa__content { font-family: var(--bm-font-serif); font-size: clamp(1.08rem, 0.3vw + 1rem, 1.22rem); line-height: 1.85; }
.bm-modlitwa__content p { margin-bottom: 1.1em; }
.bm-blogoslawienstwo { margin-top: 24px; padding-top: 16px; border-top: 1px dashed var(--bm-prayer-border); font-family: var(--bm-font-serif); }
.bm-blogoslawienstwo h3 { margin: 0 0 8px; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--bm-blue); font-family: var(--bm-font-body); }
.bm-zrodlo { font-size: 0.85rem; color: var(--bm-text-muted); margin: 10px 0 0; }
.bm-actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 24px; }

.bm-video__frame { position: relative; padding-top: 56.25%; border-radius: var(--bm-radius); overflow: hidden; background: #000; }
.bm-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bm-video__note { font-size: 0.92rem; color: var(--bm-text-muted); margin-top: 10px; }

.bm-opis { margin-top: 24px; }
.bm-opis h2 { margin-top: 1.6em; }
.bm-faq { margin-top: 28px; }
.bm-faq__item { border: 1px solid var(--bm-border); border-radius: 10px; padding: 10px 14px; margin-bottom: 8px; background: var(--bm-surface); }
.bm-faq__item summary { cursor: pointer; font-weight: 700; color: var(--bm-heading); }
.bm-faq__answer { padding-top: 8px; color: var(--bm-text); }

.bm-taxbox { margin: 28px 0 0; padding: 16px 18px; border-radius: var(--bm-radius); background: var(--bm-surface-2); font-size: 0.93rem; }
.bm-taxbox strong { color: var(--bm-navy); }
.bm-taxbox a { margin-right: 6px; }

.bm-intention { margin: 28px 0; padding: 20px; border-radius: var(--bm-radius); background: var(--bm-gold-soft); border: 1px solid #e9dcae; }
.bm-intention h2 { margin-top: 0; font-size: 1.25rem; }

/* ---------- Boczny pasek ---------- */
.bm-sidebar { position: sticky; top: 84px; align-self: start; display: flex; flex-direction: column; gap: 20px; }
.bm-widget { background: var(--bm-surface); border: 1px solid var(--bm-border); border-radius: var(--bm-radius); padding: 18px; }
.bm-widget h3 { margin: 0 0 10px; font-size: 1.05rem; }
.bm-widget ul { list-style: none; padding: 0; margin: 0; }
.bm-widget li { padding: 7px 0; border-bottom: 1px solid var(--bm-border); font-size: 0.95rem; }
.bm-widget li:last-child { border-bottom: 0; }
.bm-widget a { text-decoration: none; color: var(--bm-text); }
.bm-widget a:hover { color: var(--bm-navy); text-decoration: underline; }
.bm-widget--cta { background: var(--bm-navy); color: #fff; border: 0; }
.bm-widget--cta h3 { color: #fff; }
.bm-widget--cta p { font-size: 0.95rem; opacity: 0.92; }

.bm-modlitwa-dnia { background: var(--bm-gold-soft); border: 1px solid #e9dcae; border-radius: var(--bm-radius); padding: 20px 22px; margin: 20px 0; }
.bm-modlitwa-dnia__label { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.78rem; color: #8a6d12; font-weight: 700; margin: 0 0 6px; }
.bm-modlitwa-dnia__title { margin: 0 0 8px; }
.bm-modlitwa-dnia__title a { text-decoration: none; }
.bm-modlitwa-dnia__lead { color: var(--bm-text-muted); }

/* ---------- Archiwa ---------- */
.bm-archive-header { padding: 24px 0 8px; }
.bm-archive-header p { color: var(--bm-text-muted); max-width: 820px; }
.bm-subterms { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 20px; }
.bm-subterms a { padding: 6px 12px; border-radius: 999px; border: 1px solid var(--bm-border); background: var(--bm-surface); color: var(--bm-navy); text-decoration: none; font-size: 0.9rem; font-weight: 600; }
.bm-subterms a:hover { background: var(--bm-surface-2); }
.bm-pagination { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin: 28px 0; }
.bm-pagination .page-numbers { padding: 8px 14px; border-radius: 8px; border: 1px solid var(--bm-border); text-decoration: none; background: var(--bm-surface); color: var(--bm-navy); }
.bm-pagination .page-numbers.current { background: var(--bm-navy); color: #fff; border-color: var(--bm-navy); }
.bm-archive-seo { max-width: 820px; margin: 30px 0 40px; color: var(--bm-text-muted); font-size: 0.97rem; }

/* ---------- Strona główna ---------- */
.bm-home section { padding: 24px 0; }
.bm-home h2 { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.bm-home h2 a.bm-more { font-family: var(--bm-font-body); font-size: 0.9rem; font-weight: 600; }
.bm-home__split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 800px) { .bm-home__split { grid-template-columns: 1fr; } }
.bm-about { background: var(--bm-surface); border: 1px solid var(--bm-border); border-radius: var(--bm-radius); padding: 24px; }
.bm-about h2 { margin-top: 0; }

/* ---------- Komentarze / intencje ---------- */
.bm-comments { margin-top: 36px; }
.bm-comments .comment-list { list-style: none; padding: 0; }
.bm-comments .comment { padding: 12px 0; border-bottom: 1px solid var(--bm-border); }
.bm-comments .comment-author { font-weight: 700; }
.bm-comments .comment-metadata { font-size: 0.8rem; color: var(--bm-text-muted); }
.bm-comments textarea, .bm-comments input[type="text"], .bm-comments input[type="email"] { width: 100%; padding: 10px; border: 1px solid var(--bm-border); border-radius: 8px; background: var(--bm-surface); color: var(--bm-text); }
.bm-comments .submit { background: var(--bm-navy); color: #fff; border: 0; border-radius: 8px; padding: 10px 18px; cursor: pointer; }

/* ---------- Treść wpisów / stron ---------- */
.bm-entry { max-width: var(--bm-content); }
.bm-entry img { border-radius: 10px; }
.bm-entry blockquote { border-left: 3px solid var(--bm-blue-light); margin: 1.2em 0; padding: 4px 16px; color: var(--bm-text-muted); font-style: italic; }
.bm-entry table { border-collapse: collapse; width: 100%; }
.bm-entry td, .bm-entry th { border: 1px solid var(--bm-border); padding: 8px; }
.wp-block-embed iframe { max-width: 100%; }

/* ---------- Stopka ---------- */
.bm-footer { background: var(--bm-navy-deep); color: #cfdbe8; margin-top: 40px; padding: 40px 0 24px; font-size: 0.93rem; }
.bm-footer a { color: #e6eef7; }
.bm-footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
@media (max-width: 800px) { .bm-footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 500px) { .bm-footer__grid { grid-template-columns: 1fr; } }
.bm-footer h3 { color: #fff; font-size: 1rem; margin: 0 0 10px; font-family: var(--bm-font-body); }
.bm-footer ul { list-style: none; padding: 0; margin: 0; }
.bm-footer li { padding: 4px 0; }
.bm-footer__bottom { border-top: 1px solid rgba(255,255,255,0.15); margin-top: 28px; padding-top: 16px; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-size: 0.85rem; color: #9fb3c8; }
.bm-footer__brand img { height: 48px; border-radius: 50%; background: #fff; }

/* ---------- Reklamy ---------- */
.bm-ad { margin: 24px 0; text-align: center; min-height: 0; }
.bm-ad:empty { display: none; }

/* ---------- Druk ---------- */
@media print {
	.bm-header, .bm-footer, .bm-sidebar, .bm-actions, .bm-video, .bm-breadcrumbs, .bm-related, .bm-comments, .bm-ad, .bm-taxbox, .bm-intention { display: none !important; }
	body { background: #fff; color: #000; font-size: 12pt; }
	.bm-single { display: block; }
	.bm-modlitwa { border: 0; background: #fff; padding: 0; }
	a { color: #000; text-decoration: none; }
}
