/**
 * RGW-Rohrbau Glanz GmbH – Theme design layer
 *
 * Author: Stephan Ramsteiner, Ze-One IT Dienstleistung
 * (c) Ze-One Stephan Ramsteiner, s.ramsteiner@ze-one.de
 * Design: Sonja Veit, VEITCLUB DESIGN (Website_RGW_Rohrbau_V3.pdf)
 *
 * Loaded after the Underscores base style.css.
 * Layout principle: every colored bar / image band is a FULL-BLEED section
 * (100% viewport width). Text content sits inside .rgw-container.
 */

/* --------------------------------------------------------------
# Fonts – all local, no external requests.
# Headlines: Futura PT Bold, licensed webfont kit from Fontspring
#            (ParaType, Web Font EULA 2.0 – license in /fonts).
# Body: Open Sans (SIL OFL) local in /fonts – license included.
-------------------------------------------------------------- */
/*!
 * Web Fonts from Fontspring.com
 *
 * All OpenType features and all extended glyphs have been removed.
 * Fully installable fonts can be purchased at https://www.fontspring.com
 *
 * The fonts included in this stylesheet are subject to the End User License you purchased
 * from Fontspring. The fonts are protected under domestic and international trademark and
 * copyright law. You are prohibited from modifying, reverse engineering, duplicating, or
 * distributing this font software.
 *
 * (c) 2010-2026 Fontspring
 *
 * The fonts included are copyrighted by the vendor listed below.
 *
 * Vendor:      ParaType
 * License URL: https://www.fontspring.com/licenses/paratype/webfont
 */
@font-face {
	font-family: "futura-pt";
	src: url("../fonts/futura-pt_bold-webfont.woff2") format("woff2"),
	     url("../fonts/futura-pt_bold-webfont.woff") format("woff");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Open Sans";
	src: url("../fonts/open-sans-latin-400-normal.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Open Sans";
	src: url("../fonts/open-sans-latin-400-italic.woff2") format("woff2");
	font-weight: 400;
	font-style: italic;
	font-display: swap;
}
@font-face {
	font-family: "Open Sans";
	src: url("../fonts/open-sans-latin-600-normal.woff2") format("woff2");
	font-weight: 600;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Open Sans";
	src: url("../fonts/open-sans-latin-700-normal.woff2") format("woff2");
	font-weight: 700;
	font-style: normal;
	font-display: swap;
}

/* --------------------------------------------------------------
# Design tokens
# TODO: replace estimated values with exact PSD values (colors, font)
-------------------------------------------------------------- */
:root {
	/* Exact values sampled from Website_RGW_Rohrbau_Start.psd */
	--rgw-navy:        #20284c;	/* nav bar, footer, labels                */
	--rgw-navy-overlay: rgba(32, 40, 76, 0.85);	/* hero text box      */
	--rgw-cyan:        #009ee3;	/* accent / quals band / active nav       */
	--rgw-cyan-light:  #6ec6ee;	/* testimonial band                       */
	--rgw-grey-bg:     #ececee;	/* image strip background                 */
	--rgw-grey-line:   #d0d0d0;	/* diagonal header lines (from PSD)       */
	--rgw-text:        #4a4f57;	/* body copy                              */
	--rgw-white:       #ffffff;

	/* Headlines: Futura PT Bold (Fontspring kit, local). Body: Open Sans local. */
	--rgw-font-head:   "futura-pt", "Century Gothic", sans-serif;
	--rgw-font:        "Open Sans", Arial, sans-serif;

	--rgw-container:   1160px;
	--rgw-gutter:      24px;
}

/* --------------------------------------------------------------
# Base
-------------------------------------------------------------- */
body {
	margin: 0;
	font-family: var(--rgw-font);
	color: var(--rgw-text);
	font-size: 16px;
	line-height: 1.7;
}

/* overflow-x guard: full-bleed bands + offcanvas panel must never create
   a horizontal scrollbar on small viewports */
html,
body {
	overflow-x: hidden;
}

/* Sticky footer: page always fills the viewport, footer sits at the bottom,
   no white gap below the footer on short pages. */
#page.site {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}
#page.site > * { flex-shrink: 0; }
#page.site > .site-main { flex-grow: 1; }

.rgw-container {
	max-width: var(--rgw-container);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--rgw-gutter);
	padding-right: var(--rgw-gutter);
}

/* automatic hyphenation for running text (needs the html lang="de"
   attribute, which WP sets via language_attributes()) */
.site-main p,
.site-main li,
.site-main td,
.site-main th,
.site-main figcaption,
.site-main blockquote,
.rgw-quote blockquote,
.rgw-leistung-lb p,
.rgw-leistung-lb li,
.rgw-accordion__body {
	hyphens: auto;
	-webkit-hyphens: auto;
	overflow-wrap: break-word;
}
/* never hyphenate headings, labels, buttons – tracked uppercase breaks badly */
.site-main h1, .site-main h2, .site-main h3,
.rgw-tile__label, .rgw-subline,
.wp-block-button__link,
.main-navigation a {
	hyphens: manual;
	-webkit-hyphens: manual;
}

