/*
 * rh-zahlen-datum-hub — display-only category hub stylesheet.
 * v1.3.0 trims to the U4 §4.2 category-hub reference template. The
 * Lane 5.2 pilot additions (PAS intro, static diagnostic sample,
 * Nächster-Schritt workflow block, paired Können/Grenzen 2-panel
 * module, 3-up trust panel, optional Hilfreiche Leitfäden slot) have
 * been removed; their factual content was either already covered by
 * the trust line + existing FAQ or absorbed into FAQ entries Q7–Q9
 * in v1.3.0. The v1.1.x rh-address-hub category-hub baseline survives
 * underneath.
 *
 * Inherits the shared .rh-tool chrome (header typography, subtitle,
 * privacy line, notice, FAQ accordion) from rh-tools-core. 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` at desktop (mobile 1.5rem)
 *   3. section-title rhythm (no top margin — owned by section rhythm)
 *   4. card grid — explicit 2-column primary (curated 2-card inventory:
 *      rh-zahlenformat-de-us + rh-datumsformat); supporting variant 1-up
 *   5. card visual treatment (bg, hover, focus-visible) — the whole card
 *      is the link; CTA arrow moves 2 px on card hover/focus
 *   6. supporting-variant tightening
 *   7. empty notice
 *   8. siblings — cross-hub exit navigation: short intro + pill chips
 *   9. FAQ — open-state segmentation; chevron/border/focus-visible still
 *      owned by core
 *  10. mobile breakpoints (782 px / 720 px)
 *
 * Rules for future edits:
 *   - All selectors scoped under .rh-zahlen-datum-hub.
 *   - No global selectors, no unscoped .rh-tool* rules.
 *   - No @import, no url(), no remote fonts, no icon libraries, no CDN.
 *   - No JavaScript references — display-only.
 *   - No compliance/badge styling. No red alarm blocks.
 *   - Fixed-count curated allowlist → explicit grid columns, NOT auto-fit.
 *   - CTA arrow in aria-hidden span with `transform: translateX(2px)`
 *     on parent link hover/focus. No keyframes.
 */

/* ---------------------------------------------------------------------------
 * Header spacing — shared core owns typography; section rhythm owns the gap
 * --------------------------------------------------------------------------- */

.rh-zahlen-datum-hub__header {
	margin-bottom: 0;
}

/* ---------------------------------------------------------------------------
 * Section rhythm (1.1.0) — every top-level section/nav inside the hub
 * carries an explicit margin-top: 2rem so the cadence is predictable
 * from the H1 through to the FAQ. Section-title H2s no longer carry a
 * top margin (the section owns the spacing).
 * --------------------------------------------------------------------------- */

.rh-zahlen-datum-hub__tools,
.rh-zahlen-datum-hub__tools--supporting,
.rh-zahlen-datum-hub__siblings,
.rh-zahlen-datum-hub__faq {
	margin-top: 2rem;
}

.rh-zahlen-datum-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-column for the primary section (curated inventory
 * is currently 2 cards: rh-zahlenformat-de-us + rh-datumsformat). Mobile
 * (≤ 720 px) collapses to 1-column. Supporting variant uses 1-column at
 * all widths today (one supporting card: rh-excel-zahlennotation).
 * --------------------------------------------------------------------------- */

.rh-zahlen-datum-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-zahlen-datum-hub__cards--supporting {
	grid-template-columns: 1fr;
}

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

.rh-zahlen-datum-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-zahlen-datum-hub__card-link:hover,
.rh-zahlen-datum-hub__card-link:focus {
	background: #f3f6fb;
	border-color: #c1cbdb;
	text-decoration: none;
	box-shadow: 0 1px 2px rgba(20, 24, 31, 0.04);
}

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

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

.rh-zahlen-datum-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` pushes the CTA to the bottom of the flex column so
 * baselines align across the card row. Underline accent (faded at rest,
 * solid on card hover/focus) gives a deliberate text-button feel without
 * nesting a <button> inside the <a>. The arrow lives in a separate
 * aria-hidden span so it can carry a 2px translateX on hover/focus.
 */
.rh-zahlen-datum-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-zahlen-datum-hub__card-cta-arrow {
	display: inline-block;
	transition: transform 0.18s ease;
	will-change: transform;
}

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

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

/* ---------------------------------------------------------------------------
 * Supporting variant — slightly more compact so "Auch nützlich" reads as
 * secondary at a glance. Mirrors rh-address-hub v2.1.0 + rh-text-zeichen-hub
 * v1.2.1 + rh-csv-tabellen-hub v1.2.0 + rh-finanzen-ids-hub v1.3.x.
 * --------------------------------------------------------------------------- */

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

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

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

/* ---------------------------------------------------------------------------
 * Sibling-category exit navigation — pill chips linking to the other
 * Rechnerhub category hubs (1.1.0).
 *
 * URLs come from rh-tools-core registry via the PHP helper, so legacy SEO
 * URLs resolve correctly (e.g. `adressdaten-kontakte` slug → public URL
 * `/adressdaten-bereinigen/`). Missing categories are skipped by the
 * helper — no broken chip ships. Mobile (≤ 720 px) tightens padding + gap.
 * --------------------------------------------------------------------------- */

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

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

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

.rh-zahlen-datum-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-zahlen-datum-hub__sibling-chip:hover,
.rh-zahlen-datum-hub__sibling-chip:focus {
	background: #eaf0fa;
	border-color: #c1cbdb;
	color: #15294a;
	text-decoration: none;
}

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

/* ---------------------------------------------------------------------------
 * FAQ — shared `.rh-tool__faq` chrome owns chevron, border-top/bottom,
 * focus-visible outline, tap-target sizing. Local rules add only
 * hover/open background nudges.
 * --------------------------------------------------------------------------- */

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

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

.rh-zahlen-datum-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 — primary card grid collapses to single column; sibling chip
 *            row + section margins tighten.
 * --------------------------------------------------------------------------- */

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

@media (max-width: 720px) {
	.rh-zahlen-datum-hub__cards {
		grid-template-columns: 1fr;
	}

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

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

	.rh-zahlen-datum-hub__tools,
	.rh-zahlen-datum-hub__tools--supporting,
	.rh-zahlen-datum-hub__siblings,
	.rh-zahlen-datum-hub__faq {
		margin-top: 1.5rem;
	}
}
