:root{
  --bg:#fbfaf7;
  --text:#1f2328;
  --muted:#5b6672;
  /* Bardziej żywa wersja kolorystyczna: więcej burgundu jako akcentu */
  --brand:#7a1f2b;
  --brand2:#244a66;
  --accent-burgundy:#7a1f2b;
  /* Kardynalska czerwień (mocny akcent, ale wciąż elegancki) */
  --accent-cardinal:#C8102E;
  --accent: var(--accent-burgundy);
  --card:#ffffff;
  --line:rgba(31,35,40,.10);
  --shadow:0 14px 40px rgba(0,0,0,.10);
  --radius:18px;

  --brand-blue:#0a5ea8;
  --brand-gold:#c8a13a;
}

html, body{scroll-behavior:smooth;}
body{background:var(--bg); color:var(--text);} 

/* Linki: delikatny burgund na hover, spójnie z resztą */
a{color:var(--brand2);} 
a:hover{color:var(--accent-burgundy);} 

::selection{background:rgba(122,31,43,.18);} 

/* Header */
.u-header{box-shadow:0 8px 26px rgba(0,0,0,.08);} 
.u-header .u-nav-container .u-nav-link{border-radius:999px;}

/* Sections */
.lp-section{padding:72px 0;}
.lp-section--tight{padding:48px 0;}
.lp-section--alt{background:rgba(122,31,43,.06);} 

.lp-container{max-width:1140px; margin:0 auto; padding:0 18px;}

/* Hero */
.lp-hero{padding:64px 0 56px; position:relative;}
.lp-hero::before{
  content:"";
  position:absolute;
  inset:0;
  background:radial-gradient(900px 350px at 20% 10%, rgba(36,74,102,.16), transparent 60%),
             radial-gradient(800px 320px at 85% 15%, rgba(122,31,43,.18), transparent 60%);
  pointer-events:none;
}

.lp-hero-grid{display:grid; grid-template-columns: 1.05fr .95fr; gap:28px; align-items:center; position:relative; z-index:1;}

@media (max-width: 991px){
  .lp-hero-grid{grid-template-columns:1fr;}
}

.lp-kicker{letter-spacing:.12em; text-transform:uppercase; font-weight:700; font-size:12px; color:var(--muted);}
.lp-title{font-family: Georgia, 'Times New Roman', serif; font-weight:700; font-size:44px; line-height:1.08; margin:10px 0 12px;}
@media (max-width: 575px){
  .lp-title{font-size:34px;}
}
.lp-sub{font-size:18px; color:var(--muted); line-height:1.55; max-width:54ch;}

.lp-badges{display:flex; gap:14px; flex-wrap:wrap; margin-top:18px;}
.lp-badge{
  display:inline-flex; align-items:center; gap:10px;
  padding:10px 14px;
  border:1px solid var(--line);
  background:rgba(255,255,255,.75);
  border-radius:999px;
  backdrop-filter: blur(6px);
}
.lp-badge img{width:28px; height:28px; object-fit:contain;}

