/**
 * Mammothdesign components — own styles on top of the base theme (style.css).
 *
 * 1. Shared components — used on every page, same class names everywhere:
 *    header-sticky, page-intro, page-section, heading--sm, text-block, chip, links.
 * 2. Page / feature components — one section each:
 *    project popup, contact, pricing, faq, about, clients.
 *
 * Breakpoint: 768px (same as the theme).
 */

/* ================================================================== *
 * 1. SHARED COMPONENTS
 * ================================================================== */

/* ------------------------------------------------------------------ *
 * Site header — subpage variant (white, always fixed)
 * <header id="masthead" class="site-header header-1 header-sticky">
 * without data-header-fixed (the theme JS sticky stays off),
 * followed by <div class="header-cap"></div> as the 80px spacer.
 * ------------------------------------------------------------------ */

#masthead.header-sticky {
	position: fixed;
	top: 0;
	background: #fff;
}

/* ------------------------------------------------------------------ *
 * Page intro — the title block at the top of a subpage.
 *
 * <div class="page-intro text-center">
 *   <p class="page-intro__badge"><a class="chip">…</a></p>     (optional)
 *   <div class="heading text-center">
 *     <h1 class="title">the_title()</h1>
 *     <p class="subtitle">…</p>                                 (optional)
 *   </div>
 *   <p class="page-intro__lead">…</p>                           (optional)
 * </div>
 * ------------------------------------------------------------------ */

.page-intro {
	padding-top: 6vh;
	padding-bottom: 6vh;
}

.page-intro .subtitle,
.page-intro .heading .subtitle {
	letter-spacing: 0;
	color: #000;
	margin: 0;
}

.page-intro__badge {
	margin-bottom: 12px;
}

.page-intro__lead {
	max-width: 760px;
	margin-left: auto;
	margin-right: auto;
	font-size: 17px;
}

/* ------------------------------------------------------------------ *
 * Page section — vertical rhythm of content blocks.
 *
 * .page-section          90px top / bottom (50px on mobile)
 * .page-section--fill    grey background (#f9f9f9)
 *
 * Top padding is dropped right after the page intro and between two
 * plain sections, so the spacing never doubles.
 * ------------------------------------------------------------------ */

.page-section {
	padding-top: 90px;
	padding-bottom: 90px;
}

.page-intro + .page-section,
.page-section:not(.page-section--fill) + .page-section:not(.page-section--fill) {
	padding-top: 0;
}

.page-section--fill {
	background-color: #f9f9f9;
}

@media screen and (max-width: 768px) {
	.page-section {
		padding-top: 50px;
		padding-bottom: 50px;
	}
}

/* ------------------------------------------------------------------ *
 * Typography helpers
 * .heading.heading--sm  smaller section heading (h3 22px)
 * .text-block           body copy (15px / 25px, light)
 * ------------------------------------------------------------------ */

.heading--sm h3.title {
	font-size: 22px;
	line-height: 30px;
	font-weight: 700;
}

.text-block,
.text-block p {
	font-size: 15px;
	line-height: 25px;
	font-weight: 300;
}

.text-block p {
	margin-top: 10px;
}

/* ------------------------------------------------------------------ *
 * Chip — small rounded label (pill).
 * .chip            grey
 * .chip--save      green
 * .chip--hidden    keeps its space, invisible (aligns boxes)
 * .chip__inner     coloured part inside the chip (e.g. rating "4.8/5")
 * ------------------------------------------------------------------ */

.chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.25rem;
	min-height: 24px;
	margin-top: 0;
	padding: 0.2rem 0.75rem;
	border-radius: 16px;
	background-color: rgba(136, 136, 136, 0.12);
	font-size: 0.8em;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	vertical-align: middle;
}

.chip--save {
	color: #365701;
	background-color: rgba(195, 255, 72, 0.4);
}

.chip--hidden {
	visibility: hidden;
}

.chip__inner {
	height: 22px;
	margin-left: -8px;
	padding: 0 0.5rem;
	border-radius: 12px;
	background-color: var(--md-accent);
	color: #fff;
	font-size: 0.9em;
	line-height: 22px;
}

/* ------------------------------------------------------------------ *
 * Links in content — a.-unlink: dotted underline
 * ------------------------------------------------------------------ */

