/*
 Theme Name:     RGD Client Theme
 Theme URI:      https://www.rathje-design.de
 Description:    Divi Child-Theme für Rathje Webdesign Kundenprojekte
 Author:         Rathje Grafikdesign
 Author URI:     https://www.rathje-design.de
 Template:       Divi
 Version:        1.2.0
 License:        GPL-2.0-or-later
 Text Domain:    rgd-client-theme
*/

/* ==========================================================================
   CSS Custom Properties
   ========================================================================== */

:root {
    --clr-green:        #00953b;
    --clr-green-dark:   #2e5e22;
    --clr-orange:       #d4652a;
    --clr-anthracite:   #363636;
    --clr-white:        #ffffff;
    --clr-text:         #2a2a2a;
    --clr-border:       #e8e8e8;

    --font-base:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

    --header-h:         74px;
    --transition:       200ms ease;
    --dropdown-shadow:  0 8px 32px rgba(0, 0, 0, 0.12);
    --radius:           6px;
}

/* ==========================================================================
   Reset / Base
   ========================================================================== */

*,
*::before,
*::after { box-sizing: border-box; }


/* ==========================================================================
   Service Kacheln
   ========================================================================== */

/* Divi-Zeilen-Höhe und flex-wrap überschreiben — wird per Builder gesetzt und bricht Mobile */
.rgd-tiles.et_pb_row,
.rgd-tiles.et_pb_row_nested {
    height: auto !important;
    min-height: unset !important;
    flex-wrap: wrap !important;
}

.rgd-tiles .et_pb_column,
.rgd-tiles .et_flex_column {
    position: relative !important;
    min-height: 280px !important;
    overflow: hidden !important;
    background-size: cover !important;
    background-position: center !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
}

/* Hintergrundbild-Zoom via ::before — Text bleibt scharf */
.rgd-tiles .et_pb_column::before,
.rgd-tiles .et_flex_column::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: inherit;
    transition: transform 400ms ease;
    z-index: 0;
}

.rgd-tiles .et_pb_column:hover::before,
.rgd-tiles .et_flex_column:hover::before {
    transform: scale( 1.07 );
}

/* Gradient-Overlay — unabhängig von Divi's Farbeinstellung */
.rgd-tiles .et_pb_column::after,
.rgd-tiles .et_flex_column::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba( 61, 61, 61, 0.70 );
    z-index: 1;
    pointer-events: none;
}

