/* ==========================================================================
   VET Plyša – statická rekonstrukce původního webu (WordPress + Bricks).
   Hodnoty (barvy, odsazení, velikosti písma, breakpointy) přebírají
   vygenerované CSS původního webu. Základ 1rem = 10px, stejně jako Bricks.
   Breakpointy: 991px (tablet), 767px (mobil na šířku), 478px (mobil).
   ========================================================================== */

/* ============================ písma =====================================
   Vlastní hosting místo Google Fonts – bez self-hostingu by se IP adresa
   každého návštěvníka odesílala Googlu (GDPR).
   Soubory jsou variabilní řezy z Google Fonts, staženy jen v subsetech
   latin a latin-ext; cyrilice, řečtina a vietnamština na českém webu
   nemají využití. Rozsah vah pokrývá vše, co stylopis používá:
   EB Garamond 400/500/700/800, Open Sans 400/500/700. */

@font-face {
	font-family: "EB Garamond";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("../fonts/eb-garamond-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "EB Garamond";
	font-style: normal;
	font-weight: 400 800;
	font-display: swap;
	src: url("../fonts/eb-garamond-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
	font-family: "Open Sans";
	font-style: normal;
	font-weight: 400 700;
	font-stretch: 100%;
	font-display: swap;
	src: url("../fonts/open-sans-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
	font-family: "Open Sans";
	font-style: normal;
	font-weight: 400 700;
	font-stretch: 100%;
	font-display: swap;
	src: url("../fonts/open-sans-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
	--green: #32682a;
	--ink: #212121;
	--sage: #abc4ab;
	--page: #f5f5f5;
	--white: #ffffff;
	--font-head: "EB Garamond", "Times New Roman", Georgia, serif;
	--font-body: "Open Sans", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--container: 1440px;
}

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

html {
	font-size: 62.5%;
	background-color: var(--page);
	scroll-behavior: smooth;
	scroll-padding-top: 130px;
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: 1.6rem;
	line-height: 1.6;
	color: var(--ink);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

h1,
h2,
h3 {
	margin: 0;
	font-family: var(--font-head);
	font-weight: 400;
	line-height: 1.15;
}

p {
	margin: 0;
}

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

a {
	color: var(--green);
}

/* Zásobník SVG symbolů pro <use>. Nesmí se vykreslit, ale musí zůstat
   v layoutu – display: none láme <use> ve starších WebKitech. */
.svg-sprite {
	position: absolute;
	width: 0;
	height: 0;
	overflow: hidden;
}

:focus-visible {
	outline: 3px solid var(--green);
	outline-offset: 3px;
}

.skip-link {
	position: absolute;
	top: -100px;
	left: 1rem;
	z-index: 10000;
	padding: 1rem 2rem;
	background: var(--white);
	color: var(--ink);
	font-size: 1.6rem;
	text-decoration: none;
	border-radius: 0 0 8px 8px;
}

.skip-link:focus {
	top: 0;
}

/* ============================ layout ===================================== */

.section {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	padding: 10rem 2rem;
}

.container {
	display: flex;
	flex-direction: column;
	width: var(--container);
	max-width: 100%;
	margin-inline: auto;
}

.container--center {
	align-items: center;
}

.container--row {
	flex-direction: row;
	align-items: center;
}

.container--row > * {
	flex: 1 1 0;
	min-width: 0;
}

.container--narrow {
	width: calc(var(--container) * 0.75);
}

.section__title {
	font-size: clamp(3.4rem, 5.6vw, 5rem);
	color: var(--ink);
	text-align: center;
}

.section__lead {
	font-size: 2rem;
	text-align: center;
}

.divider {
	display: block;
	margin: 0 auto;
}

/* ============================ tlačítko =================================== */

.btn {
	display: inline-flex;
	align-items: center;
	gap: 1rem;
	padding: 1.3rem 2.6rem;
	border: 0;
	border-radius: 100px;
	font-family: var(--font-body);
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.btn--phone {
	background-color: var(--green);
	color: var(--white);
	white-space: nowrap;
}

.btn--phone:hover,
.btn--phone:focus-visible {
	background-color: #26501f;
}

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

.btn__icon {
	width: 1.5rem;
	height: 1.5rem;
	flex: none;
}

/* ============================ hlavička =================================== */

.header {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	z-index: 9999;
	width: 100%;
	padding-top: 2.5rem;
}

.header__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	width: 90%;
	margin-inline: auto;
	padding: 1.5rem 4rem;
	background-color: var(--white);
	border-radius: 100px;
}

.header__logo {
	display: flex;
	align-items: center;
	line-height: 0;
}

.header__logo img {
	width: auto;
	height: 90px;
}

.header__tools {
	display: flex;
	align-items: center;
	column-gap: 20px;
}

.nav__list {
	display: flex;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.nav__link {
	display: block;
	padding: 0.5rem 1.5rem;
	font-family: var(--font-head);
	font-size: 2.5rem;
	font-weight: 700;
	color: var(--ink);
	text-decoration: none;
	border-bottom: 3px solid transparent;
	transition: color 0.2s ease, border-color 0.2s ease;
}

.nav__link:hover,
.nav__link.is-active {
	color: var(--green);
	border-bottom-color: var(--green);
}

.nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 6px;
	width: 44px;
	height: 44px;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
}

.nav-toggle__bar {
	display: block;
	width: 30px;
	height: 3px;
	margin-inline: auto;
	background-color: var(--ink);
	border-radius: 2px;
}

/* ============================ mobilní menu =============================== */

.mobile-menu {
	position: fixed;
	inset: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: var(--sage);
}

.mobile-menu[hidden] {
	display: none;
}

.mobile-menu__close {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 48px;
	height: 48px;
	padding: 0;
	background: none;
	border: 0;
	color: var(--ink);
	cursor: pointer;
}

.mobile-menu__close svg {
	width: 32px;
	height: 32px;
}

.mobile-menu__list {
	margin: 0;
	padding: 0 2rem;
	list-style: none;
	text-align: center;
}

.mobile-menu__list a {
	display: block;
	font-family: var(--font-head);
	font-size: clamp(2.8rem, 9vw, 3.5rem);
	font-weight: 800;
	line-height: 8rem;
	color: var(--ink);
	text-decoration: none;
}

.mobile-menu__list a:hover,
.mobile-menu__list a.is-active {
	color: var(--green);
}

.mobile-menu__list a.mobile-menu__phone {
	font-family: var(--font-body);
	font-size: 2.4rem;
	font-weight: 700;
	color: var(--green);
}

/* Zámek scrollu při otevřeném menu nebo lightboxu. iOS Safari ignoruje
   overflow: hidden na body, proto stránku odsuneme z toku; svislý posun
   uloží a po zavření obnoví main.js přes inline top. */
body.is-locked {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	width: 100%;
	overflow: hidden;
}

/* ============================ hero ======================================= */

.hero {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100vh;
	min-height: 520px;
	padding: 0 2rem;
	background-color: #6d7f52;
	background-image: url("../img/hero.jpg");
	background-image: image-set(url("../img/hero.webp") type("image/webp"), url("../img/hero.jpg") type("image/jpeg"));
	background-position: center center;
	background-size: cover;
	background-repeat: no-repeat;
}

@supports (height: 100svh) {
	.hero {
		height: 100svh;
	}
}

/* překryv z původního webu (rgba(0,0,0,0.23)) */
.hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.23);
	pointer-events: none;
}

/* přidané ztmavení uprostřed kvůli čitelnosti bílého nadpisu nad oblohou */
.hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: radial-gradient(ellipse 75% 55% at 50% 48%, rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0) 75%);
	pointer-events: none;
}

.hero__inner {
	position: relative;
	z-index: 1;
	width: var(--container);
	max-width: 100%;
}

.hero__title {
	font-size: clamp(3.2rem, 6vw, 5rem);
	color: var(--white);
	text-align: center;
	text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero__scroll {
	position: absolute;
	bottom: 4rem;
	left: 50%;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	transform: translateX(-50%);
	animation: float 2s ease-in-out infinite;
}

@keyframes float {
	0%,
	100% {
		transform: translate(-50%, -10px);
	}
	50% {
		transform: translate(-50%, 0);
	}
}

/* ============================ o nás ====================================== */

.about__text {
	display: flex;
	flex-direction: column;
	row-gap: 20px;
	padding: 0 2rem;
}

.about__lead {
	font-size: clamp(2rem, 2.2vw, 2.5rem);
}

.about__media {
	display: flex;
	justify-content: center;
}

.about__media img {
	width: 512px;
}

/* ============================ služby ===================================== */

.services {
	margin-top: 5rem;
	align-items: stretch;
}

.service {
	display: flex;
	flex-direction: column;
	align-items: center;
	row-gap: 10px;
	padding: 0 2rem;
}

.service__icon {
	width: 8rem;
	height: auto;
}

.service__title {
	font-size: 3rem;
	font-weight: 500;
	color: var(--ink);
	text-align: center;
}

.service__text {
	font-size: 2rem;
	text-align: center;
}

/* ============================ galerie ==================================== */

.gallery {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	width: 100%;
	margin: 5rem 0 0;
	padding: 0;
	list-style: none;
}

.gallery__button {
	display: block;
	width: 100%;
	padding: 0;
	background: none;
	border: 0;
	border-radius: 10px;
	cursor: pointer;
	overflow: hidden;
	line-height: 0;
}

.gallery__button img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 10px;
	transition: transform 0.4s ease;
}

.gallery__button:hover img,
.gallery__button:focus-visible img {
	transform: scale(1.05);
}

/* ============================ kontakt ==================================== */

.contact__info {
	display: flex;
	flex-direction: column;
	align-items: center;
	row-gap: 10px;
	padding: 2rem;
}

.contact__note {
	font-size: 2rem;
	font-weight: 700;
	text-align: center;
}

.contact__map {
	padding: 2rem;
}

.contact__map iframe {
	display: block;
	width: 100%;
	height: 450px;
	border: 0;
	border-radius: 10px;
	background-color: #e4e4e4;
}

/* ============================ patička ==================================== */

.footer {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem 2rem;
	background-color: var(--sage);
}

.footer__text {
	font-size: 1.8rem;
	font-weight: 500;
	text-align: center;
}

/* ============================ lightbox =================================== */

.lightbox {
	position: fixed;
	inset: 0;
	z-index: 10001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem;
}

.lightbox[hidden] {
	display: none;
}

.lightbox__backdrop {
	position: absolute;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.93);
}

