/* Hubertka theme – styles that theme.json cannot express. */

:root {
	--hb-border: rgba(66, 70, 53, 0.16);
	--hb-header-h: var(--wp--custom--header-height, 96px);
	--hb-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M4 12 12 4M5.5 4H12v6.5' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

html {
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--hb-header-h) + 1rem);
}

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

body {
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
}

::selection {
	background: var(--wp--preset--color--green);
	color: var(--wp--preset--color--surface);
}

:where(a, button, input, select, textarea):focus-visible {
	outline: 2px solid var(--wp--preset--color--gold);
	outline-offset: 3px;
}

/* Hyphenate by page language so long German compounds break at syllables. */
h1, h2, h3, h4, h5, h6 {
	text-wrap: balance;
	overflow-wrap: break-word;
	hyphens: auto;
	hyphenate-limit-chars: 10 4 4;
}

p { text-wrap: pretty; }

/* ---------- Header ---------- */

.site-header-wrap {
	position: sticky;
	top: 0;
	z-index: 50;
	border-bottom: 1px solid var(--hb-border);
}

/* Blur lives on a pseudo-element: backdrop-filter on the wrapper would trap the fixed mobile overlay inside the header. */
.site-header-wrap::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: color-mix(in srgb, var(--wp--preset--color--base) 88%, transparent);
	-webkit-backdrop-filter: saturate(1.4) blur(12px);
	backdrop-filter: saturate(1.4) blur(12px);
}

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

.site-header {
	min-height: var(--hb-header-h);
	align-items: stretch !important;
}

.site-header__logo {
	display: flex;
	align-items: center;
	padding: 0.6rem clamp(1rem, 2vw, 1.5rem);
	border-right: 1px solid var(--hb-border);
}

.site-header__logo img {
	width: clamp(150px, 16vw, 230px) !important;
	height: auto;
}

.site-header__nav { align-self: stretch; }

.site-header__nav .wp-block-navigation__container { height: 100%; align-items: stretch; }

@media (min-width: 600px) {
	.site-header__nav .wp-block-navigation-item {
		border-left: 1px solid var(--hb-border);
		padding: 0 clamp(1rem, 3.2vw, 3.25rem);
		display: flex;
		align-items: center;
	}

	.site-header__nav .wp-block-navigation-item:first-child { border-left: 0; }

	.site-header__nav .wp-block-navigation-item__content {
		position: relative;
		padding: 0.4rem 0;
		color: var(--wp--preset--color--olive);
		text-decoration: none;
		transition: color 0.2s ease;
	}

	.site-header__nav .wp-block-navigation-item:not(.is-cta) .wp-block-navigation-item__content::after {
		content: "";
		position: absolute;
		left: 0;
		right: 0;
		bottom: -2px;
		height: 2px;
		background: var(--wp--preset--color--gold);
		transform: scaleX(0);
		transform-origin: left;
		transition: transform 0.25s ease;
	}

	.site-header__nav .wp-block-navigation-item__content:hover,
	.site-header__nav .current-menu-item > .wp-block-navigation-item__content { color: var(--wp--preset--color--green); }

	.site-header__nav .wp-block-navigation-item__content:hover::after,
	.site-header__nav .current-menu-item > .wp-block-navigation-item__content::after { transform: scaleX(1); }

	.site-header__nav .is-cta { padding-right: clamp(1rem, 2vw, 1.5rem); }

	.site-header__nav .is-cta .wp-block-navigation-item__content {
		background: var(--wp--preset--color--green);
		color: var(--wp--preset--color--surface);
		border-radius: 999px;
		padding: 0.8rem 1.5rem;
		transition: background-color 0.2s ease, transform 0.2s ease;
	}

	.site-header__nav .is-cta .wp-block-navigation-item__content:hover {
		background: var(--wp--preset--color--olive);
		color: var(--wp--preset--color--surface);
		transform: translateY(-1px);
	}
}

