/* ==========================================================================
   tapito v2 – Ergänzungen zu design.css (Original) und tapito-wp.css
   Schriften/Größen kommen als CSS-Variablen aus dem Customizer (inc/fonts.php).
   ========================================================================== */

:root {
	--tapito-text-column: 648px; /* = rechte Kante des Rezeptbilds (70 %-Spalte), ca. zwei Drittel */
	--tapito-radius: 10px;
	--tapito-green: #95B01E;
	--tapito-blue: #556478;
}

/* ---------- Typografie ---------- */
body {
	font-family: var(--tapito-font-body, Verdana, Arial, sans-serif);
	font-size: var(--tapito-font-size, 15px);
	line-height: var(--tapito-line-height, 1.55);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}
input, textarea, select, button { font-family: inherit; font-size: inherit; }
/* Original setzt feste 17px-Zeilenhöhen – an die gewählte Schriftgröße koppeln */
p, .elementText li, .elementLink, .entry-content ul li, .entry-content ol li,
ul.is-style-tapito-olives li, .tapitoCompactBody, .textInfo { line-height: var(--tapito-line-height, 1.55); }
.entry-content ul li, ul.is-style-tapito-olives li { margin-bottom: 4px; }
ul.is-style-tapito-olives li::before, .wp-block-tapito-ingredients li::before { top: 0.3em; }

h1, h2, h3, h4, .h1Editor, .h2Editor, .h3Editor, .h4Editor,
.listBox .listEntryTitle, .listCompact .listEntryTitle, .elementSubmap h3,
#navigationFullLayer a, .comment-reply-title {
	font-family: var(--tapito-font-heading, var(--tapito-font-body));
}
h1, .h1Editor { font-size: var(--tapito-size-h1, 28px); line-height: 1.25; font-weight: 700; letter-spacing: -0.005em; margin-bottom: 14px; }
h2, .h2Editor { font-size: var(--tapito-size-h2, 20px); line-height: 1.3; font-weight: 700; }
h3, .h3Editor { font-size: var(--tapito-size-h3, 18px); line-height: 1.3; font-weight: 700; }
h4, .h4Editor { font-size: var(--tapito-font-size, 15px); line-height: 1.35; font-weight: 700; }
h2.recipeSubtitle { font-weight: 600; font-size: calc(var(--tapito-size-h2, 20px) * 0.9); line-height: 1.4; }

#navigationFullLayer a.navLevel1, #navigationFullLayer a.navLevel1Selected,
#navigationFullLayer a.navLevel1Open, #navigationFullLayer a.navLevel1OpenSelected,
#navigationFullLayer a.navLevel1OpenDescendantSelected { font-weight: 800; letter-spacing: 0.03em; }
#navigationMeta, #navigationBreadcrumb { font-size: 0.92em; }

/* ---------- Breadcrumb: ein Trennzeichen ---------- */
#navigationBreadcrumb .breadcrumbSep { color: #a5afbe; margin: 0 0.4em; }

/* ---------- Textspalte: Rezepte und Blogbeiträge auf ca. zwei Drittel ---------- */
.single-tapito_recipe .entry-content > :not(.tapitoRecipeHeader):not(.alignwide):not(.alignfull),
.single-tapito_recipe .elementHeadline,
.single-tapito_recipe article > .elementText,
.single-tapito_recipe article > .elementLink,
.single-post .entry-content > :not(.alignwide):not(.alignfull):not(.wp-block-tapito-recipe-list):not(.wp-block-tapito-recipe-slider) {
	max-width: var(--tapito-text-column);
}
.single-tapito_recipe .tapitoRecipeHeader { max-width: none; }

