/*
Theme Name: PRO-BRUK
Theme URI: https://pro-bruk.pl
Author: Seobly
Description: Motyw wizytówki dla firmy brukarskiej PRO-BRUK Marcin Kwiatkowski.
Version: 1.0.0
Text Domain: probruk
*/

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
img, picture, svg { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; background: none; border: none; }

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* ── Tokens ── */
:root {
	--bg: #f7f6f4;
	--bg-alt: #eeece8;
	--surface: #ffffff;
	--border: #dedad2;
	--text: #20242b;
	--text-muted: #5b6167;
	--accent: #4b5157;
	--accent-hover: #33373b;
	--accent-warm: #b3502f;
	--accent-warm-bg: rgba(179, 80, 47, 0.09);
	--radius: 10px;
	--shadow: 0 2px 10px rgba(32, 36, 43, 0.06);
	--shadow-hover: 0 8px 24px rgba(32, 36, 43, 0.10);
	--container: 1160px;
	--font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

body {
	font-family: var(--font);
	background: var(--bg);
	color: var(--text);
	line-height: 1.55;
	font-size: 17px;
}

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; color: var(--text); }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { color: var(--text-muted); }

a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}
.skip-link.screen-reader-text:focus {
	position: fixed !important;
	top: 10px; left: 10px;
	width: auto; height: auto;
	clip: auto;
	background: var(--accent);
	color: #fff;
	padding: 12px 18px;
	border-radius: 8px;
	z-index: 100;
	font-weight: 600;
}

.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 640px; margin: 0 0 40px; }
.section-head .eyebrow { color: var(--accent-warm); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 0.85rem; }
.section-head p { margin-top: 12px; }

/* ── Buttons ── */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 26px;
	border-radius: var(--radius);
	font-weight: 600;
	font-size: 0.98rem;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
	min-height: 48px;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: transparent; color: var(--text); border: 1.5px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }
.btn-block { width: 100%; }

/* ── Header ── */
.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(247, 246, 244, 0.92);
	backdrop-filter: blur(8px);
	border-bottom: 1px solid var(--border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 20px;
	gap: 12px;
}
.site-header .logo img { height: 44px; width: auto; }
.site-header .logo { font-weight: 800; font-size: 1.2rem; flex-shrink: 0; }
.nav-links { display: none; align-items: center; gap: clamp(12px, 1.8vw, 28px); font-weight: 500; flex-wrap: nowrap; }
.nav-links a { color: var(--text); transition: color 0.15s ease; white-space: nowrap; }
.nav-links a:hover { color: var(--accent); }
.header-actions { display: flex; align-items: center; gap: 14px; flex-shrink: 0; }
.phone-link {
	display: none;
	align-items: center;
	gap: 8px;
	font-weight: 700;
	color: var(--text);
	white-space: nowrap;
}
.phone-link .phone-icon {
	width: 22px; height: 22px;
	border-radius: 50%;
	background: var(--accent);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	animation: phone-pulse 2.6s ease-in-out infinite;
}
.phone-link svg { width: 12px; height: 12px; fill: #fff; }
@keyframes phone-pulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(75, 81, 87, 0.35); }
	50% { box-shadow: 0 0 0 6px rgba(75, 81, 87, 0); }
}
.hamburger { display: flex; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }

.mobile-nav {
	position: fixed; inset: 0; top: 73px;
	background: var(--bg);
	display: flex; flex-direction: column;
	padding: 24px 20px;
	gap: 4px;
	transform: translateX(100%);
	transition: transform 0.2s ease;
	z-index: 49;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav a { padding: 14px 4px; font-size: 1.1rem; font-weight: 600; border-bottom: 1px solid var(--border); min-height: 48px; display: flex; align-items: center; }
.mobile-nav .btn { margin-top: 16px; }

@media (min-width: 1080px) {
	.site-header { padding: 16px 40px; }
	.nav-links { display: flex; }
	.phone-link { display: inline-flex; }
	.hamburger { display: none; }
	.mobile-nav { display: none; }
}

/* ── Hero ──
   Kolejność w źródle = kolejność na mobile: nagłówek, obraz (przełamuje
   tekst), CTA, chipsy. Na desktopie grid-template-areas układa to w
   dwie kolumny bez zmiany HTML. */
.hero {
	padding: 40px 0 56px;
	display: grid;
	gap: 24px;
	grid-template-areas: "top" "media" "cta" "facts";
}
.hero-top { grid-area: top; }
.hero-media { grid-area: media; }
.hero-cta { grid-area: cta; display: flex; flex-wrap: wrap; gap: 14px; }
.hero-facts { grid-area: facts; }

.hero-top p.lead { font-size: 1.08rem; margin-top: 14px; max-width: 48ch; }
.hero-media img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; }

