/* ==========================================================================
   Śnieżne Psy – style motywu (odwzorowanie szablonu Flex / preset 7)
   ========================================================================== */

:root {
	--sp-primary: var(--wp--preset--color--primary, #188fc2);
	--sp-primary-light: var(--wp--preset--color--primary-light, #29ace4);
	--sp-header-h: 90px;
	--sp-header-h-sticky: 70px;
}

body {
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img {
	max-width: 100%;
	height: auto;
}

::selection {
	background: var(--sp-primary);
	color: #fff;
}

/* --------------------------------------------------------------------------
   Nagłówek
   -------------------------------------------------------------------------- */
.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
	transition: box-shadow 0.3s ease;
}

.admin-bar .site-header {
	top: var(--wp-admin--admin-bar--height, 32px);
}

@media (max-width: 600px) {
	.admin-bar .site-header {
		top: 0;
	}
}

.site-header__inner {
	min-height: var(--sp-header-h);
	transition: min-height 0.3s ease;
}

.site-header.is-stuck {
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.12);
}

.site-header.is-stuck .site-header__inner {
	min-height: var(--sp-header-h-sticky);
}

.site-header__logo img {
	transition: width 0.3s ease;
}

.site-header.is-stuck .site-header__logo img {
	width: 140px !important;
}

.site-header__nav .wp-block-navigation-item__content {
	color: #777;
	padding: 6px 8px;
	transition: color 0.2s ease;
}

.site-header__nav .wp-block-navigation-item__content:hover,
.site-header__nav .wp-block-navigation-item__content:focus,
.site-header__nav .current-menu-item > .wp-block-navigation-item__content,
.site-header__nav .current-menu-ancestor > .wp-block-navigation-item__content,
.site-header__nav .wp-block-navigation-item__content[aria-current="page"] {
	color: var(--sp-primary-light);
}

.site-header__nav .wp-block-navigation__container {
	gap: 0;
}

/* Menu mobilne */
.site-header__nav .wp-block-navigation__responsive-container.is-menu-open {
	background: #fff;
	padding: 30px;
}

.site-header__nav .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-size: 18px;
	padding: 10px 0;
}

.site-header__nav .wp-block-navigation__responsive-container-open svg,
.site-header__nav .wp-block-navigation__responsive-container-close svg {
	width: 30px;
	height: 30px;
}

/* --------------------------------------------------------------------------
   Główna treść
   -------------------------------------------------------------------------- */
.site-main {
	padding-top: 50px;
	padding-bottom: 50px;
}

.site-main--front {
	padding-top: 0;
	padding-bottom: 0;
}

.wp-site-blocks > main,
.wp-site-blocks > footer,
.wp-site-blocks > .site-footer {
	margin-block-start: 0;
}

.site-main > .entry-title {
	font-size: 30px;
	margin-bottom: 25px;
}

.site-main--front > .wp-block-post-content > * {
	margin-block-start: 0;
}

/* Tekst wyjustowany (styl kolumny) */
.is-style-justify p {
	text-align: justify;
}

.is-style-justify li {
	text-align: left;
}

.wp-block-post-content ul,
.wp-block-post-content ol {
	padding-left: 1.5em;
}

.wp-block-post-content li {
	margin-bottom: 2px;
}

/* Nagłówek podkreślony (jak tytuły dodatków SP Page Builder) */
.wp-block-heading.is-style-underlined {
	display: inline-block;
	margin: 20px 0 5px;
	padding-right: 30px;
	box-shadow: inset 0 -1px 0 #ddd;
	line-height: 1.3;
	padding-bottom: 6px;
}

/* Tytuł sekcji – strona główna */
.wp-block-heading.is-style-section-title {
	text-transform: uppercase;
	text-align: center;
	letter-spacing: 1px;
	margin-top: 20px;
	margin-bottom: 30px;
}

.wp-block-heading.is-style-section-title mark {
	background: transparent;
}

/* Sekcje strony głównej */
.sp-section {
	padding-top: 20px;
	padding-bottom: 20px;
}