.lp-cta{display:flex; gap:12px; flex-wrap:wrap; margin-top:22px;}
.lp-btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 18px;
  border-radius:12px;
  font-weight:700;
  text-decoration:none;
}
.lp-btn--primary{background:var(--brand); color:#fff; box-shadow:0 10px 22px rgba(122,31,43,.28);} 
.lp-btn--primary:hover{filter:brightness(1.04);} 
.lp-btn--ghost{border:1px solid var(--line); color:var(--text); background:#fff;} 
.lp-btn--ghost:hover{background:rgba(255,255,255,.85);} 

.lp-hero-card{
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:var(--shadow);
  border:1px solid var(--line);
  background:#fff;
}
.lp-hero-card img{width:100%; height:auto; display:block;}

/* Feature cards */
.lp-cards{display:grid; grid-template-columns:repeat(3, 1fr); gap:18px; margin-top:26px;}
@media (max-width: 991px){
  .lp-cards{grid-template-columns:1fr;}
}
.lp-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:0 10px 24px rgba(0,0,0,.06);
  padding:22px;
}
.lp-card h3{margin:6px 0 8px; font-size:20px;}
.lp-card p{margin:0; color:var(--muted); line-height:1.55;}
.lp-card a{display:inline-flex; margin-top:14px; color:var(--brand2); font-weight:700; text-decoration:none;}
.lp-card a:hover{text-decoration:underline;}

/* Split section */
.lp-split{display:grid; grid-template-columns:1fr 1fr; gap:24px; align-items:center;}
@media (max-width: 991px){
  .lp-split{grid-template-columns:1fr;}
}
.lp-panel{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:0 12px 30px rgba(0,0,0,.07);
  padding:26px;
}
.lp-panel h2{font-family: Georgia, 'Times New Roman', serif; margin:0 0 10px; font-size:30px;}
.lp-panel p{margin:0; color:var(--muted); line-height:1.6;}

/* News */
.lp-section-title{font-family: Georgia, 'Times New Roman', serif; font-size:30px; margin:0; text-align:center;}
.lp-section-sub{color:var(--accent-burgundy); text-align:center; max-width:70ch; margin:10px auto 0; line-height:1.6;}

.lp-news{display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin-top:26px;}
@media (max-width: 991px){
  .lp-news{grid-template-columns:1fr;}
}
.lp-news-item{background:#fff; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; box-shadow:0 10px 24px rgba(0,0,0,.06);} 
.lp-news-item img{width:100%; height:180px; object-fit:cover; display:block;} 
.lp-news-body{padding:16px 18px 18px;} 
.lp-news-body h3{margin:0 0 8px; font-size:18px;} 
.lp-news-body p{margin:0; color:var(--muted); line-height:1.55;} 

/* CTA strip */
.lp-strip{background:linear-gradient(135deg, rgba(36,74,102,.12), rgba(122,31,43,.12)); border-top:1px solid var(--line); border-bottom:1px solid var(--line);} 
.lp-strip-inner{display:flex; gap:18px; align-items:center; justify-content:space-between; flex-wrap:wrap;}
.lp-strip-inner h2{margin:0; font-family: Georgia, 'Times New Roman', serif; font-size:26px;}
.lp-strip-inner p{margin:6px 0 0; color:var(--muted);} 

/* Footer: remove Nicepage backlink section if present */
.u-backlink{display:none !important;}


/* --- Lex: global topbar with logo + diocese crest --- */
.lex-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 18px;
  background: rgba(255,255,255,0.86);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 0;
  position:relative;
}
.lex-topbar:after{
  content:"";
  position:absolute;
  left:0; right:0; bottom:0;
  height:3px;
  background: linear-gradient(90deg, var(--accent-burgundy), var(--brand-gold), var(--accent-burgundy));
  opacity:.65;
}
.lex-brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width: 0;
}
.lex-logo{
  width:56px;
  height:56px;
  object-fit:contain;
}
.lex-crest{
  width:72px;
  height:72px;
  object-fit:contain;
}
.lex-brandtext{
  min-width:0;
}
.lex-title{font-weight:800; font-size:28px; color:var(--brand-blue) !important; letter-spacing:.2px;}
.lex-subtitle{font-weight:700; font-size: 36px; color:var(--accent-cardinal); margin-top:6px;}

/* Make sure header content sits below the topbar nicely */
.u-header{
  padding-top: 0 !important;
}

/* Mobile layout */
@media (max-width: 767px){
  .lex-topbar{
    flex-direction:column;
    align-items:flex-start;
  }
  .lex-crest{
    width:64px;
    height:64px;
    align-self:flex-end;
  }
  .lex-title{font-weight:800; font-size:28px; color:var(--brand-blue) !important; letter-spacing:.2px;}
}


/* ===== Lex v3: prostsza, czytelniejsza strona główna ===== */
.lex-topbar{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:18px;
  padding:14px 16px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,255,255,.82));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0,0,0,.06);
}
.lex-brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width: 0;
}
.lex-logo{width:150px;height:auto;display:block;}
.lex-crest{width:150px;height:auto;display:block;}
.lex-brandtext{line-height:1.15; text-align:center;}
.lex-title{font-weight:800; font-size:28px; color:var(--brand-blue) !important; letter-spacing:.2px;}
.lex-subtitle{font-weight:700; font-size: 36px; color:var(--accent-cardinal); margin-top:6px;}