.entry-content a.-unlink {
	text-decoration: 1px underline dotted;
	text-underline-offset: 0.25em;
}

.entry-content a.-unlink:hover {
	opacity: 0.65;
}

/* ================================================================== *
 * 2. PAGE / FEATURE COMPONENTS
 * ================================================================== */

/* ------------------------------------------------------------------ *
 * Project popup (index-new.html)
 * ------------------------------------------------------------------ */

/* Category tag — same look as on the slide (span.tag.-inverse).
   Overrides the blue tag from .portfolio-gallery .gallery-content .tag. */
.portfolio-gallery .gallery-content .tag.-inverse {
	background: transparent;
	color: #fff;
	border-color: rgba(255, 255, 255, 0.75);
}

/* Several categories (slide + popup): gap between tags, wrap to the next line. */
.portfolio-item .description .tag,
.portfolio-gallery .portfolio-page .tag {
	display: inline-block;
	margin: 0 4px 8px 0;
	line-height: 2.5;
}

/* Project page (single.php): the popup view, open from the start; close = link to home. */
.portfolio-gallery.project-page a.gallery-close {
	display: block;
	text-decoration: none;
}

/* Loading state while the gallery is fetched via AJAX. */
.portfolio-gallery.is-loading .slider {
	position: relative;
}

.portfolio-gallery.is-loading .slider::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 40px;
	height: 40px;
	margin: -20px 0 0 -20px;
	border: 2px solid rgba(255, 255, 255, 0.2);
	border-top-color: #fff;
	border-radius: 50%;
	animation: mammothdesign-spin 0.8s linear infinite;
}

@keyframes mammothdesign-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Gallery slider: vertical change of images (project-popup.js, Owl Animate plugin).
   Forward (wheel down, ↓, →, dots forward): new image comes up from the bottom.
   Back: new image comes down from the top. */
.portfolio-gallery .slider .owl-stage-outer {
	overflow: hidden;
}

.portfolio-gallery .slider .owl-item.animated {
	animation-duration: 0.6s;
	animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1);
	animation-fill-mode: both;
}

.portfolio-gallery .slider .owl-item.owl-animated-in {
	z-index: 1;
}

.portfolio-gallery .slider .owl-item.owl-animated-out {
	z-index: 0;
}

.md-slide-in-up {
	animation-name: md-slide-in-up;
}

.md-slide-out-up {
	animation-name: md-slide-out-up;
}

.md-slide-in-down {
	animation-name: md-slide-in-down;
}

.md-slide-out-down {
	animation-name: md-slide-out-down;
}

@keyframes md-slide-in-up {
	from { transform: translate3d(0, 100%, 0); }
	to { transform: translate3d(0, 0, 0); }
}

@keyframes md-slide-out-up {
	from { transform: translate3d(0, 0, 0); }
	to { transform: translate3d(0, -100%, 0); }
}

@keyframes md-slide-in-down {
	from { transform: translate3d(0, -100%, 0); }
	to { transform: translate3d(0, 0, 0); }
}

@keyframes md-slide-out-down {
	from { transform: translate3d(0, 0, 0); }
	to { transform: translate3d(0, 100%, 0); }
}

/* ------------------------------------------------------------------ *
 * Home slider — numbers around the current slide only (projects-slider.js).
 * Hidden numbers still increment the CSS counter, so no display: none.
 * ------------------------------------------------------------------ */

.slider-vertical-numbers > .owl-dot.is-far {
	visibility: hidden !important;
	height: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	margin: 0 !important;
	overflow: hidden !important;
}

/* ------------------------------------------------------------------ *
 * Contact (page-new-contact.htm) — map, details, form
 * ------------------------------------------------------------------ */

.contact-map {
	position: relative;
	height: 500px;
}

/* Map at the bottom of the page: space between the form and the map. */
.page-kontakt .contact-columns {
	margin-bottom: 80px;
}

.contact-map__frame {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	filter: grayscale(1);
}

/* Motion tokens (Emil Kowalski's curves, see skill "animate"). */
:root {
	--md-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
	/* Accent color = rgb(69, 20, 110); replaces the theme's original blue everywhere — see DESIGN.md › Color. */
	--md-accent: #45146e;
}

