/*
Theme Name: HiddenPlace
Theme URI: http://hiddenplace.searchnsale.de/
Description: Modernes, zweisprachiges Design für das Sehenswürdigkeitenportal HiddenPlace. Child-Theme von Twenty Twenty-Five, abgestimmt auf das Plugin World Attractions AI.
Author: HiddenPlace
Template: twentytwentyfive
Version: 1.0.5
Requires at least: 6.7
Requires PHP: 8.1
License: GPL-2.0-or-later
Text Domain: hiddenplace
*/

:root {
	--hp-radius: 18px;
	--hp-radius-sm: 10px;
	--hp-shadow: 0 1px 2px rgba(23, 36, 43, .06), 0 8px 24px rgba(23, 36, 43, .08);
	--hp-shadow-hover: 0 2px 4px rgba(23, 36, 43, .08), 0 16px 40px rgba(23, 36, 43, .14);
	--hp-border: var(--wp--preset--color--accent-6);
}

::selection { background: var(--wp--preset--color--accent-1); color: #fff; }

:where(a, button, input, select, textarea):focus-visible {
	outline: 2px solid var(--wp--preset--color--accent-1);
	outline-offset: 3px;
}

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

.hp-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: color-mix(in srgb, var(--wp--preset--color--base) 82%, transparent);
	-webkit-backdrop-filter: saturate(160%) blur(12px);
	backdrop-filter: saturate(160%) blur(12px);
	border-bottom: 1px solid color-mix(in srgb, var(--hp-border) 70%, transparent);
}
.admin-bar .hp-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .hp-header { top: 46px; } }

.hp-header .wp-block-site-title a::before {
	content: "";
	display: inline-block;
	width: .62em;
	height: .62em;
	margin-right: .45em;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg) translateY(-.06em);
	background: var(--wp--preset--color--accent-1);
	box-shadow: inset 0 0 0 .16em var(--wp--preset--color--base);
}

.hp-header .wp-block-navigation .lang-item a {
	padding: .2rem .65rem;
	border: 1px solid var(--hp-border);
	border-radius: 999px;
	font-size: .8rem;
}

/* ------------------------------------------------------------------ */
/* Hero                                                                */
/* ------------------------------------------------------------------ */

.hp-hero.wp-block-cover {
	border-radius: 0 0 28px 28px;
	overflow: hidden;
}
.hp-hero .hp-eyebrow {
	display: inline-block;
	padding: .3rem .8rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, .16);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.hp-hero h1 { color: #fff; text-wrap: balance; }
.hp-hero p { text-wrap: pretty; }

.hp-search {
	display: flex;
	gap: .5rem;
	max-width: 560px;
	padding: .4rem;
	border-radius: 999px;
	background: #fff;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .25);
}
.hp-search input[type="search"] {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	padding: .65rem 1rem;
	font: inherit;
	color: var(--wp--preset--color--contrast);
}
.hp-search input[type="search"]:focus { outline: none; }
.hp-search:focus-within { outline: 2px solid var(--wp--preset--color--accent-1); outline-offset: 3px; }
.hp-search button {
	border: 0;
	border-radius: 999px;
	padding: .65rem 1.3rem;
	background: var(--wp--preset--color--accent-1);
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}
.hp-search button:hover { background: var(--wp--preset--color--contrast); }

/* ------------------------------------------------------------------ */
/* Section headings                                                    */
/* ------------------------------------------------------------------ */

.hp-kicker {
	margin: 0;
	color: var(--wp--preset--color--accent-1);
	font-size: .8rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
}

/* ------------------------------------------------------------------ */
/* Attraction cards (query loop)                                       */
/* ------------------------------------------------------------------ */

.hp-cards .wp-block-post {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: var(--hp-radius);
	background: #fff;
	box-shadow: var(--hp-shadow);
	transition: transform .2s ease, box-shadow .2s ease;
}
.hp-cards .wp-block-post:hover { transform: translateY(-3px); box-shadow: var(--hp-shadow-hover); }
.hp-cards .wp-block-post-featured-image { margin: 0; border-radius: 0; }
.hp-cards .wp-block-post-featured-image img { border-radius: 0; aspect-ratio: 4 / 3; object-fit: cover; }
.hp-card-body { padding: 1.1rem 1.25rem 1.35rem; }
.hp-card-body > * + * { margin-top: .45rem; }
.hp-cards .wp-block-post-title { font-size: 1.3rem; }
.hp-cards .wp-block-post-title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.hp-cards .wp-block-post { position: relative; }
.hp-cards .wp-block-post-terms a { position: relative; z-index: 1; }

/* Cards without an (approved) image get a calm placeholder band. */
.hp-cards .wp-block-post:not(:has(.wp-block-post-featured-image img))::before {
	content: "";
	display: block;
	aspect-ratio: 4 / 3;
	background:
		radial-gradient(circle at 30% 30%, color-mix(in srgb, var(--wp--preset--color--accent-2) 30%, transparent), transparent 60%),
		linear-gradient(135deg, var(--wp--preset--color--accent-3), var(--wp--preset--color--accent-5));
}

/* ------------------------------------------------------------------ */
/* Topic chips (tag cloud of attraction categories)                    */
/* ------------------------------------------------------------------ */

.hp-topics.wp-block-tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: .6rem;
}
.hp-topics.wp-block-tag-cloud a {
	margin: 0 !important;
	padding: .55rem 1.05rem;
	border: 1px solid var(--hp-border);
	border-radius: 999px;
	background: #fff;
	color: var(--wp--preset--color--contrast);
	font-size: .95rem !important;
	font-weight: 600;
	text-decoration: none;
	transition: background-color .15s, color .15s, border-color .15s;
}
.hp-topics.wp-block-tag-cloud a:hover {
	background: var(--wp--preset--color--contrast);
	border-color: var(--wp--preset--color--contrast);
	color: #fff;
}

