/*
Theme Name:   Letztes Bier (Child von Blocksy)
Theme URI:    https://www.letztesbier.de
Description:  Eigenes Child-Theme für letztesbier.de auf Basis von Blocksy.
Author:       Steffen Scheibe
Template:     blocksy
Version:      0.3.0
Text Domain:  letztesbier-child
License:      GNU General Public License v2 or later
*/

/* ==========================================================================
   1. Design-Tokens
   Konzept: "Kneipen-Look" – Schaum-Creme, Stout-Braun, Bernstein.
   Die Blocksy-Palette wird hier überschrieben, der Customizer bleibt unberührt.
   ========================================================================== */
:root {
	--lb-amber:      #f0a500;
	--lb-amber-dark: #c98600;
	--lb-amber-soft: #ffe7a6;
	--lb-stout:      #2b1d14;
	--lb-text:       #4a3b30;
	--lb-foam:       #fbf6ea;
	--lb-foam-2:     #f4ead2;
	--lb-line:       #e6d8b8;
	--lb-radius:     14px;
	--lb-shadow:     6px 6px 0 var(--lb-amber);
	--lb-font-head:  "Avenir Next", "Trebuchet MS", "Segoe UI", system-ui, sans-serif;

	/* Blocksy-Palette */
	--theme-palette-color-1: var(--lb-amber);
	--theme-palette-color-2: var(--lb-amber-dark);
	--theme-palette-color-3: var(--lb-text);
	--theme-palette-color-4: var(--lb-stout);
	--theme-palette-color-5: var(--lb-line);
	--theme-palette-color-6: var(--lb-foam-2);
	--theme-palette-color-7: var(--lb-foam);
	--theme-palette-color-8: #ffffff;

	/* Buttons */
	--theme-button-text-initial-color:        var(--lb-stout);
	--theme-button-text-hover-color:          var(--lb-stout);
	--theme-button-background-initial-color:  var(--lb-amber);
	--theme-button-background-hover-color:    var(--lb-amber-soft);
}

/* Textlinks: das Gelb aus dem Customizer hat auf Creme zu wenig Kontrast */
body[data-link] {
	--theme-link-initial-color: #8a5a00;
	--theme-link-hover-color:   var(--lb-stout);
	--theme-border-color:       var(--lb-line);
}

::selection {
	background: var(--lb-amber);
	color: var(--lb-stout);
}

:focus-visible {
	outline: 3px solid var(--lb-amber);
	outline-offset: 3px;
	border-radius: 4px;
}

/* ==========================================================================
   2. Typografie
   ========================================================================== */
h1, h2, h3, h4,
.entry-title,
.widget-title,
.site-title {
	font-family: var(--lb-font-head);
	font-weight: 800;
	letter-spacing: -0.015em;
	color: var(--lb-stout);
}

.entry-content a,
.entry-excerpt a {
	text-decoration: underline;
	text-decoration-color: var(--lb-amber);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	transition: background-color .15s;
}
.entry-content a:hover {
	background: var(--lb-amber-soft);
}

/* ==========================================================================
   3. Header: Stout-Balken mit Markisen-Kante
   ========================================================================== */
body[data-header*="type-1"] .ct-header [data-row*="middle"] {
	background-color: var(--lb-stout);
}

body[data-header*="type-1"] .ct-header [data-id="logo"] .site-title {
	--theme-link-initial-color: var(--lb-foam);
	--theme-link-hover-color:   var(--lb-amber);
	--theme-font-size: 28px;
	--theme-font-weight: 800;
}
.ct-header .site-description {
	color: var(--lb-amber);
	font-style: italic;
	opacity: .95;
}
body[data-header*="type-1"] .ct-header [data-id="menu"] > ul > li > a {
	--theme-link-initial-color: var(--lb-foam);
	--theme-link-hover-color:   var(--lb-amber);
	--theme-font-size: 13px;
	letter-spacing: .06em;
}
.ct-header .ct-header-search,
.ct-header .ct-header-trigger {
	--theme-icon-color: var(--lb-foam);
	--theme-icon-hover-color: var(--lb-amber);
	color: var(--lb-foam);
}