/* Contact details: icon + value, the whole row is the link. */
.contact-details {
	margin: 0;
	padding: 0;
	list-style: none;
}

.contact-details__item {
	margin: 0 0 14px;
}

.contact-details__link {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	color: #282828;
	text-decoration: none;
}

.contact-details__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 48px;
	height: 48px;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 50%;
	font-size: 16px;
	color: #282828;
	transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms var(--md-ease-out);
}

.contact-details__text {
	font-size: 1.05rem;
	font-weight: 500;
	word-break: break-word;
}

.contact-details__link:active .contact-details__icon {
	transform: scale(0.96);
}

@media (hover: hover) and (pointer: fine) {
	.contact-details__link:hover .contact-details__icon {
		background-color: #282828;
		border-color: #282828;
		color: #fff;
	}
}

.contact-details__link:focus-visible {
	outline: none;
}

.contact-details__link:focus-visible .contact-details__icon {
	box-shadow: 0 0 0 3px rgba(40, 40, 40, 0.15);
	border-color: #282828;
}

/*
 * Entrance (assets/js/modules/reveal.js): sections fade up once per page view,
 * after the preloader closes; below the fold — when scrolled into view.
 *   [data-reveal]        fade + 8px rise (lead / support)
 *   [data-reveal="fade"] fade only (decoration, e.g. photos, logo slider)
 * Delays per element: style="--md-reveal-delay:…" in the templates.
 * Hidden state only with .md-reveal-ready (set by the script) — without JS everything is visible.
 */
.md-reveal-ready [data-reveal] {
	opacity: 0;
	transform: translateY(8px);
}

.md-reveal-ready [data-reveal="fade"] {
	transform: none;
}

.md-reveal-ready [data-reveal].is-revealed {
	animation: md-reveal-up 300ms var(--md-ease-out) both;
	animation-delay: var(--md-reveal-delay, 0ms);
}

.md-reveal-ready [data-reveal="fade"].is-revealed {
	animation-name: md-reveal-fade;
	animation-duration: 400ms;
}