/* ---------- Kategorieseiten: Texte oben/unten ---------- */
.tapitoCategoryTop > *, .tapitoCategoryBottom > * { max-width: var(--tapito-text-column); }
.tapitoCategoryTop::after, .tapitoCategoryBottom::after { content: ""; display: block; clear: both; }
.tapitoCategoryTop img.pictureLeft, .tapitoCategoryBottom img.pictureLeft,
.tapitoCategoryTop img.pictureRight, .tapitoCategoryBottom img.pictureRight {
	max-width: 220px; height: auto; border-radius: 8px;
}
.tapitoCategoryTop img.pictureLeft, .tapitoCategoryBottom img.pictureLeft { margin: 5px 20px 10px 0; }
.tapitoCategoryTop img.pictureRight, .tapitoCategoryBottom img.pictureRight { margin: 5px 0 10px 20px; }
.tapitoCategoryTop .wp-block-image img, .tapitoCategoryBottom .wp-block-image img { border-radius: 8px; }
.tapitoCategoryBottom .wp-block-image.alignleft, .tapitoCategoryBottom .wp-block-image.alignright,
.tapitoCategoryTop .wp-block-image.alignleft, .tapitoCategoryTop .wp-block-image.alignright { max-width: 220px; }
.tapitoCategoryTop { margin-bottom: 14px; }
.tapitoSortSwitch { margin-bottom: 4px; }
.tapitoSortSwitch a { color: var(--tapito-blue); }

/* ---------- Rezept-Kacheln: weicher ---------- */
ul.listBox .listEntry {
	border-color: transparent;
	border-radius: var(--tapito-radius);
	background-color: #ececec;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 2px 10px rgba(0, 0, 0, 0.06);
	transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}
ul.listBox .listEntryThumbnail { transition: transform 0.4s ease; }
ul.listBox .listEntryClickable:hover, ul.listBox .listEntryClickable:focus-within {
	transform: translateY(-3px);
	background-color: #e6e6e6;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.14);
}
ul.listBox .listEntryClickable:hover .listEntryThumbnail { transform: scale(1.04); }
ul.listBox .listEntryTitle { font-size: var(--tapito-size-tile-title, 17px); line-height: 1.3; padding: 12px 14px 8px; }
ul.listBox .listEntryDescription { padding: 0 14px 10px; font-size: var(--tapito-size-tile-text, var(--tapito-font-size, 15px)); }
ul.listBox .listEntryDescription, ul.listBox .listEntryDescription p, ul.listBox .listCurrentRatingArea { line-height: var(--tapito-tile-line-height, 1.4); }
ul.listBox .listCurrentRatingArea { padding: 0 14px 14px; }
@media (prefers-reduced-motion: reduce) {
	ul.listBox .listEntry, ul.listBox .listEntryThumbnail { transition: none; }
	ul.listBox .listEntryClickable:hover, ul.listBox .listEntryClickable:hover .listEntryThumbnail { transform: none; }
}

/* ---------- Bilder im Inhalt leicht abrunden (passend zu den Kacheln) ---------- */
.entry-content .wp-block-image img, .tapitoRecipeHeader .picture img { border-radius: 8px; }
.tapitoRecipeHeader .picture { border-radius: 8px; overflow: hidden; }

/* ---------- Mehr Luft vor Zwischenüberschriften und Abschnitten ---------- */
.entry-content > * + h2.wp-block-heading, .entry-content > * + h2 { margin-top: 2.1em; }
.entry-content > * + h3.wp-block-heading, .entry-content > * + h3 { margin-top: 1.6em; }
.entry-content > h2 + h3 { margin-top: 0.4em; }
/* Abschnitts-Elemente des Originals (Kacheln, Slider, Listen) */
.elementList + .elementHeadline, .elementList + .wp-block-heading,
.tapitoSlider + .wp-block-heading, .wp-block-tapito-recipe-slider + .wp-block-heading { margin-top: 1.6em; }
.elementList, .tapitoSlider { margin-bottom: 14px; }
/* Fußbereich (Widgets) */
#blockBottom { margin-top: 30px; }
#blockBottomInner { padding-top: 24px; }
#blockBottom .wp-block-heading, #blockBottom .widget-title, #blockBottom h2, #blockBottom h3 {
	font-size: var(--tapito-size-h3, 18px); line-height: 1.3; margin-bottom: 12px;
}
#blockBottom .widget_nav_menu li { line-height: 1.75; }
#blockBottom .widget + .widget, #blockBottom .wp-block-group + .wp-block-heading, #blockBottom .wp-block-heading:not(:first-child) { margin-top: 26px; }
