/*
 * Custom Styles & Accessibility Overrides
 * Extracted from header.php to avoid inline CSS (Audit Point 28)
 */

/* =========================================
   Global Mobile Overflow Fix
   ========================================= */

/* Prevent horizontal scrolling on all devices */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

/* =========================================
   Service Page — Responsive 2-Column Grid
   ========================================= */
/* FAQ & Contact sections on service pages: stack on mobile, 2-col on md+ */
.hds-service-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

@media (min-width: 768px) {
    .hds-service-grid {
        display: grid;
        grid-template-columns: 2fr 3fr;
        gap: 3rem;
    }
}

/* Contain decorative overflow on service intro section */
@media (max-width: 767px) {
    #ueberblick .relative {
        overflow: hidden;
    }
}

/* Long German words (Wettbewerbsfähigkeit etc.) break properly */
h1,
h2,
h3,
h4,
h5,
h6,
p {
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
}

/* Typography Fixes for Standard Pages */
.prose p {
    margin-bottom: 1.5em;
    line-height: 1.75;
}

.prose h1 {
    font-size: 2.25em;
    font-weight: 800;
    margin-bottom: 0.8em;
    line-height: 1.1;
}

.prose h2 {
    font-size: 1.5em;
    font-weight: 700;
    margin-top: 2em;
    margin-bottom: 1em;
    line-height: 1.3;
}

.prose h3 {
    font-size: 1.25em;
    font-weight: 600;
    margin-top: 1.6em;
    margin-bottom: 0.6em;
    line-height: 1.6;
}

.prose ul {
    list-style-type: disc;
    padding-left: 1.625em;
    margin-bottom: 1.25em;
}

.prose ol {
    list-style-type: decimal;
    padding-left: 1.625em;
    margin-bottom: 1.25em;
}

.prose li {
    margin-bottom: 0.5em;
}

.prose strong {
    font-weight: 600;
    color: #111827;
}

.prose a {
    color: #084c39;
    text-decoration: underline;
    font-weight: 500;
}

/* =========================================
   Accessibility Improvements
   ========================================= */

/* Point 20: Prefers Reduced Motion */
@media (prefers-reduced-motion: reduce) {

    *,
    ::before,
    ::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Point 23: Skip Link Utility (if not provided by Tailwind) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.not-sr-only:focus {
    position: static;
    width: auto;
    height: auto;
    padding: 1rem;
    margin: 0;
    overflow: visible;
    clip: auto;
    white-space: normal;
    background-color: white;
    color: #084c39;
    z-index: 100;
    border: 2px solid #084c39;
}

.skip-link {
    position: absolute;
    top: 0;
    left: -9999px;
    z-index: 10000;
    background-color: #ffffff;
    color: #084c39;
    font-weight: 700;
    padding: 0.75rem 1rem;
    border: 2px solid #084c39;
    border-radius: 0.5rem;
}

.skip-link:focus {
    left: 1rem;
    top: 1rem;
    outline: 2px solid #084c39;
    outline-offset: 2px;
}

/* Point 29: FAQ Arrow Rotation (Extracted from front-page.php) */
details[open] summary svg.faq-arrow {
    transform: rotate(90deg) !important;
}

/* Front page contact card corner handling */
.contact-card-left {
    border-radius: 1.5rem 1.5rem 0 0;
}

.contact-card-right {
    border-radius: 0 0 1.5rem 1.5rem;
}

@media (min-width: 768px) {
    .contact-card-left {
        border-radius: 1.5rem 0 0 1.5rem;
    }

    .contact-card-right {
        border-radius: 0 1.5rem 1.5rem 0;
    }
}

/* =========================================
   Point 15: Visual Form Validation
   ========================================= */
.hds-input:not(:placeholder-shown):valid {
    border-color: #084c39;
    /* HDS Green */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23084c39' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 1rem;
}

.hds-input:not(:placeholder-shown):invalid {
    border-color: #ef4444;
    /* Tailwind Red-500 */
}

.hds-input:focus:invalid {
    border-color: #ef4444;
    --tw-ring-color: #fca5a5;
    /* Tailwind Red-300 */
}

/* =========================================
   Breadcrumbs Styling
   ========================================= */
.hds-breadcrumbs a {
    color: #4b5563;
    /* Tailwind gray-600 (readable on gray-50) */
    text-decoration: none;
    transition: color 0.2s ease-in-out;
}

.hds-breadcrumbs a:hover {
    color: #084c39;
    /* HDS Green */
}

.hds-breadcrumbs .separator {
    margin: 0 0.5rem;
    color: #9ca3af;
    /* Tailwind gray-400 */
}

.hds-breadcrumbs .last {
    color: #1f2937;
    /* Tailwind gray-800 */
    font-weight: 600;
}

/* =========================================
   Sticky Header Offsets
   ========================================= */
:root {
    --hds-header-height-rest: 73px;
    --hds-header-height-compact: 73px;
    --hds-header-height-current: 73px;
}

@media (min-width: 1024px) {
    :root {
        --hds-header-height-rest: 96px;
        --hds-header-height-compact: 96px;
        --hds-header-height-current: 96px;
    }
}

#main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    transition: transform 0.3s ease, background-color 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 1024px) {
    #main-header img.object-contain {
        height: 80px;
    }
}

