/*
Theme Name:        Canivers
Theme URI:         https://github.com/Caniflage/canivers
Author:            Caniflage
Description:       Schlankes Theme für den Canivers-Seitenbaukasten. Farben und Schriften kommen aus den Canivers-Website-Einstellungen.
Version:           0.2.0
Requires at least: 6.5
Requires PHP:      8.1
License:           GPL-2.0-or-later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Text Domain:       canivers-theme
*/

:root {
	--cvt-width: var(--cv-container-width, 1140px);
	--cvt-gutter: 20px;
}

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

html {
	-webkit-text-size-adjust: 100%;
}

body {
	margin: 0;
	background: #fff;
	color: var(--cv-color-text, #3a3431);
	font-family: var(--cv-font-text, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
	font-weight: var(--cv-font-text-weight, 400);
	font-size: 17px;
	line-height: 1.65;
}

h1, h2, h3, h4, h5, h6 {
	color: var(--cv-color-primary, #2f2a27);
	font-family: var(--cv-font-primary, Georgia, serif);
	font-weight: var(--cv-font-primary-weight, 600);
	line-height: 1.2;
	margin: 0 0 0.6em;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem); }
h3 { font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
	margin: 0 0 1em;
}

a {
	color: var(--cv-color-accent, #b85c58);
}

a:hover,
a:focus-visible {
	color: var(--cv-color-primary, #2f2a27);
}

img {
	max-width: 100%;
	height: auto;
}

:focus-visible {
	outline: 2px solid var(--cv-color-accent, #b85c58);
	outline-offset: 2px;
}

.screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.skip-link:focus {
	position: fixed !important;
	top: 8px;
	left: 8px;
	z-index: 1000;
	width: auto;
	height: auto;
	clip: auto;
	padding: 10px 16px;
	background: #fff;
	color: #000;
}

.cvt-wrap {
	width: 100%;
	max-width: calc(var(--cvt-width) + 2 * var(--cvt-gutter));
	margin: 0 auto;
	padding: 0 var(--cvt-gutter);
}

/* Kopfbereich */
.cvt-header {
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	background: #fff;
}

.cvt-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 72px;
}

.cvt-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--cv-color-primary, #2f2a27);
	font-family: var(--cv-font-primary, Georgia, serif);
	font-size: 1.35rem;
	font-weight: var(--cv-font-primary-weight, 600);
	text-decoration: none;
}

.cvt-brand img {
	max-height: 56px;
	width: auto;
}

.cvt-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 22px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cvt-nav a {
	color: var(--cv-color-primary, #2f2a27);
	text-decoration: none;
	font-family: var(--cv-font-secondary, inherit);
}

.cvt-nav a:hover,
.cvt-nav .current-menu-item > a {
	color: var(--cv-color-accent, #b85c58);
}

.cvt-nav .sub-menu {
	display: none;
}

.cvt-menu-toggle {
	display: none;
	padding: 8px 12px;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 4px;
	background: transparent;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

@media (max-width: 767px) {
	.cvt-menu-toggle {
		display: inline-block;
	}

	.cvt-nav {
		display: none;
		width: 100%;
	}

	.cvt-header__inner {
		flex-wrap: wrap;
	}

	.cvt-header.is-open .cvt-nav {
		display: block;
		padding-bottom: 16px;
	}

	.cvt-nav ul {
		flex-direction: column;
	}
}

/* Inhalt */
.cvt-main {
	display: block;
}

.cvt-content {
	padding-top: 48px;
	padding-bottom: 64px;
}

.cvt-entry + .cvt-entry {
	margin-top: 48px;
	padding-top: 48px;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.cvt-entry__meta {
	margin-bottom: 1em;
	color: var(--cv-color-secondary, #6f6560);
	font-size: 0.9em;
}

.cvt-pagination {
	margin-top: 48px;
}

/* Fußbereich */
.cvt-footer {
	padding: 32px 0;
	background: var(--cv-color-light, #f7f3f0);
	color: var(--cv-color-secondary, #6f6560);
	font-size: 0.9rem;
}

.cvt-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.cvt-footer ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.cvt-footer a {
	color: inherit;
}
