/*
Theme Name:   Nawroz Child
Theme URI:    https://nawroz.events
Description:  Child theme of Astra for Nawroz Events: photo slider home page, brand colours, RTL-friendly layout and ticket-buying polish. Needs the Astra theme and the Nawroz Core plugin.
Author:       Nawroz Events
Template:     astra
Version:      0.3.0
Requires PHP: 8.0
Text Domain:  nawroz-child
License:      GPL-2.0-or-later
*/

/*
 * Design tokens.
 * --nz-accent follows Astra's first global colour, so changing
 * Customize > Global > Colors also recolours cards, icons and buttons.
 */
:root {
	--nz-accent: var(--ast-global-color-0, #1f7a4d);
	--nz-accent-ink: #ffffff;
	--nz-accent-soft: #e9f3ee;
	--nz-gold: #c9962b;
	--nz-gold-ink: #1d2327;
	--nz-ink: #14201a;
	--nz-muted: #5c6a63;
	--nz-line: #e2e7e4;
	--nz-soft: #f4f7f5;
	--nz-night: #0b1a13;
	--nz-radius: 16px;
	--nz-radius-lg: 22px;
	--nz-shadow: 0 18px 40px rgba(16, 36, 27, 0.10);
	--nz-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}
@supports (background: color-mix(in srgb, red 10%, white)) {
	:root {
		--nz-accent-soft: color-mix(in srgb, var(--nz-accent) 11%, #ffffff);
	}
}

/* ---------- Home page frame ---------- */
.nz-home-page {
	overflow-x: clip;
}
.nz-home {
	display: grid;
	gap: clamp(48px, 7vw, 88px);
	padding-block-end: clamp(48px, 7vw, 88px);
}
.nz-home__wrap {
	width: min(1160px, 100% - 40px);
	margin-inline: auto;
}
/* Edge-to-edge sections, even when the parent theme keeps content in a boxed container. */
.nz-hero,
.nz-banner {
	position: relative;
	width: 100vw;
	margin-inline: calc(50% - 50vw);
	isolation: isolate;
	overflow: hidden;
	color: #ffffff;
	background: var(--nz-night);
}

/* ---------- Hero slider ---------- */
.nz-hero {
	display: grid;
	align-items: center;
	min-height: clamp(580px, 86vh, 800px);
}
.nz-slides,
.nz-slide,
.nz-hero__scrim {
	position: absolute;
	inset: 0;
}
.nz-slides {
	z-index: -2;
}
.nz-slide {
	opacity: 0;
	transition: opacity 1.1s ease;
}
.nz-slide.is-active {
	opacity: 1;
}
.nz-slide__img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	transform: scale(1.1);
	transition: transform 7s var(--nz-ease);
}
/* Slow zoom-out while a photo is on screen. */
.nz-slide.is-active .nz-slide__img {
	transform: scale(1);
}
.nz-hero__scrim {
	z-index: -1;
	background: linear-gradient(180deg, rgba(8, 18, 13, 0.62) 0%, rgba(8, 18, 13, 0.46) 42%, rgba(8, 18, 13, 0.82) 100%);
}
.nz-hero__content {
	padding-block: 88px 124px;
}
.nz-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 18px;
	font-size: 0.85rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.86);
}
.nz-hero__eyebrow::before {
	content: "";
	width: 36px;
	height: 2px;
	border-radius: 2px;
	background: var(--nz-gold);
}
html[dir="rtl"] .nz-hero__eyebrow {
	letter-spacing: 0;
}
.nz-hero .nz-hero__title {
	margin: 0 0 14px;
	max-width: 18ch;
	color: #ffffff;
	font-size: clamp(2.1rem, 5.4vw, 3.9rem);
	font-weight: 800;
	line-height: 1.18;
	text-wrap: balance;
}
html[dir="rtl"] .nz-hero .nz-hero__title {
	line-height: 1.45;
}
.nz-hero__lead {
	margin: 0;
	max-width: 44ch;
	font-size: clamp(1.05rem, 1.6vw, 1.25rem);
	color: rgba(255, 255, 255, 0.9);
}