/* Spacer compensates for fixed header's absence from normal flow */
#header-spacer {
    height: var(--hds-header-height-compact, 73px);
}

body.admin-bar #main-header {
    top: 32px;
}

@media (max-width: 782px) {
    body.admin-bar #main-header {
        top: 46px;
    }
}

#main-header.hds-header-hidden {
    transform: translateY(calc(-100% - 2px));
}

#main-content {
    scroll-margin-top: var(--hds-header-height-current);
}

#main-content [id] {
    scroll-margin-top: calc(var(--hds-header-height-current) + 0.75rem);
}

.hds-hero-overlap-97 {
    padding-top: calc(var(--hds-header-height-rest, 97px) - var(--hds-header-height-compact, 73px));
}

.hds-hero-overlap-105 {
    padding-top: calc(var(--hds-header-height-rest, 97px) - var(--hds-header-height-compact, 73px) + 8px);
}

.hds-hero-overlap-104-plus-3rem {
    padding-top: calc(3rem + var(--hds-header-height-rest, 97px) - var(--hds-header-height-compact, 73px));
}

.hds-hero-karriere {
    min-height: max(420px, calc(560px - var(--hds-header-height-rest)));
    grid-template-rows: max(0px, calc(136px - var(--hds-header-height-rest))) 1fr;
}

/* Frontpage hero kept visual alignment under non-overlapping sticky header */
.hds-hero-grid {
    padding-top: max(0px, calc(3rem - var(--hds-header-height-rest)));
}

@media (min-width: 1024px) {
    .hds-hero-grid {
        padding-top: 50px;
        padding-bottom: 50px;
    }
}

/* =========================================
   Mobile Carousel & Layout Fixes (Custom CSS)
   ========================================= */

/* Hero Section Order & Heights */
.hds-hero-img-container {
    height: 400px;
}

@media (min-width: 1024px) {
    .hds-hero-img-container {
        height: 600px;
    }
}

/* Mobile Hero: Image full-bleed oben, Text darunter */
@media (max-width: 1023px) {

    /* Grid → Flex-Column ohne horizontales Padding, damit Bild randlos */
    .hds-hero-grid {
        display: flex !important;
        flex-direction: column;
        padding-top: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-bottom: 0 !important;
        gap: 0 !important;
    }

    /* Bild kommt an Position 1, füllt volle Breite ohne Rundungen */
    .hds-mobile-order-1 {
        order: -1;
        width: 100% !important;
        height: 260px !important;
        margin: 0 !important;
        flex-shrink: 0;
    }

    .hds-mobile-order-1>div {
        border-radius: 0 !important;
        box-shadow: none !important;
    }

    /* Text-Bereich bekommt sein eigenes Padding */
    .hds-mobile-order-2 {
        order: 2;
        padding: 1.75rem 1rem 2rem 1rem;
    }
}

/* Scrollbar Hiding Utility */
.hide-scrollbar {
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

/* =========================================
   Header/Menu Styles (moved from header.php + wp_head)
   ========================================= */
#primary-menu .menu-item>a,
.menu-item>a {
    position: relative;
    display: inline-block;
    text-decoration: none;
}

#primary-menu .menu-item>a::after,
.menu-item>a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #eab308;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    pointer-events: none;
}

.sub-menu .menu-item>a::after {
    bottom: 0;
}

#primary-menu .menu-item>a:focus::after,
.menu-item>a:focus::after {
    transform: scaleX(0) !important;
}

.mobile-primary-menu .menu-item>a {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f3f4f6;
    font-size: 1.125rem;
    font-weight: 500;
    color: #1f2937;
}

.mobile-primary-menu .menu-item>a::after {
    display: none;
}

.mobile-primary-menu .menu-item:last-child>a {
    border-bottom: 0;
}

.mobile-primary-menu .sub-menu {
    margin-left: 0.75rem;
    margin-top: 0.25rem;
}

.mobile-primary-menu .menu-item-has-children {
    position: relative;
}

