/*
Theme Name: Elbhain Wohnen
Theme URI: https://elbhain-wohnen.example
Author: Elbhain Wohnungsgesellschaft mbH (fiktiv)
Description: Modernes Block-Theme für ein fiktives Wohnungsunternehmen in Dresden. Abgestimmt auf das Plugin „IVMPRO Wohnungsanfragen“: Wohnungssuche, Listen, Details, Merkliste und Anfrage.
Requires at least: 6.6
Tested up to: 6.8
Requires PHP: 8.2
Version: 1.0.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: elbhain
*/

/* ---------- Grundlagen ---------- */
:root {
	--eh-radius-s: var(--wp--custom--radius--s, 6px);
	--eh-radius-m: var(--wp--custom--radius--m, 12px);
	--eh-radius-l: var(--wp--custom--radius--l, 22px);
	--eh-ease: var(--wp--custom--ease, cubic-bezier(.2, .7, .2, 1));
	--eh-header-h: 76px;
	--eh-ring: 0 0 0 3px color-mix(in srgb, var(--wp--preset--color--accent) 35%, transparent);
	scroll-padding-top: calc(var(--eh-header-h) + 1rem);
}

html { -webkit-text-size-adjust: 100%; }
body { font-optical-sizing: auto; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
:where(h1, h2, h3, h4) { text-wrap: balance; }
:where(p, li) { text-wrap: pretty; }
.nowrap { white-space: nowrap; }
::selection { background: var(--wp--preset--color--accent-soft); color: var(--wp--preset--color--ink); }

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

.skip-link.screen-reader-text:focus {
	background: var(--wp--preset--color--ink);
	color: var(--wp--preset--color--paper);
	padding: .75rem 1rem;
	z-index: 100000;
}

/* Fehlt ein Bild noch, bleibt eine ruhige Farbfläche statt eines kaputten Symbols. */
.eh-media { background: linear-gradient(135deg, var(--wp--preset--color--accent-soft), var(--wp--preset--color--sand)); overflow: hidden; }
img.is-missing { opacity: 0; }

/* ---------- Text-Rollen ---------- */
.eh-kicker {
	font-family: var(--wp--preset--font-family--body);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: .02em;
	color: var(--wp--preset--color--accent);
	margin: 0;
}
.eh-kicker--light { color: var(--wp--preset--color--accent-soft); }
.eh-lead { font-size: var(--wp--preset--font-size--lead); line-height: 1.5; color: var(--wp--preset--color--muted); max-width: 38ch; }
.eh-muted { color: var(--wp--preset--color--muted); }
.eh-num { font-variant-numeric: tabular-nums; }

/* Textlink mit Pfeil */
.eh-arrow a, a.eh-arrow {
	display: inline-flex; align-items: center; gap: .5em;
	font-weight: 600; text-decoration: none; color: var(--wp--preset--color--ink);
	border-bottom: 1.5px solid currentColor; padding-bottom: 2px;
	transition: gap .25s var(--eh-ease), color .2s;
}
.eh-arrow a::after, a.eh-arrow::after { content: "→"; }
.eh-arrow a:hover, a.eh-arrow:hover { gap: .8em; color: var(--wp--preset--color--accent); }

/* Buttons */
.wp-block-button__link { transition: background-color .2s, transform .2s var(--eh-ease), box-shadow .2s; }
.wp-block-button__link:active { transform: translateY(1px) scale(.99); }
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent; color: currentColor; border: 1.5px solid currentColor;
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: color-mix(in srgb, currentColor 8%, transparent); }
.eh-btn-light .wp-block-button__link { background: var(--wp--preset--color--paper); color: var(--wp--preset--color--ink); }
.eh-btn-light .wp-block-button__link:hover { background: var(--wp--preset--color--surface); }

/* ---------- Kopfbereich ---------- */
.eh-topbar {
	background: var(--wp--preset--color--forest);
	color: color-mix(in srgb, var(--wp--preset--color--paper) 82%, transparent);
	font-size: .875rem;
}
.eh-topbar a { color: var(--wp--preset--color--paper); text-decoration: none; }
.eh-topbar a:hover { text-decoration: underline; }
.eh-topbar p { margin: 0; }
.eh-emergency a { font-weight: 600; display: inline-flex; align-items: center; gap: .5rem; }
.eh-emergency a::before {
	content: ""; width: .5rem; height: .5rem; border-radius: 50%;
	background: #FF6B4A; box-shadow: 0 0 0 0 rgba(255, 107, 74, .6);
	animation: eh-pulse 2.4s infinite;
}
@keyframes eh-pulse { 70% { box-shadow: 0 0 0 8px rgba(255, 107, 74, 0); } 100% { box-shadow: 0 0 0 0 rgba(255, 107, 74, 0); } }

