/*
Theme Name: Spała – Zbiornik na rzece Gać
Description: Motyw blokowy strony inwestycji „Ochrona wartości przyrodniczo-kulturowych Spały. Etap: Otoczenie zbiornika na rzece Gać”. Pokaz slajdów w nagłówku, kafelki z danymi projektu, oś czasu i galeria postępu prac podzielona na miesiące (typ wpisu „Etapy budowy”).
Version: 1.0.1
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: spala-gac
*/

/* =========================================================
   Zmienne
   ========================================================= */
:root {
	--sg-las: var(--wp--preset--color--las, #1E4634);
	--sg-las-ciemny: var(--wp--preset--color--las-ciemny, #12291F);
	--sg-mech: var(--wp--preset--color--mech, #7A9A5B);
	--sg-woda: var(--wp--preset--color--woda, #2E6A80);
	--sg-piasek: var(--wp--preset--color--piasek, #F5F2EA);
	--sg-kamien: var(--wp--preset--color--kamien, #E6E0D3);
	--sg-grafit: var(--wp--preset--color--grafit, #1D2321);
	--sg-szary: var(--wp--preset--color--szary, #5B6560);
	--sg-radius: 18px;
	--sg-shadow: 0 1px 2px rgba(18, 41, 31, .06), 0 10px 30px rgba(18, 41, 31, .08);
	--sg-section-y: clamp(3.5rem, 8vw, 6.5rem);
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body { -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }

/* Kotwice nie chowają się pod przyklejonym nagłówkiem */
[id] { scroll-margin-top: 90px; }

.sg-eyebrow {
	font-size: .8rem !important;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--sg-mech);
	margin-bottom: .5rem !important;
}

.sg-section { padding-top: var(--sg-section-y); padding-bottom: var(--sg-section-y); }
.sg-section--jasna { background: #fff; }
.sg-section--kamien { background: var(--sg-kamien); }
.sg-section h2 { margin-top: 0; }
.sg-lead { font-size: 1.15rem; color: var(--sg-szary); max-width: 62ch; }

/* =========================================================
   Nagłówek
   ========================================================= */
.sg-fe-strip {
	background: #fff;
	border-bottom: 1px solid var(--sg-kamien);
	padding: .5rem 1.25rem !important;
	text-align: center;
}
.sg-fe-strip figure { margin: 0 auto !important; }
.sg-fe-strip img { max-height: 72px; width: auto; display: inline-block; }

/* Sekcje stykają się bez przerw (blockGap nie dotyczy pełnych sekcji) */
.wp-site-blocks > *,
.sg-main > *,
.sg-footer > * { margin-block-start: 0; }
.wp-site-blocks > * + * { margin-block-start: 0 !important; }
.sg-main.sg-single > * + * { margin-block-start: 1.25rem; }

.sg-header-part {
	position: sticky;
	top: 0;
	z-index: 50;
}
.admin-bar .sg-header-part { top: 32px; }
@media (max-width: 782px) { .admin-bar .sg-header-part { top: 46px; } }
@media (max-width: 600px) { .admin-bar .sg-header-part { top: 0; } }

.sg-header {
	padding-left: 1.25rem !important;
	padding-right: 1.25rem !important;
	background: rgba(255, 255, 255, .94);
	-webkit-backdrop-filter: saturate(1.4) blur(10px);
	backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--sg-kamien);
}

.sg-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-top: .65rem;
	padding-bottom: .65rem;
}
.sg-brand { display: flex; align-items: center; gap: .75rem; }
.sg-brand .wp-block-site-logo img { max-height: 48px; width: auto; }
.sg-brand .wp-block-site-title {
	font-family: var(--wp--preset--font-family--naglowki);
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.2;
	margin: 0;
}
.sg-brand .wp-block-site-title a { color: var(--sg-las-ciemny); text-decoration: none; }

.sg-nav { font-weight: 600; font-size: .95rem; gap: 1.5rem; }
.sg-nav a { color: var(--sg-grafit); text-decoration: none; }
.sg-nav a:hover, .sg-nav a:focus { color: var(--sg-las); text-decoration: underline; text-underline-offset: 5px; }

/* =========================================================
   Hero z pokazem slajdów
   ========================================================= */
.sg-hero {
	position: relative;
	min-height: min(88vh, 820px);
	display: flex !important;
	align-items: flex-end;
	overflow: hidden;
	background: var(--sg-las-ciemny);
	color: #fff;
	margin-top: 0 !important;
	padding-top: 6rem;
	padding-bottom: 9rem;
}
.sg-hero > .wp-block-gallery,
.sg-hero > .sg-hero-slides {
	position: absolute !important;
	inset: 0;
	margin: 0 !important;
	max-width: none !important;
	width: 100% !important;
	display: block !important;
	gap: 0 !important;
	padding: 0 !important;
}
.sg-hero > .wp-block-gallery figure.wp-block-image,
.sg-hero > .sg-hero-slides figure {
	position: absolute !important;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	opacity: 0;
	transition: opacity 1.6s ease;
}
.sg-hero > .wp-block-gallery figure.wp-block-image:first-child,
.sg-hero > .sg-hero-slides figure:first-child { opacity: 1; }
.sg-hero.is-slider-ready > .wp-block-gallery figure.wp-block-image,
.sg-hero.is-slider-ready > .sg-hero-slides figure { opacity: 0; }
.sg-hero.is-slider-ready > .wp-block-gallery figure.wp-block-image.is-active,
.sg-hero.is-slider-ready > .sg-hero-slides figure.is-active { opacity: 1; }
.sg-hero > .wp-block-gallery img,
.sg-hero > .sg-hero-slides img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	transform: scale(1.04);
	transition: transform 9s ease-out;
}
.sg-hero figure.is-active img { transform: scale(1); }
/* Podpis slajdu = miesiąc, widoczny w prawym dolnym rogu nad kropkami */
.sg-hero figcaption {
	position: absolute !important;
	right: 1.5rem !important;
	bottom: 8rem !important;
	left: auto !important;
	top: auto !important;
	z-index: 3;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: .4rem .9rem !important;
	border-radius: 999px;
	background: rgba(10, 25, 18, .55) !important;
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	color: #fff !important;
	font-size: .85rem !important;
	font-weight: 600;
	letter-spacing: .02em;
	text-align: right;
	text-shadow: none;
	overflow: visible !important;
	max-height: none !important;
}
.sg-hero figcaption::before {
	content: "";
	display: inline-block;
	width: 8px; height: 8px;
	margin-right: .5rem;
	border-radius: 50%;
	background: #B9D3A0;
	vertical-align: 1px;
}
/* Lightbox nie jest potrzebny w tle nagłówka */
.sg-hero .lightbox-trigger { display: none !important; }

.sg-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(10, 25, 18, .25) 0%, rgba(10, 25, 18, 0) 35%),
		linear-gradient(90deg, rgba(10, 25, 18, .5) 0%, rgba(10, 25, 18, .15) 55%, rgba(10, 25, 18, 0) 75%),
		linear-gradient(0deg, rgba(10, 25, 18, .85) 0%, rgba(10, 25, 18, .35) 55%, rgba(10, 25, 18, .1) 100%);
	pointer-events: none;
	z-index: 1;
}
.sg-hero__content { position: relative; z-index: 2; width: 100%; }
.sg-hero__content > * { max-width: 760px; margin-left: 0 !important; }
.sg-hero .sg-eyebrow { color: #CFE0BE; }
.sg-hero h1 {
	color: #fff;
	margin: 0 0 1rem;
	text-wrap: balance;
	text-shadow: 0 2px 20px rgba(0, 0, 0, .25);
}
.sg-hero p { color: rgba(255, 255, 255, .9); font-size: 1.15rem; }
.sg-hero .wp-block-buttons { margin-top: 1.75rem; gap: .75rem; }
.sg-btn-jasny .wp-block-button__link { background: #fff !important; color: var(--sg-las-ciemny) !important; }
.sg-btn-jasny .wp-block-button__link:hover { background: var(--sg-piasek) !important; }
.sg-btn-obrys .wp-block-button__link {
	background: transparent !important;
	color: #fff !important;
	box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7);
}
.sg-btn-obrys .wp-block-button__link:hover { background: rgba(255, 255, 255, .12) !important; }

.sg-slider-dots {
	position: absolute;
	z-index: 3;
	right: 1.5rem;
	bottom: 6.5rem;
	display: flex;
	gap: .5rem;
}
.sg-slider-dots button {
	width: 10px; height: 10px;
	padding: 0;
	border-radius: 50%;
	border: 2px solid #fff;
	background: transparent;
	cursor: pointer;
	opacity: .75;
}
.sg-slider-dots button[aria-current="true"] { background: #fff; opacity: 1; }

/* =========================================================
   Kafelki z danymi finansowymi (nachodzą na hero)
   ========================================================= */
.sg-stats { position: relative; z-index: 5; margin-top: -5.5rem !important; }
.sg-stats__grid {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem !important;
}
.sg-stats__grid > .wp-block-column { flex-basis: auto !important; margin: 0 !important; }
.sg-stat {
	background: #fff;
	border-radius: var(--sg-radius);
	box-shadow: var(--sg-shadow);
	padding: 1.5rem 1.6rem !important;
	height: 100%;
	border-top: 4px solid var(--sg-mech);
}
.sg-stat--glowny { background: var(--sg-las); color: #fff; border-top-color: #CFE0BE; }
.sg-stat__liczba {
	font-family: var(--wp--preset--font-family--naglowki);
	font-size: clamp(1.6rem, 2.6vw, 2.15rem) !important;
	font-weight: 600;
	line-height: 1.1;
	margin: 0 0 .4rem !important;
	color: var(--sg-las-ciemny);
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}
.sg-stat--glowny .sg-stat__liczba { color: #fff; }
.sg-stat__opis { margin: 0 !important; font-size: .95rem; color: var(--sg-szary); line-height: 1.45; }
.sg-stat--glowny .sg-stat__opis { color: rgba(255, 255, 255, .85); }

/* Pasek postępu (shortcode [postep_prac]) */
.sg-postep {
	background: #fff;
	border-radius: var(--sg-radius);
	box-shadow: var(--sg-shadow);
	padding: 1.25rem 1.6rem;
	margin-top: 1rem;
}
.sg-postep__top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: .6rem; }
.sg-postep__etykieta { font-weight: 600; }
.sg-postep__wartosc {
	font-family: var(--wp--preset--font-family--naglowki);
	font-size: 1.6rem;
	font-weight: 600;
	color: var(--sg-las);
}
.sg-postep__tor { height: 12px; background: var(--sg-kamien); border-radius: 999px; overflow: hidden; }
.sg-postep__pasek {
	height: 100%;
	background: linear-gradient(90deg, var(--sg-mech), var(--sg-las));
	border-radius: 999px;
}
.sg-postep__notka { margin: .6rem 0 0; font-size: .875rem; color: var(--sg-szary); }

/* =========================================================
   Oś czasu
   ========================================================= */
.sg-timeline {
	display: grid !important;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 0 !important;
	position: relative;
	margin-top: 2.5rem !important;
}
.sg-timeline::before {
	content: "";
	position: absolute;
	left: 0; right: 0;
	top: 9px;
	height: 2px;
	background: var(--sg-kamien);
}
.sg-timeline__item { position: relative; padding: 2.25rem 1.5rem 0 0 !important; margin: 0 !important; }
.sg-timeline__item::before {
	content: "";
	position: absolute;
	left: 0; top: 0;
	width: 20px; height: 20px;
	border-radius: 50%;
	background: #fff;
	border: 4px solid var(--sg-mech);
	box-sizing: border-box;
}
.sg-timeline__item--meta::before { background: var(--sg-las); border-color: var(--sg-las); }
.sg-timeline__data {
	font-family: var(--wp--preset--font-family--naglowki);
	font-size: 1.5rem !important;
	font-weight: 600;
	color: var(--sg-las-ciemny);
	margin: 0 0 .35rem !important;
}
.sg-timeline__item p:not(.sg-timeline__data) { margin: 0; color: var(--sg-szary); font-size: .975rem; line-height: 1.5; }

/* =========================================================
   O projekcie
   ========================================================= */
.sg-split { gap: clamp(2rem, 5vw, 4.5rem) !important; align-items: center !important; }
.sg-split .wp-block-image img,
.sg-foto img {
	border-radius: var(--sg-radius);
	box-shadow: var(--sg-shadow);
	width: 100%;
	height: auto;
	/* zdjęcia i wizualizacje w naturalnych proporcjach (bez przycinania) */
}
.sg-cytat {
	border-left: 4px solid var(--sg-mech);
	padding: .25rem 0 .25rem 1.25rem !important;
	font-family: var(--wp--preset--font-family--naglowki);
	font-size: 1.2rem;
	color: var(--sg-las-ciemny);
}

/* =========================================================
   Zakres – siatka elementów
   ========================================================= */
.sg-zakres {
	list-style: none;
	padding: 0 !important;
	margin: 2rem 0 0 !important;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
	gap: 1rem;
}
.sg-zakres li {
	background: #fff;
	border: 1px solid var(--sg-kamien);
	border-radius: 14px;
	padding: 1.1rem 1.2rem 1.1rem 3.4rem;
	position: relative;
	font-weight: 600;
	line-height: 1.35;
	margin: 0;
}
.sg-zakres li::before {
	content: "";
	position: absolute;
	left: 1.1rem; top: 50%;
	width: 1.5rem; height: 1.5rem;
	transform: translateY(-50%);
	border-radius: 50%;
	background: var(--sg-mech) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 62% no-repeat;
}
.sg-zakres li small, .sg-zakres li em { display: block; font-weight: 400; font-style: normal; color: var(--sg-szary); font-size: .875rem; margin-top: .15rem; }

/* Rzędy tekst + wizualizacja (na przemian) */
.sg-rzad + .sg-rzad { margin-top: clamp(3rem, 7vw, 5.5rem) !important; }
.sg-rzad .sg-zakres { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.sg-foto img { cursor: zoom-in; }
@media (max-width: 781px) {
	/* na telefonie zawsze najpierw tekst, potem zdjęcie */
	.sg-rzad--odwrocony { flex-direction: column-reverse !important; }
}

/* =========================================================
   Powiększanie zdjęć (lightbox z przewijaniem)
   ========================================================= */
.sg-etap .wp-block-gallery img,
.sg-single .wp-block-gallery img,
.sg-galeria img { cursor: zoom-in; }
.sg-lb {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: none;
	align-items: center;
	justify-content: center;
	background: rgba(8, 18, 13, .94);
	padding: 3.5rem 4.5rem;
}
.sg-lb.is-open { display: flex; }
.sg-lb__img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	border-radius: 6px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
	user-select: none;
}
.sg-lb__btn {
	position: absolute;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .12);
	color: #fff;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
}
.sg-lb__btn:hover, .sg-lb__btn:focus-visible { background: rgba(255, 255, 255, .25); }
.sg-lb__close { top: 1rem; right: 1rem; }
.sg-lb__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.sg-lb__next { right: 1rem; top: 50%; transform: translateY(-50%); }
.sg-lb__info {
	position: absolute;
	left: 0; right: 0; bottom: 1rem;
	text-align: center;
	color: rgba(255, 255, 255, .85);
	font-size: .9rem;
	padding: 0 4rem;
}
body.sg-lb-open { overflow: hidden; }
@media (max-width: 640px) {
	.sg-lb { padding: 3.5rem .5rem 4rem; }
	.sg-lb__prev, .sg-lb__next { top: auto; bottom: .75rem; transform: none; }
	.sg-lb__info { bottom: 1.6rem; }
}

/* Karty Cele / Zakres robót */
.sg-karty { gap: 1.25rem !important; margin-top: 2.5rem !important; }
.sg-karta {
	background: var(--sg-piasek);
	border-radius: var(--sg-radius);
	padding: 2rem !important;
	height: 100%;
}
.sg-section--kamien .sg-karta { background: #fff; }
.sg-karta h3 { margin-top: 0; }
.sg-karta p:last-child { margin-bottom: 0; }

/* =========================================================
   Wskaźniki
   ========================================================= */
.sg-wskazniki {
	display: grid !important;
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 1rem !important;
	margin-top: 2.5rem !important;
}
.sg-wskazniki > .wp-block-column { flex-basis: auto !important; margin: 0 !important; }
.sg-wskaznik {
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 255, 255, .16);
	border-radius: var(--sg-radius);
	padding: 1.5rem 1.25rem !important;
	height: 100%;
}
/* Ikony wskaźników: ::before = jasne kółko, ::after = ikona (maska w kolorze) */
.sg-wskaznik[class*="sg-ikona--"] { position: relative; padding-top: 6.5rem !important; }
.sg-wskaznik[class*="sg-ikona--"]::before,
.sg-wskaznik[class*="sg-ikona--"]::after {
	content: "";
	position: absolute;
	left: 50%;
	transform: translateX(-50%);
	top: 1.5rem;
	width: 64px;
	height: 64px;
}
.sg-wskaznik[class*="sg-ikona--"]::before { border-radius: 50%; background: rgba(185, 211, 160, .16); }
.sg-wskaznik[class*="sg-ikona--"]::after {
	background: #CFE0BE;
	-webkit-mask: var(--sg-ikona) center / 36px 36px no-repeat;
	mask: var(--sg-ikona) center / 36px 36px no-repeat;
}
.sg-wskaznik { text-align: center; }
.sg-ikona--dostepnosc { --sg-ikona: url("assets/icons/dostepnosc.svg"); }
.sg-ikona--zabytek { --sg-ikona: url("assets/icons/zabytek.svg"); }
.sg-ikona--przyroda { --sg-ikona: url("assets/icons/przyroda.svg"); }
.sg-ikona--kultura { --sg-ikona: url("assets/icons/kultura.svg"); }
.sg-ikona--osoby { --sg-ikona: url("assets/icons/osoby.svg"); }

.sg-wskaznik__liczba {
	font-family: var(--wp--preset--font-family--naglowki);
	font-size: clamp(2rem, 3.4vw, 2.75rem) !important;
	font-weight: 600;
	line-height: 1;
	margin: 0 0 .6rem !important;
	color: #fff;
	font-variant-numeric: tabular-nums;
}
.sg-wskaznik p:not(.sg-wskaznik__liczba) { margin: 0; font-size: .925rem; line-height: 1.45; color: rgba(255, 255, 255, .8); }

.sg-section--ciemna { background: var(--sg-las-ciemny); color: rgba(255, 255, 255, .88); }
.sg-section--ciemna h2, .sg-section--ciemna h3 { color: #fff; }
.sg-section--ciemna .sg-lead { color: rgba(255, 255, 255, .78); }
.sg-section--ciemna .sg-eyebrow { color: #B9D3A0; }

/* =========================================================
   Postęp prac – miesiące
   ========================================================= */
.sg-etapy .wp-block-post-template { list-style: none; padding: 0; margin: 2.5rem 0 0; }
.sg-etapy .wp-block-post-template > li { margin: 0; }
.sg-etap {
	position: relative;
	padding: 0 0 3rem 2.75rem !important;
	margin: 0 !important;
	max-width: none !important;
}
.sg-etap::before {
	content: "";
	position: absolute;
	left: 9px; top: 12px; bottom: 0;
	width: 2px;
	background: var(--sg-kamien);
}
.sg-etapy .wp-block-post-template > li:last-child .sg-etap::before { display: none; }
.sg-etap::after {
	content: "";
	position: absolute;
	left: 0; top: 6px;
	width: 20px; height: 20px;
	border-radius: 50%;
	background: var(--sg-piasek);
	border: 4px solid var(--sg-mech);
	box-sizing: border-box;
}
.sg-section--jasna .sg-etap::after { background: #fff; }
.sg-etapy .wp-block-post-template > li:first-child .sg-etap::after { background: var(--sg-las); border-color: var(--sg-las); }
.sg-etap > * { max-width: none !important; margin-left: 0 !important; }
.sg-etap .wp-block-post-title {
	margin: 0 0 .5rem;
	font-size: clamp(1.4rem, 2.4vw, 1.75rem);
}
.sg-etap .wp-block-post-title a { color: var(--sg-las-ciemny); text-decoration: none; }
.sg-etap .wp-block-post-content > p { max-width: 70ch; color: var(--sg-szary); margin-top: 0; }
.sg-etap .wp-block-post-content > * { max-width: none; margin-left: 0 !important; }

.sg-etap .wp-block-gallery,
.sg-galeria {
	display: grid !important;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: .6rem !important;
	margin-top: 1rem !important;
}
@media (max-width: 900px) {
	.sg-etap .wp-block-gallery, .sg-galeria { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.sg-etap .wp-block-gallery figure.wp-block-image,
.sg-galeria figure {
	width: 100% !important;
	margin: 0 !important;
	aspect-ratio: 4 / 3;
	border-radius: 12px;
	overflow: hidden;
	background: var(--sg-kamien);
}
.sg-etap .wp-block-gallery img,
.sg-galeria img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	transition: transform .4s ease;
}
.sg-etap .wp-block-gallery figure:hover img,
.sg-galeria figure:hover img { transform: scale(1.05); }
.sg-etap .wp-block-gallery figcaption { font-size: .8rem; }

.sg-etap .wp-block-gallery.is-collapsed > figure:nth-child(n+13) { display: none !important; }
.sg-wiecej {
	margin-top: 1rem;
	padding: .65rem 1.4rem;
	border: 2px solid var(--sg-las);
	border-radius: 999px;
	background: transparent;
	color: var(--sg-las);
	font: inherit;
	font-weight: 600;
	font-size: .95rem;
	cursor: pointer;
}
.sg-wiecej:hover, .sg-wiecej:focus-visible { background: var(--sg-las); color: #fff; }

/* Nawigacja po miesiącach (generowana przez [miesiace_nawigacja]) */
.sg-miesiace {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	list-style: none;
	padding: 0;
	margin: 1.5rem 0 0;
}
.sg-miesiace a {
	display: inline-block;
	padding: .45rem 1rem;
	border-radius: 999px;
	background: var(--sg-piasek);
	border: 1px solid var(--sg-kamien);
	color: var(--sg-grafit);
	text-decoration: none;
	font-size: .9rem;
	font-weight: 600;
}
.sg-miesiace a:hover, .sg-miesiace a:focus { background: var(--sg-las); border-color: var(--sg-las); color: #fff; }

.sg-etapy .wp-block-query-pagination { margin-top: 1rem; font-weight: 600; }

/* =========================================================
   Stopka
   ========================================================= */
.sg-footer { background: var(--sg-las-ciemny); color: rgba(255, 255, 255, .82); margin-top: 0 !important; }
.sg-footer__main { padding-top: 4rem !important; padding-bottom: 3rem !important; gap: 2.5rem !important; }
.sg-footer h3, .sg-footer h4 { color: #fff; font-size: 1.1rem; margin: 0 0 1rem; }
.sg-footer a { color: #fff; }
.sg-footer p { margin: 0 0 .35rem; }
.sg-footer .wp-block-site-logo img { max-height: 72px; width: auto; background: #fff; border-radius: 12px; padding: 8px; }
.sg-footer .wp-block-social-links { gap: .6rem; margin-top: 1rem; }
.sg-footer .wp-block-social-links .wp-social-link {
	background: rgba(255, 255, 255, .1) !important;
	color: #fff !important;
	border-radius: 50%;
}
.sg-footer .wp-block-social-links .wp-social-link a { padding: .55rem; }
.sg-footer .wp-block-social-links .wp-social-link:hover { background: var(--sg-mech) !important; }
.sg-footer .sg-btn-jasny { margin-top: 1rem; }
.sg-footer__fe { background: #fff; padding: 1rem 1.25rem !important; text-align: center; color: var(--sg-grafit); }
.sg-footer__fe figure { margin: 0 auto !important; }
.sg-footer__fe img { max-height: 84px; width: auto; display: inline-block; }
.sg-footer__fe p { font-size: .8rem; color: var(--sg-szary); margin: .5rem auto 0; max-width: 70ch; }
.sg-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, .12);
	padding-top: 1.25rem !important;
	padding-bottom: 1.25rem !important;
	font-size: .85rem;
	color: rgba(255, 255, 255, .6);
}
.sg-footer__bottom p { margin: 0; }

/* Pojedynczy etap */
.sg-single { padding-top: 3rem; padding-bottom: 4rem; }
.sg-single .wp-block-gallery { display: grid !important; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .6rem !important; }
.sg-single .wp-block-gallery figure.wp-block-image { width: 100% !important; margin: 0 !important; aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; }
.sg-single .wp-block-gallery img { width: 100% !important; height: 100% !important; object-fit: cover; }

/* Dostępność */
.sg-skip {
	position: absolute; left: -9999px; top: 0;
	background: #fff; color: var(--sg-las-ciemny); padding: .75rem 1rem; z-index: 100; font-weight: 700;
}
.sg-skip:focus { left: 1rem; top: 1rem; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--sg-mech); outline-offset: 3px; }

/* =========================================================
   Responsywność
   ========================================================= */
@media (max-width: 1080px) {
	.sg-wskazniki { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
	.sg-stats__grid { grid-template-columns: 1fr; }
	.sg-stat__liczba { white-space: normal; }
	.sg-timeline { grid-template-columns: 1fr; gap: 1.75rem !important; padding-left: 2.25rem !important; }
	.sg-timeline::before { left: 9px; right: auto; top: 0; bottom: 0; width: 2px; height: auto; }
	.sg-timeline__item { padding: 0 !important; }
	.sg-timeline__item::before { left: -2.25rem; top: 4px; }
	.sg-header .sg-brand .wp-block-site-title { font-size: .95rem; }
}
@media (max-width: 640px) {
	.sg-hero { min-height: 78vh; padding-bottom: 7.5rem; }
	.sg-hero p { font-size: 1.05rem; }
	.sg-slider-dots { right: auto; left: 1.25rem; bottom: 6rem; }
	.sg-hero figcaption { right: 1.25rem !important; bottom: 5.6rem !important; font-size: .78rem !important; }
	.sg-stats { margin-top: -4rem !important; }
	.sg-wskazniki { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sg-etap { padding-left: 2rem !important; }
	.sg-etap .wp-block-gallery, .sg-galeria { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.sg-fe-strip img { max-height: 40px; }
	.sg-karta { padding: 1.5rem !important; }
}