.mobile-primary-menu .menu-item-has-children>a {
    padding-right: 2rem;
}

.mobile-primary-menu .hds-mobile-submenu-toggle {
    position: absolute;
    top: 0.45rem;
    right: 0;
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    background: transparent;
    color: #6b7280;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.mobile-primary-menu .hds-mobile-submenu-toggle svg {
    transition: transform 0.2s ease;
}

.mobile-primary-menu .menu-item-has-children.is-open>.hds-mobile-submenu-toggle svg {
    transform: rotate(180deg);
}

.mobile-primary-menu .hds-mobile-submenu>li>a {
    display: block;
    padding: 0.4rem 0;
    font-size: 1rem;
    color: #4b5563;
    border-bottom: 0;
}

/* Hide the inline chevron SVG that wp_nav_menu adds inside parent <a> tags (the "first arrow") — scoped to #mobile-menu only */
#mobile-menu .menu-item-has-children>a>svg {
    display: none;
}

/* Fallback <details>/<summary> mobile menu: hide native marker cross-browser */
#mobile-menu details>summary::marker,
#mobile-menu details>summary::-webkit-details-marker {
    display: none;
}

/* Rotate the trailing SVG arrow when <details> is open */
#mobile-menu details[open]>summary svg {
    transform: rotate(180deg);
}

@media (hover: hover) {

    #primary-menu .menu-item>a:hover::after,
    .menu-item>a:hover::after {
        transform: scaleX(1);
    }
}

/* Desktop Dropdown — komplett JS-gesteuert (kein CSS :hover, verhindert sticky-hover) */
/* Geöffnet via .is-open Klasse (JS: pointerenter/pointerleave + click) */

/* Desktop nav: WordPress wp_nav_menu() dropdown */
#hds-desktop-nav .menu-item-has-children {
    position: relative;
}

#hds-desktop-nav .menu-item-has-children>.sub-menu {
    display: none;
    position: absolute;
    top: calc(100% + 0.75rem);
    left: 0;
    min-width: 200px;
    background: #fff;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    border-radius: 0.5rem;
    border: 1px solid #f3f4f6;
    padding: 0.5rem 0;
    z-index: 50;
}

/* JS adds .is-open to .hds-dropdown-menu to show the dropdown */
#hds-desktop-nav .hds-dropdown-menu.is-open {
    display: flex !important;
    flex-direction: column;
    animation: hdsFadeIn 0.15s ease-out;
}

#hds-desktop-nav .menu-item-has-children>.sub-menu a {
    display: block;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    white-space: nowrap;
    transition: color 0.15s, background-color 0.15s;
}

#hds-desktop-nav .menu-item-has-children>.sub-menu a:hover {
    color: #0d5c3a;
    background-color: #f9fafb;
}

@keyframes hdsFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover bridge: extends the parent's hoverable area across the gap to the dropdown */
.hds-leistungen-dropdown::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 1.5rem;
    /* matches pt-6 gap */
}

/* Hover bridge for wp_nav_menu dropdown: closes the visual gap above the sub-menu */
#hds-desktop-nav .menu-item-has-children>.sub-menu::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -0.75rem;
    /* extends 0.75rem above to cover calc(100% + 0.75rem) gap */
    height: 0.75rem;
}

.hds-submenu-underline {
    background-color: #ffd100 !important;
    height: 2px !important;
    width: 100% !important;
    position: absolute !important;
    left: 0 !important;
    bottom: -4px !important;
    transform: scaleX(0);
    transition: transform 0.2s ease-in-out;
    transform-origin: left;
}

.hds-submenu-link:hover .hds-submenu-underline {
    transform: scaleX(1) !important;
}

/* =========================================
   Card Shadow Fix (Leistungen & Bewertungen)
   1. Override Tailwind shadow-lg (negative spread)
      with positive spread so shadow extends beyond
      card edges on left/right.
   2. Set overflow:visible on parent sections so
      shadows aren't clipped. Safe because body
      already has overflow-x:hidden.
   ========================================= */
#leistungen,
#referenzen {
    overflow: visible !important;
}

#services-carousel>.hds-mobile-carousel-item,
#testimonials-carousel>.hds-mobile-carousel-item {
    --tw-shadow: 0 10px 20px 2px rgba(0, 0, 0, 0.07),
        0 4px 8px 0px rgba(0, 0, 0, 0.05) !important;
    box-shadow: 0 10px 20px 2px rgba(0, 0, 0, 0.07),
        0 4px 8px 0px rgba(0, 0, 0, 0.05) !important;
}