@media (max-width: 1100px) and (min-width: 600px) {
	.site-header__nav { font-size: 0.95rem !important; }
}

/* Language switcher */
.site-header__end { align-self: stretch; align-items: stretch !important; }

.lang-switch { display: flex; align-items: center; }

.lang-switch ul { display: flex; gap: 0.15rem; margin: 0; padding: 0 clamp(0.75rem, 1.5vw, 1.25rem) 0 0.25rem; list-style: none; }

.lang-switch a {
	display: block;
	padding: 0.35rem 0.55rem;
	border-radius: 999px;
	color: var(--wp--preset--color--olive);
	font-size: 0.85rem;
	letter-spacing: 0.06em;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.lang-switch a:hover { background: var(--wp--preset--color--beige); color: var(--wp--preset--color--green); }

.lang-switch .is-current a { background: var(--wp--preset--color--beige); color: var(--wp--preset--color--green); font-weight: 700; }

@media (max-width: 599px) {
	.lang-switch ul { padding: 0; }
	.lang-switch a { padding: 0.3rem 0.4rem; font-size: 0.8rem; }
}

/* Mobile overlay menu */
.site-header__nav .wp-block-navigation__responsive-container-open {
	padding: 0 1.25rem;
	align-self: center;
}

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

.site-header__nav .wp-block-navigation__responsive-container.is-menu-open {
	padding: 1.5rem 1.5rem 2rem;
}

.site-header__nav .is-menu-open .wp-block-navigation__responsive-container-content,
.site-header__nav .is-menu-open .wp-block-navigation__container { align-items: flex-start !important; }

.site-header__nav .is-menu-open .wp-block-navigation__container {
	gap: 1.25rem !important;
	font-family: var(--wp--preset--font-family--display);
	font-size: 1.6rem;
}

.site-header__nav .is-menu-open .is-cta .wp-block-navigation-item__content {
	margin-top: 1rem;
	background: var(--wp--preset--color--green);
	color: var(--wp--preset--color--surface);
	border-radius: 999px;
	padding: 0.9rem 1.6rem;
	font-size: 1.1rem;
}

@media (max-width: 599px) {
	:root { --hb-header-h: 72px; }
	.site-header__logo { border-right: 0; }
	.site-header__logo img { width: 150px !important; }
}

/* ---------- Content helpers ---------- */

.site-main > .wp-block-post-content > *:first-child { margin-top: 0; }

/* Core forces align-items on columns; honour the parent alignment per column. */
.wp-block-columns.are-vertically-aligned-center > .wp-block-column { align-self: center; }
.wp-block-columns.are-vertically-aligned-bottom > .wp-block-column { align-self: flex-end; }

/* Section rhythm: top level groups in page content */
.wp-block-post-content > .wp-block-group.is-section,
.wp-block-post-content > .wp-block-columns.is-section {
	margin-top: var(--wp--preset--spacing--70);
}

.wp-block-post-content > .is-section:first-child { margin-top: 0; }

.is-style-lead {
	color: var(--wp--preset--color--green);
	font-size: var(--wp--preset--font-size--large);
	font-weight: 700;
	line-height: 1.55;
}

.is-style-phone {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(1.6rem, 3vw, 2.25rem);
	line-height: 1.2;
	display: flex;
	align-items: center;
	gap: 1rem;
}

.is-style-phone::before {
	content: "";
	flex: none;
	width: 1.1em;
	height: 1.1em;
	background: url("../icons/phone.svg") center / contain no-repeat;
}

.is-style-phone a { color: var(--wp--preset--color--green); text-decoration: none; }
.is-style-phone a:hover { color: var(--wp--preset--color--gold); }

.site-footer .is-style-phone { font-size: clamp(1.4rem, 2.2vw, 1.9rem); white-space: nowrap; }

.site-footer .is-style-phone a { color: var(--wp--preset--color--surface); }

/* Arrow text link (former "Více o nás ↗") */
.wp-block-button.is-style-arrow .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--olive);
	padding: 0.25rem 0;
	border-radius: 0;
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	font-size: 1.125rem;
	box-shadow: inset 0 -2px 0 transparent;
	transition: color 0.2s ease, box-shadow 0.2s ease;
}

