/*
 * Ahnefeld Gruppe - Gestaltung im Stil von www.ahnefeld.de fuer Enfold-Seiten (BAUS, Ewald).
 * Alle Regeln sind auf body.ahg-design begrenzt; ohne diese Klasse greift nichts.
 * Schrift: Archivo (SIL OFL 1.1) als freie, lokal eingebundene Alternative zu "elza" (Adobe Fonts von ahnefeld.de).
 */

@font-face { font-family: "Archivo"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/archivo-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/archivo-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/archivo-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Archivo"; font-style: normal; font-weight: 800; font-display: swap; src: url("fonts/archivo-latin-800-normal.woff2") format("woff2"); }

body.ahg-design {
	--ahg-green: #00713a;        /* Kopfzeile, Buttons, Akzente (ahnefeld.de) */
	--ahg-green-head: #008746;   /* Ueberschriften (ahnefeld.de) */
	--ahg-green-dark: #005a2e;   /* Hover */
	--ahg-text: #5f5f5f;         /* Fliesstext (ahnefeld.de #666, minimal dunkler fuer Kontrast) */
	--ahg-grey-bg: #f4f4f4;      /* helle Abschnitte */
	--ahg-line: #e3e3e3;
	--ahg-font: "elza", "Archivo", "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Grundtypografie ---------- */
body.ahg-design,
body.ahg-design .main_color,
body.ahg-design .alternate_color,
body.ahg-design input, body.ahg-design textarea, body.ahg-design select, body.ahg-design button {
	font-family: var(--ahg-font);
}
body.ahg-design { color: var(--ahg-text); }
body.ahg-design .main_color,
body.ahg-design .main_color p,
body.ahg-design .main_color li,
body.ahg-design .avia_textblock,
body.ahg-design .avia_textblock p {
	color: var(--ahg-text);
}
body.ahg-design .avia_textblock,
body.ahg-design .avia_textblock p,
body.ahg-design .entry-content-wrapper li {
	font-size: 17px;
	line-height: 1.6;
}

/* Ueberschriften im Inhalt (nicht im Slider). Enfold 6 legt Inhalte nach einem Vollbild-Slider in #after_full_slider_N statt #main, daher :is(...) */
body.ahg-design :is(#main, [id^="after_full_slider"]) h1:not(.avia-caption-title),
body.ahg-design :is(#main, [id^="after_full_slider"]) h2:not(.avia-caption-title),
body.ahg-design :is(#main, [id^="after_full_slider"]) h3:not(.avia-caption-title),
body.ahg-design :is(#main, [id^="after_full_slider"]) .av-special-heading-tag,
body.ahg-design :is(#main, [id^="after_full_slider"]) .avia_iconbox_title {
	font-family: var(--ahg-font) !important;
	color: var(--ahg-green-head) !important;
	font-weight: 700 !important;
	letter-spacing: -0.5px;
	text-transform: none !important;
}
body.ahg-design :is(#main, [id^="after_full_slider"]) h1:not(.avia-caption-title),
body.ahg-design :is(#main, [id^="after_full_slider"]) .av-special-heading-h1 .av-special-heading-tag {
	font-size: clamp(30px, 4vw, 48px) !important;
	line-height: 1.12 !important;
	letter-spacing: -1px;
}
body.ahg-design :is(#main, [id^="after_full_slider"]) h2:not(.avia-caption-title),
body.ahg-design :is(#main, [id^="after_full_slider"]) .av-special-heading-h2 .av-special-heading-tag {
	font-size: clamp(26px, 3vw, 38px) !important;
	line-height: 1.15 !important;
}
body.ahg-design :is(#main, [id^="after_full_slider"]) h3:not(.avia-caption-title),
body.ahg-design :is(#main, [id^="after_full_slider"]) .av-special-heading-h3 .av-special-heading-tag {
	font-size: clamp(21px, 2.2vw, 26px) !important;
	line-height: 1.2 !important;
}
body.ahg-design :is(#main, [id^="after_full_slider"]) .av-special-heading { margin-bottom: 18px; }
body.ahg-design :is(#main, [id^="after_full_slider"]) .special-heading-border { display: none; }

/* Links im Fliesstext: gruen und fett wie auf ahnefeld.de */
body.ahg-design :is(#main, [id^="after_full_slider"]) .avia_textblock a:not(.avia-button),
body.ahg-design :is(#main, [id^="after_full_slider"]) .entry-content-wrapper p a:not(.avia-button) {
	color: var(--ahg-green-head);
	font-weight: 700;
	text-decoration: none;
}
body.ahg-design :is(#main, [id^="after_full_slider"]) .avia_textblock a:not(.avia-button):hover { color: var(--ahg-green-dark); text-decoration: underline; }

/* ---------- Kopfzeile: gruen, weisses Logo, weisse Navigation ---------- */
body.ahg-design #header .header_bg,
body.ahg-design #header.av_header_transparency .header_bg,
body.ahg-design #header_main {
	background-color: var(--ahg-green) !important;
	opacity: 1 !important;
	border-color: transparent !important;
}
body.ahg-design #header_main { border-bottom: 0 !important; }
body.ahg-design #header { box-shadow: 0 2px 14px rgba(0, 0, 0, 0.12); }

/* Logo weiss einfaerben (wie das Ahnefeld-Logo im Kopf) */
body.ahg-design.ahg-logo-white #header .logo img {
	filter: brightness(0) invert(1);
}
/* Alternative: Logo auf weissem Feld (fuer mehrfarbige Logos) */
body.ahg-design.ahg-logo-badge #header .logo a {
	display: flex;
	align-items: center;
	height: 100%;
}
body.ahg-design.ahg-logo-badge #header .logo img {
	background: #fff;
	padding: 6px 12px;
	border-radius: 4px;
	box-sizing: border-box;
}

/* Hauptmenue */
body.ahg-design #header .av-main-nav > li > a,
body.ahg-design #header.av_header_transparency .av-main-nav > li > a {
	color: #fff !important;
	font-family: var(--ahg-font);
	font-size: 16px;
	font-weight: 600;
	letter-spacing: -0.3px;
	text-transform: none;
	opacity: 1;
}
body.ahg-design #header .av-main-nav > li > a .avia-menu-text { border: 0 !important; color: inherit !important; }
body.ahg-design #header .av-main-nav > li > a:hover,
body.ahg-design #header .av-main-nav > li.current-menu-item > a,
body.ahg-design #header .av-main-nav > li.current-menu-ancestor > a {
	color: #fff !important;
	opacity: 0.85;
}
body.ahg-design #header .av-main-nav > li > a .avia-menu-fx { background-color: #fff !important; }
body.ahg-design #header .av-main-nav > li > a .avia-menu-fx .avia-arrow { border-color: #fff !important; background: #fff !important; }

/* Untermenues */
body.ahg-design #header .av-main-nav ul {
	background: #fff !important;
	border: 0 !important;
	border-top: 3px solid var(--ahg-green-head) !important;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
	min-width: 240px;
}
body.ahg-design #header .av-main-nav ul a {
	color: var(--ahg-green) !important;
	background: #fff !important;
	font-family: var(--ahg-font);
	font-size: 15px;
	font-weight: 600;
	border-color: var(--ahg-line) !important;
	padding: 11px 16px;
	text-transform: none;
}
body.ahg-design #header .av-main-nav ul a:hover { background: var(--ahg-grey-bg) !important; color: var(--ahg-green-dark) !important; }

/* Telefon-Button im Menue (wie "Jobs & Karriere"): der Link behaelt Enfolds Hoehe,
   nur der innere Text wird zum weissen Button - so bleibt er mittig, auch beim Schrumpfen. */
body.ahg-design #header .av-main-nav > li.ahg-menu-phone > a {
	padding-left: 18px !important;
	padding-right: 0 !important;
	opacity: 1 !important;
}
body.ahg-design #header .av-main-nav > li.ahg-menu-phone > a .avia-menu-text {
	display: inline-block;
	background: #fff;
	color: var(--ahg-green) !important;
	border-radius: 4px;
	padding: 9px 14px;
	line-height: 1.2;
	font-weight: 700;
	vertical-align: middle;
}
body.ahg-design #header .av-main-nav > li.ahg-menu-phone > a:hover .avia-menu-text { background: #eaf5ef; }
body.ahg-design #header .av-main-nav > li.ahg-menu-phone > a .avia-menu-text::before {
	content: "\260E\00a0";
}
body.ahg-design #header .av-main-nav > li.ahg-menu-phone > a .avia-menu-fx { display: none; }

/* Social-Icons im Kopf */
body.ahg-design #header .social_bookmarks a,
body.ahg-design #header .social_bookmarks li a { color: #fff !important; }
body.ahg-design #header .social_bookmarks { border-color: rgba(255, 255, 255, 0.35) !important; }

/* Mobiles Menue */
body.ahg-design #header .av-hamburger-inner,
body.ahg-design #header .av-hamburger-inner::before,
body.ahg-design #header .av-hamburger-inner::after { background-color: #fff !important; }
body.ahg-design #header .av-burger-menu-main > a { color: #fff !important; }
body.ahg-design .av-burger-overlay-bg { background: var(--ahg-green) !important; opacity: 0.97 !important; }
/* Enfold blendet das Menue als weisse Seitenleiste ein: gruene Schrift wie in den Dropdowns */
body.ahg-design .av-burger-overlay-scroll { background: #fff !important; border-top: 4px solid var(--ahg-green); }
/* Enfold 4.7 (BAUS) macht die Leiste nur 150 px breit und schneidet die Eintraege ab */
body.ahg-design .av-burger-overlay-inner { width: calc(100% - 40px) !important; max-width: 350px !important; left: auto !important; right: 0 !important; }
body.ahg-design .av-burger-overlay-scroll { width: 100% !important; max-width: none !important; left: 0 !important; right: auto !important; }
body.ahg-design #av-burger-menu-ul li a,
body.ahg-design .av-burger-overlay .av-burger-overlay-scroll a,
body.ahg-design #av-burger-menu-ul li a .avia-menu-text {
	color: var(--ahg-green-dark) !important;
	font-family: var(--ahg-font);
	font-weight: 700;
	font-size: 17px;
}
body.ahg-design #av-burger-menu-ul li li a,
body.ahg-design #av-burger-menu-ul li li a .avia-menu-text { font-weight: 600; font-size: 15px; color: var(--ahg-text) !important; }
body.ahg-design #av-burger-menu-ul li a { border-color: #e6e6e6 !important; }
body.ahg-design #av-burger-menu-ul li a:hover { background: var(--ahg-grey-bg) !important; }
body.ahg-design #av-burger-menu-ul li.ahg-menu-phone { padding: 18px 0 0; }
body.ahg-design #av-burger-menu-ul li.ahg-menu-phone a {
	display: inline-block;
	background: var(--ahg-green) !important;
	border-radius: 4px;
	padding: 12px 20px !important;
	border: 0 !important;
}
body.ahg-design #av-burger-menu-ul li.ahg-menu-phone a .avia-menu-text { color: #fff !important; }
body.ahg-design #av-burger-menu-ul li.ahg-menu-phone a .avia-menu-text::before { content: "\260E\00a0"; }

/* Anrufleiste fuer Handys (Ausgabe per wp_footer, nur unter 768 px sichtbar) */
body.ahg-design .ahg-callbar { display: none; }

/* ---------- Slider / Einstieg ---------- */
body.ahg-design .avia-caption-title {
	font-family: var(--ahg-font) !important;
	font-weight: 800 !important;
	font-size: clamp(30px, 4.6vw, 64px) !important;
	line-height: 1.05 !important;
	letter-spacing: -1px !important;
	text-transform: none !important;
	color: #fff !important;
	text-shadow: 0 2px 18px rgba(0, 0, 0, 0.35);
}
body.ahg-design .avia-caption-content,
body.ahg-design .avia-caption-content p {
	font-family: var(--ahg-font) !important;
	font-size: clamp(16px, 1.5vw, 20px) !important;
	line-height: 1.4 !important;
	color: #fff !important;
	text-shadow: 0 1px 10px rgba(0, 0, 0, 0.4);
}
body.ahg-design .slideshow_inner_caption,
body.ahg-design .caption_framed .slideshow_caption .slideshow_inner_caption,
body.ahg-design .caption_framed .slideshow_caption .avia-caption-title,
body.ahg-design .caption_framed .slideshow_caption .avia-caption-content p { background: transparent !important; }
body.ahg-design .avia-slideshow .avia-slideshow-button {
	background: #fff !important;
	color: var(--ahg-green) !important;
	border: 0 !important;
	border-radius: 4px !important;
	font-family: var(--ahg-font) !important;
	font-weight: 700 !important;
	font-size: 15px !important;
	text-transform: none !important;
	letter-spacing: -0.2px;
	padding: 13px 22px !important;
}
body.ahg-design .avia-slideshow .avia-slideshow-button:hover { background: #eaf5ef !important; }

/* ---------- Buttons: gruen, zweiteilig mit Pfeilfeld ---------- */
body.ahg-design :is(#main, [id^="after_full_slider"]) .avia-button:not(.avia-slideshow-button) {
	background-color: var(--ahg-green) !important;
	border: 0 !important;
	color: #fff !important;
	border-radius: 0 !important;
	font-family: var(--ahg-font) !important;
	font-weight: 700 !important;
	font-size: 16px !important;
	letter-spacing: -0.3px;
	text-transform: none !important;
	padding: 14px 22px !important;
	opacity: 1 !important;
	display: inline-flex !important;
	align-items: center;
}
body.ahg-design :is(#main, [id^="after_full_slider"]) .avia-button:not(.avia-slideshow-button)::after {
	content: "\2192";
	display: inline-block;
	margin-left: 18px;
	padding-left: 16px;
	border-left: 1px solid rgba(255, 255, 255, 0.45);
	font-size: 20px;
	line-height: 1;
	font-weight: 400;
}
body.ahg-design :is(#main, [id^="after_full_slider"]) .avia-button:not(.avia-slideshow-button):hover { background-color: var(--ahg-green-dark) !important; }
body.ahg-design :is(#main, [id^="after_full_slider"]) .avia-button .avia_iconbox_title,
body.ahg-design :is(#main, [id^="after_full_slider"]) .avia-button span {
	color: #fff !important;
	font-size: inherit !important;
	font-weight: inherit !important;
	letter-spacing: inherit;
}
body.ahg-design :is(#main, [id^="after_full_slider"]) .avia-button .avia_button_icon { display: none; }

/* ---------- Abschnitte, Bilder, Team ---------- */
body.ahg-design .alternate_color,
body.ahg-design .alternate_color.container_wrap { background-color: var(--ahg-grey-bg) !important; }
body.ahg-design :is(#main, [id^="after_full_slider"]) .hr-default .hr-inner,
body.ahg-design :is(#main, [id^="after_full_slider"]) .hr .hr-inner { border-color: var(--ahg-line) !important; }
body.ahg-design :is(#main, [id^="after_full_slider"]) .avia-team-member .team-member-name,
body.ahg-design :is(#main, [id^="after_full_slider"]) .team-member-name { color: var(--ahg-green-head) !important; font-weight: 700; font-family: var(--ahg-font); }
body.ahg-design :is(#main, [id^="after_full_slider"]) .team-member-job-title { color: var(--ahg-text) !important; }
body.ahg-design :is(#main, [id^="after_full_slider"]) .avia_image,
body.ahg-design :is(#main, [id^="after_full_slider"]) .avia-image-container img { border-radius: 0; }

/* ---------- Fusszeile wie ahnefeld.de: weiss, gruene Spaltentitel ---------- */
body.ahg-design #footer {
	background: #fff !important;
	border-top: 1px solid var(--ahg-line) !important;
	padding-top: 40px;
}
body.ahg-design #footer,
body.ahg-design #footer p,
body.ahg-design #footer .textwidget {
	color: var(--ahg-text) !important;
	font-family: var(--ahg-font);
	font-size: 15px;
	line-height: 1.55;
}
body.ahg-design #footer .widgettitle {
	color: var(--ahg-green) !important;
	font-family: var(--ahg-font) !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	text-transform: uppercase;
	letter-spacing: 0.2px;
	margin-bottom: 14px;
}
body.ahg-design #footer a { color: var(--ahg-green) !important; font-weight: 600; }
body.ahg-design #footer a:hover { color: var(--ahg-green-dark) !important; text-decoration: underline; }
body.ahg-design #socket {
	background: #fff !important;
	border-top: 1px solid var(--ahg-line) !important;
	color: var(--ahg-text) !important;
	font-family: var(--ahg-font);
	font-size: 13px;
}
body.ahg-design #socket a,
body.ahg-design #socket .avia-menu-text { color: var(--ahg-green) !important; font-weight: 600; }
body.ahg-design #socket .social_bookmarks a { color: var(--ahg-green) !important; }
body.ahg-design #scroll-top-link {
	background: var(--ahg-green) !important;
	color: #fff !important;
	border-radius: 50%;
	opacity: 0.9;
}

/* ---------- Leere Enfold-Seitenleiste ausblenden, Inhalt als mittige Lesespalte ----------
   Unterseiten haben Layout "Seitenleiste links" ohne Widgets: das schob den Text nach rechts.
   Kein verschachteltes :has() (ungueltig); Enfold-Raster setzt .units auf display:inline. */
body.ahg-design :is(#main, [id^="after_full_slider"]) .container > aside.sidebar:not(:has(.widget)) { display: none !important; }
body.ahg-design :is(#main, [id^="after_full_slider"]) .container:has(> aside.sidebar):not(:has(> aside.sidebar .widget)) > .content {
	float: none !important;
	display: block !important;
	width: 100% !important;
	max-width: 920px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	border-left: 0 !important;
	border-right: 0 !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
}

/* ---------- Kopf bei mittleren Breiten: Logo und Menue duerfen sich nicht ueberlappen ---------- */
@media only screen and (min-width: 990px) and (max-width: 1279px) {
	/* Menue passt neben dem Logo nicht mehr: Burger zeigen, Telefon bleibt sichtbar */
	body.ahg-design #header .av-main-nav > li.menu-item-top-level:not(.ahg-menu-phone) { display: none !important; }
	body.ahg-design #header .av-main-nav > li.av-burger-menu-main { display: block !important; }
}
@media only screen and (min-width: 1280px) and (max-width: 1599px) {
	body.ahg-design #header .av-main-nav > li.menu-item-top-level > a { padding-left: 8px !important; padding-right: 8px !important; }
}
/* Ewald-Logo (weisse Plakette) ist bei voller Kopfhoehe 324 px breit und ueberdeckt sonst den ersten Menuepunkt */
@media only screen and (min-width: 990px) {
	body.ahg-design.ahg-logo-badge #header .logo img { max-width: 200px !important; height: auto !important; }
}

/* ---------- Mobile Feinschliff ---------- */
@media only screen and (max-width: 767px) {
	body.ahg-design .avia_textblock,
	body.ahg-design .avia_textblock p { font-size: 16px; }
	body.ahg-design :is(#main, [id^="after_full_slider"]) .avia-button:not(.avia-slideshow-button) { font-size: 15px !important; padding: 12px 16px !important; }
	body.ahg-design.ahg-logo-badge #header .logo img { padding: 4px 8px; }

	/* Einstieg: Schrift auf unruhigem Foto besser lesbar */
	body.ahg-design .avia-caption-title { text-shadow: 0 2px 4px rgba(0, 0, 0, 0.55), 0 0 28px rgba(0, 0, 0, 0.55); }
	body.ahg-design .avia-caption-content,
	body.ahg-design .avia-caption-content p { text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7), 0 0 16px rgba(0, 0, 0, 0.6); }

	/* feste Anrufleiste unten */
	body.ahg-design .ahg-callbar {
		display: block;
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 9999;
		background: var(--ahg-green);
		color: #fff !important;
		text-align: center;
		font-family: var(--ahg-font);
		font-weight: 700;
		font-size: 17px;
		line-height: 1;
		padding: 15px 16px calc(15px + env(safe-area-inset-bottom));
		text-decoration: none !important;
		box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.18);
	}
	body.ahg-design .ahg-callbar::before { content: "\260E\00a0\00a0"; }
	body.ahg-design { padding-bottom: 50px; }
	body.ahg-design #scroll-top-link { bottom: 64px; }
	/* vorhandener schwebender Knopf "Angebot erhalten" ueber die Anrufleiste */
	body.ahg-design a.floating_new { bottom: 58px !important; }
	/* Cookie-Hinweis von Enfold ueber der Anrufleiste, damit alle drei Knoepfe erreichbar bleiben */
	body.ahg-design .avia-cookie-consent.avia-cookiemessage-bottom { bottom: 50px !important; z-index: 10000 !important; }
}
