/*
 * rh-csv-tabellen-hub — display-only category hub stylesheet.
 * Follows the rh-address-hub v2.0.3 category-hub design standard (see
 * plugins/rh-address-hub/README.md §15). v1.1.0 brings this hub into
 * alignment with that standard.
 *
 * Inherits the shared .rh-tool chrome 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)
 *   4. card grid — 4×2 at ≥900 px, 2×4 at 720–900 px, 1×8 at ≤720 px
 *      (curated 8-card primary inventory; no orphan layout at any
 *      common container width)
 *   5. card visual treatment (bg, hover, focus-visible) — CTA arrow
 *      moves 2 px on card hover/focus
 *   6. empty notice
 *   7. explanatory notes section — "Was diese Werkzeuge können" /
 *      "Was diese Werkzeuge nicht tun"
 *   8. trust panel — "Datenschutz & Verarbeitung" 3-up grid
 *   9. guide cards with `Leitfaden` chip — visually distinct from
 *      tool cards
 *  10. siblings — cross-hub exit navigation pill chips
 *  11. FAQ — open-state segmentation
 *  12. mobile breakpoints (782 px / 720 px)
 *
 * Rules for future edits:
 *   - All selectors scoped under .rh-csv-tabellen-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.
 *   - Notes modules stay visually distinct from clickable cards.
 *   - No compliance/badge styling. No red alarm blocks.
 *   - Curated fixed-count allowlist (8 cards) → explicit grid columns
 *     at desktop + tablet, NOT auto-fit; auto-fit would orphan at
 *     3-column widths.
 *   - 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-csv-tabellen-hub__header {
	margin-bottom: 0;
}

/* ---------------------------------------------------------------------------
 * Section rhythm (1.1.0) — every top-level section/nav 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.
 * --------------------------------------------------------------------------- */

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

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

/* The second section-title inside __notes (between --can and --cannot
   lists) needs an explicit top margin. */
.rh-csv-tabellen-hub__notes .rh-csv-tabellen-hub__section-title + .rh-csv-tabellen-hub__notes-list + .rh-csv-tabellen-hub__section-title {
	margin-top: 1.4rem;
}

/* ---------------------------------------------------------------------------
 * Card grid — explicit graduated columns for the curated 8-card primary
 * inventory (1.1.1 tightening of the v1.1.0 4×2 grid).
 *
 *   ≥1180 px:  4×2 grid (wide desktop only — enough width for 4-up cards
 *              with the new title/desc lengths)
 *    900–1179: 3×3 grid with one wider card (or 3 + 3 + 2) — avoids the
 *              cramped 4-up layout at mid-desktop widths
 *    540–900:  2×4 grid (tablet baseline)
 *    ≤540 px:  1×8 stack (mobile, handled by the 720 px breakpoint at
 *              the bottom of this file)
 *
 * Auto-fit would orphan unpredictably at intermediate widths; explicit
 * graduated breakpoints keep the card layout stable and readable. The
 * v1.1.0 single 4-col-at-≥900 rule was too aggressive for narrow desktop
 * containers (~900–1100 px) where 4 cards became visually cramped.
 * --------------------------------------------------------------------------- */

.rh-csv-tabellen-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;
}

@media (min-width: 900px) {
	.rh-csv-tabellen-hub__cards {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1180px) {
	.rh-csv-tabellen-hub__cards {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

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

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

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

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

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

.rh-csv-tabellen-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-csv-tabellen-hub__card-cta-arrow {
	display: inline-block;
	transition: transform 0.18s ease;
	will-change: transform;
}

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

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

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

/* ---------------------------------------------------------------------------
 * Supporting variant (1.2.0) — slightly more compact than the primary cards
 * so the "Auch nützlich" section reads as secondary at a glance. Mirrors
 * the rh-address-hub v2.1.0 and rh-text-zeichen-hub v1.2.1 U4 reference
 * patterns. Current inventory yields 2 cards (rh-zahlenformat-de-us +
 * rh-datumsformat); cap=3 enforced in PHP.
 * --------------------------------------------------------------------------- */

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

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

/* ---------------------------------------------------------------------------
 * Explanatory notes section — "Was diese Werkzeuge können" / "Was diese
 * Werkzeuge nicht tun". Information surface only; non-clickable.
 * --------------------------------------------------------------------------- */

.rh-csv-tabellen-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-csv-tabellen-hub__notes-list li {
	margin-bottom: 0.2rem;
}

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

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

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

/* ---------------------------------------------------------------------------
 * Trust panel — "Datenschutz & Verarbeitung" (1.1.0).
 * --------------------------------------------------------------------------- */

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

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

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

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

.rh-csv-tabellen-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-csv-tabellen-hub__trust-value {
	display: block;
	color: #2a3142;
	font-size: 0.9rem;
	line-height: 1.5;
}

/* ---------------------------------------------------------------------------
 * Guides — editorial article cards distinct from tool cards.
 * Each card carries a "Leitfaden" chip at the top; CTA reads
 * `Leitfaden öffnen →` with the same arrow microinteraction.
 * --------------------------------------------------------------------------- */

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

.rh-csv-tabellen-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-csv-tabellen-hub__guides-list > li {
	display: flex;
	margin: 0;
}

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

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

.rh-csv-tabellen-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-csv-tabellen-hub__guide-title {
	font-size: 1.02rem;
	font-weight: 600;
	color: #1e2230;
	line-height: 1.3;
}

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

.rh-csv-tabellen-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-csv-tabellen-hub__guide-cta-arrow {
	display: inline-block;
	transition: transform 0.18s ease;
	will-change: transform;
}

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

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

/* ---------------------------------------------------------------------------
 * Sibling-category exit navigation — pill chips (1.1.0).
 * --------------------------------------------------------------------------- */

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

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

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

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

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

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

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

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

.rh-csv-tabellen-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 8-card grid + trust grid collapse to single column;
 *            sibling chips tighten; section margins drop.
 * --------------------------------------------------------------------------- */

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

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

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

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

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

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