.rgd-tiles .et_pb_column > *,
.rgd-tiles .et_flex_column > * {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Überschrift */
.rgd-tiles .et_pb_module_header,
.rgd-tiles h2,
.rgd-tiles h3,
.rgd-tiles h4 {
    color: #ffffff !important;
    margin: 0 !important;
    padding: 16px 20px 20px !important;
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-align: center !important;
    text-shadow: 0 1px 4px rgba( 0, 0, 0, 0.5 );
}

/* Überschrift- und CTA-Spalte aus Kachel-Effekten ausnehmen */
.rgd-tiles .et_pb_column.rgd-tile-text,
.rgd-tiles .et_flex_column.rgd-tile-text,
.rgd-tiles .et_pb_column:has(.rgd-tile-text),
.rgd-tiles .et_flex_column:has(.rgd-tile-text) {
    min-height: 280px !important;
    overflow: visible !important;
    background: none !important;
    border-top-left-radius: 15px !important;
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 15px !important;
    border-bottom-left-radius: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.rgd-tiles .et_pb_column.rgd-tile-cta,
.rgd-tiles .et_flex_column.rgd-tile-cta {
    min-height: 280px !important;
    overflow: hidden !important;
    border-top-left-radius: 0 !important;
    border-top-right-radius: 15px !important;
    border-bottom-right-radius: 0 !important;
    border-bottom-left-radius: 15px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 28px 24px !important;
    gap: 20px !important;
}

/* Text und Button im CTA-Tile */
.rgd-tile-cta h2,
.rgd-tile-cta h3,
.rgd-tile-cta p {
    color: #ffffff !important;
    text-align: center !important;
    text-shadow: none !important;
    padding: 0 !important;
    margin: 0 !important;
}

.rgd-tile-cta .et_pb_button_wrapper {
    margin: 0 !important;
}

.rgd-tile-cta .et_pb_button {
    background: #ffffff !important;
    color: var( --clr-green-dark ) !important;
    border-color: #ffffff !important;
}

.rgd-tile-cta .et_pb_button:hover {
    background: transparent !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

.rgd-tiles .et_pb_column.rgd-tile-text::before,
.rgd-tiles .et_flex_column.rgd-tile-text::before,
.rgd-tiles .et_pb_column.rgd-tile-text::after,
.rgd-tiles .et_flex_column.rgd-tile-text::after,
.rgd-tiles .et_pb_column:has(.rgd-tile-text)::before,
.rgd-tiles .et_flex_column:has(.rgd-tile-text)::before,
.rgd-tiles .et_pb_column:has(.rgd-tile-text)::after,
.rgd-tiles .et_flex_column:has(.rgd-tile-text)::after,
.rgd-tiles .et_pb_column.rgd-tile-cta::before,
.rgd-tiles .et_flex_column.rgd-tile-cta::before,
.rgd-tiles .et_pb_column.rgd-tile-cta::after,
.rgd-tiles .et_flex_column.rgd-tile-cta::after {
    display: none !important;
}

/* Überschrift-Spalte: Heading-Farbe zurücksetzen */
.rgd-tile-text h2,
.rgd-tile-text h3 {
    color: var( --clr-text ) !important;
    text-shadow: none !important;
    padding: 0 !important;
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    text-align: left !important;
}

@media ( max-width: 980px ) {
    .rgd-tiles .et_pb_column,
    .rgd-tiles .et_flex_column {
        min-height: 220px !important;
    }
    .rgd-tiles .et_pb_column.rgd-tile-text,
    .rgd-tiles .et_flex_column.rgd-tile-text,
    .rgd-tiles .et_pb_column:has(.rgd-tile-text),
    .rgd-tiles .et_flex_column:has(.rgd-tile-text),
    .rgd-tiles .et_pb_column.rgd-tile-cta,
    .rgd-tiles .et_flex_column.rgd-tile-cta {
        min-height: 220px !important;
    }
}

@media ( max-width: 600px ) {
    .rgd-tiles .et_pb_column,
    .rgd-tiles .et_flex_column,
    .rgd-tiles [class*="et_flex_column_24"] {
        min-height: 180px !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .rgd-tiles .et_pb_column.rgd-tile-text,
    .rgd-tiles .et_flex_column.rgd-tile-text,
    .rgd-tiles .et_pb_column:has(.rgd-tile-text),
    .rgd-tiles .et_flex_column:has(.rgd-tile-text),
    .rgd-tiles .et_pb_column.rgd-tile-cta,
    .rgd-tiles .et_flex_column.rgd-tile-cta {
        min-height: 180px !important;
        width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}

/* ==========================================================================
   Typografie
   ========================================================================== */

h1, h2, h3 { color: #3d3d3d !important; }

/* ==========================================================================
   Responsive Images (Divi)
   ========================================================================== */

.et_pb_image img,
.et_pb_image_wrap img {
    max-width: 100%;
    height: auto !important;
}


/* ==========================================================================
   Hero Section
   ========================================================================== */

.rgd-hero p,
.rgd-hero .et_pb_text_inner p {
    color: #ffffff !important;
}

/* ==========================================================================
   Button System
   ========================================================================== */

.rgd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 24px;
    border-radius: var( --radius );
    font-family: inherit;
    font-size: 1.0625rem;
    font-weight: 700;
    line-height: 1.2;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
    white-space: nowrap;
    border: 2px solid transparent;
}

/* Filled — grüner Hintergrund, weiße Schrift */
.rgd-btn--filled,
.et_pb_button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 11px 24px !important;
    border-radius: var( --radius ) !important;
    font-family: inherit !important;
    font-size: 1.0625rem !important;
    font-weight: 700 !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    border: 2px solid #235c39 !important;
    background: #235c39 !important;
    color: var( --clr-white ) !important;
    text-decoration: none !important;
    cursor: pointer;
    transition: background 200ms ease, border-color 200ms ease;
}

.rgd-btn--filled:hover,
.et_pb_button:hover {
    background: #1a4429 !important;
    border-color: #1a4429 !important;
    color: var( --clr-white ) !important;
}

.et_pb_button::after {
    display: none !important;
}

/* Outline — Kontur, grüne Schrift */
.rgd-btn--outline {
    background: transparent;
    color: var( --clr-green ) !important;
    border-color: var( --clr-green );
}

.rgd-btn--outline:hover {
    background: var( --clr-green ) !important;
    color: var( --clr-white ) !important;
    border-color: var( --clr-green ) !important;
}

/* ==========================================================================
   Text-Utility-Klassen
   ========================================================================== */

/* Farben */
.rgd-text-white,  .rgd-text-white  * { color: #ffffff !important; }
.rgd-text-green,  .rgd-text-green  * { color: var( --clr-green ) !important; }
.rgd-text-orange, .rgd-text-orange * { color: #f18505 !important; }
.rgd-text-dark,   .rgd-text-dark   * { color: var( --clr-text ) !important; }

/* Ausrichtung */
.rgd-text-center { text-align: center !important; }
.rgd-text-left   { text-align: left   !important; }
.rgd-text-right  { text-align: right  !important; }

/* Größen */
.rgd-text-sm  { font-size: 0.875rem !important; }
.rgd-text-lg  { font-size: 1.25rem  !important; }
.rgd-text-xl  { font-size: 1.75rem  !important; }
.rgd-text-xxl { font-size: 2.5rem   !important; }

/* Hintergrund-Text-Effekt */
.rgd-clip {
    overflow: hidden !important;
}

@keyframes rgd-bg-zoom {
    from { transform: scale( 0.6 ); opacity: 0; }
    to   { transform: scale( 1 );   opacity: 1; }
}

.rgd-bg-text {
    filter: blur( 6px );
    user-select: none;
    pointer-events: none;
    overflow: visible !important;
    width: 100% !important;
}

.rgd-bg-text .et_pb_text_inner {
    transform: scale( 0.65 );
    opacity: 0;
    transition: transform 2.6s cubic-bezier( 0.22, 1, 0.36, 1 ),
                opacity   2.2s ease;
}

.rgd-bg-text.is-visible .et_pb_text_inner {
    transform: scale( 1 );
    opacity: 1;
}

.rgd-bg-text .et_pb_text_inner,
.rgd-bg-text .et_pb_text_inner p,
.rgd-bg-text .et_pb_text_inner h1,
.rgd-bg-text .et_pb_text_inner h2,
.rgd-bg-text .et_pb_text_inner h3 {
    font-size: 8vw !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    letter-spacing: -0.03em !important;
    color: rgba( 0, 0, 0, 0.07 ) !important;
    white-space: nowrap !important;
}

/* Variante auf dunklem Hintergrund */
.rgd-bg-text--light .et_pb_text_inner,
.rgd-bg-text--light .et_pb_text_inner p,
.rgd-bg-text--light .et_pb_text_inner h1,
.rgd-bg-text--light .et_pb_text_inner h2,
.rgd-bg-text--light .et_pb_text_inner h3 {
    color: rgba( 255, 255, 255, 0.08 ) !important;
}

/* Orange Button-Variante */
.rgd-btn-orange.et_pb_button,
.rgd-btn-orange {
    background: #f18505 !important;
    color: #ffffff !important;
    border-color: #f18505 !important;
}

.rgd-btn-orange.et_pb_button:hover,
.rgd-btn-orange:hover {
    background: #c96d04 !important;
    color: #ffffff !important;
    border-color: #c96d04 !important;
}

.rgd-btn-white.et_pb_button,
.rgd-btn-white {
    background: #ffffff !important;
    color: #235c39 !important;
    border-color: #ffffff !important;
}

.rgd-btn-white.et_pb_button:hover,
.rgd-btn-white:hover {
    background: transparent !important;
    color: #ffffff !important;
    border-color: #ffffff !important;
}

/* ==========================================================================
   Header
   ========================================================================== */

.rgd-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9990;
    height: var( --header-h );
    background: rgba( 255, 255, 255, 0.85 );
    backdrop-filter: blur( 6px );
    -webkit-backdrop-filter: blur( 6px );
    border-bottom: 1px solid transparent;
    transition: border-color var( --transition ), box-shadow var( --transition );
}

.rgd-header--scrolled {
    border-color: var( --clr-border );
    box-shadow: 0 2px 16px rgba( 0, 0, 0, 0.08 );
}

.rgd-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1440px;
    margin: 0 auto;
    padding: 15px 20px;
    height: 100%;
}

body {
    padding-top: var( --header-h );
    font-family: var( --font-base );
}

/* ==========================================================================
   Logo
   ========================================================================== */

.rgd-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
}

.rgd-logo img,
.rgd-logo .custom-logo,
.rgd-logo-img {
    width: 200px;
    height: auto;
    display: block;
    margin-bottom: 6px;
}

.rgd-logo-text {
    font-size: 1rem;
    font-weight: 700;
    color: var( --clr-text );
    letter-spacing: 0.02em;
}

/* ==========================================================================
   Desktop Navigation
   ========================================================================== */

.rgd-nav { margin-left: auto; }

.rgd-nav-list {
    display: flex;
    align-items: stretch;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 4px;
}

.rgd-nav-item {
    position: relative;
    display: flex;
    align-items: center;
}

.rgd-nav-link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var( --clr-text );
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
    border-radius: var( --radius );
    transition: color var( --transition );
    white-space: nowrap;
    position: relative;
}

.rgd-nav-link:hover,
.rgd-nav-link:focus-visible {
    color: var( --clr-text );
    background: none;
    outline: none;
}

/* Underline from left to right on hover — on li to avoid Safari button::after bug */
.rgd-nav-list > .rgd-nav-item:not( .rgd-nav-cta )::after {
    content: '';
    position: absolute;
    bottom: 6px;
    left: 14px;
    right: 14px;
    height: 1px;
    background: #235c39;
    border-radius: 1px;
    transform: scaleX( 0 );
    transform-origin: left;
    transition: transform 280ms ease;
    pointer-events: none;
}

.rgd-nav-list > .rgd-nav-item:not( .rgd-nav-cta ):hover::after,
.rgd-nav-list > .rgd-nav-item:not( .rgd-nav-cta ):focus-within::after,
.rgd-nav-list > .rgd-nav-item.rgd-nav-active:not( .rgd-nav-cta )::after {
    transform: scaleX( 1 );
}

/* Chevron */
.rgd-chevron {
    width: 14px;
    height: 14px;
    transition: transform var( --transition );
    flex-shrink: 0;
}

.rgd-has-dropdown.is-open .rgd-chevron {
    transform: rotate( 180deg );
}

/* WhatsApp CTA Button */
.rgd-nav-cta .rgd-nav-link {
    background: transparent !important;
    padding: 4px 4px;
    margin-left: 8px;
}

.rgd-wa-icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    display: block;
}

/* ==========================================================================
   Dropdown
   ========================================================================== */

.rgd-dropdown {
    position: absolute;
    top: calc( 100% + 12px );
    left: 50%;
    transform: translateX( -50% ) translateY( -8px );
    min-width: 300px;
    background: var( --clr-white );
    border-radius: 10px;
    box-shadow: var( --dropdown-shadow );
    border: 1px solid var( --clr-border );
    list-style: none;
    margin: 0;
    padding: 8px;
    opacity: 0;
    pointer-events: none;
    transition: opacity var( --transition ), transform var( --transition );
}

.rgd-has-dropdown.is-open .rgd-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateX( -50% ) translateY( 0 );
}