@keyframes md-reveal-up {
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes md-reveal-fade {
	to {
		opacity: 1;
	}
}

/* Reduced motion: no movement, no stagger — the group appears together. */
@media (prefers-reduced-motion: reduce) {
	.md-reveal-ready [data-reveal] {
		transform: none;
	}

	.md-reveal-ready [data-reveal].is-revealed {
		animation-name: md-reveal-fade;
		animation-delay: 0ms;
	}

	.contact-details__link:active .contact-details__icon {
		transform: none;
	}
}

.contact-intro {
	margin-bottom: 30px;
}

.contact-columns .heading {
	margin-bottom: 30px;
}

.contact-gform .gform_wrapper {
	margin-top: 0;
}

@media screen and (max-width: 768px) {
	.contact-map {
		height: 350px;
	}

	.contact-details {
		margin-bottom: 40px;
	}
}

/* ------------------------------------------------------------------ *
 * Pricing (page-new-price.htm) — price boxes
 * ------------------------------------------------------------------ */

.pricing__boxes {
	margin-top: 2em;
	padding-left: 10%;
	padding-right: 10%;
}

.pricing__footnote {
	margin-top: 32px;
	font-size: 15px;
}

.pricing-box.vc_column-inner {
	padding: 1.5vw;
	border: 1px solid rgba(136, 136, 137, 0.24);
	border-radius: 20px;
}

.pricing-box--grey.vc_column-inner {
	background-color: #f7f7f8;
}

.pricing-box--highlight.vc_column-inner {
	background-color: rgba(195, 255, 72, 0.24);
}

.pricing-box .chip:first-child {
	margin-bottom: 6px;
}

.pricing-box__heading {
	margin-bottom: 24px;
}

.pricing-box__heading h4.title {
	font-size: 24px;
}

.pricing-box__heading .subtitle {
	font-weight: 400;
	font-size: 0.96em;
	line-height: 1;
	margin-bottom: 1em;
}

/* Price: "od" 2000 "zł" "netto" (ACF prefiks, cena, waluta, okres). */
.pricing-box__price {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: 0.4rem;
	row-gap: 0;
}

.pricing-box__price .title {
	margin: 0;
	font-size: 3.5em;
	line-height: 1;
}

.pricing-box__prefix,
.pricing-box__currency {
	font-size: 24px;
	font-weight: 600;
	line-height: 1;
}

.pricing-box__period {
	font-size: 0.96em;
	line-height: 1;
	opacity: 0.7;
}

.pricing-box__btn.btn {
	display: flex;
	justify-content: center;
	width: 100%;
	margin-top: calc(1em + 12px);
}


.pricing-box__list {
	margin: 0;
	padding: 1em 0 0;
	list-style: none;
}

/* Check mark at the first line of the feature (also for features in two lines), text in one column. */
.pricing-box__list li {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
}

.pricing-box__list li i {
	flex: 0 0 1.1em;
	margin: 0;
	color: var(--md-accent);
	line-height: inherit;
	text-align: left;
}

@media screen and (max-width: 768px) {
	.pricing__boxes {
		padding-left: 0;
		padding-right: 0;
	}

	.pricing-box.vc_column-inner {
		margin-bottom: 25px;
		padding: 25px;
	}
}

/* ------------------------------------------------------------------ *
 * FAQ (page-new-price.htm) — theme accordion (.accordion-box),
 * toggled by main.min.js via [data-mammothdesign-accordion].
 * ------------------------------------------------------------------ */

.faq__list {
	margin-top: 32px;
}

/* ------------------------------------------------------------------ *
 * About (page-new-about.htm) — 3 columns: text / experience / photo
 * ------------------------------------------------------------------ */

.about-experience {
	margin: 49px 0 0;
	padding: 0;
	list-style: none;
}

.about-experience li + li {
	margin-top: 32px;
}

.about-experience h4.title,
.about-experience .subtitle {
	font-size: 15px;
	line-height: 15px;
}

.about-experience h4.title {
	font-weight: 700;
}

.about-experience .subtitle {
	font-weight: 300;
}

.about-photo {
	margin: 0;
}

.about-photo img {
	display: block;
	width: 100%;
	height: auto;
}

@media screen and (max-width: 768px) {
	.about-columns .vc_col-sm-4 + .vc_col-sm-4 {
		margin-top: 60px;
	}
}

/* ------------------------------------------------------------------ *
 * Clients — logo slider (page-new-about.htm)
 * Owl carousel via [data-mammothdesign-slider] (main.min.js);
 * keep autoHeight on — the theme positions .owl-stage absolutely.
 * Items = .clients-logo (theme hover effect: logo slides up).
 * ------------------------------------------------------------------ */

/* Owl stretches images to 100% — keep logos at their own size. */
.clients-slider .owl-item .clients-logo img {
	display: inline-block;
	width: auto;
	max-width: 100%;
	filter: grayscale(1); /* logos in black & white */
}

/* ------------------------------------------------------------------ *
 * Single post / archive (WordPress theme)
 * ------------------------------------------------------------------ */

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

.entry-meta .info-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 40px;
	margin: 2em 0 0;
	padding: 0;
	list-style: none;
}

.entry-meta .info-list .title {
	margin-bottom: 4px;
}

.post-nav {
	display: flex;
	justify-content: space-between;
	gap: 20px;
	margin-top: 3em;
}

.post-list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.post-list > li {
	padding: 24px 0;
	border-bottom: 1px solid rgba(136, 136, 137, 0.24);
}

.post-list .title {
	margin-bottom: 6px;
}

.pagination-wrap {
	margin-top: 2em;
	text-align: center;
}

/* ---------- Projects slider: title opens the popup ---------- */
.portfolio-item .title .title-link,
.portfolio-item .title .title-link:hover,
.portfolio-item .title .title-link:focus {
	color: inherit;
	text-decoration: none;
	cursor: pointer;
}

/* ---------- Projects slider: date under the title ---------- */
.portfolio-item .portfolio-item__heading .date {
	display: block;
	font-size: 11px;
	opacity: 1;
	color: #fff;
  	margin-bottom: 15px;
}

/* ------------------------------------------------------------------ *
 * Gravity Forms on the Kontakt page — same look as the theme's
 * "classic" contact form: underlined fields, outline round button.
 * Scoped to .contact-gform (Mammothdesign_Contact::render_form()).
 * ------------------------------------------------------------------ */

.contact-gform .gform_wrapper,
.contact-gform .gform_wrapper.gravity-theme {
	margin: 0;
	font-family: inherit;
}