@media (max-width: 767px){
  .lex-topbar{flex-direction:column; gap:10px; padding:12px 14px;}
  .lex-logo,.lex-crest{width:130px;}
  .lex-title{font-weight:800; font-size:28px; color:var(--brand-blue) !important; letter-spacing:.2px;}
}

/* Home */
.lex-main{background:var(--bg);}
.lex-container{max-width:1100px; margin:0 auto; padding:0 16px;}
.lex-hero{padding:34px 0 10px;}
.lex-hero__inner{max-width:1100px; margin:0 auto; padding:0 16px; display:grid; grid-template-columns: 1.1fr .9fr; gap:22px; align-items:center;}
.lex-h1{font-size:51px; line-height:1.08; margin:0 0 10px; color:var(--brand-blue);} 
.lex-lead{margin:0 0 10px; font-size:27px; color:var(--accent-cardinal); font-weight:700;}
.lex-lead2{margin:0 0 18px; font-size:16px; color:var(--muted);}
.lex-cta{display:flex; gap:10px; flex-wrap:wrap;}
.lex-btn{display:inline-block; padding:11px 16px; border-radius:12px; background:var(--accent); color:#fff; text-decoration:none; font-weight:700; box-shadow: 0 8px 20px rgba(0,0,0,.10);}
.lex-btn:hover{filter:brightness(.98);}
.lex-btn--ghost{background:transparent; color:var(--accent); border:2px solid rgba(0,0,0,.12); box-shadow:none;}
.lex-hero__img{width:100%; height:420px; object-fit:cover; object-position:center 18%; border-radius:18px; box-shadow: 0 14px 34px rgba(0,0,0,.14); display:block;}

@media (max-width: 991px){
  .lex-hero__inner{grid-template-columns:1fr; }
  .lex-h1{font-size:45px;}
  .lex-hero__img{height:360px;}
}

 (max-width: 575px){
  .lex-hero__img{height:300px;}
}

.lex-links{padding:18px 0 46px;}
.lex-cards{display:grid; grid-template-columns: repeat(3, 1fr); gap:14px;}
.lex-card{display:block; padding:16px 16px; border-radius:16px; background:#fff; border:1px solid rgba(0,0,0,.06); box-shadow: 0 10px 26px rgba(0,0,0,.06); text-decoration:none;}
.lex-card:hover{transform:translateY(-1px); box-shadow: 0 14px 32px rgba(0,0,0,.10);}
.lex-card__title{font-weight:800; color:var(--text); letter-spacing:.2px;}
.lex-card__desc{margin-top:6px; color:var(--muted); font-size:14px;}
.lex-card--accent{border-color: rgba(0,0,0,.10); background: linear-gradient(180deg, #ffffff, rgba(255,255,255,.85));}
@media (max-width: 991px){
  .lex-cards{grid-template-columns: repeat(2, 1fr);}
}
@media (max-width: 575px){
  .lex-cards{grid-template-columns: 1fr;}
}

/* Ukryj elementy typu "Nicepage" / stopki-templates jeśli wyskoczą */
.u-backlink, .u-backlink a, .u-backlink span{display:none !important;}

/* ===== PASTEL_GLOBAL_BG ===== */
html, body{
  background:
    radial-gradient(1200px 700px at 10% 0%, rgba(255,226,210,.55), transparent 60%),
    radial-gradient(900px 600px at 90% 10%, rgba(226,247,239,.55), transparent 62%),
    linear-gradient(180deg, #fffaf2 0%, #fbf6ef 45%, #f6efe6 100%);
}


/* --- Lex: subpages (clergy/news) --- */
.lex-person-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:18px;
  margin-top:26px;
}
@media (max-width: 991px){
  .lex-person-grid{grid-template-columns:1fr;}
}
.lex-person-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:0 10px 24px rgba(0,0,0,.06);
  overflow:hidden;
  display:grid;
  grid-template-columns: 180px 1fr;
}
@media (max-width: 575px){
  .lex-person-card{grid-template-columns:1fr;}
}
.lex-person-photo img{
  width:100%;
  height:100%;
  min-height:200px;
  object-fit:cover;
  display:block;
}
/* Special: don't crop certain portraits (e.g., mitre needs to be fully visible) */
.lex-person-photo img.lex-photo-contain{
  object-fit:contain;
  object-position:center;
  background: linear-gradient(180deg, rgba(251,250,247,1), rgba(241,216,179,.45));
  padding:10px;
  box-sizing:border-box;
}
.lex-person-body{padding:18px 18px 16px;}
.lex-person-title{font-weight:800; letter-spacing:.02em; text-transform:uppercase; font-size:12px; margin-bottom:6px;}
.lex-rp{color:#7851A9;} /* roman purple */
.lex-black{color:var(--text);} 
.lex-person-name{font-family: Georgia, 'Times New Roman', serif; font-size:22px; font-weight:700; margin:0 0 8px;}
.lex-person-role{color:var(--muted); line-height:1.55;}
.lex-person-email{margin-top:10px;}
.lex-person-email a{color:var(--brand2); font-weight:700; text-decoration:none;}
.lex-person-email a:hover{text-decoration:underline;}

.lex-news-grid{
  display:grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap:18px;
  margin-top:26px;
}
@media (max-width: 991px){
  .lex-news-grid{grid-template-columns:1fr;}
}
.lex-news-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  overflow:hidden;
  box-shadow:0 10px 24px rgba(0,0,0,.06);
}
.lex-news-photo img{width:100%; height:190px; object-fit:cover; display:block;}
.lex-news-body{padding:16px 18px 18px;}
.lex-news-date{font-weight:800; font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted); margin-bottom:8px;}
.lex-news-body h3{margin:0 0 10px; font-size:18px;}
.lex-news-body p{margin:0; color:var(--muted); line-height:1.55;}


/* --- Lex: subpages --- */

.lex-page-title{font-family: Georgia, 'Times New Roman', serif; font-size:34px; margin:0; text-align:center;}
.lex-page-title::after{
  content:"";
  display:block;
  width:86px;
  height:3px;
  margin:12px auto 0;
  border-radius:999px;
  background: rgba(122,31,43,.75);
}
.lex-page-sub{color:var(--accent-burgundy); text-align:center; max-width:78ch; margin:12px auto 0; line-height:1.6;}
.lex-page-title,
.lp-section-title{color:var(--brand2);}
.lex-grid{display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin-top:26px;}
@media (max-width: 991px){.lex-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width: 680px){.lex-grid{grid-template-columns:1fr;}}
.lex-person{background:#fff; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; box-shadow:0 10px 24px rgba(0,0,0,.06);}
.lex-person img{width:100%; height:280px; object-fit:cover; object-position:50% 15%; display:block; background:#fff;}

/* Kim Jesteśmy: bardziej "jedno pod drugim" */
.lex-stack{margin-top:26px; display:grid; gap:18px;}
.lex-block{background:#fff; border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 12px 30px rgba(0,0,0,.07); overflow:hidden;}
.lex-block-head{padding:22px 22px 0;}
.lex-block h2{margin:0; font-family: Georgia, 'Times New Roman', serif; font-size:28px; color:var(--brand2);}
.lex-block-media{padding:16px 22px 0;}
.lex-block-media img{width:100%; height:auto; display:block; border-radius:14px; border:1px solid var(--line);}
.lex-block-body{padding:16px 22px 22px;}
.lex-block-body p{margin:0; color:var(--muted); line-height:1.7;}

/* Aktualnosci page marker */
.lex-news-page{background:transparent;}
.lex-person-body{padding:16px 18px 18px;}
.lex-rank{font-weight:800; font-size:12px; letter-spacing:.08em; text-transform:uppercase;}
.lex-rank--bishop{color:#7851A9;}
.lex-rank--deacon{color:var(--text);}
.lex-name{margin:8px 0 6px; font-size:20px; font-weight:800;}
.lex-lines{margin:0; color:var(--muted); line-height:1.55;}
.lex-mail{display:inline-block; margin-top:10px; color:var(--brand2); font-weight:800; text-decoration:none;}
.lex-mail:hover{text-decoration:underline;}
.lex-news{display:grid; grid-template-columns:repeat(3,1fr); gap:18px; margin-top:26px;}
@media (max-width: 991px){.lex-news{grid-template-columns:1fr;}}
.lex-news-item{background:#fff; border:1px solid var(--line); border-radius:var(--radius); overflow:hidden; box-shadow:0 10px 24px rgba(0,0,0,.06);}
.lex-news-item img{width:100%; height:190px; object-fit:cover; display:block;}
.lex-news-body{padding:16px 18px 18px;}
.lex-date{font-weight:800; font-size:12px; letter-spacing:.08em; text-transform:uppercase; color:var(--muted);}
.lex-news-body h3{margin:8px 0 10px; font-size:18px;}
.lex-news-body p{margin:0; color:var(--muted); line-height:1.6;}
.lex-panel{background:#fff; border:1px solid var(--line); border-radius:var(--radius); box-shadow:0 12px 30px rgba(0,0,0,.07); padding:26px;}
.lex-split{display:grid; grid-template-columns:1fr 1fr; gap:24px; align-items:center;}
@media (max-width: 991px){.lex-split{grid-template-columns:1fr;}}
.lex-hero-card{border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow); border:1px solid var(--line); background:#fff;}
.lex-hero-card img{width:100%; height:auto; display:block;}

/* Aktualności: galeria zdjęć (mniejsze, równe, bez "gigantycznego" pierwszego zdjęcia) */
.lex-block-head .lex-date{margin-top:10px;}
.lex-gallery{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap:12px;
  max-width:920px;
  margin:0 auto;
}
.lex-gallery img{
  width:100%;
  height:220px;
  object-fit:cover;
  display:block;
  border-radius:14px;
  border:1px solid var(--line);
}
.lex-gallery img:only-child{
  max-width:760px;
  justify-self:center;
  height:320px;
}
@media (max-width: 767px){
  .lex-gallery{grid-template-columns:1fr;}
  .lex-gallery img{height:220px;}
  .lex-gallery img:only-child{height:260px;}
}

/* Kontakt: proste, spójne z resztą strony i wygodne do klikania */
.lex-contact-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap:18px;
  margin-top:26px;
}
@media (max-width: 991px){
  .lex-contact-grid{grid-template-columns: repeat(2, minmax(0, 1fr));}
}
@media (max-width: 640px){
  .lex-contact-grid{grid-template-columns:1fr;}
}

.lex-contact-card{
  display:flex;
  gap:14px;
  align-items:center;
  padding:18px 18px;
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:0 10px 24px rgba(0,0,0,.06);
  text-decoration:none;
  color:var(--text);
  min-height:86px;
  position:relative;
  overflow:hidden;
}
.lex-contact-card::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:5px;
  background: rgba(122,31,43,.78);
}
.lex-contact-card:hover{box-shadow:0 14px 34px rgba(0,0,0,.10); transform:translateY(-1px); border-color: rgba(122,31,43,.30);} 
.lex-contact-card:active{transform:translateY(0);} 

.lex-contact-icon{
  width:54px;
  height:54px;
  flex:0 0 54px;
  border-radius:14px;
  border:1px solid rgba(122,31,43,.18);
  background:rgba(122,31,43,.06);
  object-fit:contain;
  padding:8px;
  box-sizing:border-box;
}

.lex-contact-title{
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  font-size:12px;
  color:var(--brand2);
  margin-bottom:6px;
}
.lex-contact-value{
  font-family: Georgia, 'Times New Roman', serif;
  font-size:18px;
  line-height:1.2;
}
.lex-contact-note{
  margin-top:6px;
  font-size:14px;
  color:var(--muted);
  line-height:1.4;
}

.lex-rank--seminarian{color:#7a1f2b;}
.lex-person img.lex-photo-portrait{
  object-fit:contain;
  object-position:center;
  background:#fff;
  padding:14px 14px 0;
  box-sizing:border-box;
  height:360px;
}
@media (max-width: 991px){
  .lex-person img.lex-photo-portrait{height:340px;}
}
@media (max-width: 575px){
  .lex-person img.lex-photo-portrait{height:300px;}
}
