/*
Theme Name: Cutzooi
Theme URI: https://www.cutzooisneek.nl
Author: Cutzooi Barbier
Description: Herstelde one-page site van Cutzooi Barbier in Sneek, opgebouwd uit de oorspronkelijke HTML/CSS/JS.
Version: 1.0.4
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: cutzooi
*/

/* ==================================================================
   Kleuren en basis
   ================================================================== */

:root {
	--cz-black: #000;
	--cz-white: #fff;
	--cz-panel: #00000061;           /* half-transparante blokken, zoals origineel */
	--cz-menu-bg: #1e1e1e;
	--cz-red: #950000;
	--cz-red-dark: #640000;
	--cz-review-mobile: #383739;
	/* Donkere terugval zolang er nog geen foto is ingesteld */
	--cz-placeholder: radial-gradient(ellipse at 35% 40%, #2c2c2c 0%, #141414 55%, #000 100%);
	--cz-vh: 100vh;
}

@supports (height: 100dvh) {
	:root { --cz-vh: 100dvh; }
}

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

html {
	font-family: 'Rubik', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

body {
	margin: 0;
	background-color: var(--cz-black);
	color: var(--cz-white);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

a {
	color: inherit;
}

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

h1, h2, h3 {
	font-weight: 500;
	line-height: 1.2;
	margin: 0 0 0.5em;
}

h2 { font-size: 1.75rem; }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

:focus-visible {
	outline: 2px solid var(--cz-white);
	outline-offset: 3px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed !important;
	top: 8px;
	left: 8px;
	width: auto;
	height: auto;
	clip: auto;
	z-index: 10000;
	padding: 8px 14px;
	background: var(--cz-white);
	color: var(--cz-black);
}

/* ==================================================================
   Knoppen
   ================================================================== */

.front-page-button,
.wpcf7-submit {
	display: inline-block;
	background-color: var(--cz-red);
	color: var(--cz-white) !important;
	font: 700 14px/36px 'Lato', sans-serif;
	text-align: center;
	text-transform: uppercase;
	text-decoration: none;
	padding: 0 20px;
	border: 0;
	border-radius: 0;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.front-page-button:hover,
.front-page-button:focus-visible,
.wpcf7-submit:hover,
.wpcf7-submit:focus-visible {
	background-color: var(--cz-red-dark);
}

.extra-button-styling {
	position: relative;
	z-index: 10;
}

/* ==================================================================
   Header: logo en menu
   ================================================================== */

.site-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 0;
	z-index: 100;
}

.admin-bar .site-header { top: 32px; }

.logo-wrap {
	position: absolute;
	top: 0;
	left: 40%;
	width: 20%;
	z-index: 101;
	text-align: center;
}

.logo-wrap .custom-logo-link,
.logo-wrap img {
	display: block;
	width: 100%;
	height: auto;
}

.logo-text {
	display: inline-block;
	padding-top: 22px;
	color: var(--cz-white);
	font-weight: 700;
	font-size: clamp(1.75rem, 3vw, 2.75rem);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	line-height: 1;
}

.site-nav {
	position: absolute;
	top: 100px;
	left: 2%;
	z-index: 100;
}

.site-menu,
.site-menu .sub-menu {
	list-style: none;
	margin: 0;
	padding: 0;
}

.site-menu li {
	position: relative;
}

.site-menu a {
	display: block;
	padding: 5px 0;
	color: var(--cz-white) !important;
	font-weight: 500;
	text-decoration: none;
}

.site-menu a:hover {
	text-decoration: underline;
	text-underline-offset: 4px;
}

.site-menu .sub-menu {
	display: none;
	position: absolute;
	top: 0;
	left: 140px;
	min-width: 180px;
	padding: 8px 14px;
	background: var(--cz-menu-bg);
}

.site-menu li:hover > .sub-menu,
.site-menu li:focus-within > .sub-menu {
	display: block;
}

.nav-toggle {
	display: none;
}

/* Tablet */
@media only screen and (min-width: 768px) and (max-width: 1024px) {
	.logo-wrap {
		left: 35%;
		width: 30%;
	}
}

/* Mobiel */
@media only screen and (max-width: 767px) {
	.logo-wrap {
		left: 50%;
		width: min(75%, 320px);
		transform: translateX(-50%);
	}

	.logo-text {
		padding-top: 18px;
	}

	.nav-toggle {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 5px;
		position: fixed;
		top: 12px;
		left: 12px;
		z-index: 103;
		width: 44px;
		height: 44px;
		padding: 10px;
		background: transparent;
		border: 0;
		cursor: pointer;
	}

	.admin-bar .nav-toggle { top: 58px; }

	.nav-toggle-bar {
		display: block;
		height: 2px;
		width: 100%;
		background: var(--cz-white);
		transition: transform 0.2s ease, opacity 0.2s ease;
	}

	.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
	.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
	.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

	.site-nav {
		position: fixed;
		top: 0;
		left: 0;
		bottom: 0;
		width: 75%;
		z-index: 102;
		padding: 100px 24px 24px;
		background: var(--cz-menu-bg);
		overflow-y: auto;
		transform: translateX(-100%);
		visibility: hidden;
		transition: transform 0.25s ease, visibility 0.25s;
	}

	.site-nav.is-open {
		transform: none;
		visibility: visible;
	}

	.site-menu a {
		padding: 10px 0;
		font-size: 1.125rem;
	}

	.site-menu .sub-menu {
		display: block;
		position: static;
		padding: 0 0 0 16px;
		background: none;
	}
}

/* ==================================================================
   Homepage: schermvullende secties met scroll-snap
   ================================================================== */

body.home {
	height: var(--cz-vh);
	overflow: hidden;
}

.parent {
	height: var(--cz-vh);
	overflow-y: auto;
	scroll-snap-type: y mandatory;
	overscroll-behavior-y: contain;
}

.admin-bar .parent { height: calc(var(--cz-vh) - 32px); }

@media screen and (max-width: 782px) {
	.admin-bar .parent { height: calc(var(--cz-vh) - 46px); }
	.admin-bar .site-header { top: 46px; }
}

.parent > section {
	position: relative;
	width: 100%;
	min-height: var(--cz-vh);
	scroll-snap-align: start;
	background-color: var(--cz-black);
}

.has-bg {
	background-image: var(--cz-bg, var(--cz-placeholder));
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
}

/* Gedeelde half-transparante blokken */
.plan-appointment-block,
.services-container,
.front-page-block,
.review-slider {
	background-color: var(--cz-panel);
	color: var(--cz-white);
	border-radius: 3px;
}

.block-subtitle,
.services-title {
	margin: 0 !important;
}

.block-subtitle-2 {
	padding-top: 10px;
	margin: 0;
}

/* ------------------------------------------------------------------
   1. Video + afspraak maken
   ------------------------------------------------------------------ */

.one {
	overflow: hidden;
}

.one.no-video {
	background-image: var(--cz-bg, var(--cz-placeholder));
	background-size: cover;
	background-position: center;
}

#video1 {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
}

.hero-text {
	position: absolute;
	inset: 0 0 30% 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0 6%;
	text-align: center;
}

.hero-title {
	margin: 0;
	font-size: clamp(2.5rem, 7vw, 6rem);
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1;
}

.appointment-container {
	position: absolute;
	bottom: 10%;
	left: 0;
	right: 0;
	display: flex;
	justify-content: center;
	padding: 0 5%;
	z-index: 2;
}

.plan-appointment-block {
	display: flex;
	justify-content: center;
	align-items: center;
	max-width: 33%;
	padding: 20px;
	text-align: center;
}

.plan-appointment-block .block-subtitle {
	font-size: 1.25rem;
}

.plan-appointment-block p {
	margin: 0.25em 0 1em;
}

@media only screen and (max-width: 767px) {
	.one {
		background-image: var(--cz-bg, var(--cz-placeholder));
		background-size: cover;
		background-position: center;
	}

	/* Met een mobiele foto wordt de video op telefoons niet geladen/getoond */
	.one.has-image #video1 {
		display: none;
	}

	#video1 {
		object-fit: cover;
	}

	.plan-appointment-block {
		max-width: 90%;
	}
}

