/* =========================================================
   Parafia Podwyższenia Krzyża Świętego w Pawłowicach
   Styl klasyczny sakralny — responsywny
   ========================================================= */

:root {
  --bordo: #6b1f2a;
  --bordo-dark: #4e141d;
  --gold: #b8963f;
  --gold-light: #d8bd77;
  --cream: #f7f2e7;
  --cream-2: #efe6d3;
  --paper: #fffdf8;
  --ink: #2e2a24;
  --ink-soft: #56504594;
  --muted: #6d6455;
  --line: #e3d8c0;
  --shadow: 0 6px 24px rgba(60, 40, 20, 0.12);
  --radius: 10px;
  --serif: "Georgia", "Times New Roman", "EB Garamond", serif;
  --sans: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.7;
  font-size: 17px;
}

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

a { color: var(--bordo); text-decoration: none; }
a:hover { color: var(--gold); text-decoration: underline; }

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

/* ---------- Top bar ---------- */
.topbar {
  background: var(--bordo-dark);
  color: var(--cream);
  font-size: 14px;
}
.topbar .wrap {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  align-items: center; justify-content: center;
  padding: 8px 20px;
}
.topbar a { color: var(--gold-light); }
.topbar span { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Header ---------- */
.site-header {
  background:
    linear-gradient(rgba(75, 18, 26, 0.86), rgba(75, 18, 26, 0.88)),
    url("../grafika/kosciol2.jpg") center/cover no-repeat;
  color: var(--cream);
  border-bottom: 4px solid var(--gold);
}
.header-inner {
  max-width: 1140px; margin: 0 auto;
  display: flex; align-items: center; gap: 18px;
  padding: 22px 20px;
}
.header-brand { display: flex; align-items: center; gap: 18px; text-decoration: none; }
.header-brand:hover { text-decoration: none; }
.header-emblem {
  width: 66px; height: 66px; flex: 0 0 auto;
  display: grid; place-items: center;
}
.header-emblem svg { width: 100%; height: 100%; display: block;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
.header-titles h1 { margin: 0; color: #fff; font-size: 1.65rem; letter-spacing: .3px; }
.header-titles p { margin: 4px 0 0; color: var(--gold-light); font-size: .95rem; font-style: italic; }

/* ---------- Navigation ---------- */
.mainnav { background: var(--bordo); border-bottom: 3px solid var(--gold-light); position: sticky; top: 0; z-index: 50; }
.nav-inner { max-width: 1140px; margin: 0 auto; display: flex; align-items: center; }
.nav-toggle {
  display: none; background: none; border: none; color: var(--cream);
  font-size: 1.6rem; padding: 12px 18px; cursor: pointer;
}
.nav-links { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; width: 100%; }
.nav-links li { flex: 1 1 auto; text-align: center; }
.nav-links a {
  display: block; color: var(--cream); padding: 13px 12px;
  font-size: .95rem; font-weight: 600; letter-spacing: .2px;
  border-right: 1px solid rgba(255,255,255,.12);
  transition: background .18s, color .18s;
}
.nav-links a:hover, .nav-links a.active { background: var(--gold); color: var(--bordo-dark); text-decoration: none; }

/* ---------- Hero (homepage) — kościół wyeksponowany ---------- */
.hero {
  position: relative;
  background: url("../grafika/kosciol.jpg") 88% 15%/cover no-repeat;
  min-height: 74vh;
  display: flex; align-items: flex-end;
}
/* delikatny scrim tylko u dołu, aby zdjęcie kościoła było dobrze widoczne */
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(40,10,15,.60) 0%, rgba(40,10,15,.10) 42%, rgba(40,10,15,0) 70%);
}
.hero-caption {
  position: relative; z-index: 2;
  max-width: 1140px; width: 100%; margin: 0 auto; padding: 0 26px 48px;
}
.hero-panel {
  background: rgba(78,20,29,.70);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(216,189,119,.35);
  border-left: 5px solid var(--gold);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 16px 34px rgba(0,0,0,.28);
  border-radius: 12px; padding: 26px 30px; max-width: 560px; color: #fff;
}
.hero-panel .cross { color: var(--gold-light); font-size: 1.7rem; line-height: 1; }
.hero-panel h2 { color: #fff; font-size: 2.1rem; margin: 8px 0 10px; }
.hero-panel p { font-size: 1.08rem; margin: 0; color: #f4e9d6; }

/* ---------- Sekcja powitalna: zdjęcie + porządek Mszy ---------- */
.welcome { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 60vh; }
.welcome-photo {
  background: url("../grafika/kosciol.jpg") 88% 15%/cover no-repeat;
  min-height: 340px;
}
.welcome-info {
  background: var(--bordo-dark); color: #fff;
  padding: 46px 52px; display: flex; flex-direction: column; justify-content: center;
  border-top: 4px solid var(--gold);
}
.welcome-info .cross { color: var(--gold-light); font-size: 1.7rem; line-height: 1; }
.welcome-info h2 { color: #fff; font-size: 1.9rem; margin: 8px 0 6px; }
.welcome-info h3 { color: var(--gold-light); font-size: 1.2rem; margin: 26px 0 10px; }
.mass-row { display: grid; grid-template-columns: 150px 1fr; gap: 6px 16px; padding: 9px 0; border-bottom: 1px solid rgba(216,189,119,.25); }
.mass-row:last-of-type { border-bottom: none; }
.mass-row .d { color: var(--gold-light); font-weight: 700; }
.mass-row .h { color: #f4e9d6; }
.mass-row .h a { color: var(--gold-light); text-decoration: underline; }
.mass-row .h a:hover { color: #fff; }
.welcome-info .note { font-size: .92rem; color: #e7d5b8; font-style: italic; margin: 6px 0 0; }
.welcome-info p { color: #f4e9d6; margin: 4px 0 0; }

/* ---------- Sekcja aktualności na stronie głównej ---------- */
.news-section { background: #fdfbf6; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.news-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin: 0 0 8px; }
.news-head h2 { font-size: 1.9rem; margin: 0; }
.news-head a {
  font-weight: 600; white-space: nowrap;
  display: inline-block; padding: 10px 22px; border-radius: 999px;
  background: var(--bordo); color: var(--gold-light);
  border: 1px solid var(--gold);
  transition: background .18s ease, color .18s ease;
}
.news-head a:hover { background: var(--gold); color: var(--bordo-dark); text-decoration: none; }
.news-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; align-items: start; }
.news-card {
  background: #ffffff; border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 24px 26px;
  display: flex; gap: 16px; align-items: flex-start;
}
.news-ico {
  flex: 0 0 auto; width: 48px; height: 48px; border-radius: 50%;
  background: var(--cream); border: 1px solid var(--gold); color: var(--bordo);
  display: flex; align-items: center; justify-content: center;
}
.news-ico svg { width: 27px; height: 27px; }
.news-ico { display: none; }
.news-body { min-width: 0; }
.news-card h3 { font-size: 1.2rem; margin: 8px 0 10px; color: var(--bordo-dark); }
.news-card p { margin: 0; font-size: .96rem; color: var(--muted); }
.news-photo { margin: 0 0 12px; }
.news-photo img { width: 100%; max-height: 320px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); display: block; }
.news-photo figcaption { margin-top: 6px; font-size: .82rem; font-style: italic; color: var(--muted); text-align: right; }
.news-photo-sm img { max-width: 240px; max-height: 170px; }
.news-photo-sm figcaption { text-align: left; }
.news-card.feature { grid-column: 1 / -1; border-top-width: 4px; border-left: 5px solid var(--gold); }
.news-card.feature .news-ico { width: 56px; height: 56px; }
.news-card.feature .news-ico svg { width: 32px; height: 32px; }
.news-card.feature h3 { font-size: 1.5rem; }
.news-card.feature p { font-size: 1.02rem; color: var(--ink); }
.date-tag {
  display: inline-block; font-size: .78rem; font-weight: 700; letter-spacing: .4px;
  text-transform: uppercase; color: var(--gold); }

/* ---------- Layout ---------- */
.container { max-width: 1140px; margin: 0 auto; padding: 42px 22px; }
.page-title {
  text-align: center; margin: 0 0 6px; font-size: 2rem; position: relative;
}
.page-title-sub { text-align: center; color: var(--muted); margin: 0 0 34px; font-style: italic; }
.rule { width: 90px; height: 3px; background: var(--gold); border: none; margin: 12px auto 30px; }

.grid { display: grid; gap: 26px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- Cards ---------- */
.card {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  overflow: hidden; display: flex; flex-direction: column;
}
.card .card-body { padding: 22px 24px; }
.card h3 { margin: 0 0 10px; font-size: 1.25rem; }
.card h3 .cross { color: var(--gold); margin-right: 8px; }
.card p:last-child { margin-bottom: 0; }
.card img.card-top { width: 100%; height: 190px; object-fit: cover; }
.card-link {
  display: inline-block; margin-top: 14px; font-weight: 600;
  color: var(--bordo); border-bottom: 2px solid var(--gold); padding-bottom: 2px;
}
.card-link:hover { text-decoration: none; color: var(--gold); }

/* ---------- Content article block ---------- */
.article {
  background: var(--paper); border: 1px solid var(--line);
  border-left: 5px solid var(--gold); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 30px 34px; margin-bottom: 26px;
}
.article h2 { margin-top: 0; font-size: 1.5rem; }
.article h3 { color: var(--bordo); font-size: 1.15rem; margin: 22px 0 8px; }
.article .date-badge {
  display: inline-block; background: var(--bordo); color: #fff;
  font-size: .85rem; font-weight: 600; padding: 4px 14px; border-radius: 20px; margin-bottom: 14px;
}
.article ul { padding-left: 22px; }
.article li { margin-bottom: 6px; }
.article .quote {
  font-style: italic; color: var(--muted); border-left: 3px solid var(--gold-light);
  padding-left: 16px; margin: 16px 0;
}

/* sekcje Informatora */
.sec-head { text-align: center; font-size: 1.7rem; margin: 0 0 4px; }
.sec-hint { text-align: center; color: var(--muted); font-style: italic; margin: 0 0 22px; font-size: .95rem; }

/* rozwijane ogłoszenia (accordion) */
.ogl {
  background: var(--paper); border: 1px solid var(--line);
  border-left: 5px solid var(--gold); border-radius: var(--radius);
  box-shadow: var(--shadow); margin-bottom: 16px; overflow: hidden;
}
.ogl > summary {
  list-style: none; cursor: pointer; padding: 18px 24px;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  font-family: var(--serif); user-select: none;
}
.ogl > summary::-webkit-details-marker { display: none; }
.ogl > summary::after {
  content: "\203A"; margin-left: auto; font-size: 1.6rem; color: var(--gold);
  transform: rotate(90deg); transition: transform .2s;
}
.ogl[open] > summary::after { transform: rotate(-90deg); }
.ogl > summary:hover { background: var(--cream-2); }
.ogl-date {
  display: inline-block; background: var(--bordo); color: #fff;
  font-size: .85rem; font-weight: 700; padding: 5px 14px; border-radius: 20px;
}
.ogl-sub { font-size: 1.15rem; font-weight: 700; color: var(--bordo-dark); }
.ogl-body { padding: 2px 26px 22px; border-top: 1px solid var(--line); }
.ogl-body h3 { color: var(--bordo); font-size: 1.1rem; margin: 20px 0 8px; }
.ogl-body p { margin: 12px 0; }
.ogl-body ul { padding-left: 22px; }

/* porządek nabożeństw - lista Mszy w danym dniu */
.mass-day { list-style: none; padding: 0; margin: 0 0 10px; }
.mass-day li { padding: 7px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: baseline; }
.mass-day li:last-child { border-bottom: none; }
.mass-day .mt { font-weight: 700; color: var(--bordo); white-space: nowrap; }
.mass-day li.mass-note { grid-template-columns: 1fr; font-weight: 700; color: var(--gold); text-transform: uppercase; font-size: .82rem; letter-spacing: .5px; border-bottom: none; }
.article h3.day { background: var(--cream-2); border-left: 4px solid var(--gold); padding: 8px 12px; border-radius: 6px; }

/* duszpasterze */
.priest-lead { display: grid; grid-template-columns: 150px 1fr; gap: 24px; align-items: start; margin-bottom: 8px; }
.priest-portrait { width: 150px; height: 190px; object-fit: cover; border-radius: var(--radius); border: 3px solid var(--gold); box-shadow: var(--shadow); }
.priest-lead h3 { margin-top: 0; }
.two-col { columns: 2; column-gap: 34px; padding-left: 20px; }
.two-col li { break-inside: avoid; margin-bottom: 6px; }
@media (max-width: 680px) {
  .priest-lead { grid-template-columns: 1fr; justify-items: center; text-align: left; }
  .priest-lead > div { width: 100%; }
  .two-col { columns: 1; }
}

/* mapa dekanatu */
.map-figure { margin: 22px 0 0; text-align: center; }
.map-figure img { display: inline-block; max-width: 100%; width: 553px; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.map-figure figcaption { margin-top: 8px; font-style: italic; color: var(--muted); font-size: .92rem; }

/* info box */
.infobox {
  background: var(--cream-2); border: 1px dashed var(--gold);
  border-radius: var(--radius); padding: 18px 22px; margin: 18px 0;
}
.infobox strong { color: var(--bordo-dark); }

/* hours table */
.hours { width: 100%; border-collapse: collapse; margin: 12px 0; }
.hours td { padding: 9px 12px; border-bottom: 1px solid var(--line); }
.hours td:first-child { font-weight: 600; color: var(--bordo-dark); width: 45%; }
.hours tr.closed td { color: #a2452f; }

/* schedule list */
.sched { list-style: none; padding: 0; margin: 0; }
.sched li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; }
.sched li .t { flex: 0 0 78px; font-weight: 700; color: var(--bordo); }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.gallery img { border-radius: var(--radius); height: 200px; width: 100%; object-fit: cover; box-shadow: var(--shadow); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bordo-dark); color: var(--cream); margin-top: 40px; }
.footer-inner {
  max-width: 1140px; margin: 0 auto; padding: 38px 22px 20px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px;
}
.site-footer h4 { color: var(--gold-light); margin: 0 0 12px; font-size: 1.1rem; }
.site-footer a { color: var(--cream); }
.site-footer a:hover { color: var(--gold-light); }
.site-footer p { margin: 4px 0; font-size: .95rem; color: #e9dfca; }
.footer-nav { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 20px; }
.footer-nav li { margin: 4px 0; font-size: .95rem; break-inside: avoid; }
.visit-counter { line-height: 0; margin: -14px 0 0; }
.visit-counter iframe { border: 0 none; width: 126px; height: 60px; display: block; overflow: hidden; background: transparent; transform: scale(1.3); transform-origin: left top; margin: 0 0 20px; }
.visit-counter img { display: block; height: 72px; width: auto; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.15); text-align: center;
  padding: 16px; font-size: .85rem; color: #cbb9a0;
}
.footer-bottom .cross { color: var(--gold); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .news-cards { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
  body { font-size: 16px; }
  .header-titles h1 { font-size: 1.3rem; }
  .header-emblem { width: 52px; height: 52px; }
  .nav-toggle { display: block; margin-left: auto; }
  .hero-panel h2 { font-size: 1.55rem; }
  .hero-caption { padding: 0 16px 32px; }
  .welcome { grid-template-columns: 1fr; }
  .welcome-photo { min-height: 240px; }
  .welcome-info { padding: 30px 22px; }
  .mass-row { grid-template-columns: 130px 1fr; }
  .nav-links {
    display: none; flex-direction: column; background: var(--bordo-dark);
  }
  .nav-links.open { display: flex; }
  .nav-links li { flex: 1 1 100%; text-align: left; }
  .nav-links a { border-right: none; border-bottom: 1px solid rgba(255,255,255,.12); padding: 14px 20px; }
  .hero { min-height: 46vh; }
  .hero-caption h2 { font-size: 1.6rem; }
  .grid.cols-2, .grid.cols-3 { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .article { padding: 22px 20px; }
  .container { padding: 30px 16px; }
}

/* ===== Galeria poświęcenia (mini galeria + lightbox) ===== */
.pgal { margin: 6px 0 10px; }
.pgal-credit { text-align: center; color: var(--muted); font-style: italic; font-size: .95rem; margin: 0 0 16px; }
.pgal-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.pgal-item {
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  cursor: pointer;
  background: var(--cream);
  aspect-ratio: 4 / 3;
}
.pgal-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease, filter .35s ease;
}
.pgal-item:hover img { transform: scale(1.06); filter: brightness(1.04); }
.pgal-caption {
  text-align: center;
  font-style: italic;
  color: var(--muted);
  font-size: .95rem;
  margin: 14px 0 0;
}

/* Lightbox */
.pgal-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(30, 18, 20, 0.92);
  padding: 24px;
}
.pgal-lightbox.open { display: flex; }
.pgal-lightbox figure {
  margin: 0;
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pgal-lightbox img {
  max-width: 92vw;
  max-height: 82vh;
  border: 3px solid var(--gold-light);
  border-radius: 6px;
  box-shadow: 0 10px 40px rgba(0,0,0,.5);
  object-fit: contain;
  background: #000;
}
.pgal-lightbox figcaption {
  color: var(--gold-light);
  font-style: italic;
  margin-top: 12px;
  font-size: .95rem;
  text-align: center;
}
.pgal-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(107, 31, 42, .85);
  color: var(--gold-light);
  border: 1px solid var(--gold);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
  transition: background .2s ease;
}
.pgal-btn:hover { background: var(--gold); color: var(--bordo-dark); }
.pgal-prev { left: 18px; }
.pgal-next { right: 18px; }
.pgal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(107, 31, 42, .85);
  color: var(--gold-light);
  border: 1px solid var(--gold);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .2s ease;
}
.pgal-close:hover { background: var(--gold); color: var(--bordo-dark); }
.pgal-counter {
  position: absolute;
  top: 20px;
  left: 22px;
  color: var(--gold-light);
  font-size: .95rem;
  letter-spacing: .04em;
}

@media (max-width: 1000px) {
  .pgal-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ===== Intencje mszalne na dziś ===== */
.today-intentions { padding: 10px 0 4px; }
.ti-card {
  background: var(--cream);
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: 6px;
  padding: 22px 26px 20px;
  box-shadow: 0 4px 14px rgba(78,20,29,.06);
}
.ti-head { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.ti-ico { color: var(--gold); font-size: 1.5rem; line-height: 1; }
.ti-head h2 { margin: 0; font-size: 1.6rem; color: var(--bordo-dark); }
.ti-day {
  color: var(--bordo); font-size: 1.12rem; margin: 10px 0 12px;
  padding-bottom: 8px; border-bottom: 2px solid var(--gold-light);
}
.ti-body .mass-day { margin-bottom: 6px; }
.ti-more { margin: 12px 0 0; font-size: .95rem; }
.ti-empty { margin: 8px 0 2px; color: #5c4a3a; font-style: italic; }
@media (max-width: 640px) {
  .pgal-grid { grid-template-columns: repeat(3, 1fr); gap: 7px; }
  .pgal-btn { width: 42px; height: 42px; font-size: 1.4rem; }
  .pgal-prev { left: 8px; }
  .pgal-next { right: 8px; }
}
