/*
Theme Name: TopList Lite
Theme URI: https://testsiege.de
Author: XCONTOR
Author URI: https://testsiege.de
Description: Ultraleichtes Theme für Meta-Ranking-Portale (top-bewertet.com, testsiege.de). Passt zum Plugin "TopList AI", moderne Container, lokal gehostetes Open Sans, drei Farboptionen im Customizer, kein jQuery, ein Mini-Script.
Version: 1.0.5
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0+
Text Domain: toplist-lite
*/

/* ---------- Open Sans (lokal, DSGVO-konform) ---------- */
@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('fonts/open-sans-latin-400-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+2013-2014, U+2018-201A, U+201C-201E, U+2026, U+20AC;
}
@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('fonts/open-sans-latin-ext-400-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+1E00-1EFF;
}
@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('fonts/open-sans-latin-600-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+2013-2014, U+2018-201A, U+201C-201E, U+2026, U+20AC;
}
@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('fonts/open-sans-latin-ext-600-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+1E00-1EFF;
}
@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('fonts/open-sans-latin-700-normal.woff2') format('woff2');
	unicode-range: U+0000-00FF, U+2013-2014, U+2018-201A, U+201C-201E, U+2026, U+20AC;
}
@font-face {
	font-family: 'Open Sans';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('fonts/open-sans-latin-ext-700-normal.woff2') format('woff2');
	unicode-range: U+0100-02BA, U+1E00-1EFF;
}

/* ---------- Variablen (werden vom Customizer überschrieben) ---------- */
:root {
	--tp-primary: #0f2a43;   /* Header, Überschriften, Links */
	--tp-accent:  #047857;   /* Buttons, CTAs, Badges */
	--tp-bg:      #f5f6f8;   /* Seitenhintergrund */
	--tp-surface: #ffffff;
	--tp-text:    #1f2937;
	--tp-muted:   #6b7280;
	--tp-border:  #e5e7eb;
	--tp-radius:  12px;
	--tp-shadow:  0 1px 3px rgba(0,0,0,.06);
	--tp-maxw:    860px;
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	font-family: 'Open Sans', -apple-system, 'Segoe UI', Roboto, sans-serif;
	font-size: 17px;
	line-height: 1.65;
	color: var(--tp-text);
	background: var(--tp-bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--tp-primary); }
a:hover { color: var(--tp-accent); }

h1, h2, h3, h4 { color: var(--tp-primary); line-height: 1.25; margin: 1.4em 0 .5em; }
h1 { font-size: 1.9rem; font-weight: 700; }
h2 { font-size: 1.45rem; font-weight: 700; }
h3 { font-size: 1.15rem; font-weight: 600; }