.lightbox__dialog {
	position: relative;
	display: flex;
	align-items: center;
	gap: 1rem;
	width: 100%;
	max-width: 1400px;
}

.lightbox__figure {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	text-align: center;
}

/* width: auto přebíjí rozměry z atributů width/height na <img>. Ty jsou
   v HTML kvůli poměru stran (prohlížeč zná tvar dřív, než fotka doteče),
   ale jako šířka by v kombinaci s max-height fotku zploštily. */
.lightbox__figure img {
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 80vh;
	border-radius: 10px;
}

.lightbox__caption {
	margin-top: 1.5rem;
	font-size: 1.6rem;
	color: #f0f0f0;
}

.lightbox__close,
.lightbox__nav {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	background-color: rgba(0, 0, 0, 0.55);
	border: 2px solid rgba(255, 255, 255, 0.75);
	border-radius: 50%;
	color: var(--white);
	cursor: pointer;
}

.lightbox__close svg,
.lightbox__nav svg {
	width: 24px;
	height: 24px;
}

.lightbox__close {
	position: absolute;
	top: -1rem;
	right: -1rem;
	z-index: 2;
}

.lightbox__close:hover,
.lightbox__nav:hover {
	background-color: var(--green);
}

/* ============================ responzivita =============================== */

/* tablet na výšku – stejný breakpoint, na kterém se v Bricks zapínalo mobilní menu */
@media (max-width: 991px) {
	.nav {
		display: none;
	}

	.nav-toggle {
		display: flex;
	}

	.header__bar {
		padding: 1.5rem 3rem;
	}

	.about__media img {
		width: 100%;
		max-width: 380px;
	}
}