@media (hover: hover) {

    #services-carousel>.hds-mobile-carousel-item:hover,
    #testimonials-carousel>.hds-mobile-carousel-item:hover {
        --tw-shadow: 0 20px 30px 4px rgba(0, 0, 0, 0.1),
            0 8px 12px 0px rgba(0, 0, 0, 0.06) !important;
        box-shadow: 0 20px 30px 4px rgba(0, 0, 0, 0.1),
            0 8px 12px 0px rgba(0, 0, 0, 0.06) !important;
    }
}

/* Mobile Carousels (Services & Testimonials) */
@media (max-width: 767px) {

    /* Under md breakpoint */
    .hds-mobile-carousel {
        display: flex !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        /* Hide Y to prevent double scrollbars, but pad instead */
        scroll-snap-type: x mandatory;
        gap: 16px !important;
        /* Oben/Seiten: Platz für den Schatten + negative Margin zum Kompensieren.
           Unten: 40px Padding (Shadow reicht ~32px) aber kein negatives Margin,
           damit der Shadow nicht von der übergeordneten overflow:hidden Section
           abgeschnitten wird. Gilt für die längste Karte (die bestimmt die Höhe). */
        padding: 50px 16px 40px !important;
        margin: -50px -16px 0 !important;
        scroll-padding-left: 16px !important;
        align-items: flex-start;
    }

    .hds-mobile-carousel-item {
        flex: 0 0 100% !important;
        width: 100% !important;
        min-width: 100% !important;
        height: auto !important;
        /* WICHTIG: Wieder auf "start" setzen für exaktes One-by-One Scrolling am linken Rand */
        scroll-snap-align: start;
        display: block;
        transform: none !important;
    }
}

/* Responsive Testimonials Carousel (alle Breakpoints) */
.hds-responsive-carousel {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: hidden !important;
    overflow-y: clip !important;
    gap: 32px !important;
    padding: 50px 0 40px !important;
    margin: -50px 0 0 !important;
    align-items: flex-start;
    cursor: grab;
    user-select: none;
    /* Sanfter Fade-Ausklang rechts – nächste Karte durchscheinen lassen */
    -webkit-mask-image: linear-gradient(to right, black calc(100% - 110px), transparent 100%);
    mask-image: linear-gradient(to right, black calc(100% - 110px), transparent 100%);
}

/* Am Ende angelangt: kein Fade nötig */
.hds-responsive-carousel.is-at-end {
    -webkit-mask-image: none;
    mask-image: none;
}

.hds-responsive-carousel.is-dragging {
    cursor: grabbing;
}

.hds-responsive-carousel .hds-mobile-carousel-item {
    flex: 0 0 auto !important;
    height: auto !important;
    scroll-snap-align: start;
    display: flex !important;
    flex-direction: column;
    transform: none !important;
    pointer-events: auto;
}

.hds-responsive-carousel.is-dragging .hds-mobile-carousel-item {
    pointer-events: none;
}

/* Carousel Dot Indicators — safe CSS class (nicht purgeable wie Tailwind) */
.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #d1d5db;
    /* gray-300 */
    transition: background-color 0.3s, width 0.3s;
    cursor: pointer;
    flex-shrink: 0;
}

.carousel-dot.is-active {
    background-color: #084c39;
    /* hds-green */
    width: 24px;
    border-radius: 4px;
}

/* =========================================
   Blog Post Template Styles
   ========================================= */

/* --- Hero --- */
.blog-hero {
    position: relative;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

@media (min-width: 768px) {
    .blog-hero {
        min-height: 380px;
    }
}

.blog-hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(8, 76, 57, 0.15) 0%, rgba(8, 76, 57, 0.82) 100%);
    z-index: 1;
}

.blog-hero__content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem 1.25rem;
    text-align: center;
    color: #fff;
    width: 100%;
}

@media (min-width: 768px) {
    .blog-hero__content {
        padding: 2.5rem 2rem;
    }
}

