/*
Theme Name: Apetyczne Pudełka
Theme URI: https://apetycznepudelka.pl/
Author: Apetyczne Pudełka
Author URI: https://apetycznepudelka.pl/
Description: Motyw jednostronicowej wizytówki bistro i cateringu Apetyczne Pudełka (Piaseczno). Sekcje strony głównej (hero, bistro, boxy, catering, opinie, kontakt) edytowalne w Customizerze, przypięte menu z podświetlaniem aktywnej sekcji, dostępność WCAG 2.2 AA, lokalne fonty.
Version: 1.0.4
Requires at least: 6.4
Tested up to: 6.8
Requires PHP: 8.1
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: apetyczne-pudelka
Tags: one-column, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, accessibility-ready, food-and-drink, blog
*/

/* ---------- Zmienne ---------- */
:root {
	--cream: #fbf6ee;
	--paper: #fff;
	--sand: #f1e4cf;
	--line: #eadcc6;
	--ink: #2a1e17;
	--ink-2: #4a3b31;
	--brick: #a8341f;
	--brick-dark: #7e2414;
	--on-dark: #fbf6ee;
	--on-dark-2: #e6d9c6;
	--accent-dark: #f2b8a8;
	--r-control: 12px;
	--r-media: 24px;
	--header-h: 80px;
	--admin-bar: 0px;
	--font-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
	--font-display: "Fraunces", Georgia, serif;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + var(--admin-bar) + 16px);
}

html:has(body.admin-bar) {
	--admin-bar: 32px;
}

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

	*,
	*::before,
	*::after {
		transition: none !important;
	}
}

body {
	margin: 0;
	background: var(--cream);
	color: var(--ink);
	font: 400 17px/1.6 var(--font-body);
	-webkit-text-size-adjust: 100%;
}

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

h1,
h2,
h3 {
	font-family: var(--font-display);
	font-weight: 700;
	line-height: 1.1;
	margin: 0;
}

h1 {
	font-size: clamp(36px, 5.2vw, 64px);
	line-height: 1.05;
	letter-spacing: -0.01em;
}

h2 {
	font-size: clamp(30px, 3.4vw, 44px);
}

p {
	margin: 0;
}

a {
	color: var(--brick);
	text-underline-offset: 3px;
}

a:hover {
	color: var(--brick-dark);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 3px solid var(--brick);
	outline-offset: 3px;
	border-radius: 6px;
}

.is-dark a:focus-visible {
	outline-color: var(--on-dark);
}

/* ---------- WordPress: klasy wymagane ---------- */
.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	clip: auto !important;
	clip-path: none;
	height: auto;
	width: auto;
	margin: 0;
}

.skip-link {
	position: absolute;
	left: 16px;
	top: -100px;
	z-index: 100000;
	background: var(--ink);
	color: var(--on-dark);
	padding: 12px 16px;
	border-radius: var(--r-control);
}

.skip-link:focus {
	top: calc(8px + var(--admin-bar));
	color: var(--on-dark);
}

.alignleft {
	float: left;
	margin: 0 24px 16px 0;
}

.alignright {
	float: right;
	margin: 0 0 16px 24px;
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.wp-caption,
.gallery-caption,
.wp-element-caption {
	font-size: 15px;
	color: var(--ink-2);
}

.wp-caption {
	max-width: 100%;
}

.sticky .entry-title::after {
	content: "";
}

.bypostauthor > .comment-body .comment-author b {
	color: var(--brick);
}

/* ---------- Układ ---------- */
.wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding-inline: 24px;
}

.muted {
	color: var(--ink-2);
}

.eyebrow {
	font-weight: 600;
	color: var(--brick);
	margin-bottom: 8px;
}

.eyebrow--caps {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 14px;
}

.lead {
	font-size: 19px;
	max-width: 34em;
}

.measure {
	max-width: 32em;
}

.stack-16 > * + * {
	margin-top: 16px;
}

.section {
	padding-block: 80px;
}

.section--flush-top {
	padding-top: 0;
}

.band {
	background: var(--paper);
	border-block: 1px solid var(--line);
}

.split {
	display: flex;
	flex-wrap: wrap;
	gap: 48px;
	align-items: center;
}

.split > .text {
	flex: 1 1 440px;
	min-width: 0;
}

.split > .media {
	flex: 1 1 340px;
	min-width: 0;
	max-width: 480px;
}

.media img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	border-radius: var(--r-media);
}

