/* =========================================================================
   Mirjan Miłosierdzie — arkusz stylów strony publicznej
   Estetyka: katolicka, ciepła, czytelna dla wielu pokoleń (zwłaszcza starszych).
   ========================================================================= */

:root {
    --bg:        #faf5ea;
    --paper:     #ffffff;
    --ink:       #2b2620;
    --ink-soft:  #5d5648;
    --gold:      #b8912f;
    --gold-deep: #93701f;
    --gold-soft: #f3e8cf;
    --blue:      #2f4a7c;
    --blue-deep: #223a63;
    --line:      #e6dcc4;
    --danger:    #a8342b;
    --ok:        #2f6b3a;
    --radius:    14px;
    --shadow:    0 2px 10px rgba(70, 55, 20, .08);
    --shadow-lg: 0 8px 30px rgba(70, 55, 20, .14);
    --serif:     Georgia, 'Times New Roman', 'Liberation Serif', serif;
    --sans:      -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--serif);
    font-size: 18px;
    line-height: 1.72;
    color: var(--ink);
    background: var(--bg);
    background-image:
        radial-gradient(circle at 50% -10%, rgba(184,145,47,.10), transparent 55%);
}

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

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-deep); text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.25; color: var(--ink); font-weight: 700; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

.skip-link {
    position: absolute; left: -9999px; top: 0; background: var(--gold); color: #fff;
    padding: 10px 16px; z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; border-radius: 4px; }

/* ------------------------------- Nagłówek -------------------------------- */
.site-header {
    background: linear-gradient(180deg, #fffdf7, var(--paper));
    border-bottom: 3px solid var(--gold);
}
.header-inner {
    display: flex; align-items: center; justify-content: space-between;
    gap: 20px; padding: 16px 20px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 16px; color: var(--ink); text-decoration: none; }
.brand:hover { text-decoration: none; }
.brand-icon {
    width: 72px; height: 72px; border-radius: 50%; object-fit: cover;
    box-shadow: 0 0 0 3px var(--gold-soft), var(--shadow);
    background: #fff;
}
.brand-name { display: block; font-size: 2rem; font-weight: 700; letter-spacing: .3px; color: var(--gold-deep); }
.brand-tagline { display: block; font-style: italic; color: var(--ink-soft); font-size: 1.15rem; }

/* Safari nakłada natywny wygląd na input[type=search] — normalizujemy. */
input[type="search"] {
    -webkit-appearance: none;
    appearance: none;
}
input[type="search"]::-webkit-search-decoration,
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

.header-search { display: flex; align-items: stretch; }
.header-search input {
    font: inherit; font-size: 1rem; padding: 10px 14px; border: 1px solid var(--line);
    border-radius: 999px 0 0 999px; min-width: 200px; background: #fff;
    height: 44px; line-height: 1.2;
}
.header-search button { height: 44px; }
.header-search button {
    font-size: 1.1rem; padding: 10px 16px; border: 1px solid var(--gold); border-left: 0;
    background: var(--gold-soft); border-radius: 0 999px 999px 0; cursor: pointer; color: var(--gold-deep);
}

/* ------------------------------- Nawigacja ------------------------------- */
.site-nav { background: var(--blue-deep); position: sticky; top: 0; z-index: 40; box-shadow: var(--shadow); }
.nav-inner { display: flex; align-items: center; padding: 0 20px; }
.nav-toggle {
    display: none; background: none; border: 0; color: #fff; font-size: 1.2rem;
    font-family: var(--sans); padding: 14px 6px; cursor: pointer;
}
.nav-list {
    list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; font-family: var(--sans);
}
.nav-list > li { position: relative; }
.nav-list > li > a {
    display: block; color: #f3ead2; padding: 15px 16px; font-size: 1.02rem; font-weight: 500;
    text-decoration: none; border-bottom: 3px solid transparent;
}
.nav-list > li > a:hover, .nav-list > li > a.active {
    color: #fff; background: rgba(255,255,255,.08); border-bottom-color: var(--gold); text-decoration: none;
}
.caret { font-size: .7em; opacity: .8; }
.subnav {
    list-style: none; margin: 0; padding: 6px 0; position: absolute; left: 0; top: 100%;
    min-width: 230px; background: #fff; border: 1px solid var(--line); border-radius: 0 0 10px 10px;
    box-shadow: var(--shadow-lg); display: none; z-index: 50;
}
.nav-list > li.has-sub:hover > .subnav { display: block; }
.subnav a {
    display: block; padding: 11px 18px; color: var(--ink); font-size: .98rem; text-decoration: none;
}
.subnav a:hover { background: var(--gold-soft); color: var(--gold-deep); }

/* ------------------------------- Układ ----------------------------------- */
.page-layout {
    display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 40px;
    padding-top: 30px; padding-bottom: 50px; align-items: start;
}
.page-layout.full { grid-template-columns: minmax(0,1fr); max-width: 820px; }
.content { min-width: 0; }

.page-head { margin: 0 0 26px; border-bottom: 2px solid var(--gold-soft); padding-bottom: 16px; }
.page-head h1 { margin: 0 0 6px; font-size: 2.1rem; color: var(--gold-deep); }
.lead { margin: 0; color: var(--ink-soft); font-size: 1.1rem; }
.empty { padding: 30px; background: var(--paper); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--ink-soft); }