.contact-gform .gform_wrapper .gform_fields {
	grid-column-gap: 30px;
	grid-row-gap: 28px;
}

.contact-gform .gform_wrapper .gfield {
	margin: 0;
	padding: 0;
}

/* Labels */
.contact-gform .gform_wrapper .gfield_label,
.contact-gform .gform_wrapper.gravity-theme .gfield_label,
.contact-gform .gform_wrapper .gfield legend.gfield_label {
	display: block;
	margin: 0 0 6px;
	padding: 0;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: #282828;
}

.contact-gform .gform_wrapper .gfield_required,
.contact-gform .gform_wrapper.gravity-theme .gfield_required {
	color: #ed2525;
	font-size: inherit;
}

.contact-gform .gform_wrapper .gfield_description,
.contact-gform .gform_wrapper.gravity-theme .gfield_description {
	padding-top: 6px;
	font-size: 13px;
	color: rgba(0, 0, 0, 0.55);
}

/* Fields: full border with rounded corners */
.contact-gform .gform_wrapper input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]):not([type="file"]),
.contact-gform .gform_wrapper select,
.contact-gform .gform_wrapper textarea,
.contact-gform .gform_wrapper.gravity-theme input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]):not([type="file"]),
.contact-gform .gform_wrapper.gravity-theme select,
.contact-gform .gform_wrapper.gravity-theme textarea {
	width: 100%;
	margin: 0;
	padding: 15px 18px;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 50px;
	background: #fff;
	box-shadow: none;
	font: inherit;
	font-size: 1rem;
	line-height: 1.5;
	color: #282828;
	transition: border-color .2s ease-in-out, box-shadow .2s ease-in-out;
}

.contact-gform .gform_wrapper select,
.contact-gform .gform_wrapper.gravity-theme select {
	padding-right: 44px;
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23282828' stroke-width='1.5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 18px center;
	cursor: pointer;
}

.contact-gform .gform_wrapper textarea,
.contact-gform .gform_wrapper.gravity-theme textarea {
	height: 150px;
	min-height: 150px;
	resize: vertical;
}

.contact-gform .gform_wrapper input:not([type="submit"]):hover,
.contact-gform .gform_wrapper select:hover,
.contact-gform .gform_wrapper textarea:hover {
	border-color: rgba(0, 0, 0, 0.35);
}

.contact-gform .gform_wrapper input:not([type="submit"]):focus,
.contact-gform .gform_wrapper select:focus,
.contact-gform .gform_wrapper textarea:focus {
	outline: none;
	border-color: #282828;
	box-shadow: 0 0 0 3px rgba(40, 40, 40, 0.08);
}

.contact-gform .gform_wrapper ::placeholder {
	color: rgba(0, 0, 0, 0.45);
	opacity: 1;
}

/*
 * Floating labels (assets/js/modules/contact-form.js adds the classes):
 *   .md-float      — field with one text input / textarea / select,
 *   .is-focused    — the input has focus,
 *   .has-value     — the input is not empty (select: always).
 * Label sits inside the input; on focus or with a value it moves above the input and stays there.
 * Without JS the labels simply stay above the inputs.
 */
.contact-gform .gform_wrapper .gfield.md-float {
	position: relative;
	padding-top: 24px;
}

.contact-gform .gform_wrapper .gfield.md-float > .gfield_label,
.contact-gform .gform_wrapper.gravity-theme .gfield.md-float > .gfield_label {
	position: absolute;
	top: 41px; /* 24px space + 17px: vertically centered in a one-line input */
	left: 19px;
	right: 19px;
	z-index: 2;
	margin: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: .04em;
	color: rgba(0, 0, 0, 0.5);
	pointer-events: none;
	transition: top .2s ease-in-out, left .2s ease-in-out, font-size .2s ease-in-out, color .2s ease-in-out, letter-spacing .2s ease-in-out;
}

.contact-gform .gform_wrapper .gfield.md-float.is-focused > .gfield_label,
.contact-gform .gform_wrapper .gfield.md-float.has-value > .gfield_label,
.contact-gform .gform_wrapper.gravity-theme .gfield.md-float.is-focused > .gfield_label,
.contact-gform .gform_wrapper.gravity-theme .gfield.md-float.has-value > .gfield_label {
	top: 0;
	left: 2px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: .08em;
	color: #282828;
}

