/*
 * PSOR – stopka. Wzór: sekcja/footer.png. Zmienne w tokens.css.
 * Selektory zagnieżdżone pod .psor-footer (Avada: .fusion-footer a, h2 itd.).
 */

.psor-footer {
	--footer-overlay:       var(--psor-teal-overlay, rgba(0, 134, 118, 0.7)); /* #008676 70% – jak hero i kafle */
	--footer-radius-top:    var(--psor-radius, 24px);
	--footer-radius-bottom: 40px;                 /* duże dolne rogi jak na projekcie */
	--footer-pad-x:         clamp(24px, 6vw, 120px);
	--footer-pad-y:         clamp(40px, 5vw, 64px);
	--footer-min-height:    clamp(360px, 32vw, 480px);
	--footer-btn-bg:        var(--psor-blue-dark);

	box-sizing: border-box;
	max-width: var(--psor-container);
	margin: var(--psor-block-gap, 40px) auto 40px;
	padding: 0 var(--psor-gutter);
	font-family: var(--psor-font);
	color: var(--psor-white);
}

.psor-footer *,
.psor-footer *::before,
.psor-footer *::after {
	box-sizing: inherit;
}

.psor-footer__card {
	position: relative;
	min-height: var(--footer-min-height);
	overflow: hidden;
	border-radius: 0 0 var(--footer-radius-bottom) var(--footer-radius-bottom);
	background: var(--psor-green-dark);
}

.psor-footer .psor-footer__bg {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.psor-footer__overlay {
	position: absolute;
	inset: 0;
	background: var(--footer-overlay);
	pointer-events: none;
}

.psor-footer__inner {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	gap: clamp(32px, 5vw, 80px);
	padding: var(--footer-pad-y) var(--footer-pad-x);
}

/* ------------------------------------------------------------------ */
/* Logo + menu                                                         */
/* ------------------------------------------------------------------ */
.psor-footer .psor-footer__logo {
	display: inline-block;
	margin: 0 0 clamp(28px, 3vw, 48px);
	line-height: 0;
	text-decoration: none;
	color: inherit;
}
.psor-footer .psor-footer__logo-img {
	display: block;
	height: clamp(64px, 6vw, 88px);
	width: auto;
	max-width: 100%;
}
.psor-footer .psor-footer__logo-text {
	font-size: 2rem;
	font-weight: 700;
	line-height: 1;
	color: inherit;
}

.psor-footer .psor-footer__menu {
	margin: 0;
	padding: 0;
	list-style: none;
}
.psor-footer .psor-footer__menu li {
	margin: 0 0 0.55em;
	padding: 0;
	list-style: none;
}
.psor-footer .psor-footer__menu a {
	font-size: clamp(1.05rem, 1.4vw, 1.35rem);
	font-weight: 400;
	line-height: 1.3;
	color: inherit;
	text-decoration: none;
	transition: opacity var(--psor-ease);
}
.psor-footer .psor-footer__menu a:hover,
.psor-footer .psor-footer__menu a:focus-visible {
	color: inherit;
	font-weight: 700;
	text-decoration: none;
}

.psor-footer .psor-footer__notice {
	display: inline-block;
	padding: 6px 12px;
	border: 1px dashed currentColor;
	border-radius: 8px;
	font-size: 0.9rem;
	color: inherit;
	text-decoration: none;
}

/* ------------------------------------------------------------------ */
/* Newsletter                                                          */
/* ------------------------------------------------------------------ */
.psor-footer .psor-footer__nl-title {
	margin: 0 0 0.5em;
	padding: 0;
	font-family: var(--psor-font-heading);
	font-size: clamp(1.75rem, 2.6vw, 2.5rem);
	font-weight: 300;                /* lekki jak na projekcie – wymaga Work Sans 300 (inc/assets.php) */
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	color: inherit;
}
.psor-footer .psor-footer__nl-text {
	margin: 0 0 clamp(20px, 2.5vw, 36px);
	padding: 0;
	font-size: clamp(1.05rem, 1.4vw, 1.35rem);
	line-height: 1.4;
	color: inherit;
}

.psor-footer__nl-row {
	display: flex;
	gap: clamp(16px, 2.5vw, 40px);
	align-items: center;
}

.psor-footer .psor-footer__nl-input {
	flex: 1 1 auto;
	min-width: 0;
	height: 52px;
	padding: 0 24px;
	font: inherit;
	font-size: 1.05rem;
	text-align: center;
	color: var(--psor-blue);
	background: var(--psor-white);
	border: 0;
	border-radius: var(--psor-radius-pill);
	outline: none;
	box-shadow: none;
}
.psor-footer .psor-footer__nl-input::placeholder {
	color: var(--psor-blue);
	opacity: 1;
}
.psor-footer .psor-footer__nl-input:focus-visible {
	outline: 2px solid var(--psor-white);
	outline-offset: 3px;
}

.psor-footer .psor-footer__nl-submit {
	flex: 0 0 auto;
	height: 52px;
	padding: 0 40px;
	font: inherit;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--psor-white);
	background: var(--footer-btn-bg);
	border: 0;
	border-radius: var(--psor-radius-pill);
	cursor: pointer;
	transition: background-color var(--psor-ease), transform var(--psor-ease);
}
.psor-footer .psor-footer__nl-submit:hover,
.psor-footer .psor-footer__nl-submit:focus-visible {
	color: var(--psor-white);
	background: var(--psor-blue);
	transform: translateY(-1px);
}

