/* ===========================================================
   Parafia MBŁ Zgorzelec — delikatny, sakralny styl
   =========================================================== */
:root {
  --cream:      #faf6ef;   /* tło */
  --cream-2:    #f3ece0;   /* karty / sekcje */
  --ink:        #322a24;   /* tekst */
  --ink-soft:   #5d5249;   /* tekst drugorzędny */
  --burgundy:   #6b2737;   /* akcent główny (bordo) */
  --burgundy-d: #531d2b;
  --gold:       #b08d57;   /* akcent złoty */
  --gold-soft:  #d9c39a;
  --line:       #e3d8c6;
  --max:        1080px;
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --sans:  "Lato", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  font-weight: 400;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  font-size: 17px;
  overflow-wrap: break-word;
  word-break: break-word;
}
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.25; color: var(--burgundy); }
a { color: var(--burgundy); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; border-radius: 3px; }

/* ---------- Nagłówek / menu ---------- */
.site-header {
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(176,141,87,.25);
  position: sticky; top: 0; z-index: 50;
}
.header-inner {
  max-width: var(--max); margin: 0 auto; padding: .55rem 1.25rem;
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: .7rem; }
.brand:hover { text-decoration: none; }
.brand-cross { color: var(--gold); font-size: 1.6rem; line-height: 1; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-family: var(--serif); font-size: 1.32rem; font-weight: 600; color: var(--burgundy); line-height: 1.1; }
.brand-city { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }

.site-nav { margin-left: auto; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .15rem; }
.site-nav a {
  display: block; padding: .35rem .6rem; font-size: .9rem; color: var(--ink-soft);
  border-radius: 3px; transition: color .15s, background .15s;
}
.site-nav a:hover { color: var(--burgundy); background: var(--cream-2); text-decoration: none; }
.site-nav a.active { color: var(--burgundy); font-weight: 700; }
.site-nav a.active::after { content: ""; display: block; height: 2px; background: var(--gold); margin-top: 2px; border-radius: 2px; }

.nav-toggle-label { display: none; cursor: pointer; flex-direction: column; gap: 5px; padding: .4rem; margin-left: auto; }
.nav-toggle-label span { width: 26px; height: 2px; background: var(--burgundy); border-radius: 2px; }