:focus-visible { outline: 3px solid var(--tp-accent); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ---------- Layout-Container ---------- */
.tp-container { max-width: var(--tp-maxw); margin: 0 auto; padding: 0 20px; }
.tp-wide { max-width: 1100px; }

.site-main { padding: 32px 0 56px; }

/* Moderner Content-Container: Karte mit ruhigem Schatten */
.tp-card {
	background: var(--tp-surface);
	border: 1px solid var(--tp-border);
	border-radius: var(--tp-radius);
	box-shadow: var(--tp-shadow);
	padding: 32px;
	margin-bottom: 24px;
}
@media (max-width: 640px) { .tp-card { padding: 20px; } }

/* ---------- Header ---------- */
.site-header {
	background: var(--tp-primary);
	color: #fff;
	position: sticky; top: 0; z-index: 50;
}
.tp-header-inner {
	display: flex; align-items: center; justify-content: space-between;
	gap: 16px; min-height: 64px;
}
.site-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.site-brand img { max-height: 36px; width: auto; }
.site-title { color: #fff; font-size: 1.2rem; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.site-title .tp-dot { color: var(--tp-accent); }

.main-nav ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.main-nav a {
	display: block; color: rgba(255,255,255,.88); text-decoration: none;
	font-size: .92rem; font-weight: 600; padding: 8px 12px; border-radius: 8px;
}
.main-nav a:hover, .main-nav .current-menu-item > a { color: #fff; background: rgba(255,255,255,.12); }

.nav-toggle {
	display: none; background: none; border: 1px solid rgba(255,255,255,.4);
	color: #fff; border-radius: 8px; padding: 6px 12px; font-size: 1.1rem; cursor: pointer;
}
@media (max-width: 782px) {
	.nav-toggle { display: block; }
	.main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%;
		background: var(--tp-primary); padding: 8px 20px 16px; border-top: 1px solid rgba(255,255,255,.15); }
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; }
}

/* ---------- Hero (Seitentitel-Bereich) ---------- */
.tp-hero { background: var(--tp-primary); color: #fff; padding: 36px 0 44px; }
.tp-hero h1 { color: #fff; margin: 0 0 .3em; }
.tp-hero .tp-lead { color: rgba(255,255,255,.85); margin: 0; max-width: 640px; }
.tp-hero + .site-main { margin-top: -24px; }
.tp-hero + .site-main .tp-card:first-child { position: relative; }

/* ---------- Archiv: Listen-Grid ---------- */
.tp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.tp-teaser {
	display: flex; flex-direction: column; text-decoration: none;
	background: var(--tp-surface); border: 1px solid var(--tp-border);
	border-radius: var(--tp-radius); box-shadow: var(--tp-shadow);
	padding: 22px; transition: transform .15s, box-shadow .15s;
}
.tp-teaser:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.09); }
.tp-teaser h2 { font-size: 1.1rem; margin: .4em 0; }
.tp-teaser p { color: var(--tp-muted); font-size: .9rem; margin: 0 0 1em; }
.tp-cat {
	align-self: flex-start; font-size: .7rem; font-weight: 700; text-transform: uppercase;
	letter-spacing: .04em; color: var(--tp-accent);
	background: color-mix(in srgb, var(--tp-accent) 10%, #fff);
	border-radius: 999px; padding: 3px 10px;
}
.tp-more { margin-top: auto; font-weight: 700; font-size: .9rem; color: var(--tp-accent); }

/* ---------- Meta-Zeile & Footer ---------- */
.tp-meta { font-size: .82rem; color: var(--tp-muted); margin-bottom: 1em; }

.site-footer {
	background: var(--tp-primary); color: rgba(255,255,255,.8);
	padding: 28px 0; font-size: .85rem; margin-top: 40px;
}
.tp-footer-inner { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 16px; margin: 0; padding: 0; }

/* ---------- Buttons (Theme + Plugin-Anbindung) ---------- */
.tp-button, .tlai-button {
	display: inline-block; background: var(--tp-accent); color: #fff !important;
	font-weight: 700; padding: 12px 22px; border-radius: 8px;
	text-decoration: none; border: none; cursor: pointer; transition: filter .15s;
}
.tp-button:hover, .tlai-button:hover { filter: brightness(.9); background: var(--tp-accent); }

/* Plugin-Farben an Theme-Variablen koppeln */
.tlai-winner { border-color: var(--tp-accent) !important; box-shadow: 0 4px 14px color-mix(in srgb, var(--tp-accent) 20%, transparent) !important; }
.tlai-winner .tlai-rank, .tlai-badge { background: var(--tp-accent) !important; }
.tlai-pros li { color: color-mix(in srgb, var(--tp-accent) 80%, #000) !important; }

/* ---------- Inhalte / Prosa ---------- */
.entry-content > *:first-child { margin-top: 0; }
.entry-content blockquote {
	border-left: 4px solid var(--tp-accent); margin: 1.2em 0; padding: .3em 0 .3em 1em; color: var(--tp-muted);
}
.entry-content table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.entry-content th, .entry-content td { border: 1px solid var(--tp-border); padding: 8px 10px; text-align: left; }
.entry-content th { background: var(--tp-bg); }

/* Pagination / Kommentare aus – bewusst nicht gestylt (Portal-Fokus) */
.screen-reader-text {
	clip: rect(1px,1px,1px,1px); clip-path: inset(50%); height: 1px; width: 1px;
	overflow: hidden; position: absolute;
}

/* ---------- Startseite (front-page.php) ---------- */
.tp-hero-home { padding: 56px 0 64px; }
.tp-hero-cta { margin: 1.4em 0 0; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.tp-hero-link { color: rgba(255,255,255,.85); font-weight: 600; text-decoration: none; }
.tp-hero-link:hover { color: #fff; }

.tp-section { margin: 40px 0; }
.tp-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.tp-section-head h2 { margin: 0 0 18px; }
.tp-section-more { font-weight: 700; font-size: .9rem; text-decoration: none; color: var(--tp-accent); white-space: nowrap; }

.tp-cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tp-cat-card {
	display: flex; align-items: center; gap: 14px; text-decoration: none;
	background: var(--tp-surface); border: 1px solid var(--tp-border);
	border-radius: var(--tp-radius); box-shadow: var(--tp-shadow);
	padding: 14px 16px; transition: transform .15s, box-shadow .15s;
}
.tp-cat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.09); }
.tp-cat-mono {
	flex: 0 0 44px; height: 44px; border-radius: 10px;
	display: flex; align-items: center; justify-content: center;
	font-weight: 700; font-size: 1.1rem; color: #fff; background: var(--tp-primary);
}
.tp-cat-card:hover .tp-cat-mono { background: var(--tp-accent); }
.tp-cat-body { display: flex; flex-direction: column; }
.tp-cat-body strong { color: var(--tp-text); }
.tp-cat-count { font-size: .8rem; color: var(--tp-muted); }

.tp-trust {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px;
	background: var(--tp-surface); border: 1px solid var(--tp-border);
	border-radius: var(--tp-radius); box-shadow: var(--tp-shadow); padding: 28px;
}
.tp-trust-item { display: flex; gap: 12px; align-items: flex-start; }
.tp-trust-item p { margin: .2em 0 0; font-size: .88rem; color: var(--tp-muted); }
.tp-trust-icon {
	flex: 0 0 36px; height: 36px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: color-mix(in srgb, var(--tp-accent) 12%, #fff);
	color: var(--tp-accent); font-weight: 700;
}

/* v1.0.2: Logo/Brand immer linksbündig */
.tp-header-inner { justify-content: flex-start; }
.site-brand { margin-right: auto; text-align: left; }
.site-brand .custom-logo-link { display: block; margin: 0; }
.site-brand img.custom-logo { display: block; margin: 0; }

/* v1.0.3: Header über volle Seitenbreite, Logo ganz links */
.site-header .tp-header-inner { max-width: none; padding: 0 24px; }
.site-header .custom-logo-link,
.site-header .site-brand { margin-right: auto; display: flex; align-items: center; }
.site-header .custom-logo-link img { display: block; max-height: 36px; width: auto; margin: 0; }

/* =====================================================================
   v1.0.4 – Header-Fixes, Suchschlitz, Trust-Strip top
   ===================================================================== */

/* Header: volle Breite, Logo ODER Text links, Suche mittig, Nav rechts */
.site-header .tp-header-inner {
	max-width: none;
	padding: 0 24px;
	gap: 12px;
}

/* Custom Logo (WordPress-Ausgabe) direkt als Flex-Kind */
.site-header .custom-logo-link {
	display: flex;
	align-items: center;
	flex: 0 0 auto;
	text-decoration: none;
}
.site-header .custom-logo-link img.custom-logo {
	display: block;
	max-height: 38px;
	width: auto;
	margin: 0;
}

/* Suchfeld */
.tp-search {
	flex: 1 1 260px;
	max-width: 420px;
	display: flex;
	align-items: center;
	background: rgba(255,255,255,.12);
	border: 1px solid rgba(255,255,255,.25);
	border-radius: 8px;
	overflow: hidden;
}
.tp-search-input {
	flex: 1;
	background: transparent;
	border: none;
	outline: none;
	color: #fff;
	font-family: inherit;
	font-size: .92rem;
	padding: 8px 12px;
}
.tp-search-input::placeholder { color: rgba(255,255,255,.55); }
.tp-search-input:focus { background: rgba(255,255,255,.08); }
.tp-search-btn {
	background: transparent;
	border: none;
	color: rgba(255,255,255,.8);
	padding: 8px 12px;
	cursor: pointer;
	display: flex;
	align-items: center;
}
.tp-search-btn:hover { color: #fff; }

/* Mobile: Suchfeld volle Breite unter Brand/Nav */
@media (max-width: 782px) {
	.site-header .tp-header-inner { flex-wrap: wrap; }
	.tp-search { flex: 1 0 100%; order: 3; max-width: none; }
	.main-nav { order: 4; }
}

/* Trust-Strip: immer oberster Abschnitt im main */
.tp-trust { margin-top: 0; }

/* =====================================================================
   v1.0.5 – Hero als eigenständiger Such-Block
   ===================================================================== */

/* Header: Logo 120px hoch, schlanke Nav-Leiste darüber */
.site-header .custom-logo-link img.custom-logo,
.site-header .custom-logo-link img { max-height: 120px; width: auto; margin: 0; display: block; }
.site-header .tp-header-inner { min-height: 56px; max-width: none; padding: 0 24px; }

/* Hero-Block: zentrierte Spalte, komplett in Primärfarbe */
.tp-hero-home {
	background: var(--tp-primary);
	padding: 48px 20px 56px;
	text-align: center;
}
.tp-hero-inner {
	max-width: 680px;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 28px;
}

/* Logo / Wortmarke im Hero */
.tp-hero-brand { line-height: 1; }
.tp-hero-brand .custom-logo-link img.custom-logo,
.tp-hero-brand .custom-logo-link img {
	max-height: 120px;
	width: auto;
	display: block;
	margin: 0 auto;
}
.tp-hero-wordmark {
	font-size: 2.4rem;
	font-weight: 700;
	color: #fff;
	text-decoration: none;
	letter-spacing: -.02em;
}

/* Großer Suchschlitz */
.tp-hero-search {
	width: 100%;
	display: flex;
	align-items: stretch;
	background: #fff;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 24px rgba(0,0,0,.18);
}
.tp-hero-search-input {
	flex: 1;
	border: none;
	outline: none;
	font-family: inherit;
	font-size: 1.1rem;
	padding: 18px 20px;
	color: var(--tp-text);
	background: transparent;
}
.tp-hero-search-input::placeholder { color: #9ca3af; }
.tp-hero-search-btn {
	background: var(--tp-accent);
	border: none;
	color: #fff;
	padding: 0 24px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: filter .15s;
}
.tp-hero-search-btn:hover { filter: brightness(.9); }

/* CTAs unter dem Suchschlitz */
.tp-hero-cta {
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
	justify-content: center;
	margin: 0;
}
.tp-hero-link { color: rgba(255,255,255,.85); font-weight: 600; text-decoration: none; }
.tp-hero-link:hover { color: #fff; }

/* Alten tp-hero-Padding-Stil für Unterseiten beibehalten */
.tp-hero:not(.tp-hero-home) { padding: 36px 0 44px; }
.tp-hero:not(.tp-hero-home) h1 { color: #fff; margin: 0 0 .3em; }

/* Suchfeld aus Header entfernen (falls CSS-Rest) */
.site-header .tp-search { display: none; }

@media (max-width: 640px) {
	.tp-hero-home { padding: 32px 16px 40px; }
	.tp-hero-search-input { font-size: 1rem; padding: 15px 14px; }
	.tp-hero-search-btn { padding: 0 16px; }
}