/* Search inside the hero: one compact white bar (text, country, city, button). */
.nz-hero .nz-search {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
	gap: 8px;
	max-width: 900px;
	margin-block: 30px 0;
	padding: 10px;
	border: 0;
	border-radius: var(--nz-radius-lg);
	background: rgba(255, 255, 255, 0.97);
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
	color: var(--nz-ink);
}
.nz-hero .nz-search__main,
.nz-hero .nz-search__filters {
	display: contents;
}
.nz-hero .nz-search__q,
.nz-hero .nz-filter select {
	min-height: 54px;
	border: 1px solid transparent;
	border-radius: 14px;
	background: var(--nz-soft);
	color: var(--nz-ink);
	font-size: 1rem;
}
.nz-hero .nz-search__q:focus,
.nz-hero .nz-filter select:focus {
	border-color: var(--nz-accent);
	background: #ffffff;
	outline: 2px solid var(--nz-accent);
	outline-offset: 1px;
}
.nz-hero .nz-search__q {
	order: 1;
	padding-inline: 18px;
}
.nz-hero .nz-filter {
	order: 2;
}
/* The hero keeps only country and city; the full filter set lives on the Events page. */
.nz-hero .nz-filter:nth-child(n + 3),
.nz-hero .nz-search__reset {
	display: none;
}
.nz-hero .nz-filter label {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}
.nz-hero .nz-search .nz-btn--primary {
	order: 3;
	min-height: 54px;
	padding-inline: 30px;
	border-radius: 14px;
	font-size: 1rem;
}

/* The three steps of the slogan. */
.nz-steps {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 26px;
	margin: 24px 0 0;
	padding: 0;
	list-style: none;
	counter-reset: nz-step;
	font-size: 0.98rem;
	color: rgba(255, 255, 255, 0.94);
}
.nz-steps li {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	counter-increment: nz-step;
}
.nz-steps li::before {
	content: counter(nz-step);
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--nz-gold);
	color: var(--nz-gold-ink);
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1;
}
html[dir="rtl"] .nz-steps li::before {
	content: counter(nz-step, persian);
}

/* Slider controls. */
.nz-hero__controls {
	position: absolute;
	inset-inline: 0;
	inset-block-end: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}
.nz-hero .nz-ctl,
.nz-hero .nz-dot {
	margin: 0;
	padding: 0;
	min-width: 0;
	border: 0;
	box-shadow: none;
	line-height: 1;
	cursor: pointer;
	touch-action: manipulation;
}
.nz-hero .nz-ctl {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(255, 255, 255, 0.38);
	border-radius: 50%;
	background: rgba(10, 20, 15, 0.42);
	color: #ffffff;
	transition: background-color 0.2s ease, border-color 0.2s ease;
}
.nz-hero .nz-ctl:hover,
.nz-hero .nz-ctl:focus {
	border-color: #ffffff;
	background: rgba(255, 255, 255, 0.22);
	color: #ffffff;
}
.nz-hero .nz-ctl:focus-visible,
.nz-hero .nz-dot:focus-visible {
	outline: 3px solid var(--nz-gold);
	outline-offset: 2px;
}
html[dir="rtl"] .nz-icon--prev,
html[dir="rtl"] .nz-icon--next {
	transform: scaleX(-1);
}
.nz-ctl__pause,
.nz-ctl__play {
	display: grid;
}
.nz-ctl--pause[aria-pressed="false"] .nz-ctl__play,
.nz-ctl--pause[aria-pressed="true"] .nz-ctl__pause {
	display: none;
}
.nz-dots {
	display: flex;
	align-items: center;
	gap: 4px;
	padding-inline: 6px;
}
.nz-hero .nz-dot {
	display: grid;
	align-items: center;
	width: 30px;
	height: 44px;
	background: transparent;
	transition: width 0.3s var(--nz-ease);
}
.nz-hero .nz-dot:hover,
.nz-hero .nz-dot:focus {
	background: transparent;
}
.nz-hero .nz-dot.is-active {
	width: 56px;
}
.nz-dot span {
	position: relative;
	display: block;
	height: 4px;
	overflow: hidden;
	border-radius: 4px;
	background: rgba(255, 255, 255, 0.42);
}
.nz-dot.is-active span {
	background: rgba(255, 255, 255, 0.55);
}
.nz-dot span::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--nz-gold);
	transform: scaleX(0);
	transform-origin: left center;
}
html[dir="rtl"] .nz-dot span::after {
	transform-origin: right center;
}
/* The active dot fills up while its photo is on screen. */
.nz-dot.is-active span::after {
	transform: scaleX(1);
}
.is-playing .nz-dot.is-active span::after {
	animation: nz-dot-fill var(--nz-interval, 4s) linear both;
}
@keyframes nz-dot-fill {
	from { transform: scaleX(0); }
	to { transform: scaleX(1); }
}

