/*
Theme Name:   PadelMap (Kadence Child)
Theme URI:    https://padelmap.bg
Description:  Child theme for Kadence, customised for PadelMap — Bulgaria's padel directory & blog. Registers the Court CPT, taxonomies and site-specific helpers.
Author:       PadelMap
Author URI:   https://padelmap.bg
Template:     kadence
Version:      0.1.0
Text Domain:  padelmap
*/

/* -----------------------------------------------------------------------------
 * PadelMap — site-specific overrides. Keep this file lean; most styling comes
 * from theme.json design tokens + Kadence. Only add what theme.json can't express.
 * -------------------------------------------------------------------------- */

/* Smooth scroll for in-page CTAs */
html { scroll-behavior: smooth; }

/* Lift cards on hover (Court card + Blog card patterns) */
.wp-block-query .wp-block-post-template > li > .wp-block-group {
	transition: transform 200ms ease, box-shadow 200ms ease;
	will-change: transform;
}
.wp-block-query .wp-block-post-template > li > .wp-block-group:hover {
	transform: translateY(-3px);
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06), 0 12px 24px rgba(15, 23, 42, 0.08);
}

/* City tiles — scale-on-hover */
.wp-block-columns .wp-block-cover {
	transition: transform 250ms ease;
}
.wp-block-columns .wp-block-cover:hover {
	transform: scale(1.02);
}

/* Language switcher (from [lang_switcher] shortcode) — segmented control.
   Thin border around the whole control. Both languages stay black. Active
   gets a soft gray fill highlight; inactive gets a lighter gray on hover. */
.lang-switcher {
	list-style: none;
	margin: 0;
	padding: 3px;
	display: inline-flex;
	align-items: center;
	gap: 0;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 999px;
	background: transparent;
	line-height: 1;
	vertical-align: middle;
}
.lang-switcher li {
	margin: 0;
	padding: 0;
	list-style: none;
}
.lang-switcher a,
.lang-switcher a:link,
.lang-switcher a:visited,
.lang-switcher a:hover,
.lang-switcher a:focus,
.lang-switcher a:active {
	/* Kadence applies text-decoration: underline on a:hover via the global
	   link reset — neutralise it on every interaction state. */
	text-decoration: none;
	box-shadow: none;
}
.lang-switcher a {
	display: inline-block;
	padding: 0.4rem 0.85rem;
	color: var(--wp--preset--color--padelmap-charcoal, #1A1F2E);
	font-size: 0.8125rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	border-radius: 999px;
	transition: background-color 180ms ease;
}
.lang-switcher a:hover {
	color: var(--wp--preset--color--padelmap-charcoal, #1A1F2E);
	background: rgba(0, 0, 0, 0.06);
}
.lang-switcher .current-lang a {
	background: rgba(0, 0, 0, 0.10);
	color: var(--wp--preset--color--padelmap-charcoal, #1A1F2E);
}
.lang-switcher .current-lang a:hover {
	background: rgba(0, 0, 0, 0.13);
}
.lang-switcher a:focus-visible {
	outline: 2px solid rgba(0, 0, 0, 0.5);
	outline-offset: 2px;
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.wp-block-query .wp-block-post-template > li > .wp-block-group,
	.wp-block-columns .wp-block-cover {
		transition: none;
	}
	.wp-block-query .wp-block-post-template > li > .wp-block-group:hover,
	.wp-block-columns .wp-block-cover:hover {
		transform: none;
	}
}

.hidden {
	opacity: 0;
	visibility: hidden;
}

/* --------------------------------------------------------------------------
 * 404 page (404.php).
 * -------------------------------------------------------------------------- */
.padelmap-404 {
	min-height: 60vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 4rem 1.5rem;
	background:
		radial-gradient(circle at 80% 20%, rgba(212, 243, 59, 0.10) 0%, transparent 40%),
		radial-gradient(circle at 15% 75%, rgba(27, 79, 138, 0.06) 0%, transparent 45%),
		#FAFAF7;
}
.padelmap-404__inner {
	max-width: 640px;
	width: 100%;
	text-align: center;
}
.padelmap-404__eyebrow {
	font-size: clamp(4rem, 12vw, 7rem);
	font-weight: 800;
	line-height: 1;
	margin: 0 0 0.5rem;
	color: var(--wp--preset--color--padelmap-court);
	letter-spacing: -0.04em;
}
.padelmap-404__title {
	font-size: clamp(1.5rem, 3vw + 0.5rem, 2.25rem);
	line-height: 1.15;
	margin: 0 0 1rem;
	color: var(--wp--preset--color--padelmap-charcoal);
}
.padelmap-404__lead {
	font-size: 1.0625rem;
	line-height: 1.6;
	margin: 0 0 2rem;
	color: var(--wp--preset--color--padelmap-slate);
}
.padelmap-404__actions {
	display: flex;
	justify-content: center;
	gap: 0.75rem;
	flex-wrap: wrap;
	margin: 0 0 3rem;
}
.padelmap-btn--ghost {
	background: transparent;
	color: var(--wp--preset--color--padelmap-charcoal);
	border: 1px solid #d8d6cf;
}
.padelmap-btn--ghost:hover,
.padelmap-btn--ghost:focus {
	background: #fff;
	color: var(--wp--preset--color--padelmap-court);
	border-color: var(--wp--preset--color--padelmap-court);
}
.padelmap-404__search label {
	display: block;
	margin: 0 0 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--wp--preset--color--padelmap-slate);
}
.padelmap-404__search-row {
	display: flex;
	gap: 0.5rem;
	max-width: 420px;
	margin: 0 auto;
}
.padelmap-404__search-row input[type="search"] {
	flex: 1;
	padding: 0.65rem 1rem;
	border: 1px solid #d8d6cf;
	border-radius: 999px;
	background: #fff;
	font: inherit;
}
.padelmap-404__search-row input[type="search"]:focus {
	outline: 2px solid var(--wp--preset--color--padelmap-court);
	outline-offset: 1px;
	border-color: transparent;
}
.padelmap-404__search-row button {
	padding: 0.65rem 1.25rem;
	border: 0;
	border-radius: 999px;
	background: var(--wp--preset--color--padelmap-court);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}
.padelmap-404__search-row button:hover,
.padelmap-404__search-row button:focus {
	background: var(--wp--preset--color--padelmap-court-light);
}

/* Inline-SVG site logo (rendered by padelmap_site_branding() in inc/customizer.php). */
.padelmap-branding .padelmap-logo-link {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	text-decoration: none;
	line-height: 1;
	color: var(--wp--preset--color--padelmap-charcoal);
}
.padelmap-branding .padelmap-logo-pin {
	display: inline-flex;
}
.padelmap-branding .padelmap-logo-pin svg {
	display: block;
	width: auto;
	height: 40px;
}
.padelmap-branding .padelmap-logo-wordmark {
	font-size: 1.375rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: inherit;
}
.padelmap-branding .padelmap-logo-link:hover .padelmap-logo-wordmark {
	color: var(--wp--preset--color--padelmap-court);
}
