/*
 * Huber Entsorgung – Theme-Stylesheet (Header, mobiles Menü, Footer, Grundgerüst).
 * Farben, Schriften, Maße kommen als CSS-Variablen aus der Theme-Maske (inc/output.php,
 * Block :root). Hier stehen nur die festen Regeln.
 */

/* ============================================================ Grundgerüst */
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: #f6f8f9;
	color: var(--hb-text);
	font-family: var(--hb-font-main);
	font-size: var(--hb-font-size);
	font-weight: 400;
	line-height: 1.6;
	overflow-x: hidden;
	-webkit-font-smoothing: antialiased;
}
#page.hb-page {
	position: relative;
	display: grid;
	grid-template-columns: 100%;
	grid-template-rows: auto;
	grid-template-areas: "header" "main" "footer";
	background: #fff;
	overflow-x: hidden;
	overflow-x: clip;
}
#page.hb-page > .hb-header { grid-area: header; }
#page.hb-page > #main { grid-area: main; display: block; min-width: 0; padding: 0; }
#page.hb-page > .hb-footer { grid-area: footer; }
#main .wf-container-main, #main #content { display: block; }
a { color: var(--hb-link); text-decoration: none; }
img { max-width: 100%; height: auto; }
.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip-link.screen-reader-text:focus {
	clip: auto; clip-path: none; width: auto; height: auto; margin: 0; padding: 12px 20px;
	left: 8px; top: 8px; z-index: 100000; background: #fff; color: var(--hb-secondary); font-weight: 600;
}

/* Box-Modell nur für unsere Bausteine (Inhalt von Elementor bleibt unberührt) */
.hb-header, .hb-header *, .hb-header *::before, .hb-header *::after,
.hb-drawer, .hb-drawer *, .hb-drawer *::before, .hb-drawer *::after,
.hb-footer, .hb-footer *, .hb-footer *::before, .hb-footer *::after,
.hb-top, .hb-top * { box-sizing: border-box; }

/* ============================================================ Header */
.hb-header {
	position: absolute;
	top: 0; left: 0; right: 0;
	z-index: 500;
	height: var(--hb-header-h);
	color: var(--hb-hdr-fg);
	background: transparent;
	font-family: var(--hb-font-main);
	line-height: 1.6;
	transition: background-color .3s ease, color .3s ease, box-shadow .3s ease;
}
.hb-header--sticky.hb-header--transparent { position: fixed; }
.hb-header--solid { position: relative; background: var(--hb-hdr-bg-sticky); color: var(--hb-hdr-fg-sticky); box-shadow: 0 0 15px 1px rgba(0, 0, 0, .07); }
.hb-header--solid.hb-header--sticky { position: sticky; }
.hb-header.is-stuck .hb-nav { padding-left: 12px; }
.hb-header.is-stuck { background: var(--hb-hdr-bg-sticky); color: var(--hb-hdr-fg-sticky); box-shadow: 0 0 15px 1px rgba(0, 0, 0, .07); }
.admin-bar .hb-header--transparent.hb-header--sticky, .admin-bar .hb-header--solid.hb-header--sticky { top: 32px; }
@media (max-width: 782px) { .admin-bar .hb-header--transparent.hb-header--sticky, .admin-bar .hb-header--solid.hb-header--sticky { top: 46px; } }

.hb-header__bar {
	position: relative;
	display: flex;
	align-items: stretch;
	justify-content: space-between;
	max-width: 1200px;
	height: var(--hb-header-h);
	margin: 0 auto;
	padding: 0 30px;
}

/* Logo */
.hb-logo { display: flex; align-items: center; flex: 0 0 auto; height: 100%; color: inherit; text-decoration: none; }
.hb-logo img { display: block; height: var(--hb-logo-h); width: auto; max-width: none; }
.hb-logo__text { font-weight: 700; font-size: 20px; color: inherit; }
.hb-logo--mobile { display: none; }