.wp-block-button.is-style-arrow .wp-block-button__link::after {
	content: "";
	width: 1em;
	height: 1em;
	background: currentColor;
	-webkit-mask: var(--hb-arrow) center / contain no-repeat;
	mask: var(--hb-arrow) center / contain no-repeat;
	transition: transform 0.2s ease;
}

.wp-block-button.is-style-arrow .wp-block-button__link:hover {
	color: var(--wp--preset--color--green);
	box-shadow: inset 0 -2px 0 var(--wp--preset--color--gold);
}

.wp-block-button.is-style-arrow .wp-block-button__link:hover::after { transform: translate(2px, -2px); }

/* Cards */
.wp-block-group.is-style-card {
	padding: clamp(1.75rem, 3.5vw, 3.1rem);
	border-radius: var(--wp--custom--radius);
	height: 100%;
}

.feature-grid { gap: 0 !important; }

.feature-grid > .wp-block-column { display: flex; flex-direction: column; }

.feature-grid .is-style-card { border-radius: 0; flex: 1; display: flex; flex-direction: column; justify-content: flex-end; min-height: 22rem; }

.feature-grid .is-style-card .feature-icon { margin-bottom: auto; }

.feature-grid .wp-block-image { margin: 0; height: 100%; }

.feature-grid .wp-block-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }

.feature-grid .wp-block-image.is-style-rounded { display: flex; align-items: center; justify-content: center; padding: 1.25rem; }

.feature-grid .wp-block-image.is-style-rounded img { aspect-ratio: 1; height: auto; max-width: 23rem; border-radius: 9999px; }

.feature-icon img,
.feature-grid .feature-icon img { width: 72px; height: 72px; object-fit: contain; }

.feature-grid .feature-icon { height: auto; }

.card-dark a { color: var(--wp--preset--color--beige); }
.card-dark a:hover { color: var(--wp--preset--color--gold); }

.hero-photo img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }

.feature-grid h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }

@media (max-width: 781px) {
	.feature-grid .is-style-card { min-height: 0; }
	.feature-grid .is-style-card .feature-icon { margin-bottom: 1.5rem; }
}

/* Images */
.wp-block-image.is-style-rounded img { border-radius: 9999px; }

.wp-block-image img { display: block; }

.img-cover img { width: 100%; height: 100%; object-fit: cover; }

/* Stacked photo collage (O nás hero) */
.collage { position: relative; padding-bottom: 22%; }

.collage .collage__back img { width: 100%; aspect-ratio: 8 / 7; object-fit: cover; }

/* Dog photo sits over the bottom-left snow so it never covers the deer. */
.collage .collage__front {
	position: absolute;
	bottom: 0;
	left: -6%;
	width: 52%;
	margin: 0;
	box-shadow: var(--wp--preset--shadow--soft);
}

.collage .collage__front img { aspect-ratio: 16 / 10; object-fit: cover; }

@media (max-width: 781px) {
	.collage { margin-top: var(--wp--preset--spacing--40); padding-bottom: 26%; }
	.collage .collage__front { left: 0; width: 58%; }
}

/* Hero with circle photo behind heading (O nás) */
.hero-circle { position: relative; isolation: isolate; }

/* Positioned without transform: the scroll reveal animation would override it. */
.hero-circle .hero-circle__bg {
	position: absolute;
	z-index: -1;
	left: 0;
	top: 0;
	bottom: 0;
	height: fit-content;
	width: min(100%, 34rem);
	margin: auto 0;
	opacity: 0.55;
}

.hero-circle .hero-circle__bg img { aspect-ratio: 1; object-fit: cover; border-radius: 9999px; filter: grayscale(1); }