/* Placeholder only when the label has moved up (otherwise they overlap). */
.contact-gform .gform_wrapper .gfield.md-float:not(.is-focused) ::placeholder {
	opacity: 0;
}

/* Checkbox / radio (e.g. consent) */
.contact-gform .gform_wrapper .gchoice {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin-bottom: 6px;
}

.contact-gform .gform_wrapper .gchoice input {
	margin-top: 4px;
}

.contact-gform .gform_wrapper .gchoice label,
.contact-gform .gform_wrapper.gravity-theme .gchoice label {
	max-width: none;
	font-size: 14px;
	line-height: 1.5;
	text-transform: none;
	letter-spacing: 0;
}

/* Submit = theme .btn-outline */
.contact-gform .gform_wrapper .gform_footer,
.contact-gform .gform_wrapper.gravity-theme .gform_footer {
	margin: 30px 0 0;
	padding: 0;
}

.contact-gform .gform_wrapper .gform_footer input[type="submit"],
.contact-gform .gform_wrapper .gform_footer button,
.contact-gform .gform_wrapper.gravity-theme .gform_footer input[type="submit"],
.contact-gform .gform_wrapper.gravity-theme .gform_footer button {
	margin: 0;
	padding: 14px 32px;
	border: 1px solid #282828;
	border-radius: 50px;
	background: transparent;
	color: #282828;
	font: 600 0.9em "Poppins", sans-serif;
	line-height: 1.2;
	cursor: pointer;
	transition: background .2s ease-in-out, color .2s ease-in-out;
}

.contact-gform .gform_wrapper .gform_footer input[type="submit"]:hover,
.contact-gform .gform_wrapper .gform_footer input[type="submit"]:focus,
.contact-gform .gform_wrapper .gform_footer button:hover,
.contact-gform .gform_wrapper .gform_footer button:focus {
	background: #282828;
	color: #fff;
}

.contact-gform .gform_wrapper .gform_ajax_spinner {
	margin-left: 12px;
	vertical-align: middle;
}

/* Validation */
.contact-gform .gform_wrapper .gform_validation_errors,
.contact-gform .gform_wrapper.gravity-theme .gform_validation_errors,
.contact-gform .gform_wrapper div.validation_error {
	margin: 0 0 30px;
	padding: 12px 16px;
	border: 1px solid #ed2525;
	border-radius: 8px;
	background: transparent;
	box-shadow: none;
	color: #ed2525;
}

.contact-gform .gform_wrapper .gform_validation_errors > h2,
.contact-gform .gform_wrapper.gravity-theme .gform_validation_errors > h2 {
	margin: 0;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.5;
	color: #ed2525;
}

.contact-gform .gform_wrapper .gform_validation_errors > h2 .gform-icon {
	display: none;
}

.contact-gform .gform_wrapper .gfield_error input:not([type="submit"]),
.contact-gform .gform_wrapper .gfield_error select,
.contact-gform .gform_wrapper .gfield_error textarea,
.contact-gform .gform_wrapper.gravity-theme .gfield_error input:not([type="submit"]),
.contact-gform .gform_wrapper.gravity-theme .gfield_error select,
.contact-gform .gform_wrapper.gravity-theme .gfield_error textarea {
	border: 1px solid #ed2525;
}

.contact-gform .gform_wrapper .gfield.md-float.gfield_error > .gfield_label {
	color: #ed2525;
}

.contact-gform .gform_wrapper .gfield_error .gfield_label,
.contact-gform .gform_wrapper.gravity-theme .gfield_error .gfield_label {
	color: #ed2525;
}

.contact-gform .gform_wrapper .validation_message,
.contact-gform .gform_wrapper.gravity-theme .validation_message,
.contact-gform .gform_wrapper.gravity-theme .gfield_validation_message {
	margin: 6px 0 0;
	padding: 0;
	border: 0;
	background: transparent;
	font-size: 13px;
	color: #ed2525;
}

/*
 * Confirmation after sending — replaces the form (Gravity Forms AJAX).
 * Same language as the page: 1px light border, round corners, black & white,
 * check mark in a 48px circle like the contact icons. Seen once per send, so it gets
 * a short entrance (state change, not a jump): card fades up 8px, the check lands 60ms later.
 */