/* Dropdown arrow */
.rgd-dropdown::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX( -50% ) rotate( 45deg );
    width: 10px;
    height: 10px;
    background: var( --clr-white );
    border-left: 1px solid var( --clr-border );
    border-top: 1px solid var( --clr-border );
}

.rgd-dd-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 12px;
    border-radius: var( --radius );
    text-decoration: none !important;
    color: var( --clr-text );
    transition: background var( --transition );
}

.rgd-dd-link *,
.rgd-dd-link strong,
.rgd-dd-link small {
    text-decoration: none !important;
}

/* Override Divi link underlines */
#rgd-header .rgd-dropdown a,
#rgd-header .rgd-dropdown a:hover,
#rgd-header .rgd-dropdown a strong,
#rgd-header .rgd-dropdown a small {
    text-decoration: none !important;
    border-bottom: none !important;
    box-shadow: none !important;
}

.rgd-dd-link:hover,
.rgd-dd-link:focus-visible {
    background: none;
    outline: none;
}

.rgd-dd-link:hover .rgd-dd-icon,
.rgd-dd-link:focus-visible .rgd-dd-icon {
    color: #235c39;
    background: rgba( 35, 92, 57, 0.15 );
    box-shadow: 0 0 0 3px rgba( 35, 92, 57, 0.10 );
}

