/*
Theme Name: Höhle Löwen — Produkttests
Theme URI: https://hoehle-loewen.de/
Author: Marcel
Description: Eigenes Theme für hoehle-loewen.de. Schlank gebaut, ohne externe Schriften und ohne Framework. Prüf-Siegel-System für Produkturteile, automatische Navigation aus den Kategorien, Tabellen als Karten auf dem Handy.
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: hoehle-loewen
*/

/* =============================================
   Farben und Maße
   Dunkles Graphit als Basis, Bernstein als Akzent —
   ein Löwe im Scheinwerfer, nicht ein weiteres Blau.
   ============================================= */
:root {
	--ink: #16181d;
	--ink-soft: #3c414b;
	--muted: #5a6270; /* dunkler als vorher — bestand vorher knapp nicht AA auf --bg */
	--line: #e3e6eb;
	--paper: #ffffff;
	--bg: #f4f5f7;
	--amber: #c8871f;
	--amber-dark: #9a660f;
	--good: #1e7a4a;
	--warn: #b45309;
	--bad: #b3261e;
	--open: #4b5563;
	--radius: 10px;
	--shadow: 0 1px 2px rgba(20,24,29,.06), 0 6px 18px rgba(20,24,29,.06);
	--max: 1180px;
	--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--font-head: Georgia, "Iowan Old Style", "Times New Roman", serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
	margin: 0;
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.65;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--ink); text-decoration-color: var(--amber); text-underline-offset: 2px; }
a:hover { color: var(--amber-dark); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 100;
	background: var(--ink); color: #fff; padding: 10px 16px;
}
.skip-link:focus { left: 8px; top: 8px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.screen-reader-text {
	position: absolute; width: 1px; height: 1px; overflow: hidden;
	clip: rect(1px,1px,1px,1px); white-space: nowrap;
}

/* =============================================
   Kopf
   ============================================= */
.site-header { background: var(--ink); color: #fff; }
.header-bar { border-bottom: 1px solid rgba(255,255,255,.08); }
.header-inner {
	display: flex; align-items: center; gap: 16px;
	min-height: 68px; padding-top: 10px; padding-bottom: 10px;
}

.brand { display: flex; align-items: center; gap: 11px; color: #fff; text-decoration: none; }
.brand__mark {
	width: 44px; height: 44px; border-radius: 9px; flex: 0 0 44px;
	background: #fff; object-fit: contain; padding: 3px;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__name { font-family: var(--font-head); font-size: 1.22rem; font-weight: 700; letter-spacing: -.01em; }
.brand__claim {
	font-size: .68rem; letter-spacing: .1em; text-transform: uppercase;
	color: rgba(255,255,255,.55); margin-top: 3px;
}

.search-mini { margin-left: auto; display: flex; gap: 6px; }
.search-mini input {
	width: 210px; padding: 9px 13px; border-radius: 999px; font-size: .9rem; font-family: inherit;
	border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.07); color: #fff;
}
.search-mini input::placeholder { color: rgba(255,255,255,.5); }
.search-mini button {
	padding: 9px 16px; border-radius: 999px; border: 0; cursor: pointer;
	background: var(--amber); color: #16181d; font-weight: 700; font-size: .85rem; font-family: inherit;
}
.search-mini button:hover { background: #d9962a; }

.menu-toggle { display: none; }

/* Navigation in eigener Zeile — bei zwölf Kategorien der einzige Weg, der nicht bricht */
.nav-bar { background: #101216; }
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.main-nav > ul { display: flex; flex-wrap: wrap; }
.main-nav a {
	display: block; padding: 12px 14px; color: rgba(255,255,255,.86);
	text-decoration: none; font-size: .92rem; font-weight: 500; white-space: nowrap;
}
.main-nav > ul > li { position: relative; }
.main-nav > ul > li > a { border-bottom: 3px solid transparent; }
.main-nav > ul > li:hover > a,
.main-nav > ul > li.current-menu-item > a { color: #fff; border-bottom-color: var(--amber); }

.main-nav .menu-item-has-children > a::after {
	content: ""; display: inline-block; width: 5px; height: 5px; margin-left: 7px;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
}
.main-nav .sub-menu {
	position: absolute; left: 0; top: 100%; min-width: 220px; z-index: 40;
	background: #fff; border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius);
	box-shadow: var(--shadow); display: none; padding: 6px 0;
}
.main-nav li:hover > .sub-menu { display: block; }
.main-nav .sub-menu a { color: var(--ink); padding: 9px 16px; font-weight: 400; }
.main-nav .sub-menu a:hover { background: var(--bg); color: var(--amber-dark); }

/* =============================================
   Grundlayout
   ============================================= */
.site-main { padding: 26px 0 50px; }
.layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 34px; align-items: start; }
.layout--narrow { grid-template-columns: minmax(0,1fr); max-width: 800px; margin: 0 auto; }

.content { min-width: 0; }

.intro { margin-bottom: 26px; }
.intro__title { font-family: var(--font-head); font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 8px; letter-spacing: -.02em; }
.intro__text { color: var(--ink-soft); max-width: 62ch; margin: 0; }

.breadcrumbs { font-size: .82rem; color: var(--muted); padding: 4px 0 16px; }
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: var(--amber-dark); text-decoration: underline; }
.bc-sep { margin: 0 7px; opacity: .6; }

/* =============================================
   Karten
   ============================================= */
.card-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.card-grid--wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

.card {
	background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
	overflow: hidden; transition: box-shadow .18s ease, transform .18s ease;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card__link { display: block; text-decoration: none; color: inherit; height: 100%; }
.card__media { display: block; aspect-ratio: 16/10; overflow: hidden; background: #e9ecf1; }
.card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-empty { display: block; width: 100%; height: 100%; background: linear-gradient(135deg,#e9ecf1,#dfe3ea); }
.card__body { display: block; padding: 13px 15px 16px; }
.card__cat {
	display: inline-block; font-size: .68rem; letter-spacing: .09em; text-transform: uppercase;
	color: var(--amber-dark); font-weight: 700; margin-bottom: 6px;
}
.card__title { display: block; font-weight: 600; line-height: 1.35; font-size: 1rem; margin-bottom: 7px; }
.card:hover .card__title { color: var(--amber-dark); }
.card__meta { display: block; font-size: .78rem; color: var(--muted); }

/* Urteils-Plakette in Listen */
.chip {
	display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .04em;
	padding: 3px 9px; border-radius: 999px; margin: 0 0 7px 6px; text-transform: uppercase;
}
.chip--gut { background: #e7f4ed; color: var(--good); }
.chip--mittel { background: #fdf1e0; color: var(--warn); }
.chip--schlecht { background: #fdeceb; color: var(--bad); }
.chip--offen { background: #eef0f3; color: var(--open); }

/* =============================================
   Beitrag
   ============================================= */
.entry {
	background: var(--paper); border: 1px solid var(--line);
	border-radius: var(--radius); padding: 30px 34px 36px;
}
.entry-cat {
	display: inline-block; font-size: .7rem; letter-spacing: .09em; text-transform: uppercase;
	font-weight: 700; color: var(--amber-dark); text-decoration: none; margin-bottom: 10px;
}
.entry-title {
	font-family: var(--font-head); font-size: clamp(1.6rem, 3.6vw, 2.3rem);
	line-height: 1.2; letter-spacing: -.02em; margin: 0 0 12px;
}
.entry-meta {
	display: flex; flex-wrap: wrap; gap: 14px; font-size: .82rem; color: var(--muted);
	padding-bottom: 18px; border-bottom: 1px solid var(--line);
}
.entry-updated { color: var(--good); font-weight: 600; }

.entry-figure { margin: 22px 0; }
.entry-figure img { width: 100%; border-radius: var(--radius); display: block; }
.entry-figure figcaption,
.entry-content figcaption,
.entry-content .wp-caption-text {
	margin-top: 8px; font-size: .82rem; line-height: 1.5; color: var(--muted);
	border-left: 3px solid var(--line); padding: 2px 0 2px 10px;
}

.entry-content { font-size: 1.06rem; }
.entry-content > * + * { margin-top: 1.15em; }
.entry-content h2 {
	font-family: var(--font-head); font-size: 1.5rem; line-height: 1.25;
	margin-top: 2em; padding-bottom: 8px; border-bottom: 2px solid var(--amber);
	display: inline-block; padding-right: 20px;
}
.entry-content h3 { font-size: 1.18rem; margin-top: 1.7em; }
.entry-content ul, .entry-content ol { padding-left: 1.35em; }
.entry-content li + li { margin-top: .4em; }
.entry-content a { color: var(--amber-dark); }
.entry-content blockquote {
	margin: 1.6em 0; padding: 14px 20px; border-left: 4px solid var(--amber);
	background: var(--bg); border-radius: 0 var(--radius) var(--radius) 0; font-style: normal;
}

/* =============================================
   Prüf-Siegel — das Kennzeichen dieser Seite
   ============================================= */
.verdict {
	display: flex; gap: 16px; align-items: flex-start;
	margin: 24px 0 4px; padding: 18px 20px;
	border: 1px solid var(--line); border-left: 5px solid var(--open);
	border-radius: var(--radius); background: var(--paper);
}
.verdict__seal {
	flex: 0 0 42px; width: 42px; height: 42px; border-radius: 50%;
	border: 2px dashed currentColor; color: var(--open);
	position: relative;
}
.verdict__seal::after {
	content: ""; position: absolute; inset: 7px; border-radius: 50%;
	background: currentColor; opacity: .16;
}
.verdict__label {
	display: block; font-size: .68rem; letter-spacing: .1em;
	text-transform: uppercase; color: var(--muted); margin-bottom: 2px;
}
.verdict__title { display: block; font-size: 1.15rem; line-height: 1.3; }
.verdict__note { margin: 5px 0 0; font-size: .93rem; color: var(--ink-soft); }

.verdict--gut { border-left-color: var(--good); }
.verdict--gut .verdict__seal, .verdict--gut .verdict__title { color: var(--good); }
.verdict--mittel { border-left-color: var(--warn); }
.verdict--mittel .verdict__seal, .verdict--mittel .verdict__title { color: var(--warn); }
.verdict--schlecht { border-left-color: var(--bad); }
.verdict--schlecht .verdict__seal, .verdict--schlecht .verdict__title { color: var(--bad); }
.verdict--offen .verdict__seal, .verdict--offen .verdict__title { color: var(--open); }

/* =============================================
   Tabellen — am Handy Karten statt Raster
   ============================================= */
.entry-content table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: .95rem; }
.entry-content th, .entry-content td { padding: 11px 13px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.entry-content thead th { background: var(--ink); color: #fff; font-weight: 600; border-color: var(--ink); }
.entry-content tbody tr:nth-child(even) td { background: var(--bg); }
.table-wrap { margin: 22px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap > table { margin: 0; }

/* =============================================
   Tags, Hinweise, Verwandtes
   ============================================= */
.entry-tags { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); }
.entry-tags__label { display: block; font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 9px; }
.tag {
	display: inline-block; padding: 5px 12px; margin: 0 6px 6px 0;
	border: 1px solid var(--line); border-radius: 999px;
	font-size: .82rem; text-decoration: none; color: var(--ink-soft); background: var(--paper);
}
.tag:hover { border-color: var(--amber); color: var(--amber-dark); }

.affiliate-note {
	margin-top: 22px; padding: 11px 14px; background: var(--bg);
	border-radius: var(--radius); font-size: .8rem; color: var(--muted); line-height: 1.5;
}

.section-title {
	font-family: var(--font-head); font-size: 1.3rem; margin: 40px 0 16px;
	padding-bottom: 8px; border-bottom: 2px solid var(--amber); display: inline-block; padding-right: 18px;
}
.related .card__body { padding: 12px 14px 14px; }

/* =============================================
   Seitenleiste
   ============================================= */
.sidebar { position: sticky; top: 18px; }
.widget {
	background: var(--paper); border: 1px solid var(--line);
	border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px;
}
.widget-title {
	font-size: .78rem; letter-spacing: .1em; text-transform: uppercase;
	margin: 0 0 12px; color: var(--muted); font-weight: 700;
}
.widget--note p { margin: 0; font-size: .9rem; color: var(--ink-soft); }

.cat-list { list-style: none; margin: 0; padding: 0; }
.cat-list li { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.cat-list li:last-child { border-bottom: 0; }
.cat-list a { text-decoration: none; font-size: .94rem; }
.cat-list a:hover { color: var(--amber-dark); }
.count { font-size: .74rem; color: var(--muted); background: var(--bg); padding: 2px 8px; border-radius: 999px; }
.cat-list--inline { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-list--inline li { border: 1px solid var(--line); border-radius: 999px; padding: 6px 13px; }

/* =============================================
   Blättern
   ============================================= */
.pagination { margin-top: 30px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.pagination .page-numbers {
	display: inline-block; padding: 8px 14px; border: 1px solid var(--line);
	border-radius: 8px; background: var(--paper); text-decoration: none; font-size: .9rem;
}
.pagination .page-numbers.current { background: var(--ink); color: #fff; border-color: var(--ink); }
.pagination .page-numbers:hover:not(.current) { border-color: var(--amber); color: var(--amber-dark); }

/* =============================================
   Archivkopf, 404, Suchformular
   ============================================= */
.archive-head { margin-bottom: 22px; }
.archive-title { font-family: var(--font-head); font-size: clamp(1.5rem, 3.4vw, 2.1rem); margin: 0 0 6px; }
.archive-desc { color: var(--ink-soft); max-width: 65ch; }
.archive-count { font-size: .82rem; color: var(--muted); margin: 4px 0 0; }

.notfound { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 34px; max-width: 720px; }
.notfound h1 { font-family: var(--font-head); margin-top: 0; }

.search-form { display: flex; gap: 8px; margin: 14px 0; }
.search-form input[type="search"] { flex: 1; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 1rem; font-family: inherit; }
.search-form button, .search-form input[type="submit"] {
	padding: 11px 20px; border: 0; border-radius: 8px; background: var(--ink);
	color: #fff; font-weight: 600; cursor: pointer; font-family: inherit;
}

/* =============================================
   Fuß
   ============================================= */
.site-footer { background: var(--ink); color: rgba(255,255,255,.75); margin-top: 40px; }
.footer-top { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 34px; padding-top: 40px; padding-bottom: 34px; }
.footer-text { font-size: .9rem; max-width: 46ch; margin: 14px 0 0; }
.site-footer .affiliate-note { background: rgba(255,255,255,.06); color: rgba(255,255,255,.6); }
.footer-head { font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.5); margin: 0 0 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; font-size: .92rem; }
.footer-col a { color: rgba(255,255,255,.82); text-decoration: none; }
.footer-col a:hover { color: #fff; text-decoration: underline; }
.site-footer .count { background: rgba(255,255,255,.08); color: rgba(255,255,255,.6); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 16px 0; font-size: .84rem; }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: rgba(255,255,255,.8); }

/* =============================================
   Handy und Tablet
   ============================================= */
@media (max-width: 1000px) {
	.layout { grid-template-columns: minmax(0,1fr); }
	.sidebar { position: static; }
	.footer-top { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 900px) {
	.header-inner { min-height: 60px; flex-wrap: wrap; }
	.search-mini { order: 3; width: 100%; margin-left: 0; padding-bottom: 4px; }
	.search-mini input { width: 100%; }

	.menu-toggle {
		display: flex; align-items: center; gap: 8px; margin-left: auto;
		background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.16);
		border-radius: 8px; padding: 9px 13px; font-size: .88rem; font-weight: 600;
		cursor: pointer; font-family: inherit;
	}
	.menu-toggle__bars { width: 16px; height: 2px; background: #fff; position: relative; display: block; }
	.menu-toggle__bars::before, .menu-toggle__bars::after {
		content: ""; position: absolute; left: 0; width: 16px; height: 2px; background: #fff;
	}
	.menu-toggle__bars::before { top: -5px; }
	.menu-toggle__bars::after { top: 5px; }

	.nav-bar { padding: 0; }
	.main-nav { display: none; }
	.main-nav.is-open { display: block; padding-bottom: 10px; }
	.main-nav > ul { flex-direction: column; }
	.main-nav a { padding: 12px 4px; border-bottom: 1px solid rgba(255,255,255,.07); white-space: normal; }
	.main-nav > ul > li > a { border-bottom: 1px solid rgba(255,255,255,.07); }
	.main-nav .sub-menu {
		position: static; display: none; box-shadow: none; border: 0; border-radius: 0;
		background: rgba(255,255,255,.04); padding: 0 0 0 14px;
	}
	.main-nav li.is-open > .sub-menu { display: block; }
	.main-nav .sub-menu a { color: rgba(255,255,255,.8); }
	.main-nav .sub-menu a:hover { background: transparent; color: #fff; }
}

@media (max-width: 700px) {
	body { font-size: 16px; }
	.entry { padding: 22px 18px 28px; border-radius: 0; margin: 0 -20px; border-left: 0; border-right: 0; }
	.entry-content { font-size: 1rem; }
	.card-grid, .card-grid--wide { grid-template-columns: 1fr 1fr; gap: 12px; }
	.card__body { padding: 11px 12px 13px; }
	.card__title { font-size: .92rem; }
	.footer-top { grid-template-columns: 1fr; gap: 26px; }
	.verdict { flex-direction: column; gap: 10px; }

	/* Tabellen zu Karten */
	.responsive-table,
	.responsive-table tbody,
	.responsive-table tr,
	.responsive-table td { display: block; width: 100%; }
	.responsive-table { border-collapse: separate; border-spacing: 0; }
	.responsive-table thead { display: none; }
	.responsive-table tr.is-head-row { display: none; }
	.responsive-table tr {
		border: 1px solid var(--line); border-radius: var(--radius);
		overflow: hidden; margin: 0 0 14px; background: var(--paper);
	}
	.responsive-table td:first-child {
		background: var(--ink); color: #fff; font-weight: 700; padding: 11px 13px; border: 0;
	}
	.responsive-table td:first-child::before { content: none; }
	.responsive-table td {
		display: flex; justify-content: space-between; align-items: baseline; gap: 14px;
		padding: 9px 13px; border: 0; border-bottom: 1px solid var(--line);
		background: var(--paper) !important;
	}
	.responsive-table tr td:last-child { border-bottom: 0; }
	.responsive-table td::before {
		content: attr(data-label); flex: 0 0 44%;
		font-size: .78rem; font-weight: 600; color: var(--muted); line-height: 1.35;
	}
	.table-wrap:has(> .responsive-table) { overflow-x: visible; }
}

@media (max-width: 430px) {
	.card-grid, .card-grid--wide { grid-template-columns: 1fr; }
	.brand__name { font-size: 1.06rem; }
	.brand__claim { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	* { animation: none !important; transition: none !important; }
	.card:hover { transform: none; }
}
