/*
Theme Name: Nail Obsession
Theme URI: https://nail-obsession.dmitry-rogg.vn.ua/
Author: MediWeb
Description: Custom WordPress theme for the Nail Obsession nail studio and academy, built on the project's static HTML template. Pages are assembled from ACF Pro flexible content blocks.
Version: 0.4.1
Requires at least: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: nail-obsession
Tags: custom-theme, beauty, one-column
*/

/*
 * The design lives in assets/css/*.min.css, which functions.php enqueues.
 * Only the handful of rules WordPress needs and the template does not provide
 * belong here: accessibility helpers, core block alignment, pagination and the
 * Contact Form 7 messages.
 */

/* ---------------------------------------------------------- Accessibility */

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

.screen-reader-text:focus {
	z-index: 100000;
	top: 1rem;
	left: 1rem;
	width: auto;
	height: auto;
	margin: 0;
	padding: 0.75rem 1.25rem;
	clip: auto;
	clip-path: none;
	background: #fff;
	color: #1a1a1a;
	font-size: 1rem;
	text-decoration: none;
}

/* ------------------------------------------------- Core block alignment */

.editor .alignleft {
	float: left;
	margin: 0 1.5rem 1rem 0;
}

.editor .alignright {
	float: right;
	margin: 0 0 1rem 1.5rem;
}

.editor .aligncenter {
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.editor .alignwide,
.editor .alignfull {
	max-width: none;
}

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

.editor .wp-caption-text,
.editor figcaption {
	margin-top: 0.5rem;
	font-size: 0.875em;
	opacity: 0.7;
}

/* ------------------------------------------------------------- Pagination */

.nav-links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
	justify-content: center;
	margin: 3rem 0 0;
}

.nav-links .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.75rem;
	min-height: 2.75rem;
	padding: 0 0.75rem;
	border: 1px solid currentColor;
	border-radius: 999px;
	color: inherit;
	text-decoration: none;
	transition: opacity 0.2s ease;
}

.nav-links .page-numbers:hover {
	opacity: 0.65;
}

.nav-links .page-numbers.current {
	background: currentColor;
}

.nav-links .page-numbers.current span,
.nav-links .page-numbers.current {
	color: inherit;
	mix-blend-mode: difference;
}

.nav-links .page-numbers.dots {
	border-color: transparent;
}

/* ----------------------------------------------------------- Course popup */

/*
 * The popup script fills the description with textContent, so markup is not an
 * option: blank lines in the field are what separates paragraphs. pre-line keeps
 * them while still collapsing the indentation of the source text.
 */
.course-popup__text {
	white-space: pre-line;
}

/* ---------------------------------------------------------- Booking popup */

/*
 * The heading and the intro line above the form come from Theme Settings, so
 * the template's own popup CSS has no spacing rule for them.
 */
.popup__title,
.popup__text {
	margin-bottom: 15px;
}

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

.wpcf7-not-valid-tip {
	display: block;
	margin-top: 0.35rem;
	color: #d64545;
	font-size: 0.8125rem;
}

.wpcf7-response-output {
	margin: 1rem 0 0;
	padding: 0.75rem 1rem;
	border: 1px solid currentColor;
	border-radius: 0.5rem;
	font-size: 0.875rem;
}

.wpcf7-spinner {
	margin: 0 0 0 0.75rem;
}

/* A form control flagged as invalid keeps the design's own input styling. */
.wpcf7 .form-input.wpcf7-not-valid {
	border-color: #d64545;
}

/* --------------------------------------------------- Hero background video */

/*
 * The template only styles a photo behind the hero. A video, when the editor
 * adds one, is laid over that photo, which stays as the poster and as the
 * fallback for browsers that refuse to autoplay.
 *
 * isolation keeps the z-index values below inside the media box, so the
 * template's own gradient (.hero__media:before) still paints over the video.
 */
.hero__media--video {
	isolation: isolate;
	container-type: size;
}

.hero__media--video::before {
	z-index: 2;
}

.hero__media--video .hero__video {
	z-index: 1;
}

.hero__media video.hero__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 70% center;
}

/*
 * An iframe cannot be cropped with object-fit, so the Vimeo player is sized to
 * the smallest 16:9 box that covers the hero and then centred. The viewport
 * units are the fallback; the container units right after them are the exact
 * answer and win wherever they are supported.
 */
.hero__media iframe.hero__video {
	position: absolute;
	top: 50%;
	left: 50%;
	width: max(100vw, 177.7778vh);
	height: max(56.25vw, 100vh);
	width: max(100cqw, calc(100cqh * 16 / 9));
	height: max(100cqh, calc(100cqw * 9 / 16));
	border: 0;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

@media (max-width: 767.98px) {
	.hero__media video.hero__video {
		object-position: 80% center;
	}
}

/* Reduced motion leaves the photo alone. */
@media (prefers-reduced-motion: reduce) {
	.hero__media .hero__video {
		display: none;
	}
}

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

/*
 * Desktop header spacing. The template leaves only the 1rem container gap
 * between the logo and the first menu item, and it relies on the social icons
 * (margin-left: auto) to push the buttons to the right edge — but those icons
 * are hidden between 1200px and 1400px, so there the whole row clumps to the
 * left with the menu glued to the logo and the right half empty.
 */
@media (min-width: 1200px) {
	.header__container {
		column-gap: 2.5rem;
	}

	.header__nav > ul {
		column-gap: 1.5rem;
	}

	.header__actions {
		margin-left: auto;
	}
}

/* ------------------------------------------------------- Thank-you page */

/*
 * The template only styles `.thank__text p`, so anything else an editor types
 * into the wysiwyg field (a link, a list) would drop back to the body font.
 * The container repeats that typography, and the tight line-height of the
 * mock-up gets a little air so a paragraph that wraps stays readable.
 */
.thank__text {
	margin-bottom: 1.875rem;
	font-family: var(--font-main);
	font-weight: 400;
	font-size: clamp(0.875rem, 0.875rem + 2 * (100vw - 26.25rem) / 1020, 1rem);
}

.thank__text p {
	line-height: 1.5;
}

.thank__text a {
	text-decoration: underline;
}

/*
 * The static page has no button under the text, so the gap above it comes from
 * the text block's own margin-bottom.
 */