.rgd-dd-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: var( --radius );
    background: rgba( 42, 42, 42, 0.06 );
    color: var( --clr-text );
    transition: background var( --transition ), color var( --transition ), box-shadow var( --transition );
}

.rgd-dd-icon svg {
    width: 22px;
    height: 22px;
}

.rgd-dd-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rgd-dd-text strong {
    font-size: 0.9rem;
    font-weight: 600;
    color: var( --clr-text );
    line-height: 1.2;
}

.rgd-dd-text small {
    font-size: 0.775rem;
    color: #777;
    font-weight: 400;
    line-height: 1.3;
}

/* Active dropdown item */
.rgd-dd-active .rgd-dd-text strong {
    color: #235c39;
}

.rgd-dd-active .rgd-dd-icon {
    color: #235c39;
    background: rgba( 35, 92, 57, 0.15 );
}

/* ==========================================================================
   Hamburger Button
   ========================================================================== */

.rgd-hamburger {
    display: none;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    padding: 4px;
    border: none;
    background: none;
    cursor: pointer;
    border-radius: var( --radius );
    color: var( --clr-text ) !important;
    -webkit-text-fill-color: var( --clr-text );
}

.rgd-hamburger svg {
    width: 40px;
    height: 40px;
}

.rgd-hamburger svg path {
    fill: var( --clr-text ) !important;
}