/* ------------------------------------------------------------------
   Behandelingen
   ------------------------------------------------------------------ */

.treatments {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 120px 5% 60px;
}

.treatments-container {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: min(100%, 1000px);
	text-align: center;
}

.treatments-list {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 16px;
	width: 100%;
	margin: 0.5em 0 24px;
}

.treatment {
	padding: 24px 20px;
	background-color: var(--cz-panel);
	border-radius: 3px;
}

.treatment-title {
	margin-bottom: 0.4em;
}

.treatment p {
	margin: 0;
	max-width: 32ch;
	margin-inline: auto;
}

@media only screen and (max-width: 767px) {
	.treatments {
		padding: 90px 0 40px;
	}

	.treatments-container {
		width: 90%;
	}

	.treatments-list {
		grid-template-columns: 1fr;
		gap: 10px;
		margin-bottom: 18px;
	}

	.treatment {
		padding: 16px;
	}
}

/* ------------------------------------------------------------------
   2. Prijslijst
   ------------------------------------------------------------------ */

.two {
	display: flex;
	justify-content: flex-end;
	align-items: center;
}

.services-container {
	position: absolute;
	right: 10%;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	width: min(40%, 520px);
	padding: 20px 24px;
	text-align: right;
}

.services-h2 {
	color: var(--cz-white);
}

