/*
 * Maple Vale — typography & editorial flourishes
 * What lives here:
 *  - Things theme.json can't express cleanly
 *  - Hover & focus states
 *  - The :nth-of-type alternation for service rows
 *  - Tweaks to core block defaults
 */

/* ---------- Reset / base ---------- */

body {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

a {
	transition: color .2s ease, opacity .2s ease;
}

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

/* ---------- Navigation block ---------- */

.wp-block-navigation .wp-block-navigation-item__content {
	letter-spacing: 0.04em;
	font-weight: 500;
	transition: color .2s ease;
}

.wp-block-navigation .wp-block-navigation-item__content:hover {
	color: var(--wp--preset--color--gold) !important;
}

.wp-block-navigation .wp-block-navigation-item.current-menu-item .wp-block-navigation-item__content {
	color: var(--wp--preset--color--gold) !important;
}

/* ---------- Buttons / CTAs ---------- */

.wp-block-button__link {
	transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease, color .2s ease;
}

.wp-block-button__link:hover {
	transform: translateY(-1px);
}

.is-style-mv-cta-call .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--gold-deep) !important;
}

.is-style-mv-cta-whatsapp .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--gold-deep) !important;
	color: var(--wp--preset--color--surface) !important;
	border-color: var(--wp--preset--color--gold-deep) !important;
}

.is-style-mv-cta-whatsapp-on-dark .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--ink-inverse) !important;
	color: var(--wp--preset--color--surface-inverse) !important;
}

/* ---------- Service row alternation ---------- */

/*
 * Inside the mv_service archive Query Loop, every other row reverses
 * direction so the image flips between left and right sides.
 */
.wp-block-post-template > li:nth-of-type(even) .mv-service-row {
	flex-direction: row-reverse;
}

/* On narrow viewports, stack — image always on top */
@media (max-width: 900px) {
	.mv-service-row,
	.wp-block-post-template > li:nth-of-type(even) .mv-service-row {
		flex-direction: column !important;
	}
	.mv-service-row__image {
		flex: 1 1 auto !important;
		width: 100% !important;
	}
}

/* ---------- Details / FAQ accordion ---------- */

.wp-block-details {
	transition: background-color .2s ease;
}

.wp-block-details summary {
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 1rem;
}

.wp-block-details summary::-webkit-details-marker {
	display: none;
}

.wp-block-details summary::after {
	content: "+";
	font-family: var(--wp--preset--font-family--mono);
	font-size: 1.125rem;
	color: var(--wp--preset--color--ink);
	transition: transform .2s ease;
	flex-shrink: 0;
}

.wp-block-details[open] summary::after {
	content: "−";
}

.wp-block-details summary:hover {
	color: var(--wp--preset--color--gold-deep);
}

/* ---------- Featured images / cards ---------- */

.wp-block-post-featured-image img {
	transition: transform .4s ease, opacity .3s ease;
}

.wp-block-post-featured-image:hover img {
	transform: scale(1.02);
}

/* ---------- Post content (article body) ---------- */

.wp-block-post-content > * + * {
	margin-top: 1.75em;
}

.wp-block-post-content h2 {
	margin-top: 3em !important;
	margin-bottom: 0.5em;
}

.wp-block-post-content h3 {
	margin-top: 2.25em !important;
	margin-bottom: 0.5em;
}

.wp-block-post-content blockquote,
.wp-block-post-content .wp-block-quote {
	border-left: 3px solid var(--wp--preset--color--gold);
	background: var(--wp--preset--color--surface-tinted);
	padding: 2rem 2.5rem;
	margin: 2.5rem 0;
	font-family: var(--wp--preset--font-family--heading);
	font-style: italic;
	font-size: 1.5rem;
	line-height: 1.4;
	font-weight: 400;
	color: var(--wp--preset--color--ink);
}

.wp-block-post-content blockquote cite,
.wp-block-post-content .wp-block-quote cite {
	display: block;
	margin-top: 1rem;
	font-family: var(--wp--preset--font-family--mono);
	font-style: normal;
	font-size: 0.6875rem;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink-secondary);
}

.wp-block-post-content figure.wp-block-image figcaption {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.6875rem;
	letter-spacing: 0.08em;
	color: var(--wp--preset--color--ink-muted);
	margin-top: 0.75rem;
}

.wp-block-post-content ol,
.wp-block-post-content ul {
	padding-left: 1.5em;
}

.wp-block-post-content li + li {
	margin-top: 0.5em;
}

/* ---------- Separators ---------- */

.wp-block-separator.is-style-wide {
	border: 0;
	border-top: 1px solid var(--wp--preset--color--border-subtle);
	margin: 0;
}

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

.wp-block-query-pagination a,
.wp-block-query-pagination span {
	font-family: var(--wp--preset--font-family--mono);
	font-size: 0.75rem;
	letter-spacing: 0.15em;
	text-transform: uppercase;
	color: var(--wp--preset--color--ink-secondary);
	padding: 0.625rem 1rem;
	border: 1px solid var(--wp--preset--color--border-subtle);
	border-radius: 999px;
}

.wp-block-query-pagination .current {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--ink-inverse);
	border-color: var(--wp--preset--color--ink);
}

/* ---------- Responsive padding (so the desktop padding doesn't crush phones) ---------- */

@media (max-width: 900px) {
	.alignfull[style*="padding-left:6.25rem"],
	.alignfull[style*="padding-left:7.5rem"],
	.alignfull[style*="padding-left:5rem"] {
		padding-left: 1.5rem !important;
		padding-right: 1.5rem !important;
	}
}

@media (max-width: 700px) {
	h1, h2, h3, h4, h5, h6 {
		hyphens: auto;
		word-break: break-word;
	}

	/* Stack the home hero inner row on phones */
	.alignfull .wp-block-group[style*="flex-wrap:nowrap"] {
		flex-wrap: wrap !important;
	}
}

/* ---------- Selection ---------- */

::selection {
	background: var(--wp--preset--color--gold);
	color: var(--wp--preset--color--surface-inverse);
}
