/*
Theme Name:   Schallwand Veranstaltungstechnik
Theme URI:    https://hmf-it.de
Description:  Custom Theme für Schallwand Veranstaltungstechnik Münster. Basiert auf einem eigenständigen WordPress-Theme mit CI-konformem Design (Rot #de362f, Dunkelgrau #3a3a3a). Optimiert für den Import aus dem RegioHelden-Abkauf-System.
Version:      1.0.0
Author:       HMF-IT Horst Ferling
Author URI:   https://hmf-it.de
License:      GPL-2.0-or-later
Text Domain:  schallwand
*/

/* ── CI-Variablen ─────────────────────────────────────────────────── */
:root {
	--sw-red:          #de362f;
	--sw-red-dark:     #b52a24;
	--sw-dark:         #3a3a3a;
	--sw-dark-light:   #878787;
	--sw-black:        #0a0a0a;
	--sw-white:        #ffffff;
	--sw-bg:           #ffffff;
	--sw-text:         #333333;
	--sw-bg-light:     #f2f2f2;
	--sw-content-width: 1135px;
	--sw-border-radius: 3px;
}

/* ── Reset / Base ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: 'Roboto', 'Segoe UI', Arial, sans-serif;
	font-size: 16px;
	line-height: 1.8;
	color: var(--sw-text);
	background: var(--sw-bg);
}

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

a {
	color: var(--sw-red);
	text-decoration: none;
}
a:hover, a:focus {
	color: var(--sw-dark);
	text-decoration: underline;
}

/* ── Typografie ───────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
	color: var(--sw-text);
	line-height: 1.3;
	margin-top: 0;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); font-weight: 900; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
h4 { font-size: 1.1rem;  font-weight: 700; }

p { margin: 0 0 1.2em; }

strong { font-weight: 700; }

/* ── Layout ───────────────────────────────────────────────────────── */
.sw-container {
	max-width: var(--sw-content-width);
	margin-inline: auto;
	padding-inline: 2rem;
}

/* ── Skip-Link (Barrierefreiheit) ─────────────────────────────────── */
.skip-link {
	position: absolute;
	top: -100px;
	left: 1rem;
	background: var(--sw-red);
	color: #fff;
	padding: .5rem 1rem;
	z-index: 9999;
	border-radius: var(--sw-border-radius);
	font-weight: 700;
	transition: top .2s;
}
.skip-link:focus {
	top: 1rem;
	color: #fff;
	text-decoration: none;
}

/* ── Header ───────────────────────────────────────────────────────── */
#masthead {
	background: var(--sw-black);
	position: sticky;
	top: 0;
	z-index: 1000;
	box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

.site-header-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding-block: .5rem;
}

/* Logo */
.site-branding a {
	display: flex;
	align-items: center;
	gap: .75rem;
	color: var(--sw-white);
	text-decoration: none;
}
.site-branding img {
	height: 55px;
	width: auto;
}
.site-branding .site-title {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--sw-white);
	line-height: 1.2;
}

/* ── Hauptnavigation ──────────────────────────────────────────────── */
#site-navigation {
	flex: 1;
}

.nav-menu {
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 0;
	justify-content: flex-end;
}

.nav-menu li {
	position: relative;
}

.nav-menu a {
	display: block;
	padding: .75rem 1.1rem;
	color: var(--sw-white);
	font-size: .9rem;
	font-weight: 500;
	text-decoration: none;
	white-space: nowrap;
	transition: background .15s;
}

.nav-menu a:hover,
.nav-menu a:focus,
.nav-menu .current-menu-item > a,
.nav-menu .current_page_item > a {
	background: var(--sw-red);
	color: var(--sw-white);
}

/* Dropdown */
.nav-menu .sub-menu {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	min-width: 220px;
	background: var(--sw-dark);
	list-style: none;
	margin: 0;
	padding: 0;
	z-index: 999;
	box-shadow: 0 4px 12px rgba(0,0,0,.3);
}

.nav-menu li:hover > .sub-menu,
.nav-menu li:focus-within > .sub-menu {
	display: block;
}

.nav-menu .sub-menu a {
	padding: .6rem 1.2rem;
	font-size: .875rem;
	border-bottom: 1px solid rgba(255,255,255,.07);
}

.nav-menu .sub-menu a:hover,
.nav-menu .sub-menu a:focus {
	background: var(--sw-red);
}

/* ── Hamburger (Mobile) ───────────────────────────────────────────── */
.menu-toggle {
	display: none;
	background: var(--sw-red);
	border: none;
	color: #fff;
	font-size: 1.5rem;
	padding: .5rem .9rem;
	cursor: pointer;
	border-radius: var(--sw-border-radius);
	line-height: 1;
}
.menu-toggle[aria-expanded="true"] { background: var(--sw-red-dark); }