/* -------------------------- Lista Słów (blog) ---------------------------- */
.post-list { display: flex; flex-direction: column; gap: 26px; }
.post-item {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); overflow: hidden;
}
.post-item-body { padding: 24px 28px; }
.post-date {
    display: inline-block; font-family: var(--sans); font-size: .9rem; color: var(--gold-deep);
    text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px;
}
.post-item-title { margin: 2px 0 12px; font-size: 1.6rem; }
.post-item-title a { color: var(--ink); }
.post-item-title a:hover { color: var(--blue); text-decoration: none; }
.post-item-thumb { display: block; float: right; margin: 0 0 14px 22px; max-width: 240px; }
.post-item-thumb img { border-radius: 10px; box-shadow: var(--shadow); }
.post-item-excerpt { color: var(--ink-soft); }
.post-item-excerpt p { margin: 0 0 .6em; }
.read-more {
    display: inline-block; clear: both; margin-top: 10px; font-family: var(--sans); font-weight: 600;
    color: var(--gold-deep); border-bottom: 2px solid var(--gold-soft); padding-bottom: 1px;
}
.read-more:hover { color: var(--blue-deep); border-bottom-color: var(--gold); text-decoration: none; }

/* ------------------------------ Pojedyncze ------------------------------- */
.back-link { display: inline-block; font-family: var(--sans); margin-bottom: 14px; }
.single {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 34px 40px;
}
.page-banner { display: block; width: 100%; height: auto; border-radius: 10px; margin-bottom: 20px; box-shadow: var(--shadow); }
.single-head { border-bottom: 2px solid var(--gold-soft); padding-bottom: 16px; margin-bottom: 22px; }
.single-head h1 { margin: 6px 0 0; font-size: 2.2rem; color: var(--gold-deep); }
.single-cover { display: block; margin: 0 0 24px; }
.single-cover img { width: 100%; border-radius: 10px; box-shadow: var(--shadow); }

/* Treść (prose) */
.prose { font-size: 1.12rem; line-height: 1.8; color: #33302a; }
.prose p { margin: 0 0 1.1em; }
.prose h2, .prose h3 { color: var(--gold-deep); margin: 1.5em 0 .5em; }
.prose h2 { font-size: 1.6rem; } .prose h3 { font-size: 1.3rem; }
.prose a { text-decoration: underline; }
.prose img { border-radius: 8px; box-shadow: var(--shadow); height: auto; margin: 10px 0; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1.1em; }
.prose li { margin: .3em 0; }
.prose blockquote {
    margin: 1.2em 0; padding: 14px 22px; border-left: 5px solid var(--gold); background: var(--gold-soft);
    border-radius: 0 10px 10px 0; font-style: italic; color: #4a4436;
}
.prose table { border-collapse: collapse; width: 100%; margin: 1em 0; font-size: 1rem; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose iframe { max-width: 100%; border-radius: 10px; margin: 12px 0; }

.single-foot { margin-top: 30px; padding-top: 22px; border-top: 1px solid var(--line); }

/* ------------------------------- Galeria --------------------------------- */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px,1fr)); gap: 12px; margin-top: 24px; }
.gallery-item img { width: 100%; height: 130px; object-fit: cover; border-radius: 8px; box-shadow: var(--shadow); cursor: zoom-in; }