/* Zgoda – własny checkbox (biały kwadrat), tekst mały */
.psor-footer .psor-footer__nl-consent {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	margin: clamp(20px, 2.5vw, 32px) 0 0;
	cursor: pointer;
	font-size: 0.9rem;
	line-height: 1.4;
	color: inherit;
}
.psor-footer .psor-footer__nl-consent input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}
.psor-footer .psor-footer__nl-check {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	margin-top: 2px;
	border-radius: 6px;
	background: var(--psor-white);
	position: relative;
}
.psor-footer .psor-footer__nl-check::after {
	content: "";
	position: absolute;
	left: 7px;
	top: 3px;
	width: 6px;
	height: 11px;
	border: solid var(--psor-blue-dark);
	border-width: 0 2.5px 2.5px 0;
	transform: rotate(45deg);
	opacity: 0;
}
.psor-footer .psor-footer__nl-consent input:checked + .psor-footer__nl-check::after {
	opacity: 1;
}
.psor-footer .psor-footer__nl-consent input:focus-visible + .psor-footer__nl-check {
	outline: 2px solid var(--psor-white);
	outline-offset: 3px;
}

/* Shortcode (docelowy formularz) – tylko odstęp, styl da wtyczka/nasz CSS później */
.psor-footer__nl-form--shortcode {
	margin-top: 8px;
}

/* ------------------------------------------------------------------ */
/* Social                                                              */
/* ------------------------------------------------------------------ */
.psor-footer .psor-footer__social {
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	margin: clamp(28px, 3.5vw, 48px) 0 0;
	padding: 0;
	list-style: none;
}
.psor-footer .psor-footer__social-item {
	margin: 0;
	padding: 0;
	list-style: none;
	line-height: 0;
}
.psor-footer .psor-footer__social-link {
	display: inline-block;
	width: 34px;
	height: 34px;
	color: var(--psor-white);
	transition: transform var(--psor-ease), opacity var(--psor-ease);
}
.psor-footer .psor-footer__social-link svg {
	display: block;
	width: 100%;
	height: 100%;
}
.psor-footer .psor-footer__social-link:hover,
.psor-footer .psor-footer__social-link:focus-visible {
	color: var(--psor-white);
	transform: translateY(-3px);
}
.psor-footer .psor-footer__social-link:focus-visible {
	outline: 2px solid var(--psor-white);
	outline-offset: 4px;
	border-radius: 8px;
}

@media (prefers-reduced-motion: reduce) {
	.psor-footer * {
		transition: none !important;
	}
}

/* ------------------------------------------------------------------ */
/* Tablet / mobile                                                     */
/* ------------------------------------------------------------------ */
@media (max-width: 1023px) {
	.psor-footer {
		--footer-radius-bottom: 48px;
		--footer-pad-x: clamp(24px, 5vw, 56px);
	}
	.psor-footer__inner {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
	}
}

@media (max-width: 600px) {
	.psor-footer {
		--footer-radius-top: 20px;
		--footer-radius-bottom: 36px;
		--footer-pad-y: 32px;
	}
	/* Logo, menu i ikony social wyśrodkowane */
	.psor-footer__brand {
		text-align: center;
	}
	.psor-footer .psor-footer__logo-img {
		margin: 0 auto;
	}
	.psor-footer .psor-footer__menu {
		text-align: center;
	}
	.psor-footer .psor-footer__social {
		justify-content: center;
	}
	.psor-footer__nl-row {
		flex-direction: column;
		align-items: stretch;
	}
	.psor-footer .psor-footer__nl-submit {
		width: 100%;
	}
}

/* Link do polityki prywatności pod ikonami social */
.psor-footer .psor-footer__legal {
	margin: clamp(20px, 2.5vw, 32px) 0 0;
	font-family: var(--psor-font-body);
	font-size: 0.875rem;
	line-height: 1.4;
}
.psor-footer .psor-footer__legal a {
	color: var(--psor-white);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}
.psor-footer .psor-footer__legal a:hover,
.psor-footer .psor-footer__legal a:focus-visible {
	color: var(--psor-white);
	text-decoration-thickness: 2px;
}
@media (max-width: 1023px) {
	.psor-footer .psor-footer__legal {
		text-align: center;
	}
}

