/*
Theme Name:  Katrin Bretschneider
Description: Portierung der webEdition-Seite (Basis: „Telephasic“ von HTML5 UP, CCA 3.0). Benötigt das Plugin „KB Produktionen & webEdition-Import“.
Author:      Biendara Medien
Version:     2.0.3
Requires PHP: 7.4
Requires at least: 6.3
Text Domain: kb
*/

/* Open Sans lokal statt Google Fonts (SIL OFL 1.1) */
@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+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@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+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Barrierefreiheit -------------------------------------------- */
.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
	clip: auto; width: auto; height: auto; margin: 0; overflow: visible; white-space: normal;
	position: fixed !important; top: 8px; left: 8px; z-index: 100000;
	padding: .75em 1.25em; background: #fff; color: #000; border-radius: .35em;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible {
	outline: 2px solid currentColor; outline-offset: 3px;
}

/* ---- Inhalte ----------------------------------------------------- */
.kb-beschreibung { margin: 3em 0 0 0; }
.kb-beschreibung img { max-width: 100%; height: auto; }
/* WordPress setzt width/height-Attribute – main.css skaliert nur die Breite */
.image img, img.hundred { height: auto; }

/* Titel in der Produktionsliste ist jetzt ein Link – Optik wie bisher */
.sort-row .kb-row-link { color: inherit; text-decoration: none; border: 0; }
.sort-row .kb-row-link:hover { text-decoration: underline; }

/* ---- Produktionsliste ohne Isotope (fitRows → Flexbox) ----------- */
.sort-grid { display: flex; flex-wrap: wrap; align-items: flex-start; }
.sort-row[hidden] { display: none !important; }
.sort-row .image { display: block; margin: 0; }
.sort-row p { line-height: 1.35; }
.sort-row .kb-zusatz { opacity: .65; font-size: .92em; }

/* Tablet und Handy: echtes Raster mit quadratischen Bildern, Höhe passt sich an
   (main.css gibt den Kacheln sonst feste Höhen, dann rutscht die Unterschrift
   unter das Bild bzw. an die nächste Kachel) */
@media screen and (max-width: 1280px) {
	.sort-grid {
		display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr));
		column-gap: 24px; row-gap: 36px; width: 100% !important; overflow: visible !important;
	}
	.sort-row { width: auto !important; height: auto !important; margin: 0 !important; padding: 0 !important; }
	.sort-row .image img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
	.sort-row p { margin: .6em 0 0 0; }
}
@media screen and (max-width: 736px) {
	.sort-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 16px; row-gap: 28px; }
	.sort-row p { font-size: .8em; }
}

/* ---- Slider ohne bxSlider (gleiches Markup, jquery.bxslider.css greift) */
.kb-slider .bx-viewport { position: relative; overflow: hidden; width: 100%; }
ul.bxslider.kb-fade { position: relative; margin: 0; padding: 0; list-style: none; }
ul.bxslider.kb-fade > li {
	list-style: none; float: none; display: block;
	position: absolute; top: 0; left: 0; width: 100%;
	opacity: 0; z-index: 50; transition: opacity 1.25s ease;
}
ul.bxslider.kb-fade > li.is-active { position: relative; opacity: 1; z-index: 51; }
.kb-slider .bx-pager-link { cursor: pointer; }

/* ---- Mobiles Menü: Button statt Link, Icon ohne Font Awesome ------ */
#navButton .toggle { background: none; padding: 0; margin: 0; cursor: pointer; -webkit-appearance: none; appearance: none; }
#navButton .toggle:before {
	content: '' !important; font-family: inherit !important;
	background:
		linear-gradient(#fff, #fff) center 9px / 20px 2px no-repeat,
		linear-gradient(#fff, #fff) center 14px / 20px 2px no-repeat,
		linear-gradient(#fff, #fff) center 19px / 20px 2px no-repeat,
		rgba(128, 132, 136, 0.35) !important;
}

/* Menü nur so hoch wie seine Einträge (Telephasic: feste 50 % Bildschirmhöhe);
   --kb-nav-h setzt js/theme.js */
@media screen and (max-width: 736px) {
	#navPanel { height: auto !important; max-height: 85vh; padding-bottom: .5em; transform: translateY(-100%) !important; }
	body.navPanel-visible #navPanel { transform: translateY(0) !important; }
	body.navPanel-visible #page-wrapper, body.navPanel-visible #navButton { transform: translateY(var(--kb-nav-h, 50vh)) !important; }
}

/* ---- Weniger Bewegung, wenn gewünscht ---------------------------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