/* ------------------------------- Sidebar --------------------------------- */
.sidebar { display: flex; flex-direction: column; gap: 24px; font-family: var(--sans); }
.widget {
    background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
    box-shadow: var(--shadow); padding: 20px 22px;
}
.widget-title {
    font-family: var(--serif); font-size: 1.3rem; color: var(--gold-deep); margin: 0 0 14px;
    padding-bottom: 8px; border-bottom: 2px solid var(--gold-soft);
}
.widget-search form { display: flex; }
.widget-search input {
    font: inherit; flex: 1; min-width: 0; padding: 11px 14px; border: 1px solid var(--line);
    border-radius: 8px 0 0 8px; background: #fff;
}
.widget-search button {
    font: inherit; padding: 11px 16px; border: 1px solid var(--gold-deep); background: var(--gold);
    color: #fff; border-radius: 0 8px 8px 0; cursor: pointer; font-weight: 600;
}
.widget-gospel { background: linear-gradient(180deg,#fffdf7,#fbf4e4); }
.gospel-ref { font-family: var(--sans); font-weight: 700; color: var(--gold-deep); margin: 0 0 10px; font-size: .98rem; }
.gospel-text { font-family: var(--serif); font-size: 1.02rem; line-height: 1.65; color: #3a3428; max-height: 420px; overflow: auto; }
.gospel-source { font-family: var(--sans); font-size: .78rem; color: var(--ink-soft); margin: 12px 0 0; text-align: right; }

.widget-quote { text-align: center; background: linear-gradient(180deg,#fffdf7,var(--gold-soft)); }
.widget-mary { width: 120px; height: 120px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 4px #fff, var(--shadow); }
.widget-quote blockquote {
    font-family: var(--serif); font-style: italic; font-size: 1.05rem; color: #4a4436;
    margin: 16px 0; line-height: 1.6;
}
.widget-quote cite { display: block; font-style: normal; font-size: .9rem; color: var(--gold-deep); margin-top: 8px; font-weight: 600; }

.recent-list, .archive-list { list-style: none; margin: 0; padding: 0; }
.recent-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.recent-list li:last-child { border-bottom: 0; }
.recent-list a { font-weight: 600; font-size: 1.02rem; display: block; }
.recent-list time { font-size: .85rem; color: var(--ink-soft); }
.archive-list { columns: 2; }
.archive-list li { padding: 5px 0; }
.archive-list .count { color: var(--ink-soft); font-size: .85rem; }

/* ----------------------------- Paginacja --------------------------------- */
.pagination { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; align-items: center; margin-top: 36px; font-family: var(--sans); }
.page-num, .page-btn {
    display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 46px;
    padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--paper);
    color: var(--ink); font-weight: 600; text-decoration: none;
}
.page-num:hover, .page-btn:hover { background: var(--gold-soft); color: var(--gold-deep); text-decoration: none; }
.page-num.current { background: var(--gold); border-color: var(--gold-deep); color: #fff; }
.page-dots { padding: 0 4px; color: var(--ink-soft); }

/* --------------------------- Wyszukiwarka -------------------------------- */
.search-big { display: flex; gap: 10px; margin: 0 0 30px; flex-wrap: wrap; }
.search-big input {
    font: inherit; flex: 1; min-width: 200px; padding: 14px 18px; border: 1px solid var(--line);
    border-radius: 10px; background: #fff;
}

/* ------------------------------ Formularze ------------------------------- */
.form label { display: block; margin: 0 0 18px; font-family: var(--sans); font-weight: 600; color: var(--ink); }
.form label small { display: inline; font-weight: 400; color: var(--ink-soft); }
.form input[type=text], .form input[type=email], .form input[type=url], .form input[type=password],
.form input[type=date], .form textarea, .form select {
    display: block; width: 100%; font: inherit; font-family: var(--sans); font-size: 1.05rem;
    margin-top: 7px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.form textarea { line-height: 1.6; resize: vertical; }
.form-actions { margin-top: 20px; display: flex; gap: 12px; flex-wrap: wrap; }
.form-status { font-family: var(--sans); margin-bottom: 14px; }
.form-status.ok { color: var(--ok); font-weight: 600; }
.form-status.err { color: var(--danger); font-weight: 600; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.intencje-form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px 30px; margin-top: 24px; box-shadow: var(--shadow); }
.intencje .intro { margin-bottom: 6px; }

/* ------------------------------- Przyciski ------------------------------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer;
    font-family: var(--sans); font-size: 1.02rem; font-weight: 600; text-decoration: none;
    padding: 13px 22px; border-radius: 10px; border: 1px solid transparent; line-height: 1;
}
.btn:hover { text-decoration: none; }
.btn-big { font-size: 1.15rem; padding: 16px 28px; }
.btn-primary { background: var(--gold); color: #fff; border-color: var(--gold-deep); box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--gold-deep); color: #fff; }
.btn-soft { background: var(--gold-soft); color: var(--gold-deep); border-color: var(--gold-soft); }
.btn-soft:hover { background: #ecdcb8; color: var(--gold-deep); }
.btn-ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: #f5efe2; }
.btn-danger { background: #fff; color: var(--danger); border-color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-sm { padding: 8px 14px; font-size: .9rem; }

/* ------------------------------- Alerty ---------------------------------- */
.alert { margin: 18px 0; padding: 14px 18px; border-radius: 10px; font-family: var(--sans); font-weight: 600; }
.alert-ok { background: #e5f2e6; color: var(--ok); border: 1px solid #b7d9ba; }
.alert-err { background: #f7e4e2; color: var(--danger); border: 1px solid #e0b3ae; }

/* ------------------------------- Stopka ---------------------------------- */
.site-footer { background: var(--blue-deep); color: #e9e0cc; margin-top: 40px; font-family: var(--sans); }
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; padding: 30px 20px; }
.footer-brand strong { display: block; font-family: var(--serif); font-size: 1.4rem; color: #fff; }
.footer-brand span { font-style: italic; color: #c9bd9e; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-nav a { color: #e9e0cc; }
.footer-nav a:hover { color: #fff; }
.footer-social { display: flex; gap: 12px; }
.footer-social a { color: #e9e0cc; }
.footer-social a:hover { color: var(--gold); }
.footer-copy { text-align: center; padding: 14px; background: rgba(0,0,0,.2); font-size: .9rem; color: #c9bd9e; }

/* ------------------------------ Lightbox --------------------------------- */
.lightbox {
    position: fixed; inset: 0; background: rgba(20,16,8,.92); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
}
.lightbox[hidden] { display: none; }
.lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 8px; box-shadow: var(--shadow-lg); }
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute; background: rgba(255,255,255,.15); color: #fff; border: 0; cursor: pointer;
    font-size: 2rem; width: 56px; height: 56px; border-radius: 50%; line-height: 1;
}
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,.3); }

.error-page { text-align: center; }
.error-page h1 { color: var(--gold-deep); font-size: 2.2rem; }

/* ------------------------------ RWD -------------------------------------- */
@media (max-width: 980px) {
    .page-layout { grid-template-columns: minmax(0,1fr); }
    .sidebar { order: 2; }
}
@media (max-width: 860px) {
    body { font-size: 17px; }
    .brand-name { font-size: 1.5rem; }
    .brand-tagline { font-size: 1rem; }
    .brand-icon { width: 60px; height: 60px; }
    .header-search { display: none; }
    .nav-inner { display: block; padding: 0; }
    .nav-toggle {
        display: block; width: 100%; text-align: left; padding: 15px 20px;
        border-bottom: 1px solid rgba(255,255,255,.1);
    }
    .nav-list {
        display: none; flex-direction: column; width: 100%; background: var(--blue-deep);
        padding-bottom: 10px;
    }
    .nav-list.open { display: flex; }
    .nav-list > li > a { padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.1); }
    .subnav { position: static; display: none; box-shadow: none; border-radius: 0; background: rgba(0,0,0,.15); border: 0; }
    .subnav a { color: #e9e0cc; padding-left: 34px; }
    .subnav a:hover { background: rgba(255,255,255,.08); color: #fff; }
    .nav-list > li.has-sub.open > .subnav { display: block; }
    .single, .post-item-body { padding: 22px 20px; }
    .post-item-thumb { float: none; margin: 0 0 14px; max-width: 100%; }
    .single-head h1, .page-head h1 { font-size: 1.7rem; }
    .archive-list { columns: 3; }
}
@media (max-width: 520px) {
    .footer-inner { flex-direction: column; text-align: center; }
    .archive-list { columns: 2; }
}