.hero-circle .hero-circle__text { padding-left: clamp(0rem, 14vw, 13.75rem); padding-block: clamp(2rem, 8vw, 6rem); }

@media (max-width: 781px) {
	.hero-circle .hero-circle__bg { opacity: 0.3; left: 0; right: 0; margin: auto; }
	.hero-circle .hero-circle__text { padding-left: 0; }
	.hero-circle { padding-bottom: 3rem; }
}

.is-style-phone a { white-space: nowrap; }

/* Team */
.team-member .wp-block-image img {
	width: 180px;
	height: 180px;
	object-fit: cover;
	border-radius: 9999px;
	box-shadow: 0 0 0 6px var(--wp--preset--color--base), 0 0 0 7px var(--wp--preset--color--gold);
}

.team-member h3 { margin-top: 1.75rem; font-size: 1.5rem; }

/* Testimonials */
.testimonials { align-items: stretch; }

.testimonial { display: flex; flex-direction: column; gap: 1.75rem; height: 100%; }

.wp-block-quote.is-style-bubble {
	position: relative;
	flex: 1;
	margin: 0;
	padding: 2.25rem 2.25rem 1.75rem;
	background: var(--wp--preset--color--beige);
	border-radius: var(--wp--custom--radius);
	color: var(--wp--preset--color--olive);
	font-size: 1.0625rem;
	line-height: 1.65;
}

.wp-block-quote.is-style-bubble::after {
	content: "";
	position: absolute;
	left: 2.25rem;
	bottom: -26px;
	border-style: solid;
	border-width: 26px 40px 0 0;
	border-color: var(--wp--preset--color--beige) transparent transparent transparent;
}

.testimonial__author { align-items: center; }

.testimonial__author .wp-block-image { margin: 0; flex: none; }

.testimonial__author .wp-block-image img { width: 88px; height: 88px; object-fit: cover; border-radius: 9999px; }

.testimonial__author p {
	font-family: var(--wp--preset--font-family--display);
	text-transform: uppercase;
	color: var(--wp--preset--color--olive);
	letter-spacing: 0.02em;
	margin: 0;
}

/* Separators */
.wp-block-separator { border: 0; border-top: 1px solid currentColor; opacity: 0.25; }

.wp-block-separator + .wp-block-buttons { margin-top: var(--wp--preset--spacing--40); }

.extras-photo, .pond { max-width: 760px; margin-inline: auto; }

.extras-photo img, .pond img { aspect-ratio: 4 / 3; object-fit: cover; }

.extras { margin-bottom: var(--wp--preset--spacing--50); }

/* Video */
.wp-block-video video { border-radius: var(--wp--custom--radius); background: var(--wp--preset--color--dark); width: 100%; }

/* Embedded map */
.map-embed iframe { display: block; width: 100%; height: clamp(300px, 40vw, 460px); border: 0; border-radius: var(--wp--custom--radius); filter: saturate(0.85); }

/* Gallery */
.wp-block-gallery.has-nested-images figure.wp-block-image img { border-radius: var(--wp--custom--radius); }

/* Lists with gold markers */
.wp-block-post-content ul:not([class*="wp-block-social"]):not(.wp-block-navigation__container) li::marker { color: var(--wp--preset--color--gold); }

/* ---------- Blog cards ---------- */

.post-card { background: var(--wp--preset--color--surface); border-radius: var(--wp--custom--radius); overflow: hidden; padding-bottom: 1.5rem; height: 100%; transition: box-shadow 0.25s ease, transform 0.25s ease; }

.post-card:hover { box-shadow: var(--wp--preset--shadow--soft); transform: translateY(-3px); }

.post-card > :not(.wp-block-post-featured-image) { margin-inline: 1.5rem; }

.post-card .wp-block-post-featured-image { margin: 0 0 1rem; }

.post-card .wp-block-post-featured-image img { border-radius: 0; }

