/**
 * Theme Name: Rey Child
 * Theme URI: http://reytheme.com/
 * Description: This is a child theme of Rey.
 * Author: Marius H.
 * Author URI:  https://twitter.com/mariushoria
 * Template: rey
 * Version: 1.0.8
 * License: General Public License
 * License URI: http://www.gnu.org/licenses/gpl.html
 * Text Domain: rey-child
 */

/*
 * Subtle interface polish
 * These rules intentionally inherit Rey's configured colours and typography.
 * They improve spacing, interaction feedback and readability without changing
 * the site's existing layout or visual identity.
 */

:root {
	--child-radius-sm: 6px;
	--child-radius-md: 10px;
	--child-shadow-sm: 0 4px 14px rgba(15, 23, 42, .08);
	--child-shadow-md: 0 12px 32px rgba(15, 23, 42, .12);
}

html {
	scroll-behavior: smooth;
}

/* Keep keyboard navigation clearly visible, without affecting mouse users. */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
	outline: 2px solid var(--accent-color, currentColor);
	outline-offset: 3px;
}

/* A little more rhythm makes content blocks easier to scan. */
.rey-postContent > :where(h2, h3, h4),
.entry-content > :where(h2, h3, h4),
.elementor-widget-text-editor :where(h2, h3, h4) {
	scroll-margin-top: 2rem;
	letter-spacing: -.015em;
}

.rey-postContent > :where(ul, ol),
.entry-content > :where(ul, ol) {
	padding-inline-start: 1.5em;
}

/* Softer, more contemporary feedback while retaining all existing colours. */
.btn,
.elementor-button,
.woocommerce :is(.button, button, input.button),
button,
input[type='submit'],
input[type='button'],
input[type='reset'] {
	border-radius: var(--child-radius-sm);
	transition-duration: .22s;
	transition-timing-function: ease;
}

.btn:not(.btn-line):hover,
.elementor-button:hover,
.woocommerce :is(.button, button, input.button):hover,
button:hover,
input[type='submit']:hover,
input[type='button']:hover,
input[type='reset']:hover {
	transform: translateY(-1px);
}

.btn:not(.btn-line):active,
.elementor-button:active,
.woocommerce :is(.button, button, input.button):active,
button:active,
input[type='submit']:active,
input[type='button']:active,
input[type='reset']:active {
	transform: translateY(0);
}

/* Form fields get a consistent, calmer edge and a clear focus state. */
:is(input[type='email'], input[type='number'], input[type='password'], input[type='search'], input[type='tel'], input[type='text'], select, textarea) {
	border-radius: var(--child-radius-sm);
}

:is(input[type='email'], input[type='number'], input[type='password'], input[type='search'], input[type='tel'], input[type='text'], select, textarea):focus {
	border-color: var(--accent-color, currentColor);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-color, #333) 18%, transparent);
}

/* Preserve image proportions and add polish only where images are cards/content. */
.rey-postMedia,
.rey-postContent .wp-block-image img,
.entry-content .wp-block-image img,
.woocommerce ul.products li.product img {
	border-radius: var(--child-radius-md);
}

.rey-postMedia {
	overflow: hidden;
	box-shadow: var(--child-shadow-sm);
}

.rey-postMedia img {
	transition: transform .45s ease;
}

.rey-postItem:hover .rey-postMedia img {
	transform: scale(1.015);
}

/* Better separation for common WooCommerce product cards, without changing grid size. */
.woocommerce ul.products li.product {
	border-radius: var(--child-radius-md);
}

.woocommerce ul.products li.product:hover {
	box-shadow: var(--child-shadow-md);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: .01ms !important;
	}
}

@media (max-width: 767px) {
	.rey-postMedia,
	.rey-postContent .wp-block-image img,
	.entry-content .wp-block-image img {
		border-radius: var(--child-radius-sm);
	}
}

/*
 * Footer: the custom Elementor footer was allowed to span the whole viewport,
 * which left its columns visually disconnected on large screens.  Keep the
 * existing content and dark theme, but give it a centred reading width.
 */
.rey-siteFooter--custom .elementor-section .elementor-container,
.rey-siteFooter--custom .elementor-section.elementor-section-boxed > .elementor-container {
	width: 100%;
	max-width: 1760px;
	padding-inline: 32px;
}

.rey-siteFooter--custom {
	position: relative;
	border-top: 1px solid rgba(255, 255, 255, .12);
	background-image:
		radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--accent-color, #c00) 18%, transparent), transparent 31rem),
		radial-gradient(circle at 94% 100%, rgba(255, 255, 255, .055), transparent 28rem);
}

.rey-siteFooter--custom::before {
	content: '';
	position: absolute;
	top: -1px;
	left: 50%;
	width: min(1320px, calc(100% - 64px));
	height: 1px;
	background: linear-gradient(90deg, transparent, var(--accent-color, currentColor), transparent);
	transform: translateX(-50%);
	opacity: .72;
}

.rey-siteFooter--custom .elementor-top-section > .elementor-container,
.rey-siteFooter--custom .elementor-section-full_width > .elementor-container {
	margin-inline: auto;
}

/* Turn the existing Elementor columns into a clearly structured footer system. */
.rey-siteFooter--custom .elementor-top-section > .elementor-container > .elementor-column {
	display: flex;
	padding: .45rem;
}