.contact-gform .gform_confirmation_message {
	display: flex;
	align-items: center;
	gap: 18px;
	padding: 24px 28px;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 24px;
	background: #fff;
	font-size: 1.05rem;
	line-height: 1.5;
	color: #282828;
	animation: md-confirm-in 300ms var(--md-ease-out) both;
}

.contact-gform .gform_confirmation_message::before {
	content: "";
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background:
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='14' viewBox='0 0 18 14'%3E%3Cpath d='M1.5 7.5l5 5L16.5 1.5' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center,
		#282828;
	animation: md-confirm-check 300ms var(--md-ease-out) 60ms both;
}

@keyframes md-confirm-in {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
}

@keyframes md-confirm-check {
	from {
		opacity: 0;
		transform: scale(0.9);
	}
}

@keyframes md-confirm-fade {
	from {
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.contact-gform .gform_confirmation_message {
		animation-name: md-confirm-fade;
	}

	.contact-gform .gform_confirmation_message::before {
		animation: none;
	}
}

@media screen and (max-width: 640px) {
	.contact-gform .gform_wrapper .gform_footer input[type="submit"],
	.contact-gform .gform_wrapper .gform_footer button {
		width: 100%;
	}
}

/* ---------- Logo from "Ustawienia główne": white version over the slider ---------- */
.site-header .logo-img--invert {
	filter: brightness(0) invert(1);
}

/* ------------------------------------------------------------------ *
 * Mobile menu button in the header (≤ 768 px, the left panel is hidden there)
 * ------------------------------------------------------------------ */

#masthead .mobile-menu-toggle {
	display: none;
}

@media screen and (max-width: 768px) {
	#masthead .mobile-menu-toggle {
		display: flex;
		align-items: center;
		justify-content: center;
		position: absolute;
		top: 50%;
		right: 12px;
		z-index: 5;
		width: 46px;
		height: 46px;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 50%;
		background: transparent;
		color: #282828;
		transform: translateY(-50%);
		cursor: pointer;
	}

	/* White over the home slider, dark when the header gets the white fixed background. */
	#masthead.light-text:not(.header-fixed) .mobile-menu-toggle {
		color: #fff;
	}

	#masthead .mobile-menu-toggle:hover,
	#masthead .mobile-menu-toggle:focus {
		background: rgba(0, 0, 0, 0.06);
		color: inherit;
	}

	#masthead.light-text:not(.header-fixed) .mobile-menu-toggle:hover,
	#masthead.light-text:not(.header-fixed) .mobile-menu-toggle:focus {
		background: rgba(255, 255, 255, 0.15);
		color: #fff;
	}

	#masthead .mobile-menu-toggle .hamburger {
		color: inherit;
		pointer-events: none;
	}
}

/* Fullscreen menu on phones: style.css hides it (≤ 768 px) — show it full width. */
@media screen and (max-width: 768px) {
	.fullscreen-navigation {
		display: block;
		overflow-y: auto;
	}

	.fullscreen-navigation:after {
		width: 100%;
	}

	.fullscreen-navigation .site-branding {
		margin: 60px 0 0 30px;
	}

	.fullscreen-navigation .fullscreen-menu-wrap {
		display: block;
	}

	.fullscreen-navigation ul.menu {
		width: 100%;
		padding: 10px 0 0 10px;
		transform: none;
	}

	.fullscreen-navigation #secondary-menu > li > a {
		padding: 0 30px 0 20px;
	}

	.fullscreen-navigation.with-panel-offset .close {
		left: auto;
		right: 10px;
	}

	.fullscreen-navigation .copyright {
		width: auto;
		left: 30px;
		right: 30px;
		bottom: 25px;
	}
}

/* ------------------------------------------------------------------ *
 * Dropdown on the Kontakt form (assets/js/modules/contact-form.js → Dropdown).
 * The native <select> stays in the form, visually hidden; the button + listbox replace it.
 * Open: 200ms, scale 0.97 → 1 + fade, growing out of the field (transform-origin: top).
 * Close: 150ms. Options appear together — no stagger on a control used many times.
 * ------------------------------------------------------------------ */

.contact-gform .gform_wrapper select.md-select__native {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0 !important;
	opacity: 0;
	pointer-events: none;
}