/* ==========================================================================
   Mobile Fullscreen Navigation
   ========================================================================== */

.rgd-mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9995;
    background: rgba( 54, 54, 54, 0.85 );
    backdrop-filter: blur( 8px );
    -webkit-backdrop-filter: blur( 8px );
    display: flex;
    flex-direction: column;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 280ms ease;
    overflow-y: auto;
}

/* Close button */
.rgd-mobile-close {
    display: flex;
    align-items: center;
    justify-content: center;
    align-self: flex-end;
    width: 44px;
    height: 44px;
    border: 1.5px solid rgba( 255, 255, 255, 0.25 );
    background: none;
    border-radius: 50%;
    cursor: pointer;
    color: var( --clr-white );
    transition: border-color var( --transition ), background var( --transition );
    flex-shrink: 0;
    margin-bottom: 32px;
}

.rgd-mobile-close:hover,
.rgd-mobile-close:focus-visible {
    border-color: var( --clr-white );
    background: rgba( 255, 255, 255, 0.1 );
    outline: none;
}

.rgd-mobile-close svg {
    width: 20px;
    height: 20px;
}

/* Mobile nav list */
.rgd-mobile-nav-inner { flex: 1; }

.rgd-mobile-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.rgd-mobile-item {
    border-bottom: 1px solid rgba( 255, 255, 255, 0.1 );
}