.services-block {
	margin: 6px 0;
	width: 100%;
}

.services-block + .services-block {
	padding-top: 6px;
	border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.services-title {
	font-size: 1.0625rem;
	font-weight: 400;
}

.services-block-divider {
	display: flex;
	flex-direction: row;
	gap: 12px;
}

.services-text {
	display: flex;
	flex-direction: column;
	justify-content: center;
	width: 75%;
}

.services-text p {
	margin: 0.25em 0 0;
}

.services-price {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	width: 25%;
	min-width: 6.5em;
	font-family: 'Open Sans', sans-serif;
	font-size: 20px;
	font-weight: 800;
	white-space: nowrap;
}

.services-container .front-page-button {
	margin-top: 10px;
}

@media only screen and (max-width: 767px) {
	.two {
		justify-content: center;
		background-position-x: center;
		padding: 90px 0 40px;
	}

	.services-container {
		position: static;
		align-items: center;
		width: 90%;
		padding: 16px;
		text-align: left;
	}
}

/* ------------------------------------------------------------------
   3. Extra info (foto rechts op desktop)
   ------------------------------------------------------------------ */

.four,
.three {
	display: flex;
	justify-content: center;
	align-items: center;
}

.front-page-container {
	display: flex;
	justify-content: space-between;
	min-width: 56%;
}

.front-page-block {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	flex: 1 1 0;
	max-width: 40%;
	min-width: 300px;
	padding: 20px;
	text-align: center;
	z-index: 2;
}

.front-page-block .block-content {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
}

.front-page-block .block-content p {
	margin: 0.25em 0 0.75em;
}

.phone-link {
	text-decoration: none;
	font-weight: 500;
}

.phone-link:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

.openingstijden-lijst {
	margin: 0.5em 0 1em;
	padding: 0;
	list-style: none;
	text-align: left;
}

.openingstijden-lijst li {
	display: flex;
	justify-content: space-between;
	gap: 16px;
}

.openingstijden-lijst strong {
	font-weight: 500;
}

@media only screen and (min-width: 768px) {
	.four {
		background-size: 50% auto;
		background-position: right center;
	}

	.four:not([style]) {
		background-size: 50% 100%;
	}
}

@media only screen and (max-width: 767px) {
	.four {
		padding: 90px 0 40px;
	}

	.front-page-container {
		flex-direction: column;
		align-items: center;
		width: 95%;
		min-width: 0;
	}

	.front-page-block {
		width: 90%;
		max-width: none;
		min-width: 0;
		padding: 20px 4%;
	}
}

/* ------------------------------------------------------------------
   4. Reviews (foto links op desktop)
   ------------------------------------------------------------------ */

.review-slider {
	display: flex;
	flex-direction: column;
	z-index: 2;
}

.reviews-title {
	color: var(--cz-white);
}

.reviews-empty {
	max-width: 36ch;
}

.admin-hint {
	max-width: 40ch;
	padding: 8px 10px;
	border: 1px dashed rgba(255, 255, 255, 0.5);
	font-size: 0.875rem;
}

.review-slider .grw-slider {
	padding-bottom: 0 !important;
}

@media only screen and (min-width: 768px) {
	.three {
		background-size: 50% auto;
		background-position: left center;
	}

	.three:not([style]) {
		background-size: 50% 100%;
	}

	.review-slider {
		position: absolute;
		right: 4%;
		align-items: stretch;
		width: 44%;
		padding: 20px;
		text-align: right;
	}

	.review-slider > *:not(.posting-button) {
		width: 100%;
	}
}

@media only screen and (max-width: 767px) {
	.three {
		padding: 90px 0 40px;
	}

	.review-slider {
		align-items: center;
		width: 95%;
		padding: 20px 12px;
		text-align: center;
	}

	.wp-google-left {
		display: none !important;
	}
}

/* ------------------------------------------------------------------
   5. Haircuts
   ------------------------------------------------------------------ */

.five {
	display: flex;
	justify-content: center;
	align-items: center;
	padding: 90px 0 40px;
}

.posting-title {
	width: fit-content;
	margin: 0 auto;
	color: var(--cz-white);
}

.posting-container {
	display: grid;
	grid-template-columns: repeat(3, auto);
	gap: 10px;
	align-items: center;
	justify-content: center;
}

.posting-cell {
	margin: 5px;
}

.haircut-open {
	display: block;
	padding: 0;
	border: 0;
	background: none;
	cursor: zoom-in;
}

.image-cell img {
	display: block;
	width: min(300px, 27vw);
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.posting-empty {
	grid-column: 1 / -1;
	max-width: 36ch;
	margin: 0.5em auto 0;
	text-align: center;
}

.posting-button {
	width: fit-content;
	margin: 0 auto;
	padding-top: 10px;
}

@media only screen and (max-width: 767px) {
	.posting-container {
		grid-template-columns: repeat(2, auto);
	}

	.image-cell img {
		width: min(150px, 40vw);
	}
}

/* Instagram-feed (Feed Them Social) */
.instagram-feed {
	width: min(90%, 960px);
}

/* Lightbox */
.cz-lightbox {
	position: fixed;
	inset: 0;
	z-index: 9999;
	display: flex;
	justify-content: center;
	align-items: center;
	background-color: rgba(0, 0, 0, 0.8);
	cursor: zoom-out;
}

.cz-lightbox img {
	max-width: 80%;
	max-height: 80%;
	object-fit: contain;
}

.cz-lightbox-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 44px;
	height: 44px;
	padding: 0;
	background: none;
	border: 0;
	color: var(--cz-white);
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
}

/* ==================================================================
   Overige pagina's (contact, privacy, ...)
   ================================================================== */

.site-main {
	max-width: 760px;
	margin: 0 auto;
	padding: 170px 5% 80px;
}

.entry {
	margin-bottom: 3rem;
}

.entry-title {
	font-size: clamp(2rem, 4vw, 2.75rem);
	font-weight: 700;
}

.entry-content a {
	text-underline-offset: 3px;
}

.entry-content input[type="text"],
.entry-content input[type="email"],
.entry-content input[type="tel"],
.entry-content input[type="url"],
.entry-content input[type="number"],
.entry-content input[type="date"],
.entry-content select,
.entry-content textarea {
	width: 100%;
	padding: 10px 12px;
	background: var(--cz-menu-bg);
	color: var(--cz-white);
	border: 1px solid #555;
	border-radius: 0;
	font: inherit;
}

.entry-content input:focus,
.entry-content textarea:focus,
.entry-content select:focus {
	border-color: var(--cz-white);
	outline: none;
}

@media only screen and (max-width: 767px) {
	.site-main {
		padding-top: 120px;
	}
}

/* ==================================================================
   Minder beweging
   ================================================================== */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition: none !important;
	}

	.parent {
		scroll-behavior: auto;
	}
}