/* ---------- Nagłówek ---------- */
.site-header {
	position: sticky;
	top: var(--admin-bar);
	z-index: 50;
	background: var(--cream);
	border-bottom: 1px solid var(--line);
	box-shadow: 0 2px 12px rgba(42, 30, 23, 0.06);
}

.site-header .wrap {
	display: flex;
	align-items: center;
	gap: 8px 24px;
	min-height: var(--header-h);
	flex-wrap: wrap;
}

.site-branding {
	margin-right: auto;
	line-height: 0;
}

.site-branding a {
	display: block;
	border-radius: 8px;
}

.site-branding img {
	height: 56px;
	width: auto;
}

.site-title {
	font-family: var(--font-display);
	font-weight: 700;
	font-size: 24px;
	line-height: 1.2;
	color: var(--ink);
	text-decoration: none;
}

.main-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 4px 24px;
	font-weight: 500;
}

.main-navigation a {
	color: var(--ink);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 4px;
	border-bottom: 2px solid transparent;
}

.main-navigation a:hover {
	color: var(--brick);
}

.main-navigation a[aria-current="true"],
.main-navigation .current-menu-item > a {
	color: var(--brick);
	border-bottom-color: var(--brick);
}

.header-call {
	order: 2;
}

/* ---------- Przyciski ---------- */
.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 12px 24px;
	border: 0;
	border-radius: var(--r-control);
	font: 600 17px/1.3 var(--font-body);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s, color 0.15s, transform 0.05s;
}

.btn:active {
	transform: translateY(1px);
}

.btn-primary {
	background: var(--brick);
	color: #fff;
}

.btn-primary:hover {
	background: var(--brick-dark);
	color: #fff;
}

.btn-dark {
	background: var(--ink);
	color: var(--on-dark);
}

.btn-dark:hover {
	background: #000;
	color: var(--on-dark);
}

.btn-outline {
	background: var(--paper);
	color: var(--ink);
	border: 2px solid var(--ink);
}

.btn-outline:hover {
	background: var(--sand);
	color: var(--ink);
}

.btn-light {
	background: var(--on-dark);
	color: var(--ink);
}

.btn-light:hover {
	background: var(--sand);
	color: var(--ink);
}

.btn-2line {
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
}

.btn-2line small {
	font-size: 14px;
	font-weight: 500;
	opacity: 0.92;
}

.btn-2line span {
	font-size: 20px;
}

.btn-row {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin-top: 32px;
}

.btn-row .btn {
	flex: 1 1 240px;
}

.icon {
	width: 18px;
	height: 18px;
	flex: none;
}

.nowrap {
	white-space: nowrap;
}

/* ---------- Sekcje ---------- */
.hero {
	padding-block: 48px 80px;
}

.hero .media {
	max-width: 540px;
}

.hero .lead {
	margin-top: 24px;
}

.hero-meta {
	font-size: 15px;
	margin-top: 16px;
}

.catering .split {
	align-items: stretch;
}

.catering .media img {
	height: 100%;
}

.catering-card {
	flex: 1 1 520px;
	min-width: 0;
	background: var(--ink);
	color: var(--on-dark);
	border-radius: var(--r-media);
	padding: clamp(32px, 5vw, 56px);
}

.catering-card h2 {
	margin-bottom: 16px;
}

.catering-card .eyebrow {
	color: var(--accent-dark);
}

.catering-card .muted {
	color: var(--on-dark-2);
}

.steps {
	list-style: none;
	margin: 32px 0;
	padding: 0;
	display: grid;
	gap: 24px;
}

.steps li {
	display: flex;
	gap: 16px;
}

.steps .num {
	font-family: var(--font-display);
	font-size: 28px;
	line-height: 1;
	color: var(--accent-dark);
	min-width: 20px;
}

.steps h3,
.reviews h3 {
	font: 600 17px/1.5 var(--font-body);
}

.reviews {
	display: flex;
	flex-wrap: wrap;
	gap: 48px;
	align-items: flex-start;
	margin-top: 32px;
}

.reviews figure {
	flex: 1 1 420px;
	min-width: 0;
	margin: 0;
}

.reviews blockquote {
	margin: 0 0 16px;
	font-family: var(--font-display);
	font-weight: 500;
	font-size: clamp(22px, 2.2vw, 28px);
	line-height: 1.35;
}

.reviews figcaption {
	font-size: 15px;
}

.reviews ul {
	flex: 1 1 420px;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
}