/* ---------- Three "why" cards ---------- */
.nz-features__title {
	margin: 0 0 clamp(24px, 3vw, 40px);
	text-align: center;
	font-size: clamp(1.5rem, 3vw, 2.2rem);
	font-weight: 800;
	text-wrap: balance;
}
.nz-features__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.nz-feature {
	margin: 0;
	padding: 34px 30px;
	border: 1px solid var(--nz-line);
	border-radius: var(--nz-radius-lg);
	background: #ffffff;
	transition: transform 0.25s var(--nz-ease), box-shadow 0.25s var(--nz-ease), border-color 0.25s ease;
}
.nz-feature:hover {
	transform: translateY(-4px);
	border-color: transparent;
	box-shadow: var(--nz-shadow);
}
.nz-feature__icon {
	display: grid;
	place-items: center;
	width: 60px;
	height: 60px;
	margin-block-end: 22px;
	border-radius: 18px;
	background: var(--nz-accent-soft);
	color: var(--nz-accent);
}
.nz-feature__title {
	margin: 0 0 8px;
	font-size: 1.2rem;
	font-weight: 700;
}
.nz-feature__text {
	margin: 0;
	color: var(--nz-muted);
}

/* ---------- Image banner ---------- */
.nz-banner {
	display: grid;
	align-items: center;
	min-height: clamp(380px, 54vh, 540px);
}
.nz-banner__img {
	position: absolute;
	inset: 0;
	z-index: -2;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}
.nz-banner__scrim {
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(90deg, rgba(8, 18, 13, 0.86) 0%, rgba(8, 18, 13, 0.58) 55%, rgba(8, 18, 13, 0.3) 100%);
}
html[dir="rtl"] .nz-banner__scrim {
	background: linear-gradient(270deg, rgba(8, 18, 13, 0.86) 0%, rgba(8, 18, 13, 0.58) 55%, rgba(8, 18, 13, 0.3) 100%);
}
.nz-banner__content {
	display: grid;
	gap: 16px;
	justify-items: start;
	padding-block: 72px;
}
.nz-banner .nz-banner__title {
	margin: 0;
	max-width: 20ch;
	color: #ffffff;
	font-size: clamp(1.7rem, 3.8vw, 2.8rem);
	font-weight: 800;
	text-wrap: balance;
}
.nz-banner__text {
	margin: 0;
	max-width: 52ch;
	font-size: 1.1rem;
	color: rgba(255, 255, 255, 0.9);
}

/* ---------- Buttons ---------- */
.nz-btn--gold,
.nz-btn--gold:visited {
	min-height: 50px;
	padding-inline: 26px;
	border-color: var(--nz-gold);
	background: var(--nz-gold);
	color: var(--nz-gold-ink);
	transition: transform 0.15s ease, filter 0.15s ease;
}
.nz-btn--gold:hover,
.nz-btn--gold:focus {
	color: var(--nz-gold-ink);
	filter: brightness(1.07);
}
.nz-btn--gold:active {
	transform: scale(0.98);
}

/* ---------- Event rows ---------- */
.nz-section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-block-end: 20px;
}
.nz-section__title {
	margin: 0;
	font-size: clamp(1.35rem, 2.6vw, 1.8rem);
	font-weight: 800;
}
.nz-section__more {
	flex-shrink: 0;
	font-weight: 600;
	text-decoration: none;
}
.nz-home .nz-card {
	border-radius: var(--nz-radius-lg);
}