.blog-hero__badge {
    display: inline-block;
    background: #ffd100;
    color: #111;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}

.blog-hero__meta-top {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.blog-hero__category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #ffd100;
    text-decoration: none;
    transition: color 0.2s;
}

.blog-hero__category:hover {
    color: #fff;
}

.blog-hero__title {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 1.25rem;
}

@media (min-width: 768px) {
    .blog-hero__title {
        font-size: 2.5rem;
    }
}

@media (min-width: 1024px) {
    .blog-hero__title {
        font-size: 3rem;
    }
}

.blog-hero__meta {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.85rem;
    opacity: 0.9;
}

.blog-hero__meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.blog-hero__meta svg {
    flex-shrink: 0;
}

/* --- Article Body --- */
.blog-article {
    background: #fff;
    position: relative;
    z-index: 2;
    margin-top: -2rem;
    border-radius: 1.5rem 1.5rem 0 0;
}

.blog-article__container {
    max-width: 960px;
    margin: 0 auto;
    padding: 2.5rem 1.25rem 3rem;
}

@media (min-width: 768px) {
    .blog-article__container {
        padding: 3.5rem 2rem 4rem;
    }
}

/* --- Intro --- */
.blog-intro {
    background: linear-gradient(135deg, #ebf3f0 0%, #e6f0ec 100%);
    border-left: 4px solid #084c39;
    border-radius: 0 0.75rem 0.75rem 0;
    padding: 1.5rem;
    margin-bottom: 2.5rem;
    font-size: 1.1rem;
    line-height: 1.75;
    color: #374151;
}

.blog-intro--with-image {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .blog-intro--with-image {
        grid-template-columns: 1fr 200px;
        align-items: start;
    }
}

.blog-intro__image img {
    border-radius: 0.5rem;
    width: 100%;
    height: auto;
}

/* --- Table of Contents --- */
.blog-toc {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2.5rem;
}

.blog-toc__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    color: #111827;
    margin-bottom: 0.75rem;
}

.blog-toc__header svg {
    color: #084c39;
}

.blog-toc__list {
    list-style: none;
    counter-reset: toc;
    padding: 0;
    margin: 0;
}

.blog-toc__list li {
    counter-increment: toc;
    margin-bottom: 0.4rem;
}

.blog-toc__list li a {
    color: #4b5563;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    transition: color 0.2s;
}

.blog-toc__list li a::before {
    content: counter(toc) ".";
    color: #084c39;
    font-weight: 600;
    min-width: 1.25rem;
}

.blog-toc__list li a:hover {
    color: #084c39;
}

/* --- Shared Section Styles --- */
.blog-section {
    margin-bottom: 2.5rem;
    color: #374151;
}

.blog-section__heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.3;
    margin: 0 0 1rem;
}

@media (min-width: 768px) {
    .blog-section__heading {
        font-size: 1.75rem;
    }
}

/* Typography defaults für Blog-Content (ohne !important, damit der WYSIWYG-Editor Editor-Styles anwenden kann) */
.blog-section__content,
.blog-section__content p,
.blog-section__content span,
.blog-section__content div,
.blog-section__content h3,
.blog-section__content h4 {
    color: #374151;
}

.blog-section__content p {
    margin-bottom: 1.25rem;
    line-height: 1.8;
    font-size: 1.05rem;
}

.blog-section__content a,
.blog-section__content a * {
    color: #084c39;
    text-decoration: underline;
    font-weight: 600;
}

.blog-section__content strong,
.blog-section__content b {
    font-weight: 700;
    color: #111827;
}

.blog-section__content ul,
.blog-section__content ol {
    padding-left: 1.5em;
    margin-bottom: 1.25rem;
    color: #374151;
}

.blog-section__content li {
    margin-bottom: 0.4rem;
    line-height: 1.7;
}