/* Cyan section headings, e.g. UEBER UNS / UNSERE AUFTRAGGEBER */
/* PSD hierarchy: primary headline cyan, secondary headline navy (#20284c) */
.site-main h1,
.site-main h2 {
	font-family: var(--rgw-font-head);
	color: var(--rgw-cyan);
	text-transform: uppercase;
	/* PSD: cap height ~21px and almost no tracking */
	letter-spacing: 0.03em;
	font-weight: 700;
	font-size: 32px;
}
.site-main h2 {
	color: var(--rgw-navy);
}
.site-main h3 {
	font-family: var(--rgw-font-head);
	color: var(--rgw-navy);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 700;
	font-size: 20px;
}

.site-main {
	/* measured against the PSD: 74px above the h1, 75px below the last line */
	padding: 34px 0 46px;
}

/* Double headline (e.g. Karriere): tighten the gap between h1 and h2 */
.site-main h1 + h2 { margin-top: 0.5em; }

/* Buttons: standard WP button block gets the RGW look automatically.
   PDF: square cyan button, white uppercase label. */
.site-main .wp-block-button__link,
.rgw-button {
	font-family: var(--rgw-font-head);
	display: inline-block;
	background: var(--rgw-cyan);
	color: var(--rgw-white);
	text-transform: uppercase;
	/* PSD: Button 261x49px, Text 207px breit, cap 15px */
	letter-spacing: 0.08em;
	font-weight: 700;
	font-size: 23px;
	line-height: 27px;
	padding: 11px 27px;
	border-radius: 0;
	border: 0;
	text-decoration: none;
	transition: background 0.2s ease;
	/* mobile safety: the fixed PSD measure (262x49) must never overflow
	   very narrow viewports */
	max-width: 100%;
	box-sizing: border-box;
}
.site-main .wp-block-button__link:hover,
.rgw-button:hover {
	background: var(--rgw-navy);
	color: var(--rgw-white);
}

/* Cyan text accent, e.g. "Ob Neubau, Erweiterung oder Sanierung:".
   Usage in the editor: mark the text (or paragraph) and add the
   extra CSS class "rgw-cyan". */
.rgw-cyan,
.site-main .rgw-cyan {
	color: var(--rgw-cyan);
}

/* Subline under a heading, e.g. "GAS - WASSER - TIEFBAU".
   Usage in the editor: paragraph block + extra CSS class "rgw-subline". */
.rgw-subline {
	font-family: var(--rgw-font-head);
	color: var(--rgw-navy);
	text-transform: uppercase;
	/* same size as h1/h2 per PSD (cap 21px vs 22px = identical) */
	letter-spacing: 0.04em;
	font-weight: 700;
	font-size: 32px;
	line-height: 1.25;
	margin-top: -0.92em;	/* ergibt 19px Pixelabstand zur H1 wie im PSD */
}

/* Content links: navy default, cyan on hover (same pattern as the tiles) */
.site-main a,
.site-main a:visited {
	color: var(--rgw-navy);
	text-decoration: none;
	transition: color 0.2s ease;
}
.site-main a:hover,
.site-main a:focus {
	color: var(--rgw-cyan);
}
/* footer sits on navy: links white, cyan on hover */
.rgw-footer__address a { color: var(--rgw-white); text-decoration: none; }
.rgw-footer__address a:hover { color: var(--rgw-cyan); }

/* component links keep their own colors (tile labels, buttons) –
   they must not inherit the cyan content-link color */
.site-main a.rgw-tile,
.site-main a.rgw-tile:visited,
.site-main a.rgw-tile:hover,
.site-main a.rgw-tile:focus,
.site-main a.wp-block-button__link,
.site-main a.wp-block-button__link:visited,
.site-main a.wp-block-button__link:hover,
.site-main a.wp-block-button__link:focus {
	color: var(--rgw-white);
}

/* Content tables (e.g. Impressum / Kontakt data): full width, and on
   small viewports the WP table wrapper scrolls instead of overflowing */
.site-main table {
	width: 100%;
	border-collapse: collapse;
}
.site-main .wp-block-table {
	overflow-x: auto;
	margin-left: 0;
	margin-right: 0;
}
.site-main th,
.site-main td {
	padding: 6px 12px 6px 0;
	text-align: left;
	vertical-align: top;
}

/* Hide _s extras not used in this design */
.site-main .entry-header,
.site-main .entry-footer,
.post-thumbnail { display: none; }

/* _s sets .post/.page { margin: 0 0 1.5em } (= 24px) which collapses
   below the footer as a white gap – neutralize it */
.post,
.page {
	margin: 0;
}

/* --------------------------------------------------------------
# Top header (white): logo + diagonal deco lines
-------------------------------------------------------------- */
.rgw-topbar {
	background: var(--rgw-white);
	position: relative;
	overflow: hidden;
}
.rgw-topbar .rgw-container {
	display: flex;
	align-items: center;
	min-height: 150px;	/* PSD header band (was 104) */
	position: relative;
}
.rgw-topbar .custom-logo { height: 112px; max-height: none; width: auto; }	/* visible glyph ~96px; SVG has transparent top/bottom padding */