/* Logo (PNG mit weißem Hintergrund) als runde Plakette */
.ct-header .site-logo-container img,
.ct-header .custom-logo {
	background: var(--lb-foam);
	border-radius: 14px;
	padding: 4px;
	transition: transform .2s;
}
.ct-header .site-branding:hover .custom-logo {
	transform: rotate(-6deg) scale(1.06);
}

.ct-header {
	position: relative;
	z-index: 20;
}
/* Kante unter dem Header, wie eine Kneipen-Markise */
.ct-header::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	height: 14px;
	pointer-events: none;
	background:
		radial-gradient(circle at 12px 0, var(--lb-stout) 11px, transparent 12px) 0 0 / 24px 14px repeat-x;
}

/* ==========================================================================
   4. Beitragskarten ("Sticker"-Look)
   ========================================================================== */
.entries {
	padding-top: 12px;
}

body[data-prefix] .entry-card {
	background: #fff;
	border: 2px solid var(--lb-stout);
	border-radius: var(--lb-radius);
	box-shadow: var(--lb-shadow);
	transition: transform .18s ease, box-shadow .18s ease;
}
body[data-prefix] .entry-card:hover {
	transform: translate(-3px, -3px) rotate(-0.25deg);
	box-shadow: 10px 10px 0 var(--lb-amber);
}

.entry-card .entry-title {
	letter-spacing: -0.01em;
}
.entry-card .entry-title a:hover {
	text-decoration: underline wavy var(--lb-amber);
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}

/* Kategorien als schräge Etiketten */
.entry-card .meta-categories,
.entry-header .meta-categories {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 0; /* blendet die Kommas zwischen den Etiketten aus */
}
.meta-categories a {
	display: inline-block;
	padding: 2px 10px;
	background: var(--lb-amber);
	color: var(--lb-stout);
	border-radius: 999px;
	font-weight: 800;
	font-size: 11px;
	letter-spacing: .08em;
	transform: rotate(-1.5deg);
	transition: transform .15s, background-color .15s;
}
.meta-categories a:nth-child(even) {
	transform: rotate(1deg);
}
.meta-categories a:hover {
	background: var(--lb-stout);
	color: var(--lb-amber);
	transform: rotate(0) scale(1.05);
}

.entry-meta {
	color: var(--lb-text);
}

/* ==========================================================================
   5. Sidebar & Widgets
   ========================================================================== */
.ct-sidebar .ct-widget {
	background: #fff;
	border: 2px solid var(--lb-stout);
	border-radius: var(--lb-radius);
	box-shadow: 6px 6px 0 var(--lb-stout);
	padding: 24px 26px;
}
.ct-sidebar .ct-widget + .ct-widget {
	margin-top: 32px;
}
/* Reine Überschrift-Widgets (Gutenberg-Heading) ohne Karte, direkt über dem Folge-Widget */
.ct-sidebar .ct-widget:has(> .wp-block-heading:only-child) {
	background: none;
	border: 0;
	box-shadow: none;
	padding: 0 0 0 4px;
	margin-bottom: 22px;
}
.ct-sidebar .ct-widget:has(> .wp-block-heading:only-child) + .ct-widget {
	margin-top: 0;
}
.ct-sidebar .wp-block-heading,
.ct-sidebar .widget-title {
	display: inline-block;
	margin: 0 0 14px;
	padding-bottom: 6px;
	background: linear-gradient(var(--lb-amber), var(--lb-amber)) 0 100% / 100% 6px no-repeat;
}
.ct-sidebar a {
	--theme-link-initial-color: var(--lb-text);
	--theme-link-hover-color: var(--lb-stout);
}
.ct-sidebar li a:hover {
	background: var(--lb-amber-soft);
}

/* ==========================================================================
   6. Pagination
   ========================================================================== */