/* Skrzynki z faktami — świadomie prostokątne, z lewym paskiem akcentu,
   nie "pigułki" jak poprzednia wersja. */
.hero-facts { display: grid; gap: 12px; grid-template-columns: repeat(3, 1fr); }
.hero-facts .fact-box {
	background: var(--surface);
	border: 1px solid var(--border);
	border-left: 3px solid var(--accent-warm);
	border-radius: 6px;
	padding: 12px 14px;
	font-size: 0.86rem;
	font-weight: 600;
	color: var(--text);
	line-height: 1.3;
}

@media (max-width: 599px) {
	.hero-facts { grid-template-columns: 1fr; }
}

@media (min-width: 900px) {
	.hero {
		grid-template-columns: 1.1fr 0.9fr;
		grid-template-areas: "top media" "cta media" "facts media";
		align-items: start;
		row-gap: 22px;
		column-gap: 48px;
		padding: 64px 0 80px;
	}
	.hero-media { align-self: center; }
}

/* Prosty dwukolumnowy blok tekst+obraz (np. sekcja "O nas") —
   celowo osobna klasa od .hero, żeby nie mieszać z grid-template-areas. */
.split-block { display: grid; gap: 24px; align-items: center; }
.split-block .split-media img { border-radius: var(--radius); box-shadow: var(--shadow); aspect-ratio: 4/3; object-fit: cover; }
@media (min-width: 900px) {
	.split-block { grid-template-columns: 1.1fr 0.9fr; gap: 48px; }
}

/* ── Karty (dlaczego my / usługi / materiały) ── */
.card-grid { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .card-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .card-grid.cols-3 { grid-template-columns: repeat(3, 1fr); } .card-grid.cols-4 { grid-template-columns: repeat(4, 1fr); } }

.card {
	background: var(--surface);
	border: 1px solid var(--border);
	border-radius: var(--radius);
	padding: 26px;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card h3 { margin-bottom: 8px; }
.card p { font-size: 0.96rem; }
.card .icon { width: 40px; height: 40px; border-radius: 8px; background: var(--bg-alt); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }

/* Materiały: dodatkowa linia "zastosowanie" */
.material-use { margin-top: 10px; font-size: 0.85rem; color: var(--accent-warm); font-weight: 600; }

/* ── Proces współpracy ── */
.process-list { display: grid; gap: 18px; counter-reset: step; }
@media (min-width: 900px) { .process-list { grid-template-columns: repeat(5, 1fr); } }
.process-step { border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; background: var(--surface); }
.process-step .step-num { font-size: 1.6rem; font-weight: 800; color: var(--accent-warm); opacity: 0.55; }
.process-step h3 { margin: 8px 0 6px; font-size: 1.05rem; }
.process-step p { font-size: 0.92rem; }

/* ── Galeria realizacji ── */
.gallery-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 640px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .gallery-grid { grid-template-columns: repeat(4, 1fr); } }
.gallery-item { position: relative; border-radius: var(--radius); overflow: hidden; aspect-ratio: 4/3; display: block; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.2s ease; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item figcaption {
	position: absolute; left: 0; right: 0; bottom: 0;
	background: linear-gradient(180deg, transparent, rgba(0,0,0,0.55));
	color: #fff; font-size: 0.82rem; padding: 24px 12px 10px;
}

/* ── FAQ (natywny <details>) ── */
.faq-item {
	border-bottom: 1px solid var(--border);
	padding: 6px 0;
}
.faq-item summary {
	cursor: pointer;
	font-weight: 600;
	padding: 14px 4px;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	min-height: 48px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--accent-warm); flex-shrink: 0; }
.faq-item[open] summary::after { content: "\2212"; }
.faq-item p { padding: 0 4px 16px; font-size: 0.96rem; }

