/* ========================================
   Vila Victory - Custom Styles
   Uses CSS custom properties from theme.json
   ======================================== */

/* --- CSS Variables from theme.json --- */
:root {
	--vv-bg: var(--wp--preset--color--background, #e8dece);
	--vv-accent: var(--wp--preset--color--accent, #c1ae92);
	--vv-accent-hover: var(--wp--preset--color--accent-hover, #a99579);
	--vv-section-bg: var(--wp--preset--color--section-bg, #f4efe8);
	--vv-white: var(--wp--preset--color--white, #ffffff);
	--vv-text: var(--wp--preset--color--text, #333333);
}

/* --- Skip to Content (Accessibility) --- */
.skip-to-content {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 9999;
	background: var(--vv-accent);
	color: var(--vv-white);
	padding: 12px 20px;
	font-size: 16px;
	text-decoration: none;
	border-radius: 0 0 6px 0;
}

.skip-to-content:focus {
	left: 0;
}

/* --- Focus Styles (Accessibility) --- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: 3px solid var(--vv-accent);
	outline-offset: 2px;
}

/* --- Global --- */
body {
	margin: 0;
	padding-top: 80px;
}

/* --- Navigation --- */
.site-header {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	box-sizing: border-box;
	z-index: 1000;
	background-color: var(--vv-bg);
	height: 80px;
}

.site-header.wp-block-group {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0;
	padding: 0 20px;
}

/* Nav links */
.site-header .wp-block-navigation {
	gap: 0;
}

.site-header .wp-block-navigation__container {
	gap: 0;
	align-items: center;
}

.site-header .wp-block-navigation-item__content {
	text-decoration: none;
	padding: 30px 0;
	min-width: 160px;
	text-align: center;
	color: black;
	font-size: 17px;
	text-transform: uppercase;
	border-radius: 10px;
	transition: background-color 0.3s;
}

.site-header .wp-block-navigation-item__content:hover {
	background-color: var(--vv-accent);
	color: black;
}

/* Logo / Home button */
.site-header .wp-block-site-logo a {
	padding: 0;
	background-color: var(--vv-white);
	max-height: 110px;
	transition: transform 0.4s ease;
	display: inline-block;
	line-height: 0;
	border-radius: 6px;
	overflow: hidden;
}

.site-header .wp-block-site-logo a:hover {
	transform: scale(1.15);
}

.site-header .wp-block-site-logo img {
	padding: 0 20px;
	height: 130px;
	width: auto;
	vertical-align: middle;
	border-radius: 6px;
}

/* Reservation button */
.btn-nav {
	position: absolute;
	right: 10px;
	top: 50%;
	transform: translateY(-50%);
	background: var(--vv-accent);
	color: var(--vv-white);
	padding: 10px 25px;
	border-radius: 6px;
	font-size: 16px;
	text-decoration: none;
	white-space: nowrap;
	text-transform: uppercase;
}

.btn-nav:hover {
	background: var(--vv-accent-hover);
	color: var(--vv-white);
}

/* Hamburger (hidden on desktop) */
.menu-toggle {
	display: none;
}

.hamburger {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	cursor: pointer;
}

.hamburger span {
	display: block;
	width: 25px;
	height: 3px;
	background-color: black;
	border-radius: 2px;
}

/* --- Hero Sections --- */
.hero-section {
	margin: 0;
	background-size: cover;
	background-position: top;
	background-repeat: no-repeat;
	height: 500px;
	display: flex;
	justify-content: center;
	align-items: center;
}

/* iOS fix: fixed attachment fallback */
@supports (-webkit-touch-callout: none) {
	.hero-section {
		background-attachment: scroll;
	}
}

.hero-section h1 {
	font-size: 40px;
	color: var(--vv-text);
	text-shadow: none;
	margin: 0;
	background: rgba(255, 255, 255, 0.85);
	display: inline-block;
	padding: 15px 40px;
	border-radius: 10px;
}

.hero-section .wp-block-cover__inner-container {
	text-align: center;
}

/* --- Section Containers --- */
.section-container {
	max-width: 1000px;
	margin: 50px auto;
	padding: 40px;
	background-color: var(--vv-section-bg);
	border-radius: 12px;
	box-sizing: border-box;
}

/* --- Cards --- */
.card {
	background: var(--vv-white);
	border-radius: 12px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	transition: transform 0.2s ease;
}

.card:hover {
	transform: translateY(-5px);
}

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

.card h3 {
	margin: 15px;
	text-align: center;
}

.card p {
	margin: 0 20px 20px 20px;
	font-size: 16px;
	line-height: 1.5;
}

/* --- Packages Grid (Homepage) --- */
.packages-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 30px;
	margin-top: 30px;
}

.packages-grid .card {
	padding-bottom: 20px;
	text-align: center;
}

/* --- Content Boxes (Homepage bottom) --- */
.content-boxes {
	display: grid;
	grid-template-columns: 1fr;
	gap: 40px;
}

.content-box {
	background-color: var(--vv-white);
	padding: 30px;
	border-radius: 12px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
	text-align: center;
	text-decoration: none;
	color: var(--vv-text);
	display: block;
	transition: transform 0.2s ease;
}

.content-box:hover {
	transform: translateY(-5px);
}

.content-box h2 {
	margin-bottom: 15px;
	color: var(--vv-text);
}

.content-box p {
	margin-bottom: 20px;
	font-size: 16px;
	line-height: 1.5;
}

/* Content boxes as links */
a.content-box-link {
	text-decoration: none;
	color: var(--vv-text);
	display: block;
}

a.content-box-link:hover .content-box {
	transform: translateY(-5px);
}

a.content-box-link .content-box {
	transition: transform 0.2s ease;
}

/* --- Buttons --- */
.btn {
	background: var(--vv-accent);
	color: var(--vv-white);
	padding: 10px 20px;
	border-radius: 6px;
	text-decoration: none;
	font-size: 16px;
	transition: background-color 0.3s;
	display: inline-block;
}

.btn:hover {
	background: var(--vv-accent-hover);
	color: var(--vv-white);
}

.btn-large {
	padding: 15px 32px;
	font-size: 26px;
	border-radius: 12px;
}

.btn-reservation {
	display: inline-block;
	background: var(--vv-accent);
	color: var(--vv-white);
	padding: 15px 32px;
	border-radius: 6px;
	text-decoration: none;
	font-size: 26px;
	transition: background-color 0.3s;
}

.btn-reservation:hover {
	background: var(--vv-accent-hover);
	color: var(--vv-white);
}

/* --- Intro Section (Ubytovani) --- */
.intro-section {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 30px;
	text-align: center;
}

.intro-text {
	flex: 1;
	min-width: 300px;
}

.intro-text h2 {
	font-size: 26px;
	margin-bottom: 15px;
	color: var(--vv-text);
}

.intro-text p {
	font-size: 18px;
	line-height: 1.6;
	margin-bottom: 20px;
}

.intro-image {
	flex: 1;
	min-width: 300px;
}

.intro-image img {
	width: 100%;
	border-radius: 12px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* --- Properties (Ubytovani) --- */
.property {
	display: flex;
	align-items: center;
	gap: 30px;
	flex-wrap: wrap;
}

.property-left {
	flex-direction: row;
}

.property-right {
	flex-direction: row-reverse;
}

.property > .wp-block-image {
	flex: 1 1 45%;
	min-width: 300px;
	max-width: 50%;
}

.property > .wp-block-image img {
	width: 100%;
	border-radius: 12px;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.property-text {
	flex: 1 1 45%;
	min-width: 300px;
}

.property-text h3 {
	font-size: 26px;
	text-align: center;
	margin-bottom: 15px;
	color: var(--vv-text);
}

.property-text p {
	font-size: 18px;
	line-height: 1.6;
	text-align: center;
	margin-bottom: 20px;
}

/* --- Food Gallery (Restaurace) --- */
.food-gallery.wp-block-gallery {
	gap: 20px;
}

.food-gallery .wp-block-image {
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.food-gallery .wp-block-image img {
	aspect-ratio: 4/3;
	object-fit: cover;
	width: 100%;
	height: auto;
}

/* --- Opening Hours (Restaurace) --- */
.opening-hours {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 40px;
}

.opening-hours h2 {
	font-size: 28px;
	margin-bottom: 10px;
}

/* --- Activity Grid --- */
.activity-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 30px;
	margin-top: 30px;
}

/* Reset WP block gap on grid children */
.activity-grid.is-layout-flow > * {
	margin-block-start: 0;
}

.activity-grid .card {
	display: flex;
	flex-direction: column;
}

/* Reset WP block gap inside cards */
.activity-grid .card.is-layout-flow > * {
	margin-block-start: 0;
}

.activity-grid .card h3 {
	font-size: 22px;
	color: var(--vv-text);
	text-align: left;
	margin: 15px;
}

.activity-grid .card p {
	margin: 0 15px 15px 15px;
	text-align: justify;
}

.activity-grid .card .card-links {
	margin-top: auto;
	padding-top: 5px;
	border-top: 1px solid var(--vv-accent);
	text-align: center;
}

.activity-grid .card .card-links a {
	color: var(--vv-accent-hover);
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
}

.activity-grid .card .card-links a:hover {
	color: var(--vv-text);
	text-decoration: underline;
}

/* Cards without image (places, events) */
.card-place {
	padding-top: 20px;
}

.card-place h3 {
	text-align: center !important;
}

/* --- Contact Section --- */
.contact-section {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 40px;
}

.contact-info,
.contact-form {
	flex: 1 1 400px;
}

.contact-info h2,
.contact-form h2 {
	margin-top: 0;
	font-size: 28px;
	color: var(--vv-text);
}

.contact-info p,
.contact-info a {
	font-size: 16px;
	text-align: left;
	line-height: 1.5;
	color: #000;
	text-decoration: none;
}

.contact-info a {
	text-decoration: underline;
}

/* Contact Form 7 overrides */
.contact-form .wpcf7 input[type="text"],
.contact-form .wpcf7 input[type="email"],
.contact-form .wpcf7 textarea {
	padding: 12px;
	border-radius: 6px;
	border: 1px solid #ccc;
	font-size: 16px;
	width: 100%;
	box-sizing: border-box;
	font-family: 'Red Hat Display', sans-serif;
}

.contact-form .wpcf7 input[type="submit"] {
	background-color: var(--vv-accent);
	color: white;
	padding: 12px 24px;
	border: none;
	border-radius: 6px;
	font-size: 18px;
	cursor: pointer;
	transition: background-color 0.3s;
	font-family: 'Red Hat Display', sans-serif;
}

.contact-form .wpcf7 input[type="submit"]:hover {
	background-color: var(--vv-accent-hover);
}

/* --- Map with GDPR consent wrapper --- */
.map-consent {
	background: var(--vv-white);
	border-radius: 12px;
	padding: 40px;
	text-align: center;
	min-height: 400px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 15px;
}

.map-consent p {
	color: var(--vv-text);
	font-size: 16px;
	max-width: 500px;
}

.map-consent button {
	background-color: var(--vv-accent);
	color: white;
	padding: 12px 24px;
	border: none;
	border-radius: 6px;
	font-size: 16px;
	cursor: pointer;
	transition: background-color 0.3s;
	font-family: 'Red Hat Display', sans-serif;
}

.map-consent button:hover {
	background-color: var(--vv-accent-hover);
}

.map-section iframe {
	border: 0;
	border-radius: 12px;
	width: 100%;
	height: 400px;
}

/* --- Footer --- */

/* Remove WP margin above footer template-part */
footer.wp-block-template-part {
	margin-block-start: 0 !important;
}

.site-footer {
	background-color: var(--vv-accent);
	color: black;
	padding: 10px;
	font-size: 16px;
}

/* Reset ALL WP block gaps and margins inside footer */
.site-footer * {
	margin-block-start: 0;
	margin-block-end: 0;
}

.site-footer .wp-block-group {
	padding: 0;
}

.footer-top {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	text-align: center;
	max-width: 700px;
	margin: 0 auto;
	gap: 0;
}

.footer-top.is-layout-flex {
	gap: 0;
}

.site-footer a,
.site-footer p {
	color: black;
	text-decoration: none;
	margin: 5px 0;
}

.site-footer a:hover {
	color: var(--vv-white);
}

.footer-left,
.footer-right {
	flex: 1 1 250px;
}

.footer-left {
	border-right: 1px solid black;
}

.footer-right {
	padding-top: 20px;
}

.footer-copyright {
	text-align: center;
	margin-top: 0;
}

.footer-copyright p {
	font-size: 14px !important;
}

/* --- 404 Page --- */
.error-404 {
	text-align: center;
	padding: 80px 40px;
}

.error-404 h1 {
	font-size: 64px;
	color: var(--vv-accent);
	margin-bottom: 10px;
}

.error-404 p {
	font-size: 18px;
	margin-bottom: 20px;
}

/* --- Responsive: Tablet (1024px) --- */
@media screen and (max-width: 1024px) {
	.site-header .wp-block-navigation-item__content {
		padding: 20px 15px;
		font-size: 15px;
	}

	.site-header .wp-block-site-logo img {
		height: 100px;
	}

	.btn-nav {
		padding: 8px 16px;
		font-size: 14px;
		right: 10px;
	}

	.hero-section {
		height: 350px;
	}

	.hero-section h1 {
		font-size: 32px;
	}

	.section-container {
		margin: 20px auto;
	}

	.btn-reservation {
		font-size: 20px;
		padding: 12px 24px;
	}

	.btn-large {
		font-size: 20px;
		padding: 12px 24px;
	}

	.property {
		flex-direction: column;
		text-align: center;
	}

	.property img {
		max-width: 60%;
		margin: auto;
	}

	.intro-image {
		max-width: 60%;
		margin: auto;
	}

	.activity-grid {
		grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	}

	.activity-grid .card img {
		height: 150px;
	}

	.activity-grid .card h3 {
		font-size: 18px;
	}

	.activity-grid .card p {
		font-size: 14px;
		text-align: left;
	}

	.contact-section {
		flex-direction: column;
		gap: 20px;
	}

	.opening-hours {
		gap: 0;
	}
}

/* --- Responsive: Mobile (768px) - hamburger menu --- */
@media screen and (max-width: 768px) {
	/* Override WP-generated flex-wrap */
	header.site-header.wp-block-group.is-layout-flex {
		flex-wrap: wrap;
		justify-content: space-between;
		padding: 10px 20px;
		height: auto;
	}

	.site-header .wp-block-navigation-item__content {
		padding: 10px 10px;
		font-size: 14px;
	}

	/* Logo: left */
	.site-header .wp-block-site-logo {
		order: 1;
	}

	.site-header .wp-block-site-logo img {
		height: 80px;
		padding: 0;
	}

	/* Hamburger: right */
	.hamburger {
		display: flex;
		order: 2;
	}

	/* Both navs: hidden by default on mobile */
	header.site-header .wp-block-navigation.wp-block-navigation.is-layout-flex {
		display: none;
		width: 100%;
		order: 4;
		margin-top: 10px;
	}

	/* Show both navs when hamburger is toggled */
	header.site-header .menu-toggle:checked ~ .wp-block-navigation.wp-block-navigation {
		display: flex;
		flex-direction: column;
	}

	header.site-header .menu-toggle:checked ~ .wp-block-navigation .wp-block-navigation__container {
		flex-direction: column;
		width: 100%;
		gap: 0;
	}

	header.site-header .menu-toggle:checked ~ .wp-block-navigation .wp-block-navigation-item {
		width: 100%;
		border-top: 1px solid var(--vv-accent);
	}

	header.site-header .menu-toggle:checked ~ .wp-block-navigation .wp-block-navigation-item__content {
		padding: 10px;
		text-align: center;
		width: 100%;
		display: block;
	}

	/* Second nav no extra margin */
	header.site-header .menu-toggle:checked ~ .wp-block-navigation.nav-right {
		margin-top: 0;
	}

	/* Rezervace: hidden, shown inside hamburger menu */
	header.site-header .btn-nav {
		display: none;
		position: static;
		transform: none;
		padding: 8px 16px;
		font-size: 14px;
		margin: 10px auto;
		order: 5;
	}

	header.site-header .menu-toggle:checked ~ .btn-nav {
		display: block;
		text-align: center;
	}

	.hero-section {
		height: 300px;
	}

	.hero-section h1 {
		font-size: 28px;
	}

	.section-container {
		margin: 15px 10px;
		padding: 20px;
	}

	.btn-reservation {
		font-size: 18px;
		padding: 10px 20px;
	}

	.btn-large {
		font-size: 18px;
		padding: 10px 20px;
	}

	.packages-grid {
		grid-template-columns: 1fr;
	}

	.property img {
		max-width: 100%;
	}

	.intro-image {
		max-width: 100%;
	}

	.activity-grid {
		grid-template-columns: 1fr;
	}

	.site-footer {
		font-size: 14px;
	}

	.footer-left {
		border-right: none;
	}
}

/* --- Responsive: Small phones (480px) --- */
@media screen and (max-width: 480px) {
	.hero-section {
		height: 200px;
	}

	.hero-section h1 {
		font-size: 20px;
	}

	.section-container {
		margin: 10px 5px;
		padding: 15px;
	}

	.contact-info,
	.contact-form {
		flex: 1 1 100%;
	}
}