.sp-section--intro {
	padding-top: 50px;
	padding-bottom: 20px;
}

/* --------------------------------------------------------------------------
   Banery z paralaksą (blok Okładka)
   -------------------------------------------------------------------------- */
.wp-block-cover.sp-banner {
	padding-top: 50px;
	padding-bottom: 50px;
	color: #fff;
	text-align: center;
}

.wp-block-cover.sp-banner h2 {
	color: #fff;
	font-size: clamp(30px, 4vw, 50px);
	line-height: 1.2;
	margin-bottom: 30px;
}

.wp-block-cover.sp-banner h5,
.wp-block-cover.sp-banner p {
	color: #fff;
	font-family: var(--wp--preset--font-family--open-sans);
	font-size: 16px;
	line-height: 1.6;
	font-weight: 600;
}

.wp-block-cover.sp-banner a {
	color: #fff;
	font-weight: 700;
}

.wp-block-cover.sp-banner a:hover {
	color: #e1f3fb;
	text-decoration: underline;
}

/* --------------------------------------------------------------------------
   Slider (Grupa w stylu „Slider”)
   -------------------------------------------------------------------------- */
.is-style-slider {
	position: relative;
	overflow: hidden;
	background: #dfe9ee;
	margin-top: 0 !important;
}

.is-style-slider > .wp-block-cover {
	aspect-ratio: 2340 / 850;
	min-height: 300px !important;
	margin: 0 !important;
	padding: 0 5%;
}

.sp-slider-ready > .wp-block-cover {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.7s ease, visibility 0.7s ease;
}

.sp-slider-ready > .wp-block-cover:first-child {
	position: relative;
}

.sp-slider-ready > .wp-block-cover.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 1;
}

.is-style-slider .wp-block-cover__inner-container {
	text-align: center;
}

.is-style-slider > .wp-block-cover.has-custom-content-position.is-position-bottom-center {
	padding-bottom: 4%;
}

.wp-block-heading.is-style-slide-title {
	color: #fff;
	font-family: var(--wp--preset--font-family--raleway);
	font-weight: 400;
	font-size: clamp(48px, 8.5vw, 196px);
	line-height: 1.1;
	text-shadow: 2px 3px 4px #000;
	margin: 0;
}

.sp-slider-ready .wp-block-cover.is-active .wp-block-cover__inner-container > * {
	animation: sp-slide-up 0.9s ease 0.7s both;
}

