/*
 * rh-address-hub — display-only category hub stylesheet.
 * Reference design pattern for future Rechnerhub category hubs (as of 2.0.3).
 *
 * Inherits the shared .rh-tool chrome (header typography, subtitle,
 * privacy line, notice, FAQ accordion) from rh-tools-core (≥ 1.2.0 for
 * the shared layer, ≥ 1.3.0 for the registry/URL helpers). Local rules
 * own only:
 *   1. header spacing (margin-bottom = 0; section rhythm owns the gap)
 *   2. explicit section rhythm — every top-level section/nav carries
 *      `margin-top: 2rem` so the H1 → cards → notes → trust → guides →
 *      siblings → FAQ cadence is predictable; mobile tightens to 1.5rem
 *   3. section-title rhythm (no top margin — owned by section rhythm)
 *   4. card grid — explicit 2×2 at desktop (the curated allowlist is
 *      a fixed 4 cards; auto-fit produced a 3+1 orphan layout)
 *   5. card visual treatment (background, hover, focus-visible) — the
 *      whole card is the link, no separate button surface; CTA arrow
 *      moves 2 px on card hover/focus (microinteraction, not animation)
 *   6. supporting-variant tightening (when secondary cards appear)
 *   7. empty notice
 *   8. explanatory notes section — "Was diese Werkzeuge können" and
 *      "Was diese Werkzeuge nicht tun"; calm, factual, NON-clickable
 *   9. trust panel — "Datenschutz & Verarbeitung" rendered as a 3-up
 *      heading+value grid wrapped in a subtle panel surface (replaces
 *      the v2.0.2 plain bullet list)
 *  10. guides — editorial article cards with a "Leitfaden" chip label
 *      distinguishing them from tool cards; same CTA arrow microinteraction
 *  11. siblings — cross-hub exit navigation: short intro line + pill
 *      chip row pulling label/url from the registry
 *  12. FAQ — open-state segmentation (subtle bg on details[open] summary)
 *      added 2.0.3; chevron + border + focus-visible still owned by core
 *  13. mobile breakpoints (782 px / 720 px) — 2×2 → 1, trust 3-up → 1,
 *      sibling chip padding tightened, section margins drop to 1.5rem
 *
 * Rules for future edits / future hubs:
 *   - All selectors must be scoped under .rh-<hub>.
 *     No global selectors, no unscoped .rh-tool* rules.
 *   - Do not duplicate shared chrome (FAQ accordion, button baseline,
 *     stats, chips, table chrome) — that lives in rh-tools-core.
 *   - No @import, no url(), no remote fonts, no icon libraries, no CDN.
 *   - No JavaScript references — display-only.
 *   - Notes modules MUST stay visually distinct from clickable cards.
 *     No card-style borders/hover/cursor on the "können" / "nicht tun"
 *     blocks; readers must never mistake them for tappable surfaces.
 *   - No compliance/badge styling. No red alarm blocks. The whole hub
 *     reads calm and factual; the limits module is informational, not
 *     a warning.
 *   - Card grid for a fixed-count curated allowlist (≤ 4 cards): use
 *     an explicit `grid-template-columns` count, NOT `auto-fit`. The
 *     auto-fit pattern is for inventories that grow at runtime.
 *   - Trust panel: heading+value pairs in a 3-up grid (1-up on mobile).
 *     No icons. Subtle panel surface only.
 *   - Sibling chip row: keep an intro line above the chips so the
 *     section doesn't float in.
 *   - CTA arrow microinteraction: separate the arrow into an
 *     `aria-hidden="true"` span and apply `transform: translateX(2px)`
 *     on the parent link's hover/focus. No keyframes, no >0.2 s
 *     transitions.
 */

/* ---------------------------------------------------------------------------
 * Header spacing — shared .rh-tool__title / .rh-tool__subtitle / .rh-tool__privacy
 * typography is owned by rh-tools-core. Local rule only sets bottom rhythm.
 * --------------------------------------------------------------------------- */

.rh-address-hub__header {
	margin-bottom: 0;
}