/* ── Formularz kontaktowy ── */
.contact-grid { display: grid; gap: 40px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 0.9fr 1.1fr; } }
.contact-info .item { display: flex; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.contact-info .item strong { display: block; }

.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 28px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.94rem; }
.field .required { color: var(--accent); }
.field input[type=text], .field input[type=tel], .field input[type=email], .field select, .field textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid var(--border);
	border-radius: 8px;
	background: #fff;
	min-height: 48px;
}
.field textarea { min-height: 120px; resize: vertical; }
.field-file input { padding: 10px 0; }
.field-hint { font-size: 0.82rem; color: var(--text-muted); margin-top: 6px; }
.field-consent { display: flex; align-items: flex-start; gap: 10px; font-size: 0.88rem; color: var(--text-muted); }
.field-consent input { margin-top: 4px; width: 18px; height: 18px; flex-shrink: 0; }
.field-consent a { color: var(--accent); text-decoration: underline; }

/* honeypot — pole tylko dla botów, ukryte wizualnie, dostępne dla screenreadera pominięte przez tabindex */
.field-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ── Dopasowanie WPForms do wyglądu motywu ── */
.form-card .wpforms-container { margin: 0; }
.form-card .wpforms-field { padding: 0 0 18px; }
.form-card .wpforms-field-label { font-weight: 600; font-size: 0.94rem; margin-bottom: 6px; color: var(--text); }
.form-card .wpforms-required-label { color: var(--accent-warm); }
.form-card input[type=text].wpforms-field-medium,
.form-card input[type=tel].wpforms-field-medium,
.form-card input[type=email].wpforms-field-medium,
.form-card select.wpforms-field-medium,
.form-card textarea.wpforms-field-medium {
	width: 100%;
	padding: 12px 14px;
	border: 1.5px solid var(--border);
	border-radius: 8px;
	background: #fff;
	min-height: 48px;
	font-size: 1rem;
}
.form-card .wpforms-field-description { font-size: 0.82rem; color: var(--text-muted); margin-top: 6px; }
.form-card button[type=submit].wpforms-submit {
	background: var(--accent);
	color: #fff;
	border: none;
	border-radius: var(--radius);
	padding: 14px 26px;
	font-weight: 600;
	min-height: 48px;
	width: 100%;
	cursor: pointer;
}
.form-card button[type=submit].wpforms-submit:hover { background: var(--accent-hover); }

/* ── Mapa (lazy) ── */
.map-placeholder {
	border: 1px dashed var(--border);
	border-radius: var(--radius);
	padding: 40px 20px;
	text-align: center;
	background: var(--bg-alt);
}
.map-embed { border-radius: var(--radius); overflow: hidden; }
.map-embed iframe { width: 100%; height: 360px; border: 0; display: block; }

/* ── Footer ── */
.site-footer { background: var(--text); color: #e7e6e3; padding: 56px 0 26px; margin-top: 40px; }
.site-footer a { color: #e7e6e3; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 1fr; margin-bottom: 36px; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr; } }
.footer-grid h4 { color: #fff; font-size: 0.95rem; margin-bottom: 14px; }
.footer-grid ul li { margin-bottom: 8px; font-size: 0.94rem; }
.footer-logo { font-weight: 800; font-size: 1.2rem; color: #fff; margin-bottom: 10px; }
.footer-desc { font-size: 0.9rem; color: #b7b5b0; max-width: 40ch; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding-top: 20px; font-size: 0.82rem; color: #a9a7a2; display: flex; flex-wrap: wrap; gap: 10px 20px; justify-content: space-between; }

.single-realizacja-thumb { border-radius: var(--radius); margin: 20px 0; box-shadow: var(--shadow); }

/* ── Strony treściowe (o nas, polityki) ── */
.content-page { padding: 56px 0 72px; }
.content-page h1 { margin-bottom: 20px; }
.content-page h2 { margin: 36px 0 14px; }
.content-page p, .content-page li { color: var(--text-muted); margin-bottom: 14px; }
.content-page ul { list-style: disc; padding-left: 22px; }

/* ── Page header (podstrony) ── */
.page-hero { padding: 48px 0 8px; }
.page-hero p { max-width: 60ch; margin-top: 14px; }
.page-hero-media { margin-top: 28px; }
.page-hero-media img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }

/* ── Utility ── */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