/* ── Hero / Cover ─────────────────────────────────────────────────── */
.wp-block-cover,
.site-hero {
	position: relative;
	overflow: hidden;
}

/* ── Hauptinhalt ──────────────────────────────────────────────────── */
#primary {
	padding-block: 3rem;
}

/* ── Produkt-Karten ───────────────────────────────────────────────── */
.sw-product-card {
	display: grid;
	grid-template-columns: 220px 1fr;
	gap: 1.5rem;
	padding: 1.5rem;
	background: var(--sw-bg-light);
	border-left: 4px solid var(--sw-red);
	border-radius: var(--sw-border-radius);
	margin-bottom: 1.5rem;
}
.sw-product-card img {
	width: 100%;
	height: 160px;
	object-fit: contain;
	background: #fff;
	border-radius: var(--sw-border-radius);
}
.sw-product-card .price {
	font-weight: 700;
	color: var(--sw-red);
	font-size: 1.05rem;
	margin-top: .5rem;
}

@media (max-width: 640px) {
	.sw-product-card {
		grid-template-columns: 1fr;
	}
}

/* ── Gutenberg-Blöcke: Farben & Abstände ─────────────────────────── */
.wp-block-columns {
	margin-bottom: 2rem;
}

.wp-block-separator {
	border-color: #ddd;
	margin-block: 2rem;
}

.wp-block-heading { margin-bottom: .75rem; }

/* Buttons */
.wp-block-button__link {
	background: var(--sw-red);
	color: #fff;
	border-radius: var(--sw-border-radius);
	font-weight: 700;
	padding: .75rem 1.75rem;
	transition: background .2s;
}
.wp-block-button__link:hover,
.wp-block-button__link:focus {
	background: var(--sw-red-dark);
	color: #fff;
}

/* ── Widget / Sidebar Adress-Box ─────────────────────────────────── */
.contact-box {
	background: var(--sw-bg-light);
	border-left: 4px solid var(--sw-red);
	padding: 1.5rem;
	border-radius: var(--sw-border-radius);
}
.contact-box h3 {
	margin-top: 0;
	color: var(--sw-red);
}
.contact-box a { color: var(--sw-red); }

/* ── Footer ───────────────────────────────────────────────────────── */
#colophon {
	background: var(--sw-black);
	color: var(--sw-white);
	padding-block: 2.5rem;
}

.footer-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 2rem;
	align-items: flex-start;
	justify-content: space-between;
}

.footer-contact h3 {
	color: var(--sw-red);
	margin-bottom: .75rem;
	font-size: 1rem;
	text-transform: uppercase;
	letter-spacing: .05em;
}

.footer-contact p, .footer-contact address {
	font-style: normal;
	color: rgba(255,255,255,.8);
	font-size: .9rem;
	line-height: 1.7;
}

.footer-contact a {
	color: var(--sw-red);
}
.footer-contact a:hover {
	color: #fff;
}

.footer-nav {
	list-style: none;
	margin: 0;
	padding: 0;
}
.footer-nav a {
	color: rgba(255,255,255,.7);
	font-size: .875rem;
	display: block;
	padding: .2rem 0;
}
.footer-nav a:hover {
	color: var(--sw-red);
	text-decoration: none;
}

.footer-bottom {
	text-align: center;
	padding-top: 2rem;
	margin-top: 2rem;
	border-top: 1px solid rgba(255,255,255,.1);
	color: rgba(255,255,255,.4);
	font-size: .8rem;
}

/* ── Responsive ───────────────────────────────────────────────────── */
@media (max-width: 1135px) {
	.menu-toggle {
		display: block;
	}

	#site-navigation {
		flex: none;
	}

	.nav-menu {
		display: none;
		flex-direction: column;
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background: var(--sw-black);
		border-top: 2px solid var(--sw-red);
		z-index: 9998;
		padding-bottom: 1rem;
		max-height: 80vh;
		overflow-y: auto;
	}

	.nav-menu.toggled {
		display: flex;
	}

	.nav-menu li {
		border-bottom: 1px solid rgba(255,255,255,.05);
	}

	.nav-menu a {
		padding: .9rem 1.5rem;
	}

	.nav-menu .sub-menu {
		display: none !important;
	}

	.nav-menu .sub-menu.mobile-open {
		display: block !important;
		position: static;
		background: rgba(255,255,255,.05);
		box-shadow: none;
	}

	.nav-menu .sub-menu a {
		padding-left: 2.5rem;
	}
}

@media (max-width: 600px) {
	.sw-container {
		padding-inline: 1rem;
	}

	.site-header-inner {
		flex-wrap: wrap;
	}

	.footer-inner {
		flex-direction: column;
	}
}

/* ── Admin-Bar Offset ─────────────────────────────────────────────── */
.admin-bar #masthead {
	top: 32px;
}
@media screen and (max-width: 782px) {
	.admin-bar #masthead {
		top: 46px;
	}
}