.contact-gform .md-select {
	position: relative;
}

.contact-gform .md-select__trigger {
	display: flex;
	align-items: center;
	justify-content: flex-start; /* theme buttons center their content */
	width: 100%;
	min-height: 56px;
	margin: 0;
	padding: 15px 52px 15px 24px;
	border: 1px solid rgba(0, 0, 0, 0.18);
	border-radius: 50px; /* pill, like the theme buttons */
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23282828' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 24px center;
	box-shadow: none;
	font: inherit;
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.5;
	color: #282828;
	text-align: left;
	cursor: pointer;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.contact-gform .md-select__value {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

@media (hover: hover) and (pointer: fine) {
	.contact-gform .md-select__trigger:hover {
		background-color: #fff;
		border-color: rgba(0, 0, 0, 0.35);
		color: #282828;
	}
}

.contact-gform .md-select__trigger:focus,
.contact-gform .md-select.is-open .md-select__trigger {
	outline: none;
	background-color: #fff;
	border-color: #282828;
	box-shadow: 0 0 0 3px rgba(40, 40, 40, 0.08);
	color: #282828;
}

.contact-gform .gfield_error .md-select__trigger {
	border-color: #ed2525;
}

.contact-gform .md-select__list {
	position: absolute;
	top: calc(100% + 6px);
	left: 0;
	right: 0;
	z-index: 20;
	max-height: 280px;
	margin: 0;
	padding: 6px;
	overflow-y: auto;
	list-style: none;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 20px;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12), 0 2px 6px rgba(0, 0, 0, 0.06);
	transform-origin: top center;
	opacity: 0;
	transform: scale(0.97) translateY(-4px);
	visibility: hidden;
	pointer-events: none;
	transition:
		opacity 150ms var(--md-ease-out),
		transform 150ms var(--md-ease-out),
		visibility 0s linear 150ms;
}

.contact-gform .md-select.is-open .md-select__list {
	opacity: 1;
	transform: none;
	visibility: visible;
	pointer-events: auto;
	transition:
		opacity 200ms var(--md-ease-out),
		transform 200ms var(--md-ease-out),
		visibility 0s;
}

.contact-gform .md-select__list:focus {
	outline: none;
}

.contact-gform .md-select__option {
	position: relative;
	margin: 0;
	padding: 11px 40px 11px 14px;
	border-radius: 8px;
	font-size: 1rem;
	line-height: 1.4;
	color: #282828;
	cursor: pointer;
	user-select: none;
}

.contact-gform .md-select__option.is-active {
	background: rgba(0, 0, 0, 0.05);
}

.contact-gform .md-select__option[aria-selected="true"] {
	font-weight: 600;
}

.contact-gform .md-select__option[aria-selected="true"]::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 16px;
	width: 6px;
	height: 11px;
	margin-top: -7px;
	border: solid #282828;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

/* Floating label over the dropdown: always above (a select always has a value). */
.contact-gform .gform_wrapper .gfield.md-float.md-has-select > .gfield_label {
	pointer-events: auto;
	cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
	.contact-gform .md-select__list,
	.contact-gform .md-select.is-open .md-select__list {
		transform: none;
	}
}

/*
 * Project popup / project page: "Chcę taką stronę" button (template-parts/projects/popup.php).
 * Ghost button on the dark popup: transparent, white border + text; hover → white fill, black text.
 * Press feedback scale(0.97) 160ms (Emil: button press). Links to Kontakt with the service preselected (?usluga=).
 */
.portfolio-gallery .project-cta.btn {
	margin-top: 32px;
	padding: 16px 32px;
	border: 1px solid #fff;
	border-radius: 50px;
	background: transparent;
	color: #fff;
	transition:
		background-color 160ms ease,
		color 160ms ease,
		transform 160ms var(--md-ease-out);
}

@media (hover: hover) and (pointer: fine) {
	.portfolio-gallery .project-cta.btn:hover {
		background: #fff;
		border-color: #fff;
		color: #000;
	}
}

.portfolio-gallery .project-cta.btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.portfolio-gallery .project-cta.btn:active {
	transform: scale(0.97);
}

@media (prefers-reduced-motion: reduce) {
	.portfolio-gallery .project-cta.btn:active {
		transform: none;
	}
}