/* ---------- Hero (strona główna) ---------- */
.hero {
  background: linear-gradient(180deg, var(--burgundy), var(--burgundy-d));
  color: #f7eede; text-align: center; padding: 3.2rem 1.25rem 3rem;
  border-bottom: 3px solid var(--gold);
}
.hero-inner { max-width: var(--max); margin: 0 auto; }
.hero-eyebrow { letter-spacing: .28em; text-transform: uppercase; font-size: .78rem; color: var(--gold-soft); margin: 0 0 .6rem; }
.hero h1 { color: #fff; font-size: 2.6rem; margin: 0; }
.hero h1 span { color: var(--gold-soft); font-style: italic; font-weight: 500; }
.hero-sub { font-family: var(--serif); font-style: italic; font-size: 1.2rem; color: #e9dcc4; margin: 1rem 0 0; }

/* ---------- Układ główny ---------- */
.site-main { min-height: 50vh; }
.page { max-width: 820px; margin: 0 auto; padding: 2.4rem 1.25rem 3rem; }
.page-header { border-bottom: 1px solid var(--line); margin-bottom: 1.6rem; padding-bottom: .6rem; }
.page-header h1 { font-size: 2.1rem; margin: 0; }
.page-header h1::before { content: "✦"; color: var(--gold); font-size: 1rem; vertical-align: middle; margin-right: .5rem; }

/* ---------- Treść (prose) ---------- */
.prose { font-size: 1.05rem; }
.prose p { margin: 0 0 1.05rem; }
.prose h2 { font-size: 1.5rem; margin: 2rem 0 .8rem; }
.prose h3 { font-size: 1.2rem; margin: 1.5rem 0 .6rem; color: var(--ink); }
.prose ul, .prose ol { margin: 0 0 1.1rem; padding-left: 1.4rem; }
.prose li { margin: .35rem 0; }
.prose ol { list-style: decimal; }
.prose ol ul { list-style: "·  "; margin-top: .4rem; }
.prose a { text-decoration: underline; text-decoration-color: var(--gold-soft); }
.prose img { display: block; max-width: min(100%, 560px); height: auto; margin: 1.2rem auto; box-shadow: 0 2px 10px rgba(50,42,36,.15); }
.prose hr { border: none; border-top: 1px solid var(--line); margin: 2rem 0; }
.prose blockquote { border-left: 3px solid var(--gold); margin: 1.2rem 0; padding: .2rem 1rem; color: var(--ink-soft); font-style: italic; }

/* Akapity będące zdjęciem — wyśrodkuj podpis/obraz */
.prose p:has(> img) { text-align: center; margin: 1.2rem 0; }

/* ---------- Strona główna: grid ---------- */
.home-grid { max-width: var(--max); margin: 0 auto; padding: 2.5rem 1.25rem 3rem; display: grid; grid-template-columns: 1.6fr 1fr; gap: 2.5rem; }
.home-main img { max-width: min(100%, 300px); }
.home-aside { display: flex; flex-direction: column; gap: 1.2rem; }
.card { background: var(--cream-2); border: 1px solid var(--line); border-radius: 6px; padding: 1.2rem 1.3rem; }
.card h2 { font-size: 1.18rem; margin: 0 0 .6rem; }
.card p { margin: 0 0 .6rem; font-size: .96rem; }
.card-accent { background: #fff; border-top: 3px solid var(--gold); }
.card-date { color: var(--gold); font-style: italic; font-family: var(--serif); }
.card-excerpt { max-height: 14rem; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, #000 65%, transparent); mask-image: linear-gradient(180deg, #000 65%, transparent); font-size: .92rem; }
.card-excerpt ol { padding-left: 1.2rem; }
.card-link { display: inline-block; margin-top: .4rem; font-weight: 700; font-size: .92rem; }

/* ---------- Ogłoszenia / Intencje ---------- */
.weekly-latest { max-width: 820px; margin: 0 auto; }
.weekly-date { font-family: var(--serif); font-style: italic; font-size: 1.15rem; color: var(--gold); text-align: center; margin: 0 0 1.4rem; }

.church-tabs .tab-labels { display: flex; gap: .4rem; justify-content: center; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.church-tabs .tab-labels label {
  cursor: pointer; padding: .5rem 1.4rem; font-family: var(--serif); font-size: 1.1rem; color: var(--ink-soft);
  border: 1px solid transparent; border-bottom: none; border-radius: 6px 6px 0 0; position: relative; top: 1px;
}
.church-tabs .tab-panel { display: none; }
#tab-zg:checked ~ .tab-panel.panel-zg { display: block; }
#tab-ty:checked ~ .tab-panel.panel-ty { display: block; }
#tab-zg:checked ~ .tab-labels label[for="tab-zg"],
#tab-ty:checked ~ .tab-labels label[for="tab-ty"] {
  color: var(--burgundy); font-weight: 600; background: var(--cream); border-color: var(--line); border-bottom: 1px solid var(--cream);
}

.weekly-archive { max-width: 820px; margin: 3rem auto 0; border-top: 1px solid var(--line); padding-top: 1.5rem; }
.weekly-archive h2 { font-size: 1.4rem; }
.archive-list { list-style: none; padding: 0; margin: 0; }
.archive-list > li { padding: .7rem 0; border-bottom: 1px dotted var(--line); font-family: var(--serif); font-size: 1.05rem; }
.archive-date { color: var(--burgundy); font-weight: 600; }
.archive-list details { margin-top: .5rem; }
.archive-list summary { cursor: pointer; font-family: var(--sans); font-size: .85rem; color: var(--gold); }
.archive-bodies { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 1rem; font-size: .92rem; }

/* ---------- Stopka ---------- */
.site-footer { background: var(--burgundy-d); color: #e9dcc4; margin-top: 3rem; }
.footer-inner { max-width: var(--max); margin: 0 auto; padding: 2.4rem 1.25rem 1.5rem; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.8rem; }
.footer-col h3 { color: var(--gold-soft); font-size: 1.05rem; margin: 0 0 .6rem; }
.footer-col p { margin: 0 0 .4rem; font-size: .92rem; color: #d8c9ad; }
.footer-bottom { border-top: 1px solid rgba(217,195,154,.2); text-align: center; padding: 1rem; font-size: .82rem; color: #b7a888; }

/* ---------- Responsywność ---------- */
@media (max-width: 860px) {
  .home-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  .archive-bodies { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav-toggle-label { display: flex; }
  .brand-name { font-size: 1.1rem; }
  .site-nav { flex-basis: 100%; margin-left: 0; max-height: 0; overflow: hidden; transition: max-height .25s ease; }
  /* otwarte menu: przewijalne i ograniczone do wysokości ekranu (minus pasek nagłówka) */
  .nav-toggle:checked ~ .site-nav { max-height: calc(100dvh - 60px); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
  .site-nav ul { flex-direction: column; gap: 0; padding: .4rem 0; }
  .site-nav a { padding: .8rem .5rem; font-size: 1rem; border-bottom: 1px solid var(--line); }
  .site-nav a.active::after { display: none; }
  .hero h1 { font-size: 2rem; }
  .footer-inner { grid-template-columns: 1fr; }
}