.eh-header {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--wp--preset--color--paper) 88%, transparent);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	backdrop-filter: saturate(1.4) blur(14px);
	border-bottom: 1px solid transparent;
	transition: border-color .3s, box-shadow .3s, background-color .3s;
}
.admin-bar .eh-header { top: var(--wp-admin--admin-bar--height, 32px); }
.eh-header.is-scrolled { border-bottom-color: var(--wp--preset--color--line); box-shadow: 0 8px 30px -18px rgba(19, 32, 26, .35); }
.eh-header__inner { min-height: var(--eh-header-h); }

.eh-logo { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--wp--preset--color--ink); }
.eh-logo img { display: block; height: 46px; width: auto; }
@media (max-width: 600px) { .eh-logo img { height: 38px; } }

.eh-header .wp-block-navigation-item__content { padding: .5rem .15rem; }
.eh-header .wp-block-navigation .wp-block-navigation-item > .wp-block-navigation-item__content { position: relative; }
.eh-header .wp-block-navigation > .wp-block-navigation__container > .wp-block-navigation-item > .wp-block-navigation-item__content::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: .2rem; height: 1.5px;
	background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s var(--eh-ease);
}
.eh-header .wp-block-navigation > .wp-block-navigation__container > .wp-block-navigation-item:hover > .wp-block-navigation-item__content::after,
.eh-header .wp-block-navigation .current-menu-item > .wp-block-navigation-item__content::after { transform: scaleX(1); }
.eh-header .wp-block-navigation__submenu-container {
	border: 1px solid var(--wp--preset--color--line) !important;
	border-radius: var(--eh-radius-m);
	padding: .5rem !important;
	min-width: 240px !important;
	box-shadow: 0 24px 50px -24px rgba(19, 32, 26, .35);
	background: var(--wp--preset--color--surface) !important;
}
.eh-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content { padding: .55rem .75rem !important; border-radius: var(--eh-radius-s); }
.eh-header .wp-block-navigation__submenu-container .wp-block-navigation-item__content:hover { background: var(--wp--preset--color--paper); }
.eh-header .wp-block-navigation__responsive-container.is-menu-open { background: var(--wp--preset--color--paper) !important; padding: 1.5rem; }
.eh-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item { font-size: 1.25rem; }

.eh-header__actions { gap: .75rem; }
.eh-header__actions .wp-block-button__link { padding: .7rem 1.2rem; font-size: .95rem; }
@media (max-width: 781px) {
	.eh-header__cta { display: none; }
	.eh-topbar .eh-topbar__meta { display: none; }
}

/* ---------- Seitenkopf innen ---------- */
.eh-pagehead { border-bottom: 1px solid var(--wp--preset--color--line); }
.eh-pagehead .wp-block-post-title { font-size: var(--wp--preset--font-size--h1); max-width: 16ch; }
.eh-breadcrumb { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.eh-breadcrumb a { color: inherit; }

/* Inhaltsbereich normaler Seiten */
.eh-prose > * + h2 { margin-top: var(--wp--preset--spacing--40); }
.eh-prose h2 { font-size: var(--wp--preset--font-size--h3); }
.eh-prose h3 { font-size: var(--wp--preset--font-size--h4); }

/* ---------- Fußbereich ---------- */
.eh-footer { background: var(--wp--preset--color--forest); color: color-mix(in srgb, var(--wp--preset--color--paper) 78%, transparent); }
.eh-footer :where(h2, h3, h4) { color: var(--wp--preset--color--paper); }
.eh-footer a { color: var(--wp--preset--color--paper); text-decoration: none; }
.eh-footer a:hover { text-decoration: underline; text-underline-offset: 3px; }
.eh-footer .eh-footer__title { font-family: var(--wp--preset--font-family--body); font-size: .8125rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--wp--preset--color--accent-soft); margin-bottom: 1rem; }
.eh-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .55rem; }
.eh-footer__word {
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(4rem, 17vw, 16rem); font-weight: 700; letter-spacing: -.06em; line-height: .8;
	color: color-mix(in srgb, var(--wp--preset--color--paper) 9%, transparent);
	margin: 0; user-select: none; white-space: nowrap; overflow: hidden;
}
.eh-footer__legal { border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--paper) 14%, transparent); font-size: .875rem; }
.eh-footer__legal p { margin: 0; }

/* ---------- Bewegung ---------- */
.eh-reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--eh-ease), transform .8s var(--eh-ease); }
.eh-reveal.is-visible { opacity: 1; transform: none; }
.no-js .eh-reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
	.eh-reveal { opacity: 1; transform: none; }
}