/* diagonal deco lines: original vector from the PSD (img/deco-lines.svg).
   Anchored to .rgw-container so they stay inside the layout width,
   matching the PDF, instead of sticking to the viewport edge. */
.rgw-topbar .rgw-container::after {
	content: "";
	position: absolute;
	top: 0;
	right: var(--rgw-gutter);
	width: 60%;
	height: 100%;
	background: url("../img/deco-lines.svg") right center no-repeat;
	background-size: auto 100%;
	pointer-events: none;
}

/* --------------------------------------------------------------
# Main navigation (navy bar, full-bleed)
-------------------------------------------------------------- */
.rgw-navbar {
	background: var(--rgw-navy);
}
.rgw-navbar .main-navigation {
	background: transparent;
}
.main-navigation ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
	width: 100%;
	justify-content: space-between;
	margin: 0;
	padding: 0;
	list-style: none;
}
.main-navigation li { position: relative; }
.main-navigation a {
	font-family: var(--rgw-font-head);
	display: block;
	/* PSD: bar height 69px, cap height 12px => ~16px font, generous padding */
	padding: 23px 0;
	color: var(--rgw-white);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 16px;
	line-height: 1.4;
	font-weight: 700;
	text-decoration: none;
}
.main-navigation a:hover,
.main-navigation .current-menu-item > a,
.main-navigation .current-menu-ancestor > a {
	color: var(--rgw-cyan);
}

/* Dropdown (cyan panel, like PDF submenu).
   Also neutralizes the _s left:-999em show/hide mechanic from style.css. */
.main-navigation ul ul {
	display: none;
	float: none;
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 50;
	background: var(--rgw-cyan);
	min-width: 253px;	/* PSD Panelbreite */
	padding: 18px 0;	/* PSD: Panelhoehe 165px bei 4 Punkten */
	flex-direction: column;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}
.main-navigation ul li:hover > ul,
.main-navigation ul li.focus > ul,
.main-navigation ul ul li:hover > ul,
.main-navigation ul ul li.focus > ul {
	left: 0;	/* _s sets left:auto here – keep panel anchored */
}
.main-navigation ul ul a {
	/* PSD: cap 12px (=18px), 32px Zeilenabstand, 22px Einzug,
	   Text 208px breit -> Tracking deutlich enger als in der Hauptnavi */
	padding: 5px 22px;
	font-size: 18px;
	line-height: 22px;
	letter-spacing: 0.05em;
}
.main-navigation ul ul a:hover { color: var(--rgw-navy); }
/* active items inside the cyan panel stay white (cyan-on-cyan is invisible) */
.main-navigation ul ul .current-menu-item > a,
.main-navigation ul ul .current-menu-ancestor > a { color: var(--rgw-white); }
.main-navigation ul ul .current-menu-item > a:hover,
.main-navigation ul ul .current-menu-ancestor > a:hover { color: var(--rgw-navy); }
.main-navigation li:hover > ul,
.main-navigation li:focus-within > ul,
.main-navigation li.focus > ul {
	display: flex;
}

/* --------------------------------------------------------------
# Mobile: offcanvas menu (<=1024px)
# Burger button in the navy bar opens a navy panel from the right.
# Backdrop + close X + ESC + link click all close it (JS in rgw.js).
# Scroll lock via body.rgw-offcanvas-open.
-------------------------------------------------------------- */
.menu-toggle {
	display: none;	/* shown only in the offcanvas breakpoint below */
	background: transparent;
	border: 0;
	cursor: pointer;
	padding: 12px;
	margin: 8px 0;
	margin-left: auto;	/* burger sits right in the navy bar */
	flex-direction: column;
	gap: 5px;
}
.menu-toggle__bar {
	display: block;
	width: 26px;
	height: 3px;
	background: var(--rgw-white);
}
.menu-toggle:hover .menu-toggle__bar,
.menu-toggle:focus-visible .menu-toggle__bar { background: var(--rgw-cyan); }

/* close X inside the panel (element appended by rgw.js) */
.rgw-offcanvas-close { display: none; }