/* mobil na šířku */
@media (max-width: 767px) {
	html {
		scroll-padding-top: 80px;
	}

	.section {
		padding: 5rem 2rem;
	}

	.container--row {
		flex-direction: column;
		row-gap: 2rem;
	}

	/* Ve sloupcovém režimu už "flex: 1 1 0" z .container--row > * nedělí šířku,
	   ale výšku — blokům by vnutil stejnou výšku bez ohledu na obsah a obrázky
	   uvnitř by se svisle roztáhly. Ve sloupci ať si každý blok drží výšku
	   podle svého obsahu. */
	.container--row > * {
		flex: 0 0 auto;
	}

	.container--narrow {
		width: var(--container);
	}

	.header__logo img {
		height: 60px;
	}

	.about__text {
		align-items: center;
	}

	.about__lead {
		text-align: center;
	}

	.about__media img {
		width: 50%;
	}

	.services {
		margin-top: 2rem;
	}

	.gallery {
		grid-template-columns: repeat(2, 1fr);
		margin-top: 3rem;
	}

	.contact__map {
		width: 100%;
		padding: 2rem 0 0;
	}

	.contact__map iframe {
		height: 320px;
	}

	.lightbox__figure img {
		max-height: 70vh;
	}
}

/* mobil na výšku */
@media (max-width: 478px) {
	.header__bar {
		width: 94%;
		padding: 1.2rem 2rem;
	}

	.header__logo img {
		height: 50px;
	}

	.header__tools {
		column-gap: 12px;
	}

	/* stejně jako v původním webu se na mobilu skrývá jen telefon v hlavičce,
	   v sekci Kontakt zůstává */
	.header .btn--phone {
		display: none;
	}

	.hero {
		background-image: url("../img/hero-mobile.jpg");
		background-image: image-set(url("../img/hero-mobile.webp") type("image/webp"), url("../img/hero-mobile.jpg") type("image/jpeg"));
	}

	.service {
		padding: 0 1rem;
	}

	.gallery {
		gap: 10px;
	}

	.lightbox {
		padding: 1rem;
	}

	.lightbox__dialog {
		gap: 0.5rem;
	}

	.lightbox__close,
	.lightbox__nav {
		width: 40px;
		height: 40px;
	}

	.lightbox__close {
		top: -0.5rem;
		right: -0.5rem;
	}
}

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

	.hero__scroll {
		animation: none;
		transform: translateX(-50%);
	}

	.gallery__button img,
	.btn {
		transition: none;
	}
}