.rey-siteFooter--custom .elementor-top-section > .elementor-container > .elementor-column > .elementor-widget-wrap {
	width: 100%;
	padding: clamp(1.25rem, 2vw, 2rem);
	border: 1px solid rgba(255, 255, 255, .11);
	border-radius: 14px;
	background: rgba(255, 255, 255, .035);
	box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
	transition: transform .25s ease, border-color .25s ease, background-color .25s ease, box-shadow .25s ease;
}

/* Navigation and legal rows need density, not large empty cards. */
.rey-siteFooter--custom .elementor-top-section:nth-of-type(n + 2) > .elementor-container > .elementor-column > .elementor-widget-wrap {
	border-color: transparent;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
}

.rey-siteFooter--custom .elementor-top-section:nth-of-type(n + 2) > .elementor-container > .elementor-column > .elementor-widget-wrap:hover {
	border-color: transparent;
	background: transparent;
	box-shadow: none;
	transform: none;
}

.rey-siteFooter--custom .elementor-top-section:nth-of-type(2) > .elementor-container > .elementor-column:not(:first-child) > .elementor-widget-wrap {
	border-inline-start: 1px solid rgba(255, 255, 255, .1);
}

.rey-siteFooter--custom .elementor-top-section > .elementor-container > .elementor-column > .elementor-widget-wrap:hover {
	border-color: color-mix(in srgb, var(--accent-color, #fff) 60%, rgba(255, 255, 255, .18));
	background: rgba(255, 255, 255, .065);
	box-shadow: 0 16px 36px rgba(0, 0, 0, .2);
	transform: translateY(-3px);
}

.rey-siteFooter--custom .elementor-widget-container > :first-child {
	margin-top: 0;
}

.rey-siteFooter--custom .elementor-widget-container > :last-child {
	margin-bottom: 0;
}

.rey-siteFooter--custom .elementor-heading-title {
	letter-spacing: .055em;
	font-weight: 700;
}

.rey-siteFooter--custom :is(.elementor-widget-text-editor, .elementor-nav-menu a, .elementor-icon-list-item a) {
	text-underline-offset: 4px;
}

.rey-siteFooter--custom .elementor-nav-menu a,
.rey-siteFooter--custom .elementor-icon-list-item a {
	position: relative;
	transition: color .2s ease, opacity .2s ease, transform .2s ease;
}

.rey-siteFooter--custom .elementor-nav-menu a:hover,
.rey-siteFooter--custom .elementor-icon-list-item a:hover {
	transform: translateX(3px);
}

.rey-siteFooter--custom .elementor-nav-menu a::after,
.rey-siteFooter--custom .elementor-icon-list-item a::after {
	content: '→';
	display: inline-block;
	margin-inline-start: .45em;
	opacity: 0;
	transform: translateX(-.35em);
	transition: opacity .2s ease, transform .2s ease;
}

.rey-siteFooter--custom .elementor-nav-menu a:hover::after,
.rey-siteFooter--custom .elementor-icon-list-item a:hover::after {
	opacity: .9;
	transform: translateX(0);
}

/* Service icons read as one deliberate group, rather than floating elements. */
.rey-siteFooter--custom .elementor-widget-icon-box .elementor-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.8rem;
	height: 2.8rem;
	border: 1px solid currentColor;
	border-radius: 50%;
	opacity: .78;
}

.rey-siteFooter--custom .elementor-widget-icon-box .elementor-icon-box-title {
	margin-top: .8rem;
	letter-spacing: .035em;
}

.rey-siteFooter--custom .elementor-widget-divider {
	margin-block: .5rem;
}

/* A consistent baseline for copyright, payment and small-print widgets. */
.rey-siteFooter--custom .elementor-widget-text-editor :is(small, .elementor-inline-item),
.rey-siteFooter--custom .elementor-widget-social-icons {
	opacity: .82;
}

.rey-siteFooter--custom .elementor-widget-image .elementor-widget-container,
.rey-siteFooter--custom .elementor-widget-image .elementor-image {
	display: inline-block;
	vertical-align: middle;
}

.rey-siteFooter--custom .elementor-nav-menu--main .elementor-nav-menu,
.rey-siteFooter--custom .elementor-nav-menu--main .elementor-nav-menu ul {
	gap: .3rem 1.25rem;
}

/* Lower footer row: let its elements wrap naturally instead of drifting apart. */
.rey-siteFooter--custom .elementor-element:has(> .elementor-widget-wrap) > .elementor-widget-wrap {
	row-gap: 1rem;
}

@media (max-width: 1024px) {
	.rey-siteFooter--custom .elementor-section .elementor-container {
		padding-inline: 24px;
	}
}

@media (max-width: 767px) {
	.rey-siteFooter--custom .elementor-section .elementor-container {
		padding-inline: 20px;
	}

	.rey-siteFooter--custom .elementor-column,
	.rey-siteFooter--custom .elementor-widget-container {
		text-align: center;
	}

	.rey-siteFooter--custom .elementor-top-section > .elementor-container > .elementor-column > .elementor-widget-wrap {
		padding: 1.4rem 1.2rem;
	}

	.rey-siteFooter--custom .elementor-top-section:nth-of-type(2) > .elementor-container > .elementor-column:not(:first-child) > .elementor-widget-wrap {
		border-inline-start: 0;
	}

	.rey-siteFooter--custom::before {
		width: calc(100% - 40px);
	}

	.rey-siteFooter--custom .elementor-nav-menu a:hover,
	.rey-siteFooter--custom .elementor-icon-list-item a:hover {
		transform: none;
	}

	.rey-siteFooter--custom .elementor-nav-menu a::after,
	.rey-siteFooter--custom .elementor-icon-list-item a::after {
		display: none;
	}
}