.ct-pagination {
	--theme-link-hover-color: var(--lb-amber);
	--theme-text-active-color: var(--lb-stout);
	--theme-border-color: var(--lb-stout);
}
.ct-pagination .page-numbers {
	border-radius: 999px;
	font-weight: 800;
}
.ct-pagination .page-numbers.current {
	background: var(--lb-amber);
	color: var(--lb-stout);
}
.ct-pagination a.next,
.ct-pagination a.prev {
	border: 2px solid var(--lb-stout);
	color: var(--lb-stout);
	border-radius: 999px;
	background: transparent;
}
.ct-pagination a.next:hover,
.ct-pagination a.prev:hover {
	background: var(--lb-amber);
}

/* ==========================================================================
   7. Einzelner Beitrag
   ========================================================================== */
.single .entry-header .page-title,
.single .hero-section .page-title {
	font-size: clamp(30px, 5vw, 46px);
	line-height: 1.12;
}
.single .ct-container-narrow article,
.single article.post {
	font-size: 18px;
	line-height: 1.75;
}
.entry-content img {
	border-radius: 10px;
}
.entry-content blockquote {
	position: relative;
	margin: 2em 0;
	padding: 1.1em 1.4em 1.1em 1.6em;
	background: var(--lb-foam-2);
	border: 0;
	border-left: 6px solid var(--lb-amber);
	border-radius: 0 var(--lb-radius) var(--lb-radius) 0;
	font-style: italic;
	color: var(--lb-stout);
}
.entry-content code,
.entry-content pre {
	background: var(--lb-stout);
	color: var(--lb-amber-soft);
	border-radius: 8px;
}
.entry-content code {
	padding: .1em .4em;
}
.entry-content pre {
	padding: 1.1em 1.3em;
}
.entry-content pre code {
	padding: 0;
	background: transparent;
}
.entry-content hr {
	border: 0;
	height: 12px;
	background: radial-gradient(circle, var(--lb-amber) 4px, transparent 5px) 0 50% / 24px 12px repeat-x;
}
.post-navigation a,
.ct-related-posts .entry-title a {
	font-family: var(--lb-font-head);
	font-weight: 800;
}
.comment-respond,
.ct-comments {
	font-size: 16px;
}

/* --------------------------------------------------------------------------
   7b. Einzelbeitrag – Feinschliff
   -------------------------------------------------------------------------- */

/* Meta-Zeile: Autor, Datum, Kategorien sauber in einer Reihe */
.single .entry-header .entry-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 16px;
	margin-top: 14px;
}
.single .entry-header .entry-meta li::after {
	display: none;
}
.single .entry-header .meta-author img {
	border: 2px solid var(--lb-amber);
	border-radius: 50%;
}

/* Einstiegsabsatz etwas größer */
.single .entry-content > p:first-of-type {
	font-size: 1.12em;
	color: var(--lb-stout);
}