.blog-section__caption {
    text-align: center;
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

/* --- Section: Image + Text --- */
.blog-section--image-text .blog-section__grid {
    display: grid;
    gap: 1.5rem;
}

@media (min-width: 640px) {
    .blog-section--image-text .blog-section__grid {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }

    .blog-section--img-right .blog-section__image-wrap {
        order: 2;
    }

    .blog-section--img-right .blog-section__content {
        order: 1;
    }
}

/* Image above/below: single-column layout */
.blog-section--img-above .blog-section__grid,
.blog-section--img-below .blog-section__grid {
    grid-template-columns: 1fr !important;
}

.blog-section--img-below .blog-section__image-wrap {
    order: 2;
}

.blog-section--img-below .blog-section__content {
    order: 1;
}

.blog-section--img-above .blog-section__image,
.blog-section--img-below .blog-section__image {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.blog-section__image {
    border-radius: 0.75rem;
    width: 100%;
    height: auto;
}

/* --- Section: Full Image --- */
.blog-section--fullimage {
    margin-left: -1.25rem;
    margin-right: -1.25rem;
}

@media (min-width: 768px) {
    .blog-section--fullimage {
        margin-left: -2rem;
        margin-right: -2rem;
    }
}

.blog-section__fullimage {
    width: 100%;
    height: auto;
    border-radius: 0;
}

@media (min-width: 768px) {
    .blog-section__fullimage {
        border-radius: 0.75rem;
    }

    .blog-section--fullimage {
        margin-left: 0;
        margin-right: 0;
    }
}

/* --- Section: Quote --- */
.blog-section--quote {
    background: linear-gradient(135deg, #ebf3f0 0%, #e6f0ec 100%);
    border-left: 4px solid #084c39;
    border-radius: 0 0.75rem 0.75rem 0;
    padding: 2rem 1.5rem;
    position: relative;
}

.blog-quote__icon {
    color: #084c39;
    margin-bottom: 0.5rem;
}

.blog-quote__text {
    font-size: 1.15rem;
    font-style: italic;
    line-height: 1.75;
    color: #374151;
    margin: 0 0 0.75rem;
}

.blog-quote__author {
    display: block;
    font-size: 0.9rem;
    font-style: normal;
    font-weight: 600;
    color: #084c39;
}

/* --- Section: List --- */
.blog-list {
    padding: 0;
    margin: 0;
}

.blog-list--bullets {
    list-style: disc;
    padding-left: 1.5rem;
}

.blog-list--numbers {
    list-style: decimal;
    padding-left: 1.5rem;
}

.blog-list--checks {
    list-style: none;
}

.blog-list li {
    margin-bottom: 0.6rem;
    font-size: 1.05rem;
    line-height: 1.6;
    color: #374151;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.blog-list--bullets li,
.blog-list--numbers li {
    display: list-item;
}

.blog-list__check {
    flex-shrink: 0;
    color: #084c39;
    margin-top: 0.15rem;
}

/* --- Section: Callout --- */
.blog-section--callout {
    border-radius: 0.75rem;
    padding: 1.25rem 1.5rem;
    border-left: 4px solid;
}

.blog-callout__header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    font-weight: 700;
    font-size: 0.95rem;
}

.blog-callout__body p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.7;
}

.blog-callout--info {
    background: #eff6ff;
    border-left-color: #3b82f6;
}

.blog-callout--info .blog-callout__header {
    color: #1d4ed8;
}

.blog-callout--info .blog-callout__icon {
    color: #3b82f6;
}

.blog-callout--tipp {
    background: #f0fdf4;
    border-left-color: #22c55e;
}

.blog-callout--tipp .blog-callout__header {
    color: #15803d;
}

.blog-callout--tipp .blog-callout__icon {
    color: #22c55e;
}

.blog-callout--warnung {
    background: #fefce8;
    border-left-color: #eab308;
}

.blog-callout--warnung .blog-callout__header {
    color: #a16207;
}

.blog-callout--warnung .blog-callout__icon {
    color: #eab308;
}

.blog-callout--wichtig {
    background: #fef2f2;
    border-left-color: #ef4444;
}

.blog-callout--wichtig .blog-callout__header {
    color: #b91c1c;
}

.blog-callout--wichtig .blog-callout__icon {
    color: #ef4444;
}

/* --- Section: Stats --- */
.blog-stats__grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
    .blog-stats--count-3 {
        grid-template-columns: repeat(3, 1fr);
    }

    .blog-stats--count-4 {
        grid-template-columns: repeat(4, 1fr);
    }
}

.blog-stats__item {
    text-align: center;
    padding: 1.25rem 1rem;
    background: #f9fafb;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
}

.blog-stats__value {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #084c39;
    line-height: 1.1;
    margin-bottom: 0.25rem;
}

.blog-stats__label {
    display: block;
    font-size: 0.85rem;
    color: #6b7280;
}

/* --- Section: Video --- */
.blog-video__wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
    border-radius: 0.75rem;
    background: #111;
}

.blog-video__wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.blog-video__caption {
    text-align: center;
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

/* --- Section: CTA --- */
.blog-section--cta {
    background: linear-gradient(135deg, #084c39 0%, #0d5c3a 100%);
    border-radius: 1rem;
    padding: 2.5rem 1.5rem;
    text-align: center;
    color: #fff;
}

.blog-cta__inner {
    max-width: 540px;
    margin: 0 auto;
}

.blog-cta__heading {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 0.75rem;
    color: #fff;
}

.blog-cta__text {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.blog-cta__button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #faac22;
    color: #111;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.75rem 1.75rem;
    border-radius: 999px;
    text-decoration: none;
    transition: transform 0.2s, box-shadow 0.2s;
}

.blog-cta__button:hover {
    background: #e89b1a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(250, 172, 34, 0.35);
}

/* --- Section: Gallery --- */
.blog-gallery__grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 640px) {
    .blog-gallery--cols-3 {
        grid-template-columns: repeat(3, 1fr);
    }
}

.blog-gallery__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
}

@media (min-width: 768px) {
    .blog-gallery__image {
        height: 240px;
    }
}