.rgd-mobile-item:last-child { border-bottom: none; }

.rgd-mobile-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rgd-mobile-link {
    display: block;
    padding: 18px 0;
    font-size: 1.375rem;
    font-weight: 500;
    color: var( --clr-white );
    text-decoration: none;
    letter-spacing: 0.01em;
    flex: 1;
    transition: color var( --transition );
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    font-family: inherit;
}

.rgd-mobile-link:hover,
.rgd-mobile-link:focus-visible {
    color: rgba( 255, 255, 255, 0.6 );
    outline: none;
}

.rgd-mobile-whatsapp {
    color: #25d366 !important;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.9rem;
}

.rgd-wa-icon-mobile {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
}

/* +/- Toggle */
.rgd-sub-toggle {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    margin: 0;
    border: 1.5px solid rgba( 255, 255, 255, 0.3 );
    background: none;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color var( --transition ), background var( --transition );
}

.rgd-sub-toggle:hover,
.rgd-sub-toggle:focus-visible {
    border-color: var( --clr-white );
    background: rgba( 255, 255, 255, 0.1 );
    outline: none;
}

.rgd-toggle-sign {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-size: 1.25rem;
    line-height: 1;
    color: var( --clr-white );
    font-weight: 300;
    user-select: none;
}

/* Submenu */
.rgd-mobile-sub {
    list-style: none;
    margin: 0;
    padding: 0 0 12px 16px;
    display: none;
}

.rgd-mobile-sub.is-open { display: block; }

.rgd-mobile-sub li {
    border-bottom: 1px solid rgba( 255, 255, 255, 0.06 );
}

.rgd-mobile-sub li:last-child { border-bottom: none; }

.rgd-mobile-sub a {
    display: block;
    padding: 13px 0;
    font-size: 1rem;
    font-weight: 400;
    color: rgba( 255, 255, 255, 0.75 );
    text-decoration: none;
    transition: color var( --transition );
}

.rgd-mobile-sub a:hover,
.rgd-mobile-sub a:focus-visible {
    color: var( --clr-white );
    outline: none;
}

/* ==========================================================================
   Overlay
   ========================================================================== */