/* ------------------------------------------------------------------ */
/* Map call to action + footer                                          */
/* ------------------------------------------------------------------ */

.hp-cta { border-radius: 28px; overflow: hidden; }
.hp-cta .hp-cta-dots {
	background-image: radial-gradient(color-mix(in srgb, #fff 30%, transparent) 1.2px, transparent 1.4px);
	background-size: 18px 18px;
	border-radius: var(--hp-radius);
	min-height: 220px;
	position: relative;
}
.hp-cta .hp-cta-dots::after {
	content: "";
	position: absolute;
	left: 52%;
	top: 42%;
	width: 26px;
	height: 26px;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	background: var(--wp--preset--color--accent-1);
	box-shadow: 0 0 0 10px color-mix(in srgb, var(--wp--preset--color--accent-1) 25%, transparent);
}

.hp-footer a { color: inherit; text-decoration: none; }
.hp-footer a:hover { text-decoration: underline; }
.hp-footer .hp-muted { opacity: .72; }

/* ------------------------------------------------------------------ */
/* Plugin components (World Attractions AI) in the theme's colours     */
/* ------------------------------------------------------------------ */

.waai-intro, .waai-section, .waai-explorer {
	--waai-accent: var(--wp--preset--color--accent-1);
	--waai-border: var(--hp-border);
	--waai-soft: var(--wp--preset--color--accent-5);
	--waai-radius: var(--hp-radius-sm);
}
.waai-location { font-weight: 600; letter-spacing: .02em; }
.waai-location a { text-decoration: none; color: var(--wp--preset--color--accent-2); }
.waai-lead { font-family: var(--wp--preset--font-family--platypi); font-size: 1.35rem; line-height: 1.45; }
.waai-chips a { background: #fff; }
.waai-section h2 { font-size: 1.6rem; }
.waai-section.waai-facts ul, .waai-section.waai-reasons ul { list-style: none; padding-left: 0 !important; }
.waai-section.waai-facts li, .waai-section.waai-reasons li {
	position: relative;
	padding-left: 1.6rem;
}
.waai-section.waai-facts li::before, .waai-section.waai-reasons li::before {
	content: "";
	position: absolute;
	left: .2rem;
	top: .62em;
	width: .5rem;
	height: .5rem;
	border-radius: 50%;
	background: var(--wp--preset--color--accent-1);
}
.waai-map { border-radius: var(--hp-radius); box-shadow: var(--hp-shadow); }
.waai-card { background: #fff; border-radius: var(--hp-radius-sm); box-shadow: var(--hp-shadow); border: 0; }
.waai-card img { aspect-ratio: 4 / 3; height: auto; }
.waai-search { background: #fff; border: 0; box-shadow: var(--hp-shadow); border-radius: var(--hp-radius); }
.waai-search .wp-element-button { padding: .65rem 1.4rem; }
.waai-pagination .current { color: #fff; }

/* Single attraction template */
.hp-single .wp-block-post-featured-image img { box-shadow: var(--hp-shadow); }
.hp-single .wp-block-post-title { text-wrap: balance; }

@media (prefers-reduced-motion: reduce) {
	.hp-cards .wp-block-post, .hp-topics.wp-block-tag-cloud a { transition: none; }
	.hp-cards .wp-block-post:hover { transform: none; }
}

/* Hero: the photo stays unchanged (no overlay); only the text sits on a soft panel, so it stays legible on any image. */
.hp-hero .hp-hero-panel {
	width: fit-content;
	max-width: min(760px, 100%);
	padding: clamp(1rem, 3vw, 1.75rem);
	border-radius: var(--hp-radius);
	background: rgba(23, 36, 43, .1);
	-webkit-backdrop-filter: blur(8px) saturate(120%);
	backdrop-filter: blur(8px) saturate(120%);
}
.hp-hero .hp-hero-panel > :first-child { margin-top: 0; }
.hp-hero .wp-block-cover__inner-container { text-shadow: 0 1px 3px rgba(0, 0, 0, .45), 0 2px 18px rgba(0, 0, 0, .35); }
.hp-hero .hp-eyebrow { background: rgba(23, 36, 43, .55); text-shadow: none; }
.hp-hero .hp-search { text-shadow: none; }

/* Scroll to top (button added in functions.php, shown after scrolling down). */
.hp-totop {
	position: fixed;
	right: max(16px, env(safe-area-inset-right));
	bottom: max(16px, env(safe-area-inset-bottom));
	z-index: 40;
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--wp--preset--color--contrast);
	color: #fff;
	box-shadow: var(--hp-shadow);
	cursor: pointer;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition: opacity .2s ease, transform .2s ease, visibility .2s, background-color .15s;
}
.hp-totop.is-visible { opacity: 1; visibility: visible; transform: none; }
.hp-totop:hover { background: var(--wp--preset--color--accent-1); }
.hp-totop svg { width: 22px; height: 22px; }
@media (prefers-reduced-motion: reduce) { .hp-totop { transition: none; } }
@media print { .hp-totop { display: none; } }