/* ---------------------------------------------------------------------------
 * Section rhythm (2.0.3) — every top-level section/nav inside the hub
 * carries an explicit `margin-top: 2rem` so the vertical cadence is
 * predictable from the H1 through to the FAQ. Section-title H2s no
 * longer carry a top margin (the section owns the spacing). Result: a
 * documentation-style coherent rhythm without compounding margins.
 * --------------------------------------------------------------------------- */

.rh-address-hub__tools,
.rh-address-hub__tools--supporting,
.rh-address-hub__notes,
.rh-address-hub__trust,
.rh-address-hub__guides,
.rh-address-hub__siblings,
.rh-address-hub__faq {
	margin-top: 2rem;
}

.rh-address-hub__section-title {
	margin: 0 0 0.85rem;
	font-size: 1.2rem;
	font-weight: 700;
	color: #14181f;
	letter-spacing: -0.005em;
}

/* ---------------------------------------------------------------------------
 * Card grid — explicit 2×2 (2.0.3).
 *
 * Switched from `repeat(auto-fit, minmax(17rem, 1fr))` to `repeat(2,
 * minmax(0, 1fr))` because this hub renders a curated allowlist of
 * exactly four cards. auto-fit produced a 3+1 orphan-card layout at
 * common container widths; an explicit 2-column grid produces a
 * balanced 2×2 that reads as a documentation-style category page.
 *
 * Mobile (≤ 720 px) collapses to one column via the breakpoint at the
 * bottom of this file. The grid does NOT adapt to 4-up on very wide
 * screens — the 2×2 cadence is the deliberate design choice and
 * stays stable from ~600 px container width upward.
 * --------------------------------------------------------------------------- */

.rh-address-hub__cards {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.85rem;
	margin: 0;
	padding: 0;
	list-style: none;
	align-items: stretch;
}

.rh-address-hub__card {
	display: flex;
	margin: 0;
}