.rgd-overlay {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 9988;
    background: rgba( 0, 0, 0, 0.4 );
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Einziger Breakpoint der Navigation. Oberhalb greift keine dieser Regeln —
   dadurch ist das mobile Menue am Desktop automatisch wirkungslos, auch wenn
   es beim Aufziehen des Fensters noch als geoeffnet markiert war. */
@media ( max-width: 900px ) {
    .rgd-nav { display: none; }
    .rgd-hamburger {
        display: flex;
        width: 54px !important;
        height: 54px !important;
    }
    .rgd-hamburger svg {
        width: 40px !important;
        height: 40px !important;
    }

    .rgd-mobile-nav.is-open {
        opacity: 1;
        pointer-events: auto;
    }

    body.rgd-nav-open { overflow: hidden; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.rgd-footer {
    background: var( --clr-anthracite );
    color: rgba( 255, 255, 255, 0.65 );
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.rgd-footer::before {
    content: '';
    position: absolute;
    right: -80px;
    top: 50%;
    transform: translateY( -50% );
    width: 640px;
    height: 640px;
    background-image: url( 'assets/images/footer-bg.png' );
    background-repeat: no-repeat;
    background-size: contain;
    background-position: center right;
    opacity: 0.04;
    pointer-events: none;
}

.rgd-footer-inner {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 60px clamp( 40px, 5vw, 80px ) 48px;
}

.rgd-footer-logo svg {
    width: 160px;
    height: auto;
    display: block;
    margin-bottom: 24px;
}

/* CTA-Leiste über dem Footer-Menü */
.rgd-footer-cta-strip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    max-width: 1440px;
    margin: 0 auto;
    padding: 28px clamp( 40px, 5vw, 80px );
    border-bottom: 1px solid rgba( 255, 255, 255, 0.1 );
    flex-wrap: wrap;
}

.rgd-footer-cta-strip__text {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 500;
    color: rgba( 255, 255, 255, 0.65 );
}

.rgd-footer-cta-strip__btn {
    display: inline-block;
    padding: 11px 28px;
    background: transparent;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.0625rem;
    border-radius: var( --radius );
    border: 1px solid #ffffff;
    white-space: nowrap;
    transition: background 200ms ease, color 200ms ease;
    flex-shrink: 0;
}

.rgd-footer-cta-strip__btn:hover {
    background: transparent;
    color: rgba( 255, 255, 255, 0.65 );
    border-color: rgba( 255, 255, 255, 0.65 );
}

.rgd-footer-address {
    font-style: normal;
    line-height: 1.8;
    color: rgba( 255, 255, 255, 0.6 );
    margin-bottom: 8px;
}

.rgd-footer-phone {
    display: block;
    color: rgba( 255, 255, 255, 0.65 );
    text-decoration: none;
    font-size: 0.9375rem;
    margin-bottom: 4px;
    transition: color 200ms ease;
}

.rgd-footer-phone:hover {
    color: #ffffff;
}

.rgd-footer-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 11px 24px;
    background: #ffffff;
    color: #235c39;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.0625rem;
    border-radius: var( --radius );
    border: 2px solid #ffffff;
    transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}

.rgd-footer-cta-btn:hover {
    background: transparent;
    border-color: #ffffff;
    color: #ffffff;
}

.rgd-footer-social {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rgd-social-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: rgba( 255, 255, 255, 0.65 );
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 200ms ease;
}

.rgd-social-link:hover {
    color: var( --clr-white );
}

/* Die Icon-Dateien bringen keine width/height mit - Groesse kommt aus dem CSS.
   flex-shrink verhindert, dass sie bei schmaler Spalte gequetscht werden. */
/* Einsatzgebiet, Spalte 4 */
.rgd-footer-area {
    line-height: 1.8;
    color: rgba( 255, 255, 255, 0.6 );
    margin: 0 0 10px;
}

.rgd-footer-area-note {
    font-size: 0.8125rem;
    color: rgba( 255, 255, 255, 0.45 );
    margin: 0;
}

/* Social-Icons in der Fussleiste - nur sichtbar, wenn rgd_social() gefuellt ist */
.rgd-footer-social-bottom {
    display: flex;
    align-items: center;
    gap: 14px;
}

.rgd-social-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.rgd-footer-heading {
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #ffffff !important;
    margin: 0 0 20px;
    padding-bottom: 10px;
    position: relative;
}

.rgd-footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 28px;
    height: 2px;
    background: #235c39;
    border-radius: 2px;
}

.rgd-footer-nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rgd-footer-nav a {
    color: rgba( 255, 255, 255, 0.65 );
    text-decoration: none;
    transition: color 200ms ease;
}

.rgd-footer-nav a:hover {
    color: var( --clr-white );
}

.rgd-footer-bottom {
    border-top: 1px solid rgba( 255, 255, 255, 0.1 );
}

.rgd-footer-bottom-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 1440px;
    margin: 0 auto;
    padding: 16px 20px;
    font-size: 0.8rem;
    color: rgba( 255, 255, 255, 0.35 );
    gap: 16px;
    flex-wrap: wrap;
}