/* Schlagwörter als Pillen */
.entry-tags .ct-module-title,
.ct-share-box .ct-module-title {
	text-transform: uppercase;
	letter-spacing: .08em;
	font-size: 12px;
	color: var(--lb-text);
}
.entry-tags-items {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
.entry-tags-items a {
	padding: 4px 14px;
	background: #fff;
	border: 2px solid var(--lb-stout);
	border-radius: 999px;
	color: var(--lb-stout);
	font-weight: 700;
	font-size: 14px;
	transition: transform .15s, background-color .15s;
}
.entry-tags-items a:nth-child(odd) { transform: rotate(-1deg); }
.entry-tags-items a:nth-child(even) { transform: rotate(1deg); }
.entry-tags-items a:hover {
	background: var(--lb-amber);
	color: var(--lb-stout);
	transform: rotate(0) scale(1.05);
}
.entry-tags-items a span {
	color: var(--lb-amber-dark);
}

/* Teilen-Leiste */
.ct-share-box[data-type="type-1"] {
	--theme-border-color: var(--lb-stout);
	border: 2px solid var(--lb-stout);
	border-radius: var(--lb-radius);
	overflow: hidden;
	background: #fff;
	box-shadow: 4px 4px 0 var(--lb-amber);
}
.ct-share-box[data-type="type-1"] a {
	--theme-icon-color: var(--lb-stout);
	color: var(--lb-stout);
	transition: background-color .15s;
}
.ct-share-box[data-type="type-1"] a:hover {
	background: var(--lb-amber);
	color: var(--lb-stout);
}

/* Autoren-Box als Karte */
.author-box {
	margin-top: 40px;
	padding: 28px 24px;
	background: var(--lb-foam-2);
	border: 2px solid var(--lb-stout);
	border-radius: var(--lb-radius);
	box-shadow: 6px 6px 0 var(--lb-stout);
}
.author-box[data-type="type-2"]::before,
.author-box[data-type="type-2"]::after,
.author-box[data-type="type-2"] .ct-media-container::before,
.author-box[data-type="type-2"] .ct-media-container::after {
	display: none;
}
.author-box .ct-media-container img {
	border: 4px solid var(--lb-amber);
	border-radius: 50%;
	background: #fff;
}
.author-box-name {
	font-family: var(--lb-font-head);
	font-weight: 800;
	font-size: 22px;
	color: var(--lb-stout);
}
.author-box-bio {
	font-style: italic;
	color: var(--lb-text);
}
.author-box-socials a {
	--theme-icon-color: var(--lb-stout);
	color: var(--lb-stout);
}
.author-box .ct-author-box-more {
	display: inline-block;
	padding: 3px 14px;
	background: var(--lb-stout);
	color: var(--lb-amber);
	border-radius: 999px;
	font-weight: 800;
	font-size: 12px;
	letter-spacing: .06em;
}
.author-box .ct-author-box-more:hover {
	background: var(--lb-amber);
	color: var(--lb-stout);
}

/* Vorheriger / Nächster Beitrag */
.post-navigation {
	margin-top: 40px;
}
.post-navigation a {
	display: block;
	padding: 14px 18px;
	background: #fff;
	border: 2px solid var(--lb-stout);
	border-radius: var(--lb-radius);
	box-shadow: 4px 4px 0 var(--lb-amber);
	transition: transform .15s, box-shadow .15s;
}
.post-navigation a:hover {
	transform: translate(-2px, -2px);
	box-shadow: 7px 7px 0 var(--lb-amber);
}
.post-navigation .item-label {
	color: var(--lb-amber-dark);
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: .08em;
	font-size: 12px;
}

.post-navigation [class*="nav-item"]::before,
.post-navigation [class*="nav-item"]::after,
.post-navigation::before,
.post-navigation::after {
	display: none;
}

/* Ähnliche Beiträge */
.ct-related-posts-container {
	background: var(--lb-foam-2);
	margin-top: 56px;
}
.ct-related-posts .ct-module-title {
	display: inline-block;
	padding-bottom: 6px;
	background: linear-gradient(var(--lb-amber), var(--lb-amber)) 0 100% / 100% 6px no-repeat;
}
.ct-related-posts-items article > div {
	height: 100%;
	padding: 18px 20px;
	background: #fff;
	border: 2px solid var(--lb-stout);
	border-radius: var(--lb-radius);
	box-shadow: 4px 4px 0 var(--lb-stout);
	transition: transform .15s, box-shadow .15s;
}
.ct-related-posts-items article > div:hover {
	transform: translate(-2px, -2px);
	box-shadow: 7px 7px 0 var(--lb-amber);
}
.related-entry-title {
	font-family: var(--lb-font-head);
	font-weight: 800;
}

/* Kommentare */
.ct-comments-container,
.comment-respond {
	--theme-form-field-border-initial-color: var(--lb-stout);
	--theme-form-field-border-focus-color: var(--lb-amber);
}
.ct-comments .ct-module-title,
.comment-reply-title {
	font-family: var(--lb-font-head);
	font-weight: 800;
	color: var(--lb-stout);
}
.comment-respond input[type="text"],
.comment-respond input[type="email"],
.comment-respond input[type="url"],
.comment-respond textarea {
	border: 2px solid var(--lb-stout);
	border-radius: 10px;
	background: #fff;
}
.comment-respond input:focus,
.comment-respond textarea:focus {
	border-color: var(--lb-amber);
	box-shadow: 0 0 0 3px var(--lb-amber-soft);
	outline: none;
}
/* Checkboxen: dunkler Rahmen, angehakt dunkel mit hellem Haken */
:root {
	--theme-form-selection-field-initial-color: var(--lb-stout);
	--theme-form-selection-field-active-color:  var(--lb-stout);
}
input[type="checkbox"] {
	accent-color: var(--lb-stout);
	border-width: 2px;
	border-radius: 5px;
}
/* Jetpack setzt "appearance: checkbox" direkt am Element (inline) und
   schaltet damit das Blocksy-Design ab. Nur !important schlägt Inline-Stile. */
.comment-subscription-form input[type="checkbox"] {
	-webkit-appearance: none !important;
	-moz-appearance: none !important;
	appearance: none !important;
	width: 16px !important;
}
/* Abstände und Schrift wie bei den Blocksy-Zeilen darüber (Datenschutz-Checkbox) */
.comment-subscription-form {
	margin: -16px 0 0;
}
.comment-subscription-form label,
.comment-subscription-form .subscribe-label {
	font-size: 13px;
}
/* Abstand zwischen "Kommentar abschicken" und dem Akismet-Hinweis */
.comment-respond .form-submit {
	margin-bottom: 0;
}
.akismet_comment_form_privacy_notice {
	margin-top: 28px;
	font-size: 14px;
	line-height: 1.6;
}

.ct-comment-list .comment-body,
.ct-comment-list article {
	background: #fff;
	border: 2px solid var(--lb-stout);
	border-radius: var(--lb-radius);
	padding: 18px 22px;
	margin-bottom: 18px;
}

/* ==========================================================================
   8. Footer
   ========================================================================== */
body[data-footer*="type-1"] .ct-footer {
	background-color: var(--lb-stout);
}
body[data-footer*="type-1"] .ct-footer [data-id="menu"] > ul > li > a {
	--theme-link-initial-color: var(--lb-foam);
	--theme-link-hover-color:   var(--lb-amber);
	letter-spacing: .06em;
}
body[data-footer*="type-1"] [data-id="copyright"] {
	--theme-text-color: rgba(251, 246, 234, .6);
}

/* ==========================================================================
   9. Cookie-Hinweis
   ========================================================================== */
.cookie-notification {
	--notice-background-color: transparent;
	background: transparent !important;
	box-shadow: none !important;
}
.cookie-notification .container {
	background: #fff !important;
	border: 2px solid var(--lb-stout);
	border-radius: var(--lb-radius) !important;
	box-shadow: 6px 6px 0 var(--lb-amber) !important;
	color: var(--lb-text);
}
.cookie-notification .ct-cookies-accept-button {
	background: var(--lb-amber);
	color: var(--lb-stout);
	font-weight: 800;
	border-radius: 999px;
}
.cookie-notification .ct-cookies-decline-button {
	border-radius: 999px;
}

/* ==========================================================================
   10. Formulare & Buttons
   ========================================================================== */
.ct-button,
.wp-block-button__link,
button[type="submit"],
input[type="submit"] {
	border-radius: 999px;
	font-weight: 800;
	border: 2px solid var(--lb-stout);
	box-shadow: 3px 3px 0 var(--lb-stout);
	transition: transform .15s, box-shadow .15s, background-color .15s;
}
.ct-button:hover,
.wp-block-button__link:hover,
button[type="submit"]:hover,
input[type="submit"]:hover {
	transform: translate(-1px, -1px);
	box-shadow: 5px 5px 0 var(--lb-stout);
}
input[type="text"],
input[type="email"],
input[type="url"],
input[type="search"],
textarea {
	border-radius: 10px;
}

/* ==========================================================================
   11. Mobil & Barrierefreiheit
   ========================================================================== */
@media (max-width: 689px) {
	body[data-prefix] .entry-card {
		box-shadow: 4px 4px 0 var(--lb-amber);
	}
	.ct-sidebar .ct-widget {
		box-shadow: 4px 4px 0 var(--lb-stout);
	}
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		transition: none !important;
		animation: none !important;
	}
	body[data-prefix] .entry-card:hover {
		transform: none;
	}
}