.rh-address-hub__card-link {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.35rem;
	padding: 1rem 1.1rem 0.95rem;
	background: #fafbfc;
	border: 1px solid #dde2ea;
	border-radius: 6px;
	color: inherit;
	text-decoration: none;
	transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.rh-address-hub__card-link:hover,
.rh-address-hub__card-link:focus {
	background: #f3f6fb;
	border-color: #c1cbdb;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(20, 24, 31, 0.04);
}

.rh-address-hub__card-link:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

.rh-address-hub__card-title {
	font-size: 1.02rem;
	font-weight: 600;
	color: #1e2230;
	line-height: 1.3;
}

.rh-address-hub__card-desc {
	font-size: 0.9rem;
	color: #4a5266;
	line-height: 1.5;
	flex: 1;
}

/*
 * CTA baseline alignment + text-button affordance + arrow microinteraction.
 *
 * `margin-top: auto` forces the CTA to the bottom of the flex column so
 * baselines align across the card row regardless of title/desc wrap.
 * `padding-top` gives visible separation when desc is short. The
 * underline accent (faded at rest, solid on card hover/focus) gives the
 * CTA a deliberate text-button feel without nesting an actual <button>
 * inside the <a>. The arrow lives in a separate aria-hidden span so it
 * can carry a 2px translateX hover microinteraction without affecting
 * screen reader output.
 */
.rh-address-hub__card-cta {
	display: inline-flex;
	align-items: baseline;
	margin-top: auto;
	padding-top: 0.55rem;
	font-size: 0.88rem;
	font-weight: 600;
	color: #1f3a5f;
	text-decoration: underline;
	text-decoration-color: rgba(31, 58, 95, 0.35);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
}

.rh-address-hub__card-cta-arrow {
	display: inline-block;
	margin-left: 0.25rem;
	transition: transform 0.18s ease;
	will-change: transform;
}

.rh-address-hub__card-link:hover .rh-address-hub__card-cta,
.rh-address-hub__card-link:focus .rh-address-hub__card-cta {
	text-decoration-color: #1f3a5f;
}

.rh-address-hub__card-link:hover .rh-address-hub__card-cta-arrow,
.rh-address-hub__card-link:focus .rh-address-hub__card-cta-arrow {
	transform: translateX(2px);
}

/* ---------------------------------------------------------------------------
 * Supporting variant — slightly more compact than the primary cards so the
 * future "Ergänzend nützlich" section reads as secondary at a glance.
 * Currently unused (no tool declares secondary_category=adressdaten-kontakte);
 * the rule is here for inventory growth and follows the established hub
 * pattern.
 * --------------------------------------------------------------------------- */

.rh-address-hub__tools--supporting .rh-address-hub__card-link {
	padding: 0.85rem 1rem;
	background: #fff;
}

.rh-address-hub__tools--supporting .rh-address-hub__card-title {
	font-size: 0.98rem;
}

/* ---------------------------------------------------------------------------
 * Empty notice — rendered when no primary card resolves. Calm, factual,
 * dashed border to read as a placeholder rather than an error.
 * --------------------------------------------------------------------------- */

.rh-address-hub__empty {
	margin: 0;
	padding: 1rem 1.1rem;
	color: #5a6478;
	font-style: italic;
	background: #fafbfc;
	border: 1px dashed #dde2ea;
	border-radius: 6px;
}

/* ---------------------------------------------------------------------------
 * Explanatory notes section — "Was diese Werkzeuge können" / "Was diese
 * Werkzeuge nicht tun". Information surface only. Each sub-block sits in
 * a panel that is intentionally different from the clickable card chrome:
 *   - no hover/focus state, no transition
 *   - no border-radius matching the cards exactly (the panel uses a left
 *     accent rule instead, so the visual cue is "list block" not "card")
 *   - no cursor:pointer
 *   - text-only payload; never wraps an <a>
 *
 * The two sub-blocks share an internal `__section-title` H2 — the second
 * H2 ("Was diese Werkzeuge nicht tun") needs an explicit margin-top to
 * separate it from the first --can list. The outer __notes section margin
 * is owned by the rhythm block at the top of this file.
 * Variants:
 *   --can     — subtle blue-grey left accent, calm positive
 *   --cannot  — subtle slate left accent, calm neutral (NOT red, NOT alarm)
 * --------------------------------------------------------------------------- */

.rh-address-hub__notes .rh-address-hub__section-title + .rh-address-hub__notes-list + .rh-address-hub__section-title {
	margin-top: 1.4rem;
}

.rh-address-hub__notes-list {
	margin: 0 0 0.5rem;
	padding: 0.85rem 1rem 0.85rem 2.1rem;
	list-style: disc;
	background: #fafbfc;
	border-left: 3px solid #c1cbdb;
	border-radius: 0 4px 4px 0;
	color: #2a3142;
	font-size: 0.95rem;
	line-height: 1.55;
}

.rh-address-hub__notes-list li {
	margin-bottom: 0.2rem;
}

.rh-address-hub__notes-list li:last-child {
	margin-bottom: 0;
}

.rh-address-hub__notes-list--can {
	border-left-color: #6c8bbf;
	background: #f7f9fc;
}

.rh-address-hub__notes-list--cannot {
	border-left-color: #8a93a6;
	background: #f7f8fa;
}

/* ---------------------------------------------------------------------------
 * Trust panel — "Datenschutz & Verarbeitung" (2.0.3).
 *
 * Replaces the v2.0.2 plain `<ul class="__privacy-list">` of three bullets
 * with a 3-up grid of heading+value pairs wrapped in a subtle panel
 * surface. The privacy commitment now reads as a core product promise
 * rather than an afterthought bullet list.
 *
 * Doctrine for this panel:
 *   - factual, no compliance badge styling, no "Siegel" feel
 *   - no icons, no decorative shapes, no animation
 *   - subtle surface (`#f3f6fb` + `#d7deea` border, `8px` radius)
 *   - heading is a short label, value is a one-sentence statement
 *   - on mobile (≤ 720 px) the 3-up grid collapses to a single column
 *     with smaller gap
 * --------------------------------------------------------------------------- */

.rh-address-hub__trust {
	padding: 1.1rem 1.25rem 1.15rem;
	background: #f3f6fb;
	border: 1px solid #d7deea;
	border-radius: 8px;
}

.rh-address-hub__trust-title {
	margin: 0 0 0.9rem;
	font-size: 1.05rem;
	font-weight: 700;
	color: #14181f;
	letter-spacing: -0.005em;
}

.rh-address-hub__trust-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rh-address-hub__trust-item {
	margin: 0;
	padding: 0;
}

.rh-address-hub__trust-heading {
	display: block;
	margin-bottom: 0.3rem;
	color: #1f3a5f;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.rh-address-hub__trust-value {
	display: block;
	color: #2a3142;
	font-size: 0.9rem;
	line-height: 1.5;
}

/* ---------------------------------------------------------------------------
 * Hilfreiche Leitfäden — editorial guide cards (rh-content-articles routing).
 *
 * Mirrors the rh-csv-tabellen-hub guides pattern but scoped to rh-address-hub
 * classes and using the address-hub palette. Renders BETWEEN the privacy
 * block and the FAQ. Each card is a full <a> that routes to an editorial
 * article page in rh-content-articles. NOT a tool card: no chip badge, the
 * CTA reads "Leitfaden öffnen →" instead of "Werkzeug öffnen →", and the
 * article URLs deliberately do NOT enter the hub's CollectionPage ItemList
 * or FAQPage schema (those remain registry-tool-driven only).
 * --------------------------------------------------------------------------- */

/* Outer .rh-address-hub__guides margin-top is owned by the section
   rhythm block at the top of this file (2 rem). Local section rules
   start at the intro. */

.rh-address-hub__guides-intro {
	margin: 0 0 0.85rem;
	color: #2a3142;
	font-size: 0.95rem;
	line-height: 1.55;
}

.rh-address-hub__guides-list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
	gap: 0.85rem;
	margin: 0;
	padding: 0;
	list-style: none;
	align-items: stretch;
}