@media (max-width: 1024px) {
	.menu-toggle { display: flex; }
	.rgw-navbar .main-navigation { display: flex; }

	/* panel = the top-level menu list */
	.main-navigation .menu {
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		z-index: 210;
		width: min(320px, 86vw);
		background: var(--rgw-navy);
		display: flex;
		flex-direction: column;
		flex-wrap: nowrap;
		justify-content: flex-start;
		margin: 0;
		padding: 72px 0 40px;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35);
		opacity: 0;
		visibility: hidden;
		transform: translateX(48px);
		transition:
			opacity 0.22s ease,
			transform 0.22s ease,
			visibility 0s linear 0.22s;
	}
	.main-navigation.toggled .menu {
		display: flex;	/* beats the _s .main-navigation.toggled ul { display: block } */
		opacity: 1;
		visibility: visible;
		transform: none;
		transition-delay: 0s;
	}
	.main-navigation .menu > li > a {
		padding: 13px 30px;
		font-size: 17px;
	}

	/* submenus: no dropdown on mobile - the offcanvas shows them statically,
	   always expanded, indented below their parent item. Overrides the
	   desktop dropdown rules (absolute cyan panel) completely. */
	.main-navigation .menu .sub-menu {
		display: block;
		position: static;
		background: transparent;
		box-shadow: none;
		min-width: 0;
		padding: 0 0 8px;
		/* visibility must INHERIT from the panel: an explicit "visible"
		   would keep the links hit-testable inside the closed
		   (opacity 0 / hidden) panel */
		visibility: inherit;
		transform: none;
		transition: none;
	}
	.main-navigation .menu .sub-menu a {
		padding: 7px 30px 7px 48px;
		font-size: 15px;
		line-height: 1.5;
		letter-spacing: 0.06em;
		color: rgba(255, 255, 255, 0.82);
	}
	.main-navigation .menu .sub-menu a:hover,
	.main-navigation .menu .sub-menu a:focus { color: var(--rgw-cyan); }
	.main-navigation .menu .sub-menu .current-menu-item > a { color: var(--rgw-cyan); }

	/* backdrop (element appended by rgw.js) */
	.rgw-nav-backdrop {
		position: fixed;
		inset: 0;
		z-index: 200;
		background: rgba(18, 22, 42, 0.55);
		opacity: 0;
		visibility: hidden;
		transition:
			opacity 0.22s ease,
			visibility 0s linear 0.22s;
	}
	body.rgw-offcanvas-open .rgw-nav-backdrop {
		opacity: 1;
		visibility: visible;
		transition-delay: 0s;
	}

	/* close X: fixed over the open panel, top right */
	.main-navigation.toggled .rgw-offcanvas-close {
		display: flex;
		align-items: center;
		justify-content: center;
		position: fixed;
		top: 10px;
		right: 10px;
		z-index: 220;
		width: 44px;
		height: 44px;
		box-sizing: border-box;
		padding: 0;
		background: transparent;
		border: 0;
		border-radius: 0;
		cursor: pointer;
		color: var(--rgw-white);
		font-size: 30px;
		line-height: 1;
	}
	.rgw-offcanvas-close:hover,
	.rgw-offcanvas-close:focus-visible { color: var(--rgw-cyan); }

	/* scroll lock while the panel is open */
	body.rgw-offcanvas-open { overflow: hidden; }
}
@media (min-width: 1025px) {
	.menu-toggle { display: none; }
	.main-navigation ul { display: flex; }
	/* submenus: eased fade + slide instead of hard toggle.
	   Kept in the layout (display:flex) and hidden via opacity/visibility,
	   because display itself cannot transition. The 0.22s visibility delay
	   on close also forgives brief mouse slips on the way into the panel. */
	.main-navigation ul ul {
		display: flex;
		opacity: 0;
		visibility: hidden;
		transform: translateY(10px);
		pointer-events: none;
		transition:
			opacity 0.22s ease,
			transform 0.22s ease,
			visibility 0s linear 0.22s;
	}
	.main-navigation li:hover > ul,
	.main-navigation li:focus-within > ul,
	.main-navigation li.focus > ul {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
		pointer-events: auto;
		transition-delay: 0s;
	}
}

/* --------------------------------------------------------------
# Hero (full-bleed image, navy text box)
-------------------------------------------------------------- */
.rgw-hero {
	position: relative;
	min-height: 560px;	/* PSD hero is taller (was 420) */
	background-size: cover;
	background-position: center;
	background-color: var(--rgw-navy); /* fallback until image set */
}
.rgw-hero .rgw-container {
	position: relative;
	min-height: inherit;
}
/* headline: one stack of separate navy boxes, bottom-left (cf. PDF) */
.rgw-hero__headline {
	position: absolute;
	left: var(--rgw-gutter);
	bottom: 56px;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 6px;	/* tight spacing between the boxes (Sonja: was too high) */
	max-width: 92%;
}
.rgw-hero__box {
	font-family: var(--rgw-font-head);
	background: var(--rgw-navy-overlay);
	color: var(--rgw-white);
	padding: 10px 30px;
	text-transform: uppercase;
	/* tracking + size measured against the PSD:
	   cap height 34px and 0.13em tracking at 1150px layout width */
	letter-spacing: 0.13em;
	font-weight: 700;
	font-size: clamp(20px, 4.3vw, 50px);
	line-height: 1.2;
}
@media (max-width: 600px) {
	.rgw-hero { min-height: 340px; }
	.rgw-hero__headline { bottom: 28px; gap: 4px; }
	.rgw-hero__box { letter-spacing: 0.10em; padding: 8px 18px; }
}

/* --------------------------------------------------------------
# Hero info box: closed = white "i" square top right,
# hover/focus opens the white contact panel (cf. PDF)
-------------------------------------------------------------- */
.rgw-infobox {
	position: absolute;
	top: 0;
	right: var(--rgw-gutter);
	z-index: 20;
}
/* mobile: the i square sits flush at the right viewport edge */
@media (max-width: 700px) {
	.rgw-infobox { right: 0; }
}
/* closed state: just the white i square with a navy top rule */
.rgw-infobox__toggle {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	margin-left: auto;
	background: var(--rgw-white);
	color: var(--rgw-navy);
	cursor: default;
}
.rgw-infobox__toggle em {
	font-family: Georgia, "Times New Roman", serif;
	font-style: italic;
	font-weight: 700;
	font-size: 17px;
}
/* open state: one solid white rectangle behind everything; a 1px navy
   rule separates the i row from the contact lines (cf. PDF) */