.post-card .wp-block-post-title a { text-decoration: none; color: var(--wp--preset--color--olive); }

.post-card .wp-block-post-title a:hover { color: var(--wp--preset--color--green); }

/* ---------- Footer ---------- */

.site-footer a { text-decoration: none; }

.site-footer .site-footer__title { font-size: 1.5rem; margin-bottom: 1rem; }

.site-footer .site-footer__sep { margin-top: var(--wp--preset--spacing--60); margin-bottom: var(--wp--preset--spacing--30); opacity: 0.6; height: 1px; border: 0; }

/* ---------- Contact Form 7 ---------- */

.wpcf7 form { display: grid; gap: 1rem; }

.wpcf7 form p { margin: 0; }

.wpcf7 form br { display: none; }

.order-card { max-width: 1040px; margin-inline: auto; }

.wpcf7 form .block { gap: 1.1rem; }

.wpcf7 form .block > div { flex: 1 1 0; margin: 0 !important; width: auto !important; }

.wpcf7 :is(input[type="text"], input[type="email"], input[type="tel"], input[type="date"], input[type="number"], select, textarea) {
	width: 100%;
	box-sizing: border-box;
	padding: 0.9rem 1.05rem;
	font: inherit;
	color: var(--wp--preset--color--olive);
	background: var(--wp--preset--color--surface);
	border: 1px solid #dcdbd3;
	border-radius: var(--wp--custom--radius);
	height: auto !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wpcf7 :is(input, select, textarea):focus {
	outline: none;
	border-color: var(--wp--preset--color--green);
	box-shadow: 0 0 0 3px rgba(1, 73, 13, 0.15);
}

.wpcf7 ::placeholder { color: #8a8c82; }

.wpcf7 h2, .wpcf7 h3, .wpcf7 h4 { font-size: 1.5rem; margin: 1.25rem 0 0; }

.wpcf7 input[type="checkbox"] { accent-color: var(--wp--preset--color--green); width: 1.1rem; height: 1.1rem; vertical-align: -0.15rem; margin-right: 0.35rem; }

.wpcf7 .wpcf7-list-item { margin: 0 1rem 0 0; }

.wpcf7 input[type="submit"] {
	justify-self: start;
	cursor: pointer;
	border: 0;
	border-radius: 999px;
	padding: 1rem 2.25rem;
	background: var(--wp--preset--color--green);
	color: var(--wp--preset--color--surface);
	font-family: var(--wp--preset--font-family--display);
	font-size: 1rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	transition: background-color 0.2s ease;
}

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

.wpcf7 .wpcf7-not-valid-tip { font-size: 0.9rem; color: #b3261e; margin-top: 0.3rem; }

.wpcf7 form .wpcf7-response-output { margin: 0; padding: 1rem 1.25rem; border-radius: var(--wp--custom--radius); border: 0 !important; background: var(--wp--preset--color--beige); color: var(--wp--preset--color--olive); }

.wpcf7 form.sent .wpcf7-response-output { background: #dcebdc; }

@media (max-width: 767px) {
	.wpcf7 form .block { display: grid; }
}

/* ---------- Motion ---------- */

@media (prefers-reduced-motion: no-preference) {
	@supports (animation-timeline: view()) {
		.wp-block-post-content :is(.wp-block-image, .wp-block-heading, .wp-block-columns, .wp-block-quote, .wp-block-video):not(.hero-circle__bg, .collage__front, .collage__back, .hero-circle *, .collage *) {
			animation: hb-reveal linear both;
			animation-timeline: view();
			animation-range: entry 0% entry 35%;
		}
	}
}

@keyframes hb-reveal {
	from { opacity: 0; transform: translateY(24px); }
	to { opacity: 1; transform: none; }
}

/* Editor: keep reveal off so blocks are always visible while editing. */
.editor-styles-wrapper .wp-block-post-content *,
.editor-styles-wrapper * { animation: none !important; }