.rh-address-hub__guides-list > li {
	display: flex;
	margin: 0;
}

/*
 * Guide cards reuse the tool-card chrome (same surface, border, radius,
 * hover/focus) but add a "Leitfaden" chip label at the top — added in
 * 2.0.2 so visitors can distinguish editorial guides from tool cards at
 * a glance. The chip is decorative, not interactive: the whole guide
 * card surface is the link.
 */
.rh-address-hub__guide-card {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.35rem;
	padding: 1rem 1.1rem 0.95rem;
	background: #fafbfc;
	border: 1px solid #dde2ea;
	border-radius: 6px;
	color: inherit;
	text-decoration: none;
	transition: background-color 0.12s ease, border-color 0.12s ease, box-shadow 0.12s ease;
}

.rh-address-hub__guide-card:hover,
.rh-address-hub__guide-card:focus {
	background: #f3f6fb;
	border-color: #c1cbdb;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(20, 24, 31, 0.04);
}

.rh-address-hub__guide-card:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

.rh-address-hub__guide-chip {
	display: inline-flex;
	align-self: flex-start;
	padding: 0.15rem 0.65rem;
	background: #e8eef7;
	color: #2a3a5f;
	border-radius: 999px;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.rh-address-hub__guide-title {
	font-size: 1.02rem;
	font-weight: 600;
	color: #1e2230;
	line-height: 1.3;
}

.rh-address-hub__guide-desc {
	font-size: 0.9rem;
	color: #4a5266;
	line-height: 1.5;
	flex: 1;
}

.rh-address-hub__guide-cta {
	display: inline-flex;
	align-items: baseline;
	margin-top: auto;
	padding-top: 0.55rem;
	font-size: 0.88rem;
	font-weight: 600;
	color: #1f3a5f;
	text-decoration: underline;
	text-decoration-color: rgba(31, 58, 95, 0.35);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 3px;
}

.rh-address-hub__guide-cta-arrow {
	display: inline-block;
	transition: transform 0.18s ease;
	will-change: transform;
}

.rh-address-hub__guide-card:hover .rh-address-hub__guide-cta,
.rh-address-hub__guide-card:focus .rh-address-hub__guide-cta {
	text-decoration-color: #1f3a5f;
}

.rh-address-hub__guide-card:hover .rh-address-hub__guide-cta-arrow,
.rh-address-hub__guide-card:focus .rh-address-hub__guide-cta-arrow {
	transform: translateX(2px);
}

/* ---------------------------------------------------------------------------
 * Sibling-category exit navigation — pill chips linking to the other
 * Rechnerhub category hubs. Added in 2.0.2 so visitors have a clean exit
 * out of the address hub without falling back to the WP nav menu.
 *
 * URLs come from rh-tools-core registry via the PHP helper, so legacy
 * SEO URLs (e.g. /adressdaten-bereinigen/ vs the internal
 * `adressdaten-kontakte` slug) resolve correctly. Missing categories are
 * skipped by the helper — no broken chip ships.
 *
 * Pill-button style is intentional here (unlike the tool-card CTA which
 * is a text-button-inside-a-link): each chip IS the primary interactive
 * surface, so the pill affordance reads correctly.
 * --------------------------------------------------------------------------- */

/* Outer .rh-address-hub__siblings margin-top is owned by the section
   rhythm block at the top of this file (2 rem). Local section rules
   start at the intro line. */

.rh-address-hub__siblings-intro {
	margin: 0 0 0.85rem;
	color: #4a5266;
	font-size: 0.9rem;
	line-height: 1.55;
}

.rh-address-hub__siblings-list {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.rh-address-hub__siblings-list > li {
	margin: 0;
}

.rh-address-hub__sibling-chip {
	display: inline-flex;
	align-items: center;
	padding: 0.45rem 0.95rem;
	background: #f7f9fc;
	border: 1px solid #dde2ea;
	border-radius: 999px;
	color: #1f3a5f;
	font-size: 0.9rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.rh-address-hub__sibling-chip:hover,
.rh-address-hub__sibling-chip:focus {
	background: #eaf0fa;
	border-color: #c1cbdb;
	color: #15294a;
	text-decoration: none;
}

.rh-address-hub__sibling-chip:focus-visible {
	outline: 2px solid #2563eb;
	outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
 * FAQ — the <section> carries both `rh-tool__faq` (shared core, rh-tools-core
 * ≥ 1.2.0) and `rh-address-hub__faq` (local spacing). Shared core owns the
 * accordion chrome (suppressed default marker, right-side CSS chevron,
 * hover/focus state, details border-top/bottom, summary tap-target sizing).
 * Local rule below owns only the section's top margin so the FAQ block sits
 * clearly below the privacy block. Do not re-style chrome locally.
 * --------------------------------------------------------------------------- */

/* Outer .rh-address-hub__faq margin-top is owned by the section rhythm
   block at the top of this file (2 rem). Local rules below own only
   open/hover state nudges; chevron, cursor, border-top/bottom, and
   focus-visible outline still come from the shared .rh-tool__faq
   chrome in rh-tools-core ≥ 1.2.0. */

.rh-address-hub__faq details > summary {
	transition: background-color 0.12s ease;
}

.rh-address-hub__faq details > summary:hover {
	background: #f7f9fc;
}

/* Open-state segmentation (2.0.3): a subtle tinted background on the
   summary when its details element is open makes the FAQ row state
   readable at a glance without overpowering the calm hub palette. */
.rh-address-hub__faq details[open] > summary {
	background: #fafbfc;
}

/* ---------------------------------------------------------------------------
 * Mobile breakpoints.
 *   782 px — tighten top margin against the WP admin bar / GeneratePress
 *            header on tablet width.
 *   720 px — card grid collapses to a single column.
 * --------------------------------------------------------------------------- */

@media (max-width: 782px) {
	.rh-address-hub {
		margin-top: 0.75rem;
	}
}

@media (max-width: 720px) {
	.rh-address-hub__cards,
	.rh-address-hub__guides-list,
	.rh-address-hub__trust-grid {
		grid-template-columns: 1fr;
	}

	.rh-address-hub__trust-grid {
		gap: 0.75rem;
	}

	.rh-address-hub__siblings-list {
		gap: 0.4rem;
	}

	.rh-address-hub__sibling-chip {
		padding: 0.4rem 0.8rem;
		font-size: 0.85rem;
	}

	.rh-address-hub__tools,
	.rh-address-hub__tools--supporting,
	.rh-address-hub__notes,
	.rh-address-hub__trust,
	.rh-address-hub__guides,
	.rh-address-hub__siblings,
	.rh-address-hub__faq {
		margin-top: 1.5rem;
	}
}