/* ------------------------------------------------------------------ */
/* Dopasowanie do projektu (12.11.2026) – proporcje z makiety względem   */
/* szerokości karty: logo 4,6% od lewej i 3,1% od góry, newsletter od   */
/* 42,7%, ikony 3,7% od dołu; wysokość z treści (projekt ~3 : 1).       */
/* ------------------------------------------------------------------ */
@media (min-width: 1024px) {
	.psor-footer {
		--footer-pad-x: clamp(24px, 4.1vw, 61px);
		--footer-min-height: 0px;
	}
	.psor-footer__inner {
		grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
		padding-top: clamp(28px, 3.1vw, 41px);
		padding-bottom: clamp(32px, 3.7vw, 49px);
	}
}

/* Dolny pasek linków pod kartą (Polityka prywatności itp.) */
.psor-footer {
	margin-bottom: 24px;
}
.psor-footer .psor-footer__bottom {
	margin: 16px 0 0;
	font-family: var(--psor-font);
	font-size: 0.875rem;
	line-height: 1.4;
}
.psor-footer .psor-footer__bottom-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.psor-footer .psor-footer__bottom-list li {
	margin: 0;
	padding: 0;
	list-style: none;
}
.psor-footer .psor-footer__bottom-list a {
	color: var(--psor-grey-700);
	text-decoration: none;
}
.psor-footer .psor-footer__bottom-list a:hover,
.psor-footer .psor-footer__bottom-list a:focus-visible {
	color: var(--psor-blue);
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

/* Dolny pasek: adres po lewej (szary), linki po prawej (niebieskie); w linii z wnętrzem karty */
.psor-footer .psor-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 12px 32px;
	margin: 20px 0 0;
	padding: 0 var(--footer-pad-x);
	font-family: var(--psor-font);
	font-size: 0.875rem;
	line-height: 1.5;
}
.psor-footer .psor-footer__address {
	display: flex;
	flex-direction: column;
	margin: 0;
	font-style: normal;
	color: var(--psor-grey-700);
}
.psor-footer .psor-footer__address-line--name {
	font-weight: 600;
}
.psor-footer .psor-footer__bottom-list {
	justify-content: flex-end;
}
.psor-footer .psor-footer__bottom-list a {
	color: var(--psor-blue);
}
.psor-footer .psor-footer__bottom-list a:hover,
.psor-footer .psor-footer__bottom-list a:focus-visible {
	color: var(--psor-blue-dark);
}
@media (max-width: 600px) {
	.psor-footer .psor-footer__bottom {
		flex-direction: column;
		align-items: center;
		text-align: center;
	}
	.psor-footer .psor-footer__bottom-list {
		justify-content: center;
	}
}

/* Link w dolnym pasku wyrównany do góry (do pierwszej linii adresu) */
.psor-footer .psor-footer__bottom {
	align-items: flex-start;
}

/* Menu w stopce i adres pod stopką w linii z literą „P” w logo (nie z liściem).
   W logoWhite.svg „P” zaczyna się na 53,06 z 188,66 szerokości; logo ma proporcje 188,66 : 94,45,
   więc wcięcie = wysokość logo × 0,5618. */
@media (min-width: 601px) {
	.psor-footer {
		--footer-logo-h: clamp(64px, 6vw, 88px);
		--footer-text-indent: calc(var(--footer-logo-h) * 0.5618);
	}
	.psor-footer .psor-footer__logo-img {
		height: var(--footer-logo-h);
	}
	.psor-footer .psor-footer__nav {
		margin-left: var(--footer-text-indent);
	}
	.psor-footer .psor-footer__address {
		padding-left: var(--footer-text-indent);
	}
}

/* Logo w stopce: SVG ma w bibliotece wymiary 300×300, więc rysowało się w kwadracie (grafika 2:1 o połowę mniejsza).
   Wymuszamy proporcje pliku – logo ma pełną wysokość, a wcięcie menu trafia w „P”. */
.psor-footer .psor-footer__logo-img {
	width: auto;
	max-width: none;
	aspect-ratio: 188.66 / 94.45;
}

/* Adres: niebieski, w jednej linii, linie rozdzielone przecinkami; link z podkreśleniem */
.psor-footer .psor-footer__address {
	display: block;
	color: var(--psor-blue);
}
.psor-footer .psor-footer__address-line {
	display: inline;
}
.psor-footer .psor-footer__bottom-list a {
	text-decoration: underline;
	text-underline-offset: 0.2em;
}
.psor-footer .psor-footer__bottom-list a:hover,
.psor-footer .psor-footer__bottom-list a:focus-visible {
	text-decoration-thickness: 2px;
}

/* Nazwa w adresie bez pogrubienia */
.psor-footer .psor-footer__address-line--name {
	font-weight: 400;
}

/* Dolny pasek: adres i link jeden pod drugim, wyśrodkowane (wszystkie szerokości) */
.psor-footer .psor-footer__bottom {
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	text-align: center;
}
.psor-footer .psor-footer__address {
	padding-left: 0;
}
.psor-footer .psor-footer__bottom-list {
	justify-content: center;
}