.rgd-footer-bottom-inner nav {
    display: flex;
    gap: 20px;
}

.rgd-footer-bottom-inner nav a {
    color: rgba( 255, 255, 255, 0.7 );
    text-decoration: none;
    transition: color 200ms ease;
}

.rgd-footer-bottom-inner nav a:hover {
    color: var( --clr-white );
}

@media ( max-width: 1100px ) {
    .rgd-footer-inner {
        grid-template-columns: 1fr 1fr;
        gap: 36px;
    }
}

@media ( max-width: 768px ) {
    .rgd-bg-text {
        filter: blur( 4px ) !important;
    }
    .rgd-bg-text .et_pb_text_inner,
    .rgd-bg-text .et_pb_text_inner p,
    .rgd-bg-text .et_pb_text_inner h1,
    .rgd-bg-text .et_pb_text_inner h2,
    .rgd-bg-text .et_pb_text_inner h3 {
        color: rgba( 0, 0, 0, 0.13 ) !important;
        font-size: 11vw !important;
    }
}

@media ( max-width: 600px ) {
    .rgd-footer-cta-strip {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }

    .rgd-footer-inner {
        grid-template-columns: 1fr;
        gap: 32px;
        padding: 40px 20px 32px;
        text-align: center;
        font-size: 1.0625rem;
    }

    .rgd-footer-heading::after {
        left: 50%;
        transform: translateX( -50% );
    }

    .rgd-footer-logo {
        justify-content: center;
    }

    .rgd-footer-logo svg {
        margin-left: auto;
        margin-right: auto;
    }

    .rgd-footer-cta-btn {
        justify-content: center;
    }

    .rgd-footer-nav {
        align-items: center;
    }

    .rgd-footer-social {
        align-items: center;
    }

    .rgd-footer-heading,
    .rgd-footer-nav a,
    .rgd-footer-cta-btn,
    .rgd-social-link,
    .rgd-footer-address,
    .rgd-footer-phone {
        font-size: 1.0625rem !important;
    }

    .rgd-footer-bottom-inner {
        flex-direction: column;
        align-items: center;
        gap: 8px;
        text-align: center;
        font-size: 1.0625rem;
    }

    .rgd-footer-bottom-inner nav {
        justify-content: center;
    }
}

/* ==========================================================================
   404 Fehlerseite
   ========================================================================== */

.rgd-404 {
    display: block;
}

.rgd-404-hero {
    width: 100%;
    height: 55vh;
    min-height: 320px;
    overflow: hidden;
}

.rgd-404-hero img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 40%;
    display: block;
}

.rgd-404-inner {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
    padding: 60px 20px;
}

.rgd-404-title {
    font-size: 2rem;
    font-weight: 700;
    color: var( --clr-text );
    margin-bottom: 16px;
}

.rgd-404-text {
    color: #666;
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 32px;
}

.rgd-404-btn {
    display: inline-flex;
    align-items: center;
    padding: 11px 24px;
    background: var( --clr-green );
    color: var( --clr-white );
    text-decoration: none;
    font-weight: 700;
    font-size: 1.0625rem;
    border-radius: var( --radius );
    border: 2px solid var( --clr-green );
    transition: background 200ms ease, border-color 200ms ease;
    margin-bottom: 48px;
}

.rgd-404-btn:hover {
    background: var( --clr-green-dark );
    border-color: var( --clr-green-dark );
    color: var( --clr-white );
}

.rgd-404-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.rgd-404-links a {
    padding: 6px 14px;
    border: 1px solid var( --clr-border );
    border-radius: 20px;
    font-size: 0.875rem;
    color: var( --clr-text );
    text-decoration: none;
    transition: border-color 200ms ease, color 200ms ease;
}

.rgd-404-links a:hover {
    border-color: var( --clr-green );
    color: var( --clr-green );
}