.reviews li {
	padding-block: 16px;
	border-bottom: 1px solid var(--line);
}

.reviews li:first-child {
	padding-top: 0;
}

.reviews li:last-child {
	border-bottom: 0;
}

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

.text-link {
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

.contact {
	display: flex;
	flex-wrap: wrap;
	gap: 48px;
}

.contact > div {
	flex: 1 1 360px;
	min-width: 0;
}

.contact-address {
	font-weight: 600;
	margin-top: 24px;
}

.hours {
	display: grid;
	grid-template-columns: auto auto;
	justify-content: start;
	gap: 4px 24px;
	margin: 16px 0 24px;
}

.hours dd {
	margin: 0;
	font-weight: 600;
	color: var(--ink);
}

.phone-label {
	font-size: 15px;
}

.phone-label + .phone + .phone-label {
	margin-top: 16px;
}

.phone {
	font-weight: 600;
	font-size: 22px;
	color: var(--ink);
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

.social {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	margin-top: 16px;
}

.social a {
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

/* ---------- Stopka ---------- */
.site-footer {
	padding-block: 24px;
	font-size: 14px;
}

.site-footer .wrap {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 24px;
	align-items: center;
	justify-content: space-between;
}

.footer-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0 16px;
}

.footer-navigation a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

/* ---------- Wpisy i strony ---------- */
.content-area {
	padding-block: 56px 80px;
}

.entry {
	max-width: 760px;
	margin-inline: auto;
}

.entry + .entry {
	margin-top: 56px;
	padding-top: 56px;
	border-top: 1px solid var(--line);
}

.entry-title a {
	color: var(--ink);
	text-decoration: none;
}

.entry-title a:hover {
	color: var(--brick);
}

.entry-meta {
	font-size: 15px;
	color: var(--ink-2);
	margin-top: 8px;
}

.entry-thumbnail img {
	border-radius: var(--r-media);
	margin-top: 24px;
}

.entry-content,
.entry-summary {
	margin-top: 24px;
}

.entry-content > * + * {
	margin-top: 1em;
}

.entry-content h2,
.entry-content h3 {
	margin-top: 1.5em;
}

.entry-content ul,
.entry-content ol {
	padding-left: 1.4em;
}

.entry-content::after {
	content: "";
	display: table;
	clear: both;
}

.entry-footer {
	margin-top: 24px;
	font-size: 15px;
	color: var(--ink-2);
}

.page-links,
.navigation {
	margin-top: 32px;
}

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	justify-content: space-between;
}

.nav-links a,
.page-numbers {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}

.page-header {
	max-width: 760px;
	margin: 0 auto 40px;
}

.search-form {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 24px;
}

.search-form label {
	flex: 1 1 240px;
}

input[type="search"],
input[type="text"],
input[type="email"],
input[type="url"],
textarea {
	width: 100%;
	min-height: 44px;
	padding: 10px 14px;
	border: 2px solid var(--ink-2);
	border-radius: var(--r-control);
	background: var(--paper);
	color: var(--ink);
	font: inherit;
}

.comments-area {
	max-width: 760px;
	margin: 56px auto 0;
}

.comment-list {
	list-style: none;
	padding: 0;
}

.comment-list .children {
	list-style: none;
	padding-left: 24px;
}

.comment-body {
	padding-block: 16px;
	border-bottom: 1px solid var(--line);
}

.comment-form p {
	margin-top: 16px;
}

.comment-form label {
	display: block;
	font-weight: 600;
	margin-bottom: 4px;
}

.form-submit .submit {
	background: var(--brick);
	color: #fff;
	border: 0;
	border-radius: var(--r-control);
	min-height: 44px;
	padding: 12px 24px;
	font: 600 17px/1.3 var(--font-body);
	cursor: pointer;
}

.form-submit .submit:hover {
	background: var(--brick-dark);
}

/* ---------- Slider (karuzela) ---------- */
.slider {
	width: 100%;
	max-width: 540px;
	margin-inline: auto;
}

.slider-stage {
	position: relative;
	aspect-ratio: 4 / 5;
	width: 100%;
	overflow: hidden;
	border-radius: 24px;
	background: #2a1e17;
	box-shadow: 0 10px 30px rgba(42, 30, 23, 0.16), 0 2px 6px rgba(42, 30, 23, 0.08);
	touch-action: pan-y;
}

.slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.8s ease, visibility 0s linear 0.8s;
}

.slide.is-active {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.8s ease, visibility 0s;
}