.rgw-infobox__panel::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 34px;	/* directly under the 34px i row */
	height: 1px;
	background: var(--rgw-navy);
}
.rgw-infobox__panel {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 1;
	background: var(--rgw-white);
	color: var(--rgw-navy);
	font-family: var(--rgw-font-head);
	font-weight: 700;
	font-size: 14px;
	line-height: 1.9;
	text-align: right;
	padding: 44px 18px 12px;	/* top padding = white i row + gap below rule */
	min-width: 215px;
	opacity: 0;
	visibility: hidden;
	transform: translateY(8px);
	transition:
		opacity 0.22s ease,
		transform 0.22s ease,
		visibility 0s linear 0.22s;
}
.rgw-infobox:hover .rgw-infobox__panel,
.rgw-infobox:focus-within .rgw-infobox__panel {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
	transition-delay: 0s;
}
/* same link pattern as the rest of the site: navy default, cyan on hover */
.rgw-infobox__panel a { color: var(--rgw-navy); text-decoration: none; transition: color 0.2s ease; }
.rgw-infobox__panel a:hover,
.rgw-infobox__panel a:focus { color: var(--rgw-cyan); }

/* --------------------------------------------------------------
# Leistungen icon tiles
-------------------------------------------------------------- */
.rgw-tiles {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
	margin: 48px 0;
}
.rgw-tile {
	display: block;
	text-align: center;
	text-decoration: none;
}
.rgw-tile__icon {
	background: radial-gradient(circle at center, #f7f7f8 0%, #dcdee2 100%);
	aspect-ratio: 4 / 3;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.rgw-tile__icon svg { width: 96px; height: 96px; }
.rgw-tile__icon img { max-width: 70%; max-height: 130px; }
.rgw-tile__label {
	font-family: var(--rgw-font-head);
	display: block;
	transition: background 0.2s ease;
	margin-top: -2px;
	/* PSD: Balken 81px hoch, cap 13px, 26px Zeilenabstand */
	padding: 14px 10px;
	background: var(--rgw-navy);
	color: var(--rgw-white);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-size: 20px;
	line-height: 26px;
	font-weight: 700;
	text-decoration: none;
}
/* PSD tile 1 shows the hover state: default navy, hover cyan */
.rgw-tile:hover .rgw-tile__label,
.rgw-tile:focus-visible .rgw-tile__label { background: var(--rgw-cyan); }
@media (max-width: 700px) {
	.rgw-tiles { grid-template-columns: 1fr; gap: 22px; margin: 36px 0; }
}
/* tablet: three 20px labels don't fit side by side ("OBERFLAECHEN-
   WIEDERHERSTELLUNG" forces its column wider) - two columns up to 900px
   and slightly smaller labels up to 1024px */
@media (min-width: 701px) and (max-width: 900px) {
	.rgw-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 701px) and (max-width: 1024px) {
	.rgw-tile__label { font-size: 16px; line-height: 22px; letter-spacing: 0.1em; }
}

/* --------------------------------------------------------------
# Referenzen: client list + testimonial band
-------------------------------------------------------------- */
.rgw-clients {
	columns: 2;
	column-gap: 60px;
	list-style: none;
	margin: 24px 0 0;
	padding: 0;
}
.rgw-clients li { padding: 3px 0; break-inside: avoid; }
@media (max-width: 700px) { .rgw-clients { columns: 1; } }

.rgw-quote {
	background: var(--rgw-cyan-light);
	color: var(--rgw-white);
	padding: 48px 0;
}
.rgw-quote blockquote {
	margin: 0;
	border: 0;
	font-style: italic;
	font-weight: 600;
	font-size: clamp(18px, 2.4vw, 26px);
	line-height: 1.5;
	position: relative;
	padding-left: 70px;
}
/* opening quote mark like the PSD: two slanted white bars,
   top-aligned with the first text line (pure CSS, font-independent) */
.rgw-quote blockquote::before {
	content: "";
	position: absolute;
	left: 4px;
	top: 0.32em;
	width: 34px;
	height: 0.85em;
	background:
		linear-gradient(var(--rgw-white), var(--rgw-white)) 0 0 / 12px 100% no-repeat,
		linear-gradient(var(--rgw-white), var(--rgw-white)) 20px 0 / 12px 100% no-repeat;
	transform: skewX(-18deg);
}
/* Owl carousel inside the quote band: white arrows, no button chrome */
.rgw-quote .owl-carousel .owl-nav button.owl-prev,
.rgw-quote .owl-carousel .owl-nav button.owl-next {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	color: var(--rgw-white);
	font-size: 48px;
	line-height: 1;
	opacity: 0.75;
	margin: 0;
	padding: 0 8px;
}
.rgw-quote .owl-carousel .owl-nav button.owl-prev { left: -34px; }
.rgw-quote .owl-carousel .owl-nav button.owl-next { right: -34px; }
.rgw-quote .owl-carousel .owl-nav button:hover { background: transparent; opacity: 1; color: var(--rgw-white); }
.rgw-quote .owl-carousel .item blockquote { margin: 0; }

/* small viewports: arrows at -34px would poke out of the viewport -
   pull them into the gutter, shrink them, keep the text clear of them */
@media (max-width: 700px) {
	.rgw-quote { padding: 40px 0; }
	.rgw-quote blockquote {
		padding-left: 52px;
		padding-right: 14px;
	}
	.rgw-quote blockquote::before {
		left: 2px;
		width: 28px;
		background:
			linear-gradient(var(--rgw-white), var(--rgw-white)) 0 0 / 10px 100% no-repeat,
			linear-gradient(var(--rgw-white), var(--rgw-white)) 16px 0 / 10px 100% no-repeat;
	}
	.rgw-quote .owl-carousel .owl-nav button.owl-prev,
	.rgw-quote .owl-carousel .owl-nav button.owl-next {
		font-size: 34px;
		padding: 0 4px;
	}
	.rgw-quote .owl-carousel .owl-nav button.owl-prev { left: -18px; }
	.rgw-quote .owl-carousel .owl-nav button.owl-next { right: -18px; }
	.rgw-quote__nav { font-size: 34px; padding: 4px 6px; }
	.rgw-quote__nav--prev { left: -16px; }
	.rgw-quote__nav--next { right: -16px; }
	.rgw-quote cite { font-size: 14px; }
}

/* rotation: items stacked, fade via opacity */
.rgw-quote .rgw-container { position: relative; }
.rgw-quote__item {
	transition: opacity 0.5s ease;
}
.rgw-quote[data-rgw-rotate] .rgw-quote__item {
	opacity: 0;
	visibility: hidden;
	position: absolute;
	inset: 0;
}
.rgw-quote[data-rgw-rotate] .rgw-quote__item.is-active {
	opacity: 1;
	visibility: visible;
	position: relative;
}
.rgw-quote__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: 0;
	color: var(--rgw-white);
	font-size: 44px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 10px;
	opacity: 0.7;
}
.rgw-quote__nav:hover { opacity: 1; }
.rgw-quote__nav--prev { left: -6px; }
.rgw-quote__nav--next { right: -6px; }

.rgw-quote cite {
	display: block;
	text-align: right;
	font-style: italic;
	font-weight: 400;
	font-size: 16px;
	margin-top: 12px;
}

/* --------------------------------------------------------------
# Accordion (Angebot Pos. 5)
-------------------------------------------------------------- */
details.rgw-accordion {
	border: 1px solid var(--rgw-grey-line);
	margin-bottom: 10px;
}
details.rgw-accordion > summary {
	cursor: pointer;
	list-style: none;
	padding: 14px 48px 14px 18px;
	background: var(--rgw-navy);
	color: var(--rgw-white);
	font-family: var(--rgw-font-head);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 700;
	position: relative;
}
details.rgw-accordion > summary::-webkit-details-marker { display: none; }
details.rgw-accordion > summary::after {
	content: "+";
	position: absolute;
	right: 18px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 22px;
}
details.rgw-accordion[open] > summary { background: var(--rgw-cyan); }
details.rgw-accordion[open] > summary::after { content: "\2013"; }
details.rgw-accordion > .rgw-accordion__body { padding: 18px; }

/* --------------------------------------------------------------
# Lightbox (Angebot Pos. 5)
-------------------------------------------------------------- */
.rgw-gallery {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 14px;
	margin: 32px 0;
}
.rgw-gallery img { display: block; width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.wp-block-gallery img { cursor: zoom-in; }
@media (max-width: 700px) { .rgw-gallery { grid-template-columns: repeat(2, 1fr); } }

/* --------------------------------------------------------------
# Featherlight: unified lightbox styling
# Containers are hidden via class (featherlight CLONES nodes, inline
# display:none would survive into the overlay).
-------------------------------------------------------------- */
.rgw-leistung-lb { display: none; }
.featherlight .rgw-leistung-lb { display: block; }

body .featherlight .featherlight-content {
	padding: 0;
	border-bottom: 0;
	background: var(--rgw-white);
}
/* Leistungen overlays: constrain width, navy header bar */
body .featherlight .featherlight-content .rgw-leistung-lb { max-width: 720px; }
.featherlight .rgw-leistung-lb h2 {
	font-family: var(--rgw-font-head);
	background: var(--rgw-navy);
	color: var(--rgw-white);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-size: 22px;
	margin: 0;
	padding: 20px 64px 18px 28px; /* right padding keeps clear of the close icon */
}
.featherlight .rgw-leistung-lb img {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
}
.featherlight .rgw-leistung-lb > :not(h2):not(img) {
	margin-left: 28px;
	margin-right: 28px;
}
.featherlight .rgw-leistung-lb > p:first-of-type { margin-top: 22px; }
.featherlight .rgw-leistung-lb { padding-bottom: 24px; }
.featherlight .rgw-leistung-lb a { color: var(--rgw-navy); text-decoration: none; transition: color 0.2s ease; }
.featherlight .rgw-leistung-lb a:hover,
.featherlight .rgw-leistung-lb a:focus { color: var(--rgw-cyan); }

/* close icon: white, cyan on hover; text-shadow keeps it readable on images */
body .featherlight .featherlight-close-icon {
	background: transparent;
	color: var(--rgw-white);
	font-size: 26px;
	line-height: 60px;
	width: 56px;
	height: 60px;
	top: 0;
	right: 0;
	text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}
body .featherlight .featherlight-close-icon:hover { color: var(--rgw-cyan); }

/* image gallery: image flush top/left/right, navy footer bar below
   with the caption in white (always shown as a design element) */
body .featherlight .featherlight-image {
	margin: 0;
	width: 100%;
}
body .featherlight .featherlight-previous,
body .featherlight .featherlight-next {
	background: transparent;
}
body .featherlight .featherlight-previous span,
body .featherlight .featherlight-next span {
	color: var(--rgw-white);
	font-size: 60px;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
	display: inline-block;
}
.featherlight .rgw-cap {
	background: var(--rgw-navy);
	color: var(--rgw-white);
	font-family: var(--rgw-font-head);
	font-weight: 700;
	font-size: 14px;
	letter-spacing: 0.06em;
	text-align: center;
	min-height: 20px;
	padding: 12px 16px;
}

/* small phones: tighter overlay chrome (checked at 360-430px) */
@media (max-width: 430px) {
	.featherlight .rgw-leistung-lb h2 {
		font-size: 18px;
		padding: 16px 52px 14px 18px;
	}
	.featherlight .rgw-leistung-lb > :not(h2):not(img) {
		margin-left: 18px;
		margin-right: 18px;
	}
	.featherlight .rgw-leistung-lb > p:first-of-type { margin-top: 16px; }
	.featherlight .rgw-leistung-lb { padding-bottom: 18px; }
	body .featherlight .featherlight-close-icon {
		font-size: 22px;
		width: 48px;
		height: 52px;
		line-height: 52px;
	}
	body .featherlight .featherlight-previous span,
	body .featherlight .featherlight-next span { font-size: 44px; }
	.featherlight .rgw-cap { font-size: 13px; padding: 10px 14px; }
}

/* --------------------------------------------------------------
# Footer image strip (3 images, grey full-bleed background)
-------------------------------------------------------------- */
.rgw-strip {
	background: var(--rgw-grey-bg);
}
.rgw-strip .rgw-container {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 2px;	/* hairline gap between images, matches carousel margin */
}
.rgw-strip img {
	display: block;
	width: 100%;
	height: 240px;
	object-fit: cover;
	cursor: zoom-in;
}
.rgw-strip--single img { cursor: default; }
@media (max-width: 700px) {
	/* mobile: the strip (grid AND carousel variant) runs full-bleed
	   like the front page image - no container gutters */
	.rgw-strip .rgw-container {
		grid-template-columns: 1fr;
		max-width: none;
		padding-left: 0;
		padding-right: 0;
	}
}

/* base mobile fixes (<=700px): compact header, tighter content padding */
@media (max-width: 700px) {
	.rgw-topbar .rgw-container { min-height: 96px; justify-content: center; }
	.rgw-topbar .custom-logo { height: 72px; }
	/* mobile: logo centered, diagonal deco lines completely off
	   (they collided with the logo on narrow viewports) */
	.rgw-topbar .rgw-container::after { display: none; }
	.site-main { padding: 26px 0 34px; }

	/* headings: PSD sizes are desktop measures - scale down so an h1
	   doesn't wrap over 4+ lines on a 360px phone */
	.site-main h1,
	.site-main h2 { font-size: 24px; line-height: 1.3; }
	.site-main h3 { font-size: 18px; }
	.rgw-subline { font-size: 24px; }

	/* long German compounds (e.g. OBERFLAECHENWIEDERHERSTELLUNG) don't fit
	   an iPhone viewport in one piece: allow automatic hyphenation on
	   headings mobile-only (overrides the global hyphens:manual rule);
	   overflow-wrap is the fallback when no hyphenation point is found */
	.site-main h1,
	.site-main h2,
	.site-main h3,
	.site-main h4,
	.site-main h5,
	.site-main h6,
	.rgw-subline,
	.featherlight .rgw-leistung-lb h2 {
		hyphens: auto;
		-webkit-hyphens: auto;
		overflow-wrap: break-word;
	}

	/* buttons: keep the square look, slightly smaller type */
	.site-main .wp-block-button__link,
	.rgw-button { font-size: 20px; line-height: 24px; padding: 11px 22px; }

	/* accordion: keep clear of the +/- icon, slightly tighter */
	details.rgw-accordion > summary { padding: 12px 44px 12px 16px; font-size: 15px; }
	details.rgw-accordion > .rgw-accordion__body { padding: 14px 16px; }
}

/* carousel variant: owl replaces the grid inside the container */
.rgw-strip--carousel .rgw-container { display: block; }
.rgw-strip--carousel .item img {
	display: block;
	width: 100%;
	height: 240px;
	object-fit: cover;
}

/* front page variant: one image, full-bleed across the viewport */
.rgw-strip--single img {
	display: block;
	width: 100%;
	height: 340px;
	object-fit: cover;
}
@media (max-width: 700px) {
	.rgw-strip--single img { height: 220px; }
}

/* --------------------------------------------------------------
# Qualifications band (cyan, full-bleed)
-------------------------------------------------------------- */
.rgw-quals {
	background: var(--rgw-cyan);
	color: var(--rgw-white);
}
.rgw-quals .rgw-container {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	min-height: 72px;
	flex-wrap: wrap;
	padding-top: 10px;
	padding-bottom: 10px;
}
.rgw-quals__label {
	font-family: var(--rgw-font-head);
	text-transform: uppercase;
	letter-spacing: 0.12em;
	font-weight: 700;
	font-size: 18px;	/* PSD: cap height 12px */
}
.rgw-quals__logos { display: flex; gap: 40px; align-items: center; }
/* mobile: label row + centered logo row, box vertically symmetric
   (paddings verified at the rendering pixel, see measurement notes) */
@media (max-width: 700px) {
	.rgw-quals .rgw-container {
		flex-direction: column;
		align-items: stretch;
		justify-content: center;
		gap: 16px;
		min-height: 0;
		/* label line-height adds ~9px leading above the caps - compensate so
		   the RENDERED gap above the text equals the gap below the logos */
		padding-top: 13px;
		padding-bottom: 22px;
	}
	.rgw-quals__label { text-align: center; }
	.rgw-quals__logos { justify-content: center; gap: 28px; }
}
.rgw-quals__logos a { display: flex; }	/* inline anchor adds baseline gap -> misaligned logos */
.rgw-quals__logos img { height: 50px; width: auto; background: var(--rgw-white); padding: 5px; box-sizing: content-box; }	/* PSD: 60x60 Kasten */

/* --------------------------------------------------------------
# Footer (navy, full-bleed)
-------------------------------------------------------------- */
.rgw-footer {
	background: var(--rgw-navy);
	color: var(--rgw-white);
	font-size: 14px;
}
.rgw-footer .rgw-container {
	display: grid;
	/* PSD: badge+logo stacked left, address, then menus; logo/address/menus
	   share the bottom baseline, badge sits above the logo */
	grid-template-columns: 240px 1fr auto auto;
	gap: 40px 56px;
	padding-top: 44px;
	padding-bottom: 44px;
	align-items: end;
}
.rgw-footer a { color: var(--rgw-white); text-decoration: none; }
.rgw-footer a:hover { color: var(--rgw-cyan); }

.rgw-footer__badge img { max-width: 190px; height: auto; }	/* PSD: 190x136 */
.rgw-footer__badge { margin-bottom: 28px; }
.rgw-footer__logo img { height: 85px; max-height: none; width: auto; }	/* PSD: 216x85 */
.rgw-footer__address {
	/* PSD: zwei Bloecke nebeneinander, fett, cap 10px, 23px Zeilenabstand */
	display: flex;
	gap: 47px;
	font-family: var(--rgw-font-head);
	font-weight: 700;
	font-size: 15px;
	line-height: 23px;
	white-space: nowrap;
}
.rgw-footer__addr-col { flex: 0 0 auto; }

.rgw-footer nav ul { list-style: none; margin: 0; padding: 0; text-align: right; }
.rgw-footer nav li { padding: 2px 0; }
.rgw-footer nav .current-menu-item > a { color: var(--rgw-cyan); }
.rgw-footer nav a {
	font-family: var(--rgw-font-head);
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 700;
	font-size: 16px;	/* PSD: cap height 11px */
	line-height: 30px;	/* PSD: 30px Zeilenabstand */
}
@media (max-width: 900px) {
	.rgw-footer .rgw-container { grid-template-columns: 1fr 1fr; align-items: start; }
	.rgw-footer nav ul { text-align: left; }
	/* the two nowrap address columns are ~430px together - allow them to
	   stack instead of pushing the page wider than the viewport */
	.rgw-footer__address { flex-wrap: wrap; gap: 10px 47px; }
}
@media (max-width: 700px) {
	.rgw-footer .rgw-container { grid-template-columns: 1fr; gap: 32px; padding-top: 36px; padding-bottom: 36px; }
	/* mobile: centered footer stack - matches the centered logo/quals band */
	.rgw-footer .rgw-container { justify-items: center; text-align: center; }
	.rgw-footer__badge,
	.rgw-footer__logo { text-align: center; }
	.rgw-footer__address { justify-content: center; }
	.rgw-footer nav ul { text-align: center; }
}

/* --------------------------------------------------------------
# Accessibility / motion
-------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
summary:focus-visible {
	outline: 3px solid var(--rgw-cyan);
	outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
	/* keep the subtle 0.22s opacity fade (harmless), drop movement/animation */
	* { animation: none !important; }
	.main-navigation ul ul { transform: none; }
	.main-navigation li:hover > ul,
	.main-navigation li:focus-within > ul,
	.main-navigation li.focus > ul { transform: none; }
	/* offcanvas panel: no slide, opacity fade only */
	.main-navigation .menu { transform: none; }
	.main-navigation.toggled .menu { transform: none; }
}