.blog-gallery__caption {
    text-align: center;
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

/* --- Section: Divider --- */
.blog-section--divider {
    margin: 2.5rem 0;
    text-align: center;
}

.blog-divider__line {
    border: 0;
    height: 1px;
    background: #e5e7eb;
}

.blog-divider--decorative {
    position: relative;
}

.blog-divider--decorative .blog-divider__line {
    background: linear-gradient(90deg, transparent, #e5e7eb 20%, #e5e7eb 80%, transparent);
}

.blog-divider__icon {
    display: inline-block;
    color: #084c39;
    margin-bottom: -0.75rem;
    position: relative;
    z-index: 1;
    background: #fff;
    padding: 0 0.5rem;
}

/* --- Tags --- */
.blog-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f3f4f6;
}

.blog-tags__tag {
    padding: 0.25rem 0.75rem;
    background: #f3f4f6;
    color: #6b7280;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 999px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.blog-tags__tag:hover {
    background: #084c39;
    color: #fff;
}

/* --- Share Buttons --- */
.blog-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.blog-share__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
}

.blog-share__buttons {
    display: flex;
    gap: 0.5rem;
}

.blog-share__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f3f4f6;
    color: #6b7280;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, transform 0.2s;
}

.blog-share__btn:hover {
    transform: translateY(-2px);
}

.blog-share__btn--linkedin:hover {
    background: #0077b5;
    color: #fff;
}

.blog-share__btn--facebook:hover {
    background: #1877f2;
    color: #fff;
}

.blog-share__btn--twitter:hover {
    background: #000;
    color: #fff;
}

.blog-share__btn--email:hover {
    background: #084c39;
    color: #fff;
}

/* --- Author Box --- */
.blog-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 1rem;
    padding: 1.5rem;
    max-width: 760px;
    margin: 0 auto 3rem;
}

.blog-author__avatar {
    border-radius: 50%;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.blog-author__label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #9ca3af;
    font-weight: 600;
}

.blog-author__name {
    display: block;
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    text-decoration: none;
}

.blog-author__name:hover {
    color: #084c39;
}

.blog-author__bio {
    font-size: 0.85rem;
    color: #6b7280;
    margin: 0.25rem 0 0;
    line-height: 1.5;
}

/* --- Related Posts --- */
.blog-related {
    padding: 3rem 0;
    background: #fdfdfd;
    border-top: 1px solid #f3f4f6;
}

.blog-related__heading {
    font-size: 1.75rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 2rem;
    text-align: center;
}

.blog-related__grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .blog-related__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .blog-related__grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
}

.blog-related__card {
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 1rem;
    overflow: hidden;
    text-decoration: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.blog-related__card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.blog-related__image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f3f4f6;
}

.blog-related__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-related__card:hover .blog-related__image img {
    transform: scale(1.05);
}

.blog-related__content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-related__category {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #084c39;
    margin-bottom: 0.75rem;
}

.blog-related__title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111827;
    line-height: 1.4;
    margin: 0 0 1rem;
    transition: color 0.2s ease;
}

.blog-related__card:hover .blog-related__title {
    color: #084c39;
}

.blog-related__excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #4b5563;
    margin-bottom: 1.5rem;
    flex-grow: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-related__footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.blog-related__date {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.blog-related__readmore {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #084c39;
    transition: gap 0.2s ease;
}

.blog-related__card:hover .blog-related__readmore {
    gap: 0.6rem;
}

.blog-related__actions {
    text-align: center;
    margin-top: 3rem;
}

/* --- Layout Container --- */
.hds-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

@media (min-width: 768px) {
    .hds-container {
        padding: 0 2rem;
    }
}

/* --- Global Button Utility: hds-btn --- */
.hds-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 0.875rem 2rem;
    border-radius: 999px;
    text-decoration: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    cursor: pointer;
    border: none;
    line-height: 1;
}

.hds-btn--primary {
    background: #faac22;
    color: #111111;
}

.hds-btn--primary:hover {
    background: #e89b1a;
    color: #111111;
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(250, 172, 34, 0.35);
}

/* --- Back Link --- */
.blog-back-link {
    text-align: center;
    padding: 2rem 1rem 3rem;
}

.blog-back-link a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #084c39;
    font-weight: 700;
    text-decoration: none;
    font-size: 0.95rem;
    transition: gap 0.2s;
}

.blog-back-link a:hover {
    gap: 0.75rem;
}

/* --- Fallback article-content (Gutenberg posts) --- */
.article-content h2 {
    font-size: 1.875rem;
    font-weight: 800;
    color: #111827;
    margin-top: 3rem;
    margin-bottom: 1.5rem;
    line-height: 1.3;
}

.article-content h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1f2937;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
}