/* ---------- Organizer call to action ---------- */
.nz-cta {
	display: grid;
	gap: 14px;
	justify-items: start;
	padding: clamp(28px, 4vw, 48px);
	border-radius: var(--nz-radius-lg);
	background: var(--nz-ink);
	color: #ffffff;
}
.nz-cta .nz-cta__title {
	margin: 0;
	color: #ffffff;
	font-size: clamp(1.35rem, 2.6vw, 1.8rem);
	font-weight: 800;
}
.nz-cta__text {
	margin: 0;
	max-width: 56ch;
	color: rgba(255, 255, 255, 0.84);
}

.nz-admin-note {
	padding: 12px 16px;
	border: 1px dashed #d63638;
	border-radius: 8px;
	background: #fff5f5;
}

/* ---------- Smaller screens ---------- */
@media (max-width: 860px) {
	.nz-features__grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	.nz-feature {
		display: grid;
		grid-template-columns: auto 1fr;
		column-gap: 18px;
		padding: 22px 20px;
	}
	.nz-feature__icon {
		grid-row: span 2;
		width: 52px;
		height: 52px;
		margin-block-end: 0;
		border-radius: 16px;
	}
	.nz-feature:hover {
		transform: none;
	}
}
@media (max-width: 720px) {
	.nz-hero {
		min-height: clamp(600px, 92vh, 760px);
	}
	.nz-hero__content {
		padding-block: 56px 112px;
	}
	.nz-hero .nz-search {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}
	.nz-hero .nz-search__q,
	.nz-hero .nz-search .nz-btn--primary {
		grid-column: 1 / -1;
	}
	.nz-steps {
		flex-direction: column;
		gap: 8px;
		font-size: 0.95rem;
	}
	.nz-banner__content {
		padding-block: 56px;
	}
}
/* Phones: each row of events scrolls sideways instead of making the page very long. */
@media (max-width: 560px) {
	.nz-home .nz-section .nz-grid {
		grid-template-columns: none;
		grid-auto-flow: column;
		grid-auto-columns: 78%;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		padding-block-end: 8px;
		-webkit-overflow-scrolling: touch;
	}
	.nz-home .nz-section .nz-card {
		scroll-snap-align: start;
	}
}

/* Visitors who asked for less motion: no zoom, quick fade, no moving progress bar. */
@media (prefers-reduced-motion: reduce) {
	.nz-slide {
		transition-duration: 0.2s;
	}
	.nz-slide__img,
	.nz-slide.is-active .nz-slide__img {
		transform: none;
		transition: none;
	}
	.is-playing .nz-dot.is-active span::after {
		animation: none;
	}
	.nz-feature,
	.nz-feature:hover {
		transform: none;
		transition: none;
	}
}

/* ---------- Ticket buying polish (any page) ---------- */

/* Large, thumb-friendly "Buy tickets" button on event pages. */
.single-product form.cart .single_add_to_cart_button {
	min-height: 52px;
	padding-inline: 28px;
	border-radius: 999px;
	font-size: 1.05rem;
	font-weight: 700;
}
@media (max-width: 560px) {
	.single-product form.cart:not(.variations_form),
	.single-product form.cart .woocommerce-variation-add-to-cart {
		display: flex;
		flex-wrap: wrap;
		gap: 10px;
	}
	.single-product form.cart .single_add_to_cart_button {
		flex: 1 1 auto;
	}
}

/* Checkout: big pay button. */
.woocommerce-checkout #place_order {
	width: 100%;
	min-height: 56px;
	border-radius: 999px;
	font-size: 1.1rem;
	font-weight: 700;
}

/* Product loops that are not our cards (shop, artist and city archives). */
.woocommerce ul.products li.product .nz-loop-tickets {
	border-radius: 999px;
}

/* Persian and Dari read better with a little more line height. */
html[dir="rtl"] body {
	line-height: 1.9;
}
html[dir="rtl"] h1,
html[dir="rtl"] h2,
html[dir="rtl"] h3 {
	line-height: 1.5;
	letter-spacing: 0;
}
