/*
Theme Name: RhekTec Theme
Theme URI: https://rhektec.at
Author: RhekTec
Author URI: https://rhektec.at
Description: Praesentationsschicht fuer den RhekTec Builder. Enthaelt Header, Footer, Navigation, Templates und das globale Design-System. Inhalte werden vom Plugin "RhekTec Builder" verwaltet und bleiben beim Theme-Wechsel erhalten (siehe docs/ARCHITECTURE.md).
Requires at least: 6.4
Tested up to: 6.7
Requires PHP: 8.1
Version: 0.1.0
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rhektec-theme
*/

/*
 * Basis-Layout und Elementstile fuer die vom RhekTec Builder gerenderten
 * Elemente (rhektec-el-*). Farb-/Typografie-Tokens kommen zur Laufzeit als
 * CSS-Custom-Properties vom Plugin (DesignSystem\CssVariablesOutput) -
 * diese Datei referenziert ausschliesslich die Variablennamen, keine festen
 * Werte, damit globale Aenderungen automatisch durchschlagen (Auftrag
 * Abschnitt 13).
 */

:root {
	--rhektec-content-width: 1180px;
}

* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: var(--rhektec-font-body, system-ui, sans-serif);
	color: var(--rhektec-color-text, #111827);
	background: var(--rhektec-color-background, #ffffff);
	line-height: 1.6;
}

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

a {
	color: var(--rhektec-color-primary, #1a56db);
}

.rhektec-site {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
}

.rhektec-site__content {
	flex: 1;
}

/* Header / Navigation */
.rhektec-header {
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.rhektec-header__inner {
	max-width: var(--rhektec-content-width);
	margin: 0 auto;
	padding: 16px 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.rhektec-header__brand {
	font-weight: 700;
	font-family: var(--rhektec-font-heading, inherit);
	text-decoration: none;
	color: inherit;
}

.rhektec-nav ul {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.rhektec-nav a {
	text-decoration: none;
	color: inherit;
}

@media (max-width: 640px) {
	.rhektec-header__inner {
		flex-direction: column;
		align-items: flex-start;
	}
	.rhektec-nav ul {
		gap: 12px;
	}
}

/* Footer */
.rhektec-footer {
	margin-top: auto;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	padding: 32px 24px;
	font-size: 14px;
	color: var(--rhektec-color-muted, #6b7280);
}

.rhektec-footer__inner {
	max-width: var(--rhektec-content-width);
	margin: 0 auto;
}

/* Builder-Elemente: Basis-Typografie/Spacing. Farbwerte, Abstaende etc.
 * pro Node werden zusaetzlich als gescopte <style>-Bloecke vom
 * Renderer\TreeRenderer ausgegeben (docs/ARCHITECTURE.md Abschnitt 6). */
.rhektec-el-heading {
	font-family: var(--rhektec-font-heading, inherit);
	margin: 0 0 var(--rhektec-spacing-sm, 12px);
}

.rhektec-el-text {
	margin: 0 0 var(--rhektec-spacing-sm, 12px);
}

.rhektec-el-button {
	display: inline-block;
	text-decoration: none;
	font-weight: 600;
	background: var(--rhektec-color-primary, #1a56db);
	color: #fff;
	padding: 12px 20px;
	border-radius: var(--rhektec-radius-md, 8px);
}

.rhektec-el-button--disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.rhektec-el-container {
	display: flex;
	flex-wrap: wrap;
}

.rhektec-el-container.rhektec-columns-1 > * { flex: 1 1 100%; }
.rhektec-el-container.rhektec-columns-2 > * { flex: 1 1 calc(50% - 12px); }
.rhektec-el-container.rhektec-columns-3 > * { flex: 1 1 calc(33.333% - 16px); }
.rhektec-el-container.rhektec-columns-4 > * { flex: 1 1 calc(25% - 18px); }
.rhektec-el-container.rhektec-columns-5 > * { flex: 1 1 calc(20% - 18px); }
.rhektec-el-container.rhektec-columns-6 > * { flex: 1 1 calc(16.666% - 18px); }

@media (max-width: 1024px) {
	.rhektec-el-container[class*="rhektec-columns-"] > * {
		flex: 1 1 calc(50% - 12px);
	}
}

@media (max-width: 640px) {
	.rhektec-el-container[class*="rhektec-columns-"] > * {
		flex: 1 1 100%;
	}
}

.rhektec-layout-full-width {
	width: 100%;
}

.rhektec-layout-contained {
	max-width: var(--rhektec-content-width);
	margin: 0 auto;
	padding-left: 24px;
	padding-right: 24px;
}