.article-content p {
    margin-bottom: 1.5rem;
    line-height: 1.8;
    color: #374151;
    font-size: 1.125rem;
}

.article-content ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: #374151;
}

.article-content ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
    color: #374151;
}

.article-content li {
    margin-bottom: 0.5rem;
}

.article-content strong {
    color: #111827;
    font-weight: 700;
}

.article-content blockquote {
    border-left: 4px solid #084c39;
    padding-left: 1.5rem;
    font-style: italic;
    color: #4b5563;
    margin: 2rem 0;
    font-size: 1.25rem;
}

.article-content img {
    border-radius: 0.75rem;
    margin: 2rem 0;
    width: 100%;
    height: auto;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.article-content a {
    color: #084c39;
    text-decoration: underline;
    font-weight: 600;
}

.article-content figcaption {
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: -1.5rem;
    margin-bottom: 2rem;
}
/* =========================================
   Reading Progress Bar
   ========================================= */
#reading-progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 8px;
    width: 0%;
    background: linear-gradient(90deg, #084c39, #13a456);
    z-index: 9999;
    transition: width 0.1s linear;
    pointer-events: none;
}

/* =========================================
   NEWS FILTER
   ========================================= */
.news-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.875rem 0;
    align-items: center;
}

.news-filter__btn {
    display: inline-flex;
    align-items: center;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    border: 1.5px solid #d1d5db;
    background: transparent;
    color: #4b5563;
    font-size: 0.8125rem;
    font-weight: 600;
    text-decoration: none;
    line-height: 1.4;
    transition: border-color 0.2s, background 0.2s, color 0.2s;
    white-space: nowrap;
}

.news-filter__btn:hover {
    border-color: #084c39;
    color: #084c39;
    background: #f0faf5;
}

.news-filter__btn--active {
    background: #084c39;
    border-color: #084c39;
    color: #ffffff;
}

.news-filter__btn--active:hover {
    background: #063d2e;
    border-color: #063d2e;
    color: #ffffff;
}

/* News Card – "Beitrag lesen" Pill */
.news-card__pill {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.92);
    color: #084c39;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.375rem 0.75rem;
    border-radius: 9999px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
    z-index: 2;
}

.news-card__img-link:hover .news-card__pill {
    opacity: 1;
}

/* News Hero – Dot-Pattern Hintergrund */
.news-hero {
    padding-top: 50px;
    padding-bottom: 50px;
    background-color: #063b2d;
    background-image: radial-gradient(circle, rgba(255,255,255,0.15) 1px, transparent 1px);
    background-size: 20px 20px;
}

@media (max-width: 767px) {
    .news-hero {
        padding-top: 30px;
        padding-bottom: 40px;
    }
}

/* News Post Grid – Abstand unter dem Filterbalken */
.news-post-grid {
    padding-top: 5rem;
    padding-bottom: 4rem;
    background: #ffffff;
}

/* =========================================
   Announcement Bar
   ========================================= */

/* Announcement Bar — normaler Dokumentfluss, scrollt mit der Seite weg */
/* JS in main.js hält den Header bündig darunter bis die Bar verschwunden ist */
.hds-announcement-bar {
    position: relative;
    width: 100%;
    padding: 0.5rem 0;
    min-height: 40px;
    display: flex;
    align-items: center;
}

.hds-ab--green  { background-color: #084c39; color: #ffffff; }
.hds-ab--yellow { background-color: #faac22; color: #084c39; }
.hds-ab--red    { background-color: #dc2626; color: #ffffff; }
.hds-ab--dark   { background-color: #111827; color: #ffffff; }

.hds-ab__cta {
    display: inline-block;
    padding: 0.2rem 0.75rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    transition: background-color 0.15s ease;
}
.hds-ab--green .hds-ab__cta:hover,
.hds-ab--red .hds-ab__cta:hover,
.hds-ab--dark .hds-ab__cta:hover { background-color: rgba(255, 255, 255, 0.15); }
.hds-ab--yellow .hds-ab__cta { border-color: #084c39; color: #084c39; }
.hds-ab--yellow .hds-ab__cta:hover { background-color: rgba(8, 76, 57, 0.1); }

/* =========================================
   Footer — Defensive Sicherung
   ========================================= */

/* Grüner Footer — maximale Durchsetzungskraft gegen Plugin-Stylesheets */
body > footer,
footer#site-footer,
.site-footer,
footer {
    background-color: #084c39 !important;
    color: #ffffff !important;
    display: block !important;
    position: relative;
}

/* Footer-Inhalte sichtbar halten (color: inherit greift durch) */
body > footer a,
body > footer p,
body > footer span,
body > footer li {
    color: inherit;
}