@keyframes sp-slide-up {
	from {
		opacity: 0;
		transform: translateY(40px);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

.is-style-slider .wp-block-buttons {
	margin-top: clamp(15px, 3vw, 60px);
}

.wp-block-button.is-style-white .wp-block-button__link {
	background: #fff;
	color: var(--wp--preset--color--navy, #005289);
	border: 1px solid #fff;
	font-size: clamp(14px, 1.6vw, 28px);
	font-weight: 400;
	letter-spacing: 1px;
	padding: 0.55em 2.2em;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.wp-block-button.is-style-white .wp-block-button__link:hover {
	background: var(--wp--preset--color--navy, #005289);
	color: #fff;
}

.sp-slider__arrow {
	position: absolute;
	top: 50%;
	z-index: 5;
	width: 50px;
	height: 50px;
	margin-top: -25px;
	border: 0;
	background: transparent;
	color: #fff;
	cursor: pointer;
	opacity: 0.8;
	filter: drop-shadow(1px 1px 2px rgba(0, 0, 0, 0.6));
	transition: opacity 0.2s;
}

.sp-slider__arrow:hover,
.sp-slider__arrow:focus-visible {
	opacity: 1;
}

.sp-slider__arrow svg {
	width: 100%;
	height: 100%;
}

.sp-slider__arrow--prev {
	left: 15px;
}

.sp-slider__arrow--next {
	right: 15px;
}

.sp-slider__dots {
	position: absolute;
	bottom: 15px;
	left: 0;
	right: 0;
	z-index: 5;
	display: flex;
	justify-content: center;
	gap: 10px;
}

.sp-slider__dot {
	width: 12px;
	height: 12px;
	padding: 0;
	border: 2px solid rgba(255, 93, 93, 1);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
}

.sp-slider__dot.is-active {
	background: rgba(255, 93, 93, 1);
}

@media (max-width: 781px) {
	.sp-slider__arrow {
		display: none;
	}

	.is-style-slider > .wp-block-cover {
		aspect-ratio: auto;
		min-height: 62vw !important;
	}

	.wp-block-heading.is-style-slide-title {
		font-size: clamp(34px, 11vw, 60px);
	}
}

/* --------------------------------------------------------------------------
   Kafelki (Pętla zapytania w stylu „Kafelki ze zdjęciem”)
   -------------------------------------------------------------------------- */
.wp-block-query.is-style-tiles .wp-block-post-template {
	gap: 30px;
}

.wp-block-query.is-style-tiles .wp-block-post {
	text-align: center;
}

.wp-block-query.is-style-tiles .wp-block-post-featured-image {
	overflow: hidden;
	margin-bottom: 15px;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.wp-block-query.is-style-tiles .wp-block-post-featured-image img {
	transition: transform 0.6s ease, filter 0.4s ease;
}

.wp-block-query.is-style-tiles .wp-block-post:hover .wp-block-post-featured-image img {
	transform: scale(1.08);
	filter: brightness(1.05);
}

.wp-block-query.is-style-tiles .wp-block-post-title {
	font-size: 18px;
	margin: 0 0 10px;
}

.wp-block-query.is-style-tiles .wp-block-post-title a {
	color: var(--wp--preset--color--heading);
}

.wp-block-query.is-style-tiles .wp-block-post-title a:hover {
	color: var(--sp-primary);
}

.wp-block-query.is-style-tiles .wp-block-read-more {
	display: inline-block;
	padding: 6px 18px;
	border: 1px solid var(--sp-primary);
	border-radius: 3px;
	font-size: 13px;
	font-weight: 600;
}

.wp-block-query.is-style-tiles .wp-block-read-more:hover {
	background: var(--sp-primary);
	color: #fff;
}

/* Karta „cardy” na listach wpisów */
.sp-cards .wp-block-post {
	background: #fff;
	transition: background 0.4s;
}

/* --------------------------------------------------------------------------
   Zdjęcia i galerie
   -------------------------------------------------------------------------- */
.wp-block-image img {
	vertical-align: middle;
}

.wp-block-gallery.has-nested-images figure.wp-block-image {
	overflow: hidden;
}

.wp-block-gallery.has-nested-images figure.wp-block-image img {
	transition: transform 0.5s ease, opacity 0.3s ease;
}

.wp-block-gallery.has-nested-images figure.wp-block-image a:hover img {
	transform: scale(1.06);
	opacity: 0.9;
}

.wp-block-gallery a[href] {
	cursor: zoom-in;
}

/* Lightbox */
.sp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.92);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.sp-lightbox.is-open {
	opacity: 1;
}

.sp-lightbox__figure {
	margin: 0;
	max-width: 92vw;
	max-height: 88vh;
	text-align: center;
}

.sp-lightbox__img {
	max-width: 92vw;
	max-height: 82vh;
	width: auto;
	height: auto;
	box-shadow: 0 5px 30px rgba(0, 0, 0, 0.5);
	user-select: none;
}

.sp-lightbox__caption {
	color: #ddd;
	font-size: 13px;
	margin-top: 10px;
}

.sp-lightbox button {
	position: absolute;
	border: 0;
	background: rgba(0, 0, 0, 0.3);
	color: #fff;
	cursor: pointer;
	width: 54px;
	height: 54px;
	padding: 12px;
	border-radius: 50%;
	transition: background 0.2s;
}

.sp-lightbox button:hover,
.sp-lightbox button:focus-visible {
	background: var(--sp-primary);
}

.sp-lightbox button svg {
	width: 100%;
	height: 100%;
}

.sp-lightbox__close {
	top: 15px;
	right: 15px;
}

.sp-lightbox__prev {
	left: 15px;
	top: 50%;
	margin-top: -27px;
}

.sp-lightbox__next {
	right: 15px;
	top: 50%;
	margin-top: -27px;
}

.sp-lightbox__counter {
	position: absolute;
	top: 28px;
	left: 20px;
	color: #bbb;
	font-size: 13px;
}

/* Filmy YouTube */
.wp-block-embed.is-type-video {
	margin-bottom: 30px;
}

/* --------------------------------------------------------------------------
   Formularz kontaktowy (Contact Form 7)
   -------------------------------------------------------------------------- */
.wpcf7 {
	max-width: 600px;
}

.wpcf7 label {
	display: block;
	font-weight: 600;
	color: #555;
	margin-bottom: 15px;
}

.wpcf7 input[type="text"],
.wpcf7 input[type="email"],
.wpcf7 input[type="tel"],
.wpcf7 textarea {
	display: block;
	width: 100%;
	margin-top: 5px;
	padding: 8px 12px;
	border: 1px solid #ccc;
	border-radius: 3px;
	font: inherit;
	font-weight: 400;
	color: #555;
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
	transition: border-color 0.15s, box-shadow 0.15s;
	box-sizing: border-box;
}

.wpcf7 textarea {
	height: 180px;
	resize: vertical;
}

.wpcf7 input:focus,
.wpcf7 textarea:focus {
	border-color: var(--sp-primary);
	outline: 0;
	box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px rgba(24, 143, 194, 0.5);
}

.wpcf7 .sp-consent {
	font-weight: 400;
	font-size: 13px;
	line-height: 1.6;
}

.wpcf7 .sp-consent label {
	font-weight: 400;
	display: inline;
}

.wpcf7 input[type="submit"] {
	background: var(--sp-primary);
	color: #fff;
	border: 0;
	border-radius: 3px;
	padding: 10px 30px;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
}

.wpcf7 input[type="submit"]:hover {
	background: var(--wp--preset--color--primary-dark);
}

.wpcf7-not-valid-tip {
	font-size: 12px;
	font-weight: 400;
}

/* --------------------------------------------------------------------------
   Stopka
   -------------------------------------------------------------------------- */
.site-footer {
	background: var(--wp--preset--color--footer, #363839);
	color: #b0b0b0;
	padding-top: 20px;
	padding-bottom: 20px;
	margin-top: 0 !important;
	font-size: 13px;
}

.site-footer p {
	margin: 4px 0;
}

.site-footer a {
	color: #d6d6d6;
}

.site-footer a:hover {
	color: #f0f0f0;
}

/* Przycisk „do góry” */
.sp-to-top {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 90;
	width: 44px;
	height: 44px;
	padding: 10px;
	border: 0;
	border-radius: 3px;
	background: rgba(24, 143, 194, 0.85);
	color: #fff;
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: all 0.3s ease;
}

.sp-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: none;
}

.sp-to-top:hover {
	background: var(--sp-primary);
}

.sp-to-top svg {
	width: 100%;
	height: 100%;
}

/* 404 */
.site-404__code {
	font-size: 120px;
	color: var(--sp-primary-light);
	margin-bottom: 0;
}

/* Kotwice pod przyklejonym nagłówkiem */
[id] {
	scroll-margin-top: calc(var(--sp-header-h-sticky) + 10px);
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}
}

/* --------------------------------------------------------------------------
   Edytor – slajdy jeden pod drugim, czytelne podpowiedzi
   -------------------------------------------------------------------------- */
.editor-styles-wrapper .is-style-slider > .block-editor-inner-blocks > .block-editor-block-list__layout > .wp-block-cover {
	aspect-ratio: 2340 / 850;
	margin-bottom: 10px !important;
}

.wp-block-heading.is-style-underlined + p {
	margin-top: 10px;
}