/* Hauptmenü (Desktop) */
.hb-nav { flex: 1 1 auto; display: flex; justify-content: center; align-items: stretch; min-width: 0; }
.hb-menu { display: flex; align-items: stretch; justify-content: center; margin: 0; padding: 0; list-style: none; }
.hb-menu > li { position: relative; display: flex; align-items: stretch; margin: 0; padding: 0; }
.hb-link {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 18px;
	padding: 2px;
	border: 0;
	background: none;
	color: inherit;
	font-family: var(--hb-font-main);
	font-size: var(--hb-menu-size);
	font-weight: 500;
	line-height: 19px;
	text-decoration: none;
	text-align: center;
	white-space: nowrap;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
.hb-menu > li:first-child > .hb-link { margin-left: 0; }
.hb-menu > li:last-child > .hb-link { margin-right: 0; }
.hb-link:hover { color: inherit; text-decoration: none; }
.hb-link:focus-visible { outline: 2px solid var(--hb-primary); outline-offset: 2px; }

/* Untermenü (Desktop) */
.hb-nav .hb-sub {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 200;
	width: 290px;
	margin: 0;
	padding: 10px;
	list-style: none;
	background: var(--hb-sub-bg);
	box-shadow: 0 0 4px rgba(0, 0, 0, .2);
	opacity: 0;
	visibility: hidden;
	transform: translateY(6px);
	transition: opacity .25s ease, transform .25s ease, visibility 0s linear .25s;
}
.hb-nav li:hover > .hb-sub,
.hb-nav li:focus-within > .hb-sub,
.hb-nav li.is-open > .hb-sub { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.hb-nav .hb-sub li { display: block; position: relative; }
.hb-nav .hb-sub .hb-link {
	display: flex;
	justify-content: flex-start;
	width: 100%;
	margin: 0 0 2px;
	padding: 6px 10px;
	color: var(--hb-sub-fg);
	font-size: 14px;
	font-weight: 400;
	line-height: 18px;
	text-align: left;
	white-space: normal;
}
.hb-nav .hb-sub .hb-sub { display: none; }

/* Button im Header */
.hb-cta {
	position: relative;
	display: inline-flex;
	align-items: center;
	align-self: center;
	flex: 0 0 auto;
	padding: 10px 20px;
	background: var(--hb-cta-bg);
	box-shadow: inset 0 0 0 1px var(--hb-cta-bg);
	color: var(--hb-cta-fg);
	font-family: var(--hb-font-main);
	font-size: 14px;
	font-weight: 700;
	line-height: 18px;
	text-decoration: none;
	white-space: nowrap;
}
.hb-cta:hover, .hb-cta:focus { color: var(--hb-cta-fg); text-decoration: none; }
.hb-cta span { display: block; position: relative; }
.hb-cta--bar { margin-left: 30px; }

/* Hamburger */
.hb-burger {
	display: none;
	align-items: center;
	align-self: center;
	flex: 0 0 auto;
	width: 46px;
	height: 36px;
	margin: 0 0 0 10px;
	padding: 11px 8px;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
.hb-burger__lines { position: relative; display: block; width: 30px; height: 14px; }
.hb-burger__lines i { position: absolute; left: 0; display: block; width: 24px; height: 2px; background: currentColor; transition: width .2s linear; }
.hb-burger__lines i:nth-child(1) { top: 0; }
.hb-burger__lines i:nth-child(2) { top: 6px; width: 30px; }
.hb-burger__lines i:nth-child(3) { top: 12px; }
.hb-burger:hover .hb-burger__lines i { width: 30px; }
.hb-burger:focus-visible { outline: 2px solid var(--hb-primary); outline-offset: 2px; }

/* ============================================================ Mobiles Menü */
.hb-overlay {
	position: fixed;
	inset: 0;
	z-index: 9601;
	background: var(--hb-overlay);
	opacity: 0;
	visibility: hidden;
	transition: opacity .4s ease, visibility 0s linear .4s;
}
.hb-drawer {
	position: fixed;
	top: 0; right: 0; bottom: 0;
	z-index: 9602;
	width: 300px;
	max-width: 100%;
	padding: 40px 38px 40px 40px;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--hb-mob-bg);
	color: var(--hb-mob-fg);
	font-family: var(--hb-font-main);
	line-height: 1.6;
	transform: translateX(100%);
	visibility: hidden;
	transition: transform .5s ease, visibility 0s linear .5s;
}
html.hb-menu-open { overflow: hidden; }
html.hb-menu-open .hb-overlay { opacity: 1; visibility: visible; transition-delay: 0s; }
html.hb-menu-open .hb-drawer { transform: none; visibility: visible; transition-delay: 0s; }
.admin-bar .hb-drawer, .admin-bar .hb-overlay { top: 32px; }
@media (max-width: 782px) { .admin-bar .hb-drawer, .admin-bar .hb-overlay { top: 46px; } }

.hb-drawer__close {
	position: absolute;
	top: 15px;
	right: 13px;
	z-index: 2;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	background: var(--hb-mob-close);
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
.hb-drawer__close span, .hb-drawer__close::before, .hb-drawer__close::after { position: absolute; left: 5px; top: 12px; display: block; width: 16px; height: 2px; background: #fff; content: ""; transform: rotate(45deg); transition: transform .2s ease; }
.hb-drawer__close span { display: none; }
.hb-drawer__close::after { transform: rotate(-45deg); }
.hb-drawer__close:hover::before { transform: rotate(135deg); }
.hb-drawer__close:hover::after { transform: rotate(45deg); }
.hb-drawer__close:focus-visible { outline: 2px solid var(--hb-primary); outline-offset: 2px; }

.hb-menu--mobile { display: block; margin: 0; padding: 0; list-style: none; }
.hb-menu--mobile > li { position: relative; display: block; margin: 0; }
.hb-menu--mobile > li + li::before { content: ""; position: absolute; top: -.5px; left: 0; right: 0; border-bottom: 1px solid var(--hb-mob-line); }
.hb-menu--mobile .hb-link {
	display: block;
	width: 100%;
	margin: 0;
	padding: 15.2px 25px 15.2px 0;
	color: var(--hb-mob-fg);
	font-size: 16px;
	font-weight: 500;
	line-height: 20px;
	text-align: left;
	white-space: normal;
}
.hb-menu--mobile .hb-link:hover { color: var(--hb-mob-fg); }
/* Plus-Zeichen für Einträge mit Untermenü */
.hb-menu--mobile .has-children > .hb-link::before,
.hb-menu--mobile .has-children > .hb-link::after {
	content: "";
	position: absolute;
	top: 50%;
	right: 9px;
	width: 12px;
	height: 2px;
	margin-top: -1px;
	background: currentColor;
	opacity: .17;
	transition: transform .25s ease;
}
.hb-menu--mobile .has-children > .hb-link::after { transform: rotate(90deg); }
.hb-menu--mobile .has-children.is-open > .hb-link::before { transform: rotate(45deg); }
.hb-menu--mobile .has-children.is-open > .hb-link::after { transform: rotate(135deg); }
.hb-menu--mobile .hb-sub { display: none; margin: 0 0 16px 20px; padding: 0; list-style: none; }
.hb-menu--mobile li.is-open > .hb-sub { display: block; }
.hb-menu--mobile .hb-sub .hb-link { padding: 5.6px 0; font-size: 14px; font-weight: 600; line-height: 18px; }
.hb-menu--mobile .hb-sub .hb-link::before, .hb-menu--mobile .hb-sub .hb-link::after { display: none; }

.hb-drawer__extras { display: none; flex-direction: column; padding: 30px 0 0; }
.hb-drawer__extras .hb-status { margin: 5px 20px 5px 0; font-size: 14px; line-height: 18px; color: #282828; }
.hb-cta--drawer { align-self: flex-start; margin: 5px 20px 5px 0; }

/* Öffnungsstatus (Plugin „Opening Hours“) */
.hb-status .op-open { color: var(--hb-open); }
.hb-status .op-closed { color: var(--hb-closed); }
.hb-status .op-is-open-shortcode { display: block; }

/* Zweiter Umschaltpunkt: ab hier Statuszeilen + Button im Menü statt in der Leiste */
@media (max-width: 768px) {
	.hb-cta--bar { display: none; }
	.hb-burger { margin-left: auto; }
	.hb-drawer__extras { display: flex; }
}

/* ============================================================ Footer */
.hb-footer {
	background: var(--hb-footer-bg);
	color: var(--hb-footer-fg);
	font-family: var(--hb-font-main);
	font-size: 14px;
	line-height: 1.8;
}
.hb-footer a { color: inherit; text-decoration: none; }
.hb-footer a:hover, .hb-footer a:focus { color: var(--hb-footer-accent); text-decoration: none; }
:where(.hb-footer p) { margin: 0; }
:where(.hb-footer ul) { margin: 0; padding: 0; list-style: none; }

.hb-footer__main { padding: 18px; }
.hb-footer__inner { display: flex; align-items: flex-start; max-width: 1150px; margin: 0 auto; }
.hb-fcol { min-width: 0; padding: 20px; }
.hb-fcol--hours   { flex: 0 0 30.52%; }
.hb-fcol--contact { flex: 0 0 22.35%; }
.hb-fcol--col3    { flex: 0 0 28%; }
.hb-fcol--col4    { flex: 0 0 19.13%; }

.hb-f-title {
	margin: 0 0 40px;
	color: var(--hb-footer-head);
	font-size: 18px;
	font-weight: 500;
	line-height: 18px;
}
.hb-f-sub, .hb-f-sub a {
	margin: 0;
	color: var(--hb-footer-accent);
	font-size: 14px;
	font-weight: 500;
	line-height: 21px;
}
.hb-f-sub a:hover { color: var(--hb-footer-head); }
.hb-ftext { margin: 0; color: var(--hb-footer-fg); font-size: 14px; line-height: 25.2px; }
.hb-ftext p { margin: 0 0 15px; }
.hb-ftext p:last-child { margin-bottom: 0; }

/* Öffnungszeiten */
.hb-fblock + .hb-fblock { margin-top: 40px; }
.hb-fblock > .hb-f-sub { line-height: 14px; }
.hb-fblock .hb-status--footer { margin: 0 0 15px; font-size: 14px; line-height: 25.2px; }
.hb-fblock + .hb-fblock .hb-status--footer { margin-bottom: 10px; }
.hb-fblock .hb-hours { margin: 0; }

/* Kontakt */
.hb-f-company { margin-bottom: 15px; }
.hb-f-address { margin-bottom: 15px; }
.hb-f-contact { margin-bottom: 25px; }
.hb-f-contact a { display: block; }
.hb-f-contact .hb-f-mail { color: var(--hb-link); }
.hb-f-contact .hb-f-mail:hover { color: var(--hb-footer-head); }
.hb-f-more { margin-top: 0; }

/* Linklisten (Spalte 3 und 4) */
.hb-fgroup + .hb-fgroup { margin-top: 25px; }
.hb-fgroup > .hb-f-sub { margin: 0; }
.hb-fgroup + .hb-fgroup > .hb-f-sub { margin-bottom: 16px; }
.hb-f-links li { margin: 0; }
.hb-f-links a { display: block; color: var(--hb-footer-fg); font-size: 14px; line-height: 25.2px; }
.hb-f-links a:hover { color: var(--hb-footer-accent); }

/* Fußzeile */
.hb-footer__line { height: 0; margin: 25px 0 15px; border-top: 1px solid var(--hb-footer-line); }
.hb-footer__copy { max-width: 1150px; margin: 0 auto; padding: 10px; }
.hb-footer__copy p { margin: 0 0 10px; color: var(--hb-footer-fg); font-size: 13px; line-height: 25.6px; }
.hb-footer__bottom { padding-bottom: 0; }

/* Nach-oben-Button */
.hb-top {
	position: fixed;
	right: 10px;
	bottom: 10px;
	z-index: 900;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	background: rgba(0, 0, 0, .2);
	color: #fff;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: opacity .3s ease, transform .3s ease, visibility 0s linear .3s, background-color .2s ease;
}
.hb-top.is-visible { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.hb-top:hover, .hb-top:focus { background: rgba(0, 0, 0, .5); color: #fff; }
.hb-top svg { display: block; width: 24px; height: 24px; }

/* Icons als Inline-SVG (schlanke Auslieferung): quadratische Box wie bisher die Icon-Schrift.
   The7 setzt sonst height:auto -> hohe SVGs (z. B. Handy-Symbol) machen die Karten länger.
   Hochgeladene SVG-Dateien (ohne Klasse e-font-icon-svg) behalten ihr Seitenverhältnis. */
.the7-box-wrapper .elementor-icon svg.e-font-icon-svg { width: 1em; height: 1em; }

/* ============================================================ Footer mobil */
@media (max-width: 767px) {
	.hb-footer__inner { display: block; }
	.hb-fcol { padding: 20px; }
	.hb-fcol--hours, .hb-fcol--contact, .hb-fcol--col3, .hb-fcol--col4 { flex: none; width: 100%; }
	.hb-footer__copy { padding: 10px; }
	.hb-footer__copy p { margin: 0 0 10px; }
}

/* ============================================================ Standard-Templates */
.hb-container { max-width: 1250px; margin: 0 auto; padding: 150px 30px 80px; }
.hb-entry__title { margin: 0 0 20px; color: var(--hb-secondary); font-size: 36px; line-height: 1.2; }
.hb-entry__meta { margin: 0 0 30px; color: #6b7280; font-size: 14px; }
.hb-entry__content > * { max-width: 800px; }
.hb-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 30px; margin: 30px 0; }
.hb-card { background: #fff; padding: 0 0 20px; }
.hb-card__img img { display: block; width: 100%; height: auto; }
.hb-card__title { margin: 15px 20px 8px; font-size: 20px; line-height: 1.3; }
.hb-card__title a { color: var(--hb-secondary); }
.hb-card__text { margin: 0 20px; font-size: 15px; }
.hb-404 { text-align: center; }
.hb-404__code { margin: 0; color: var(--hb-primary); font-size: 96px; font-weight: 700; line-height: 1; }
.hb-search { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.hb-search__input { padding: 10px 14px; border: 1px solid #cfd6e2; font: inherit; }
.hb-search__btn { padding: 10px 18px; border: 0; background: var(--hb-secondary); color: #fff; font: inherit; font-weight: 600; cursor: pointer; }
.pagination { margin-top: 30px; }
.pagination .page-numbers { display: inline-block; padding: 6px 12px; }

@media (prefers-reduced-motion: reduce) {
	.hb-header, .hb-nav .hb-sub, .hb-overlay, .hb-drawer, .hb-top, .hb-burger__lines i { transition: none; }
	html { scroll-behavior: auto; }
}