.slider .slide img {
	width: 100%;
	height: 100%;
	aspect-ratio: auto;
	object-fit: cover;
	border-radius: 0;
	display: block;
}

.slider-prev,
.slider-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 2;
	width: 48px;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(251, 246, 238, 0.92);
	color: #2a1e17;
	box-shadow: 0 2px 10px rgba(42, 30, 23, 0.25);
	cursor: pointer;
	transition: background-color 0.15s, transform 0.15s;
}

.slider-prev {
	left: 16px;
}

.slider-next {
	right: 16px;
}

.slider-prev:hover,
.slider-next:hover {
	background: #fff;
}

.slider-prev:active,
.slider-next:active {
	transform: translateY(-50%) scale(0.95);
}

.slider-prev svg,
.slider-next svg,
.slider-toggle svg {
	width: 22px;
	height: 22px;
}

.slider-nav {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 4px;
	margin-top: 12px;
}

.slider-dot,
.slider-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 44px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
	color: #2a1e17;
	border-radius: 8px;
}

.slider-toggle {
	width: 44px;
	margin-right: 4px;
}

.slider-dot::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 999px;
	background: #c9b49a;
	transition: width 0.3s ease, background-color 0.3s ease;
}

.slider-dot:hover::before {
	background: #8a6f56;
}

.slider-dot[aria-current="true"]::before {
	width: 24px;
	background: #a8341f;
}

.slider-stage button:focus-visible {
	outline: 3px solid #2a1e17;
	outline-offset: 2px;
	box-shadow: 0 0 0 6px #fbf6ee;
}

.slider-nav button:focus-visible {
	outline: 3px solid #a8341f;
	outline-offset: 2px;
}

.slider-toggle .icon-play,
.slider-toggle.is-paused .icon-pause {
	display: none;
}

.slider-toggle.is-paused .icon-play {
	display: block;
}

@media (prefers-reduced-motion: reduce) {

	.slide,
	.slide.is-active {
		transition: none;
	}
}

@media (max-width: 899px) {

	.slider-stage {
		border-radius: 18px;
	}

	.slider-prev,
	.slider-next {
		width: 44px;
		height: 44px;
	}

	.slider-prev {
		left: 8px;
	}

	.slider-next {
		right: 8px;
	}
}

/* ---------- Przycisk „Wróć na górę” ---------- */
.to-top {
	position: fixed;
	right: max(16px, env(safe-area-inset-right));
	bottom: max(16px, env(safe-area-inset-bottom));
	z-index: 60;
	width: 48px;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: var(--r-control);
	background: var(--brick);
	color: #fff;
	box-shadow: 0 0 0 2px var(--cream), 0 4px 14px rgba(42, 30, 23, 0.25);
	cursor: pointer;
	animation: to-top-in 0.2s ease-out;
	transition: background-color 0.15s, transform 0.05s;
}

.to-top:hover {
	background: var(--brick-dark);
}

.to-top:active {
	transform: translateY(1px);
}

.to-top:focus-visible {
	outline: 3px solid var(--ink);
	outline-offset: 3px;
}

.to-top[hidden] {
	display: none;
}

@keyframes to-top-in {

	from {
		opacity: 0;
		transform: translateY(8px);
	}

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

@media (min-width: 900px) {

	.to-top {
		right: 24px;
		bottom: 24px;
	}
}

/* ---------- Mobile / tablet ---------- */
@media (max-width: 899px) {

	:root {
		--header-h: 112px;
	}

	.site-header .wrap {
		padding-block: 8px;
		gap: 0 12px;
	}

	.site-branding img {
		height: 44px;
	}

	.header-call {
		order: 0;
		padding: 10px 16px;
	}

	.main-navigation {
		order: 3;
		flex: 1 1 100%;
	}

	.main-navigation ul {
		justify-content: space-between;
		gap: 0 12px;
		font-size: 15px;
		overflow-x: auto;
		scrollbar-width: none;
	}

	.section {
		padding-block: 56px;
	}

	.hero {
		padding-block: 24px 56px;
	}

	.split {
		gap: 32px;
	}

	.media img {
		aspect-ratio: 4 / 3;
	}

	.split > .media {
		max-width: none;
	}
}

@media (max-width: 782px) {

	html:has(body.admin-bar) {
		--admin-bar: 46px;
	}
}

@media (max-width: 600px) {

	html:has(body.admin-bar) {
		--admin-bar: 0px;
	}
}
