/*
 * Strona glowna (front-page.php) - wartosci jak w dotychczasowym ukladzie (Elementor + zzz-strona-glowna.php).
 * Sekcje: baner, skroty, adoracja, komunikat, aktualnosci, modlitwa; "Strefy parafii" - styl w zzz-strona-glowna.php.
 */

/* ─── Baner: zdjecia na zmiane (powolne przyblizenie), napis, przyciski ─── */
.sg-baner {
	position: relative; display: flex; flex-direction: column; justify-content: center; overflow: hidden;
	min-height: calc(100vh - var(--czest-baner-gora, 141px));
	min-height: calc(100svh - var(--czest-baner-gora, 141px)); /* svh: bez paska adresu przegladarki na telefonie */
	padding: clamp(16px, 5vh, 48px) 16px; background: #1b1b1b;
}
.sg-baner-slajdy { position: absolute; inset: 0; z-index: 0; }
.sg-baner-slajdy::after { content: ""; position: absolute; inset: 0; background: rgb(2, 1, 1); opacity: .27; }
.sg-slajd {
	position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0;
	transform: scale(1); transition: opacity .5s ease-in-out;
}
.sg-slajd.aktywny { opacity: 1; animation: sg-przyblizenie 20s linear forwards; }
@keyframes sg-przyblizenie { from { transform: scale(1); } to { transform: scale(1.3); } }
@media (prefers-reduced-motion: reduce) { .sg-slajd.aktywny { animation: none; } }
.sg-baner-tresc { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; width: 100%; }
.czest-start .sg-napis {
	margin: 0; color: #fff; font-family: Roboto, var(--czest-czcionka); font-size: clamp(20px, min(5.6vw, 9.5vh), 72px);
	font-weight: 600; line-height: 1.2; text-align: center; text-shadow: 0 2px 12px rgba(0, 0, 0, .35);
}
.sg-przyciski { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 16px; margin-top: clamp(14px, 3.5vh, 32px); }
.sg-przycisk {
	display: inline-block; padding: 15px 30px; border-radius: var(--czest-radius); box-shadow: 0 4px 16px rgba(0, 0, 0, .3);
	font-family: Roboto, var(--czest-czcionka); font-size: 16px; font-weight: 500; line-height: 1; letter-spacing: 1px;
	transition: background-color .2s, color .2s, transform .2s;
}
.sg-przycisk-zielony { background: var(--czest-zielony); color: #fff; }
.sg-przycisk-zielony:hover { background: var(--czest-zielony-ciemny); color: #fff; transform: translateY(-1px); }
.sg-przycisk-bialy { background: #fff; color: var(--czest-zielony-ciemny); }
.sg-przycisk-bialy:hover { background: var(--czest-zielony-jasny); color: var(--czest-zielony-ciemny); transform: translateY(-1px); }
@media (max-height: 500px) {
	.czest-start .sg-napis { font-size: clamp(18px, min(5.6vw, 8vh), 72px); }
}

/* ─── Skroty (karty z ikona) ─── */
.sg-skroty { padding: 56px 20px 48px; background: #fff; }
.sg-skroty-lista { display: flex; max-width: 1140px; margin: 0 auto; padding: 0; list-style: none; }
.sg-skroty-lista > li { flex: 1 1 0; min-width: 0; margin: 0; }
.sg-skrot {
	display: flex; flex-direction: column; align-items: center; height: 100%; margin: 0 10px; padding: 26px 14px 20px;
	border-radius: var(--czest-karta-radius); background: #fff; box-shadow: var(--czest-cien); text-align: center;
	transition: box-shadow .25s, transform .25s;
}
.sg-skrot:hover { box-shadow: 0 6px 24px rgba(0, 0, 0, .16); transform: translateY(-3px); }
.sg-skrot-ikona {
	display: inline-flex; align-items: center; justify-content: center; width: 72px; height: 72px; border-radius: 50%;
	background: var(--czest-zielony-jasny); color: var(--czest-zielony-ciemny); font-size: 30px; transition: background-color .25s, color .25s;
}
.sg-skrot:hover .sg-skrot-ikona { background: var(--czest-zielony); color: #fff; }
.sg-skrot-podpis { margin-top: 16px; color: var(--czest-grafit); font-size: 15px; font-weight: 600; line-height: 1.35; transition: color .2s; }
.sg-skrot:hover .sg-skrot-podpis { color: var(--czest-zielony-ciemny); }

/* ─── Pas: adoracja i spowiedz ─── */
.sg-adoracja { padding: 52px 20px; background: linear-gradient(135deg, #2e7d32 0%, #4caf50 100%); }
.sg-adoracja-ramka {
	display: flex; flex-direction: column; align-items: center; max-width: 760px; margin: 0 auto; padding: 28px 24px;
	border: 1px solid rgba(255, 255, 255, .25); border-radius: 16px; background: rgba(255, 255, 255, .1);
}
.sg-adoracja-ikona { display: block; color: #fff; font-size: 52px; line-height: 0; }
.sg-adoracja-ikona svg { width: 52px; height: 52px; }
.sg-adoracja-tekst { margin: 14px 0 0; color: #fff; font-size: 19px; font-weight: 500; line-height: 1.6; text-align: center; }

/* ─── Komunikat ─── */
.sg-komunikat { padding: 56px 20px; background: #f5fbf5; }
.sg-komunikat-karta {
	display: flex; align-items: center; max-width: 1000px; margin: 0 auto; padding: 32px 36px; border-radius: var(--czest-karta-radius);
	background: linear-gradient(180deg, #eef7ee 0%, #fff 100%); box-shadow: var(--czest-cien);
}
.sg-komunikat-obraz { flex: 0 0 30%; padding: 10px; text-align: center; } /* 10px - jak kolumny Elementora */
.sg-komunikat-obraz img { width: 220px; max-width: 100%; }
.sg-komunikat-tresc { flex: 1 1 70%; min-width: 0; padding: 10px; }
.sg-etykieta { margin: 0 0 10px; color: var(--czest-zielony); font-size: 12px; font-weight: 600; letter-spacing: 1.5px; line-height: 1.5; text-transform: uppercase; }
.sg-komunikat-tresc h2 {
	position: relative; margin: 0 0 16px; padding-bottom: 12px; color: var(--czest-grafit); font-size: 20px; font-weight: 600; line-height: 1.45;
}
.sg-komunikat-tresc h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 40px; height: 3px; border-radius: 3px; background: var(--czest-zielony); }
.sg-komunikat-tresc h3 { margin: 0 0 6px; color: var(--czest-zielony-ciemny); font-size: 16px; font-weight: 600; }
.sg-komunikat-tresc p { margin: 0 0 10px; color: #000; font-size: 15px; line-height: 1.7; }
.sg-komunikat-tresc > :last-child { margin-bottom: 0; }

/* ─── Aktualnosci (karty jak dotad) ─── */
.sg-aktualnosci { padding: 60px 20px 0; }
.czest-start .sg-tytul {
	position: relative; margin: 0 auto 30px; padding-bottom: 14px; color: var(--czest-grafit); font-size: 26px; font-weight: 600;
	line-height: 1.3; text-align: center;
}
.czest-start .sg-tytul::after { content: ""; position: absolute; left: 50%; bottom: 0; width: 40px; height: 3px; margin-left: -20px; border-radius: 3px; background: var(--czest-zielony); }
.sg-karty { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 30px; max-width: 1120px; margin: 0 auto; }
.sg-karta {
	position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--czest-karta-radius);
	background: #fff; box-shadow: var(--czest-cien); transition: box-shadow .25s, transform .25s;
}
.sg-karta:hover { box-shadow: 0 6px 26px rgba(0, 0, 0, .16); transform: translateY(-3px); }
.sg-karta-obraz { display: block; aspect-ratio: 100 / 65; margin: 0 0 20px; overflow: hidden; background: #eef7ee; }
.sg-karta-obraz img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.sg-karta:hover .sg-karta-obraz img { transform: scale(1.05); }
.sg-karta-znaczek {
	position: absolute; top: 20px; right: 20px; z-index: 1; padding: .6em 1.2em; border-radius: 999px; background: var(--czest-zielony);
	color: #fff; font-size: 12px; font-weight: 500; line-height: 1; text-transform: uppercase;
}
.sg-karta-tekst { flex: 1; margin-top: 20px; padding: 0 30px; }
.sg-karta-obraz + .sg-karta-znaczek + .sg-karta-tekst, .sg-karta-obraz + .sg-karta-tekst { margin-top: 0; }
.czest-start .sg-karta-tytul { margin: 0 0 25px; color: var(--czest-grafit); font-size: 21px; font-weight: 600; line-height: 1.4; }
.sg-karta-tytul a { color: inherit; }
.sg-karta-tytul a:hover { color: var(--czest-zielony); }
.sg-karta-wiecej { display: inline-block; margin: 0 0 20px; color: var(--czest-zielony); font-size: 12px; font-weight: 500; line-height: 1.8; text-transform: uppercase; }
.sg-karta-wiecej:hover { color: var(--czest-zielony-ciemny); }
.sg-karta-data { padding: 15px 30px; border-top: 1px solid #eaeaea; color: #adadad; font-size: 12px; line-height: 1.3; }
.sg-wszystkie { margin: 0; padding: 34px 20px 64px; text-align: center; }
.sg-wszystkie-przycisk {
	display: inline-flex; align-items: center; gap: 8px; padding: 14px 24px; border-radius: var(--czest-radius); background: var(--czest-zielony);
	box-shadow: 0 2px 8px rgba(46, 125, 50, .25); color: #fff; font-size: 13px; font-weight: 600; letter-spacing: 1px; line-height: 1.2;
	text-transform: uppercase; transition: background-color .2s, box-shadow .2s, transform .2s;
}
.sg-wszystkie-przycisk span { font-size: 18px; font-weight: 400; }
.sg-wszystkie-przycisk:hover { background: var(--czest-zielony-ciemny); box-shadow: 0 4px 14px rgba(46, 125, 50, .3); color: #fff; transform: translateY(-1px); }

/* ─── Modlitwa ─── */
.sg-modlitwa { padding: 64px 20px 56px; background: linear-gradient(160deg, #1b5e20 0%, #2e7d32 100%); }
.sg-modlitwa-tresc { max-width: 860px; margin: 0 auto; }
.sg-modlitwa-tresc img { display: block; width: 88px; height: auto; margin: 0 auto 22px; filter: brightness(0) invert(1); opacity: .9; }
.sg-modlitwa-tresc p:has(> img:only-child) { margin: 0; }
.sg-modlitwa-tresc p {
	margin: 0 0 14px; color: rgba(255, 255, 255, .92); font-family: Roboto, var(--czest-czcionka); font-size: 17px; font-style: italic;
	font-weight: 400; line-height: 1.8; text-align: center;
}
.sg-modlitwa-tresc > :last-child { margin-bottom: 0; }

/* ─── Tablet i telefon ─── */
@media (max-width: 1024px) {
	.sg-skroty-lista { flex-wrap: wrap; justify-content: center; row-gap: 20px; }
	.sg-skroty-lista > li { flex: 0 0 33.333%; }
}
@media (max-width: 767px) {
	.sg-przyciski { flex-direction: column; align-items: center; gap: 10px; }
	.sg-przycisk { font-size: 12px; }
	.sg-skroty { padding: 32px 16px 28px; }
	.sg-skroty-lista { row-gap: 10px; }
	.sg-skroty-lista > li { flex: 0 0 100%; }
	.sg-skrot { flex-direction: row; align-items: center; gap: 14px; margin: 0; padding: 12px 16px; text-align: left; }
	.sg-skrot::after { content: "\203A"; color: #adadad; font-size: 24px; line-height: 1; }
	.sg-skrot-ikona { flex: 0 0 46px; width: 46px; height: 46px; font-size: 20px; }
	.sg-skrot-podpis { flex: 1; margin-top: 0; }
	.sg-adoracja { padding: 32px 16px; }
	.sg-adoracja-ramka { padding: 22px 16px; }
	.sg-adoracja-tekst { font-size: 16px; }
	.sg-komunikat { padding: 32px 16px; }
	.sg-komunikat-karta { flex-direction: column; align-items: stretch; padding: 24px 18px; }
	.sg-komunikat-obraz { margin-bottom: 8px; }
	.sg-komunikat-obraz img { width: 140px; }
	.sg-komunikat-tresc h2 { font-size: 17px; }
	.sg-aktualnosci { padding: 40px 16px 0; }
	.czest-start .sg-tytul { margin-bottom: 24px; font-size: 22px; }
	.sg-karty { grid-template-columns: 1fr; max-width: 338px; }
	.sg-karta-obraz { aspect-ratio: 2 / 1; }
	.sg-wszystkie { padding: 24px 16px 44px; }
	.sg-modlitwa { padding: 44px 16px 40px; }
	.sg-modlitwa-tresc p { font-size: 15px; }
}
@media (min-width: 768px) and (max-width: 1024px) {
	.sg-karty { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ─── Animacje jak dotad w Elementorze: wejscie przy przewijaniu (motyw.js dodaje .widoczne), pulsowanie ikon ─── */
.czest-js .czest-anim:not(.widoczne) { visibility: hidden; }
.czest-anim.widoczne { animation-duration: 1.25s; animation-fill-mode: both; }
.czest-anim.czest-anim-wolno.widoczne { animation-duration: 2s; }
.czest-anim.widoczne[data-animacja="fadeIn"] { animation-name: czest-fadeIn; }
.czest-anim.widoczne[data-animacja="fadeInLeft"] { animation-name: czest-fadeInLeft; }
.czest-anim.widoczne[data-animacja="fadeInRight"] { animation-name: czest-fadeInRight; }
.czest-anim.widoczne[data-animacja="fadeInUp"] { animation-name: czest-fadeInUp; }
@keyframes czest-fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes czest-fadeInLeft { from { opacity: 0; transform: translate3d(-100%, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes czest-fadeInRight { from { opacity: 0; transform: translate3d(100%, 0, 0); } to { opacity: 1; transform: none; } }
@keyframes czest-fadeInUp { from { opacity: 0; transform: translate3d(0, 100%, 0); } to { opacity: 1; transform: none; } }
.sg-skroty { overflow-x: clip; } /* wjezdzajace karty nie poszerzaja strony */
.sg-skrot:hover .sg-skrot-ikona { animation: czest-pulse 1s linear infinite; }
@keyframes czest-pulse { 25% { transform: scale(1.1); } 75% { transform: scale(.9); } }
.sg-adoracja-ikona svg { transition: transform .3s; }
.sg-adoracja-ikona:hover svg { transform: scale(.9); }
@media (prefers-reduced-motion: reduce) {
	.czest-anim.widoczne, .sg-skrot:hover .sg-skrot-ikona { animation: none; }
}
