/*
Theme Name:         Interieur & Meer – Child 2026
Theme URI:          https://interieurmeer.de
Description:        Maßgeschneidertes Child-Theme für Interieur & Meer (Segelmacherei & Polsterei, Steinhude) auf Basis von Twenty Twenty-Four. Maritim-eleganter Markenauftritt mit eigenem Farbschema, Typografie und Block-Patterns.
Author:             Interieur & Meer
Author URI:         https://interieurmeer.de
Template:           twentytwentyfour
Version:            2.3.0
Requires at least:  6.4
Tested up to:       6.5
Requires PHP:       7.4
License:            GNU General Public License v2 or later
License URI:        http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:        interieurmeer-child
Tags:               maritim, handwerk, business, one-page, block-theme, full-site-editing
*/

/* =================================================================
   1. DESIGN TOKENS
   ================================================================= */

:root {
    --im-primary:    #1E3A5F;
    --im-secondary:  #4A90C2;
    --im-sand:       #E8D5A9;
    --im-rope:       #B08968;
    --im-light:      #F5F7FA;
    --im-text:       #1A1A1A;
    --im-muted:      #555555;
    --im-radius:     8px;
    --im-transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* =================================================================
   2. BASE
   ================================================================= */

html { scroll-behavior: smooth; }

h1, h2, h3, h4, h5, h6,
.wp-block-post-title,
.wp-block-heading {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 600;
    letter-spacing: -0.01em;
}

body {
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-feature-settings: "kern", "liga";
    color: var(--im-text);
}

/* =================================================================
   3. STICKY HEADER mit Backdrop-Blur
   ================================================================= */

/* Sticky Header – Kompatibilität mit WordPress Block-Theme-Layout */
.im-sticky-header,
header.wp-block-template-part .im-sticky-header,
.wp-site-blocks > header .im-sticky-header,
.wp-site-blocks > .wp-block-template-part .im-sticky-header {
    position: sticky !important;
    position: -webkit-sticky !important;
    top: 0 !important;
    z-index: 999 !important;
    background: rgba(255, 255, 255, 0.92) !important;
    -webkit-backdrop-filter: blur(16px) saturate(1.8);
    backdrop-filter: blur(16px) saturate(1.8);
    transition: box-shadow var(--im-transition), padding var(--im-transition);
}

/* WordPress Block-Theme: Elterncontainer darf kein overflow:hidden haben */
.wp-site-blocks > header,
.wp-site-blocks > .wp-block-template-part {
    position: sticky !important;
    top: 0;
    z-index: 999;
}

.im-sticky-header.is-scrolled {
    box-shadow: 0 1px 12px rgba(30, 58, 95, 0.08) !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.wp-block-site-title a {
    font-family: "Playfair Display", Georgia, serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--im-primary);
    text-decoration: none;
    transition: font-size var(--im-transition);
}

.is-scrolled .wp-block-site-title a {
    font-size: 1.25rem;
}

/* Navigation: kompakt, 1 Zeile */
.wp-block-navigation {
    gap: 0.25rem !important;
}
.wp-block-navigation .wp-block-navigation-item__content {
    font-weight: 500;
    font-size: 0.85rem;
    padding: 0.4rem 0.6rem;
    transition: color 0.2s ease;
    white-space: nowrap;
}
.wp-block-navigation .wp-block-navigation-item__content:hover {
    color: var(--im-secondary);
}

/* Service-Karten: Bilder prominenter */
.im-service-card img {
    aspect-ratio: 4/3;
    object-fit: cover;
    margin-bottom: 1rem;
}

/* =================================================================
   4. HERO
   ================================================================= */

.im-hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.75), rgba(74, 144, 194, 0.55)),
                var(--im-primary);
    background-size: cover;
    background-position: center;
    color: #fff;
}

.im-hero h1 {
    font-size: clamp(2.25rem, 5vw + 1rem, 4.5rem);
    line-height: 1.05;
    color: #ffffff;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.35);
}

.im-hero p { color: rgba(255, 255, 255, 0.92); }

/* =================================================================
   5. BUTTONS – harmonisiert auf var(--im-radius)
   ================================================================= */

.wp-block-button.is-style-im-primary .wp-block-button__link {
    background-color: var(--im-sand);
    color: var(--im-primary);
    border-radius: var(--im-radius);
    padding: 1rem 2rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}

.wp-block-button.is-style-im-primary .wp-block-button__link:hover {
    background-color: #d9c092;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px -6px rgba(232, 213, 169, 0.5);
}

.wp-block-button.is-style-im-outline .wp-block-button__link {
    background: transparent;
    color: var(--im-primary);
    border: 2px solid var(--im-primary);
    border-radius: var(--im-radius);
    padding: 0.875rem 2rem;
    font-weight: 600;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.wp-block-button.is-style-im-outline .wp-block-button__link:hover {
    background-color: var(--im-primary);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 4px 16px -4px rgba(30, 58, 95, 0.35);
}

/* Standard WP-Buttons ebenfalls harmonisieren */
.wp-block-button__link {
    border-radius: var(--im-radius);
}

/* =================================================================
   6. SERVICE-KARTEN – radius harmonisiert
   ================================================================= */

.im-service-card {
    background: #fff;
    border: 1px solid #e5e9ef;
    border-radius: var(--im-radius);
    padding: 2.5rem 2rem;
    overflow: hidden;
    transition: box-shadow var(--im-transition), transform var(--im-transition), border-color var(--im-transition);
}

.im-service-card:hover {
    box-shadow: 0 18px 40px -20px rgba(30, 58, 95, 0.35);
    transform: translateY(-4px);
    border-color: var(--im-secondary);
}

.im-service-card h3 {
    color: var(--im-primary);
    margin-top: 1rem;
    margin-bottom: 0.75rem;
}

.im-service-card .im-icon {
    width: 48px;
    height: 48px;
    color: var(--im-secondary);
}

/* =================================================================
   7. IMAGE HOVER ZOOM
   ================================================================= */

.im-service-card .wp-block-image,
.wp-block-gallery .wp-block-image,
.im-reviews-fallback .wp-block-image {
    overflow: hidden;
    border-radius: var(--im-radius);
}

/* Bilder in Karten und Galerien: immer volle Breite */
.im-service-card img,
.im-service-card .wp-block-image img,
.im-service-card figure img,
.wp-block-image.has-custom-border img,
.wp-block-gallery img,
.wp-block-gallery .wp-block-image img {
    width: 100% !important;
    height: auto !important;
    display: block;
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform;
}

.im-service-card:hover .wp-block-image img,
.wp-block-gallery .wp-block-image:hover img {
    transform: scale(1.04);
}

/* Alle Bilder im Theme auf einheitlichen Radius */
.wp-block-image.has-custom-border img,
.wp-block-gallery img {
    border-radius: var(--im-radius) !important;
}

/* =================================================================
   8. SCROLL-REVEAL ANIMATIONS
   ================================================================= */

/* Scroll-Reveal: Startzustand unsichtbar, wird per JS sichtbar */
.im-reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.im-reveal.is-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}
/* Fallback: falls JS nicht lädt, alles sichtbar */
.no-js .im-reveal { opacity: 1; transform: none; }

/* =================================================================
   9. TRUST COUNTER
   ================================================================= */

.im-trust-counter {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
    text-align: center;
}

.im-trust-item {
    flex: 0 1 auto;
    min-width: 140px;
}

.im-trust-number {
    font-family: "Playfair Display", Georgia, serif;
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 600;
    color: var(--im-secondary);
    line-height: 1;
    margin-bottom: 0.25rem;
}

.im-trust-label {
    font-size: 0.9rem;
    color: var(--im-muted);
    font-weight: 500;
    letter-spacing: 0.03em;
}

.im-trust-divider {
    width: 2px;
    height: 48px;
    background: #e5e9ef;
    align-self: center;
}

@media (max-width: 600px) {
    .im-trust-counter { gap: 1.5rem; }
    .im-trust-divider { display: none; }
    .im-trust-item { min-width: 100px; }
}

/* =================================================================
   10. WHATSAPP FLOATING BUTTON
   ================================================================= */

.im-whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 998;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    animation: im-whatsapp-pop 0.5s 2s both ease;
}

.im-whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 24px rgba(37, 211, 102, 0.55);
}

.im-whatsapp-float svg {
    width: 28px;
    height: 28px;
    fill: #fff;
}

.im-whatsapp-float .im-wa-tooltip {
    position: absolute;
    right: 68px;
    background: #fff;
    color: var(--im-text);
    font-size: 0.85rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--im-radius);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.im-whatsapp-float:hover .im-wa-tooltip {
    opacity: 1;
    transform: translateX(0);
}

@keyframes im-whatsapp-pop {
    from { transform: scale(0); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

@media (max-width: 480px) {
    .im-whatsapp-float {
        bottom: 16px;
        right: 16px;
        width: 50px;
        height: 50px;
    }
    .im-whatsapp-float .im-wa-tooltip { display: none; }
}

/* =================================================================
   11. SECTION-HINTERGRÜNDE
   ================================================================= */

.im-section-sand { background-color: var(--im-sand); }
.im-section-light { background-color: var(--im-light); }
.im-section-dark { background-color: var(--im-primary); color: #fff; }
.im-section-dark h2,
.im-section-dark h3 { color: #fff; }

/* =================================================================
   12. KONTAKT-BLOCK
   ================================================================= */

.im-contact-block {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 2rem;
}

.im-contact-block .im-info-item {
    padding: 1.5rem;
    background: #fff;
    border-left: 4px solid var(--im-secondary);
    border-radius: 0;
}

.im-contact-block .im-info-item strong {
    display: block;
    color: var(--im-primary);
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.5rem;
}

/* =================================================================
   13. FOOTER
   ================================================================= */

.im-footer {
    background: var(--im-primary);
    color: #cfd8e3;
    padding: 3.5rem 0 2rem;
}

.im-footer h4 {
    color: #fff;
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.im-footer a { color: #cfd8e3; text-decoration: none; transition: color 0.2s ease; }
.im-footer a:hover { color: var(--im-sand); }

.im-footer .im-copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 1.5rem;
    margin-top: 2.5rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.65);
}

/* =================================================================
   14. ÖFFNUNGSZEITEN
   ================================================================= */

.im-hours {
    list-style: none;
    padding: 0;
    margin: 0;
}

.im-hours li {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.15);
    font-size: 0.9rem;
    white-space: nowrap;
}

.im-hours li:last-child { border-bottom: 0; }

.im-hours .im-day {
    font-weight: 500;
    flex-shrink: 0;
}

.im-hours li > span:last-child {
    text-align: right;
    white-space: nowrap;
}

@media (max-width: 420px) {
    .im-hours li { font-size: 0.85rem; gap: 0.5rem; }
}

/* =================================================================
   15. GOOGLE-BEWERTUNGEN
   ================================================================= */

.im-google-teaser {
    background: rgba(255, 255, 255, 0.04);
}

.im-google-teaser a:hover span { opacity: 0.85; }

.im-reviews-fallback { display: block; }

.im-reviews-fallback .wp-block-column {
    border-radius: var(--im-radius);
    box-shadow: 0 2px 12px rgba(30, 58, 95, 0.08);
    transition: transform var(--im-transition), box-shadow var(--im-transition);
}

.im-reviews-fallback .wp-block-column:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 24px -8px rgba(30, 58, 95, 0.2);
}

.has-google-reviews-active .im-reviews-fallback { display: none; }

/* =================================================================
   16. RESPONSIVE
   ================================================================= */

@media (max-width: 768px) {
    .im-hero { min-height: 55vh; }
    .im-service-card { padding: 2rem 1.5rem; }
}

/* =================================================================
   17. ACCESSIBILITY
   ================================================================= */

a:focus-visible,
button:focus-visible,
.wp-block-button__link:focus-visible {
    outline: 3px solid var(--im-secondary);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .im-reveal,
    .im-reveal-left,
    .im-reveal-right,
    .im-reveal-stagger > * {
        opacity: 1;
        transform: none;
    }
    .im-whatsapp-float { animation: none; }
}

/* =================================================================
   18. BACK TO TOP
   ================================================================= */

.im-back-to-top {
    position: fixed;
    bottom: 90px;
    right: 28px;
    z-index: 997;
    width: 40px;
    height: 40px;
    background: var(--im-primary);
    color: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
    box-shadow: 0 2px 8px rgba(30, 58, 95, 0.2);
}

.im-back-to-top.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.im-back-to-top:hover {
    background: var(--im-secondary);
}

.im-back-to-top svg {
    width: 20px;
    height: 20px;
}

/* =================================================================
   19. HERO – IMMERSIV (EverSwap-Stil)
   ================================================================= */

.im-hero--immersive {
    min-height: 92vh;
    min-height: 92svh;
    overflow: hidden;
    align-items: center;
    background: var(--im-primary);
}

/* Bildbehandlung: maritime Duotone-Anmutung + langsames Ken-Burns-Zoom */
.im-hero--immersive .wp-block-cover__image-background {
    filter: saturate(0.62) contrast(1.05) brightness(0.86);
    transform: scale(1.08);
    animation: im-kenburns 26s ease-in-out infinite alternate;
    will-change: transform;
}
@keyframes im-kenburns {
    from { transform: scale(1.08) translateY(0); }
    to   { transform: scale(1.18) translateY(-2%); }
}

/* Overlay-Span zum Verlauf umfunktionieren (Himmel hell oben, tief unten) */
.im-hero--immersive .wp-block-cover__background {
    opacity: 1 !important;
    background:
        linear-gradient(180deg, rgba(74,144,194,0.30) 0%, rgba(30,58,95,0.32) 42%, rgba(16,34,56,0.86) 100%),
        radial-gradient(120% 80% at 50% 16%, rgba(124,176,214,0.34), transparent 62%) !important;
}

/* Inhalt über dem Overlay halten */
.im-hero--immersive .wp-block-cover__inner-container { position: relative; z-index: 2; }

/* Gestaffelte Einblendung beim Laden */
.im-hero--immersive .im-hero__content > * {
    opacity: 0;
    transform: translateY(26px);
    animation: im-hero-rise 1s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.im-hero--immersive .im-hero__kicker   { animation-delay: 0.15s; }
.im-hero--immersive .im-hero__wordmark { animation-delay: 0.30s; }
.im-hero--immersive .im-hero__sub      { animation-delay: 0.55s; }
.im-hero--immersive .im-hero__buttons  { animation-delay: 0.75s; }
.im-hero--immersive .im-hero__scroll   { animation-delay: 1.00s; }
@keyframes im-hero-rise { to { opacity: 1; transform: none; } }

/* Kicker */
.im-hero--immersive .im-hero__kicker {
    font-size: 0.82rem;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    font-weight: 500;
    color: var(--im-sand);
    margin-bottom: 1.4rem;
}

/* Riesen-Wortmarke (überschreibt das generische .im-hero h1) */
.im-hero--immersive .im-hero__wordmark {
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 500;
    font-size: clamp(3rem, 11vw, 9rem);
    line-height: 0.92;
    letter-spacing: -0.015em;
    color: #fff;
    text-shadow: 0 8px 60px rgba(0, 0, 0, 0.45);
    margin: 0;
}
.im-hero--immersive .im-hero__w1 { display: block; }
.im-hero--immersive .im-hero__w2 { display: block; font-style: italic; font-weight: 400; }
.im-hero--immersive .im-hero__amp { color: var(--im-sand); font-style: italic; }

/* Sub-Text */
.im-hero--immersive .im-hero__sub {
    font-size: clamp(1rem, 1.4vw, 1.2rem);
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.9);
    max-width: 560px;
    margin: 1.6rem auto 2.2rem;
}

/* Outline-Button (heller Rahmen auf dunklem Bild) */
.im-hero-split .wp-block-button.is-style-im-outline .wp-block-button__link,
.im-hero--immersive .wp-block-button.is-style-im-outline .wp-block-button__link {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.6);
    border-radius: var(--im-radius);
    padding: 1rem 2rem;
    font-weight: 600;
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.im-hero-split .wp-block-button.is-style-im-outline .wp-block-button__link:hover,
.im-hero--immersive .wp-block-button.is-style-im-outline .wp-block-button__link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fff;
    transform: translateY(-2px);
}

/* Scroll-Hinweis */
.im-hero__scroll {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    margin-top: 2.6rem;
    font-family: "Playfair Display", Georgia, serif;
    font-style: italic;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.82);
    letter-spacing: 0.02em;
}
.im-hero__scroll-line {
    width: 1px;
    height: 42px;
    background: linear-gradient(var(--im-sand), transparent);
    animation: im-scrollcue 1.9s ease-in-out infinite;
}
@keyframes im-scrollcue {
    0%, 100% { transform: scaleY(0.4); transform-origin: top; opacity: 0.4; }
    50%      { transform: scaleY(1);   opacity: 1; }
}

/* --- Transparenter Header über dem Hero (nur Startseite) --- */
.home .im-sticky-header:not(.is-scrolled) {
    background: transparent !important;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    box-shadow: none !important;
    border-bottom-color: transparent !important;
}
.home .im-sticky-header:not(.is-scrolled) .wp-block-site-title a,
.home .im-sticky-header:not(.is-scrolled) .wp-block-navigation a {
    color: #fff !important;
    text-shadow: 0 1px 12px rgba(16, 34, 56, 0.5);
}

/* Hero unter den (in-flow) Header ziehen, damit das Bild bis ganz oben reicht */
.home main > .im-hero--immersive:first-child {
    margin-top: calc(-1 * var(--im-header-h, 84px));
}

/* --- Scroll-Fortschritts-Punkte (per JS befüllt) --- */
.im-progress {
    position: fixed;
    left: clamp(0.9rem, 2vw, 1.8rem);
    top: 50%;
    transform: translateY(-50%);
    z-index: 996;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.im-progress button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 1.5px solid rgba(120, 140, 170, 0.6);
    background: transparent;
    transform: rotate(45deg);
    cursor: pointer;
    transition: all 0.35s ease;
}
.im-progress button.is-active {
    background: var(--im-sand);
    border-color: var(--im-sand);
    box-shadow: 0 0 12px rgba(232, 213, 169, 0.7);
}
.home .im-progress button { border-color: rgba(255, 255, 255, 0.5); }

@media (max-width: 768px) {
    .im-hero--immersive { min-height: 88vh; min-height: 88svh; }
    .im-progress { display: none; }
    .home main > .im-hero--immersive:first-child {
        margin-top: calc(-1 * var(--im-header-h, 70px));
    }
}

/* =================================================================
   20. UNTERSEITEN – HERO MIT BILD (ohne Inhalts-Änderung, per CSS)
   ================================================================= */

/* Bestehende, bildlose .im-hero-Cover der Unterseiten zu immersiven
   Bild-Headern aufwerten. Bild kommt aus einem ::before, damit der
   Text scharf bleibt. Bild-URL pro Seite via --im-hero-img (s. u.). */
.im-hero:not(.im-hero--immersive) {
    position: relative;
    overflow: hidden;
    min-height: 48vh !important;
    display: flex;
    align-items: center;
    background: var(--im-primary);
}
.im-hero:not(.im-hero--immersive)::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: var(--im-hero-img, none);
    background-size: cover;
    background-position: center;
    filter: saturate(0.62) contrast(1.04) brightness(0.82);
}
/* Overlay-Span zum maritimen Verlauf machen (über dem Bild, unter dem Text) */
.im-hero:not(.im-hero--immersive) .wp-block-cover__background {
    z-index: 1 !important;
    opacity: 1 !important;
    background:
        linear-gradient(180deg, rgba(16, 34, 56, 0.50) 0%, rgba(16, 34, 56, 0.72) 100%),
        radial-gradient(120% 90% at 50% 12%, rgba(124, 176, 214, 0.22), transparent 60%) !important;
}
.im-hero:not(.im-hero--immersive) .wp-block-cover__inner-container {
    position: relative;
    z-index: 2;
}
.im-hero:not(.im-hero--immersive) h1 {
    font-size: clamp(2.25rem, 4vw + 1rem, 3.75rem);
    line-height: 1.06;
    text-shadow: 0 6px 40px rgba(0, 0, 0, 0.4);
    margin: 0;
}

/* Gestaffelte Einblendung des Hero-Texts */
.im-hero:not(.im-hero--immersive) .wp-block-cover__inner-container > * {
    opacity: 0;
    transform: translateY(20px);
    animation: im-hero-rise 0.9s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.im-hero:not(.im-hero--immersive) .wp-block-cover__inner-container > *:nth-child(1) { animation-delay: 0.10s; }
.im-hero:not(.im-hero--immersive) .wp-block-cover__inner-container > *:nth-child(2) { animation-delay: 0.25s; }
.im-hero:not(.im-hero--immersive) .wp-block-cover__inner-container > *:nth-child(3) { animation-delay: 0.40s; }

/* --- Hero-Hintergrundbild je Unterseite (relative Pfade zum Theme) --- */
.im-page-segelmacherei   .im-hero:not(.im-hero--immersive) { --im-hero-img: url("assets/images/bootsverdeck-blau-wasser.webp"); }
.im-page-polsterei       .im-hero:not(.im-hero--immersive) { --im-hero-img: url("assets/images/sessel-polster-blau-modern.webp"); }
.im-page-camper-wohnmobil .im-hero:not(.im-hero--immersive) { --im-hero-img: url("assets/images/wohnmobil-aufstelldach-steinhude.webp"); }
.im-page-kontakt         .im-hero:not(.im-hero--immersive) { --im-hero-img: url("assets/images/wassersport-werkstatt-steinhude.webp"); }
.im-page-referenzen      .im-hero:not(.im-hero--immersive) { --im-hero-img: url("assets/images/persenning-segelboot-werft-steinhude.webp"); }

/* =================================================================
   21. UNTERSEITEN – INHALTS-POLITUR (scoped auf .wp-block-post-content)
   ================================================================= */

/* Überschriften-Rhythmus */
.wp-block-post-content h2 {
    margin-top: 2.6rem;
    margin-bottom: 1rem;
    font-size: clamp(1.6rem, 2.2vw + 0.5rem, 2.25rem);
}
.wp-block-post-content h3 {
    margin-top: 1.8rem;
    margin-bottom: 0.6rem;
}
.wp-block-post-content p { line-height: 1.7; }

/* Listen mit dezenten Rauten-Markern in Sand */
.wp-block-post-content ul:not(.wp-block-navigation__container):not(.wp-block-list) li,
.wp-block-post-content ul.wp-block-list li {
    position: relative;
    padding-left: 1.6rem;
    margin-bottom: 0.55rem;
    list-style: none;
}
.wp-block-post-content ul.wp-block-list { padding-left: 0; }
.wp-block-post-content ul:not(.wp-block-navigation__container) li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 8px;
    height: 8px;
    transform: rotate(45deg);
    background: var(--im-sand);
    border: 1px solid var(--im-rope);
}

/* FAQ-Akkordeons (core/details) als elegante Karten */
.wp-block-post-content .wp-block-details {
    border: 1px solid #e2e7ee;
    border-radius: var(--im-radius);
    background: #fff;
    margin: 0.75rem 0;
    padding: 0 1.3rem;
    transition: box-shadow 0.25s ease, border-color 0.25s ease;
}
.wp-block-post-content .wp-block-details[open] {
    box-shadow: 0 10px 28px -14px rgba(30, 58, 95, 0.3);
    border-color: #d3dce8;
}
.wp-block-post-content .wp-block-details summary {
    cursor: pointer;
    padding: 1.15rem 2.2rem 1.15rem 0;
    position: relative;
    font-family: "Playfair Display", Georgia, serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--im-primary);
    list-style: none;
}
.wp-block-post-content .wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-post-content .wp-block-details summary::after {
    content: "+";
    position: absolute;
    right: 0.1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1;
    color: var(--im-secondary);
    transition: transform 0.2s ease;
}
.wp-block-post-content .wp-block-details[open] summary::after {
    content: "\2013"; /* en dash */
}
.wp-block-post-content .wp-block-details > *:not(summary) {
    margin: 0 0 1.1rem;
    color: var(--im-muted);
    line-height: 1.65;
}

/* Inhalts-Bilder: weiche Ecken + dezenter Schatten */
.wp-block-post-content .wp-block-image img {
    border-radius: var(--im-radius);
}
.wp-block-post-content .wp-block-image.is-style-default img {
    box-shadow: 0 14px 34px -18px rgba(30, 58, 95, 0.35);
}

/* Zitate / Hervorhebungen */
.wp-block-post-content .wp-block-quote {
    border-left: 3px solid var(--im-sand);
    padding-left: 1.2rem;
    font-style: italic;
    color: var(--im-primary);
}

/* Abschnitts-Abstand für volle Breite-Gruppen innerhalb des Inhalts */
.wp-block-post-content > .wp-block-group.alignfull {
    margin-top: 0;
}

@media (max-width: 768px) {
    .im-hero:not(.im-hero--immersive) { min-height: 42vh !important; }
}


/* =================================================================
   22. LOGO – HEADER & FOOTER (rundes Marken-Emblem)
   ================================================================= */

/* Header: Text-Site-Title durch das runde Logo ersetzen (Text bleibt für SEO/Screenreader) */
.wp-block-site-title { line-height: 0; }
.wp-block-site-title a {
    display: inline-block;
    width: 54px;
    height: 54px;
    overflow: hidden;
    white-space: nowrap;
    text-indent: -9999px;
    background: url("assets/images/logo-interieur-meer.png") center / contain no-repeat;
    transition: width 0.3s ease, height 0.3s ease;
}
.is-scrolled .wp-block-site-title a { width: 46px; height: 46px; }
/* Auf dem transparenten Hero-Header bekommt das weiße Rondell etwas Tiefe */
.home .im-sticky-header:not(.is-scrolled) .wp-block-site-title a {
    filter: drop-shadow(0 2px 10px rgba(16, 34, 56, 0.45));
}

/* Footer: Logo als Marken-Anker in der ersten Spalte */
.im-footer-logo {
    width: 128px;
    height: 128px;
    margin: 0 0 1.1rem;
    background: url("assets/images/logo-interieur-meer.png") center / contain no-repeat;
}
@media (max-width: 768px) {
    .im-footer-logo { width: 104px; height: 104px; }
}


/* =================================================================
   23. STARTSEITE – SPLIT-HERO + STORY (Widescreen-tauglich)
   ================================================================= */

/* Front-Page-Header wieder solide (Split-Hero braucht keinen transparenten Header) */
.home .im-sticky-header:not(.is-scrolled) {
    background: rgba(255, 255, 255, 0.92) !important;
    -webkit-backdrop-filter: blur(16px) saturate(1.8);
    backdrop-filter: blur(16px) saturate(1.8);
    box-shadow: none !important;
    border-bottom-color: #e5e9ef !important;
}
.home .im-sticky-header:not(.is-scrolled) .wp-block-navigation a {
    color: var(--im-contrast) !important;
    text-shadow: none !important;
}

/* --- Split-Hero --- */
.im-hero-split { background: var(--im-primary); overflow: hidden; }
.im-hero-split__cols { gap: 0 !important; margin-top: 0; margin-bottom: 0; align-items: stretch; }
.im-hero-split__cols > .wp-block-column { align-self: stretch; }
.im-hero-split__text {
    background: linear-gradient(135deg, #24506f, #16273a);
    padding: clamp(2.5rem, 5vw, 5rem) clamp(1.5rem, 5vw, 5rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.im-hero-split__media { padding: 0 !important; }
.im-hero-split__media .wp-block-cover { min-height: 88vh; border-radius: 0; }
.im-hero-split__media .wp-block-cover__image-background { object-fit: cover; }

.im-hero-split .im-hero__kicker {
    font-size: 0.78rem; letter-spacing: 0.28em; text-transform: uppercase; font-weight: 500;
    color: var(--im-sand); margin-bottom: 1.2rem;
}
.im-hero-split .im-hero__wordmark {
    font-family: "Playfair Display", Georgia, serif; font-weight: 500;
    font-size: clamp(2.4rem, 3.6vw + 1rem, 4.4rem); line-height: 0.95; letter-spacing: -0.015em;
    color: #fff; margin: 0;
}
.im-hero-split .im-hero__w1 { display: block; }
.im-hero-split .im-hero__w2 { display: block; font-style: italic; font-weight: 400; }
.im-hero-split .im-hero__amp { color: var(--im-sand); font-style: italic; }
.im-hero-split .im-hero__sub {
    color: rgba(255, 255, 255, 0.9); font-size: clamp(1rem, 1.1vw + 0.4rem, 1.18rem);
    line-height: 1.6; max-width: 46ch; margin: 1.4rem 0 1.9rem;
}
.im-hero-split .im-hero__buttons { gap: 0.8rem; }

@media (max-width: 781px) {
    .im-hero-split__media .wp-block-cover { min-height: 52vh; }
    .im-hero-split__text { padding: 2.6rem 1.5rem; }
}

/* --- Story-Reihen (editorial, kein Vollbild-Beschnitt) --- */
.im-story .im-story__row { margin-bottom: 3.5rem; gap: clamp(1.5rem, 4vw, 3.5rem); }
.im-story .im-story__row:last-child { margin-bottom: 0; }
.im-story__img img {
    width: 100%; aspect-ratio: 4 / 5; object-fit: cover;
    border-radius: var(--im-radius);
    box-shadow: 0 18px 44px -20px rgba(30, 58, 95, 0.45);
}
.im-story__kicker {
    font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 600;
    color: var(--im-secondary); margin-bottom: 0.6rem;
}
.im-story__h {
    font-size: clamp(1.6rem, 1.6vw + 1rem, 2.4rem); line-height: 1.15; color: var(--im-primary);
    margin: 0 0 0.9rem;
}
.im-story__text p { color: #33414f; line-height: 1.7; }

@media (max-width: 781px) {
    .im-story__row--reverse { flex-direction: column-reverse; }
    .im-story__img img { aspect-ratio: 3 / 2; }
}


/* =================================================================
   24. STORY – SCROLL-SEKTIONEN (hoch, seitenweise einblendend)
   ================================================================= */

.im-story .im-story__row {
    min-height: 78vh;
    margin: 0;
    padding: 4vh 0;
    align-items: center;
}

/* Container-Reveal des Theme-Systems neutralisieren – wir animieren die Spalten einzeln */
.im-story__row.im-reveal { opacity: 1; transform: none; }

.im-story__media,
.im-story__text {
    transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 0.61, 0.36, 1);
}
/* Startzustand nur, wenn JS die Reihe getaggt hat (.im-reveal) -> kein Inhalt-Verlust ohne JS */
.im-story__row.im-reveal .im-story__media { opacity: 0; transform: translateX(-48px); }
.im-story__row.im-reveal.im-story__row--reverse .im-story__media { transform: translateX(48px); }
.im-story__row.im-reveal .im-story__text { opacity: 0; transform: translateY(28px); }
.im-story__row.im-reveal .im-story__text > * { transition-delay: 0.08s; }

/* Eingeblendet */
.im-story__row.is-visible .im-story__media,
.im-story__row.is-visible .im-story__text {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .im-story__media,
    .im-story__text { opacity: 1 !important; transform: none !important; }
}


/* =================================================================
   25. MODERNE UX & CONVERSION (v1.6)
   ================================================================= */

.wp-block-button__link {
    transition: transform 0.18s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.wp-block-button__link:hover { transform: translateY(-2px); }
.wp-block-button.is-style-im-primary .wp-block-button__link:hover {
    box-shadow: 0 8px 22px -8px rgba(232, 213, 169, 0.65);
}

/* Service-Karten: dezenter Hover-Lift */
.im-service-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border-radius: var(--im-radius);
}
.im-service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 40px -20px rgba(30, 58, 95, 0.35);
}

/* Story-/Inhaltsbilder: sanfter Zoom im Rahmen */
.im-story__img { overflow: hidden; border-radius: var(--im-radius); }
.im-story__img img { transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1); }
.im-story__img:hover img { transform: scale(1.04); }

/* Inhalts-Links klarer erkennbar */
.wp-block-post-content a:not(.wp-block-button__link) {
    color: var(--im-secondary);
    text-underline-offset: 3px;
    text-decoration-thickness: 1px;
}
.wp-block-post-content a:not(.wp-block-button__link):hover { color: var(--im-primary); }

/* --- Sticky Mobile-Kontaktleiste (Conversion) --- */
.im-mobilebar { display: none; }
@media (max-width: 768px) {
    .im-mobilebar {
        display: flex;
        position: fixed;
        left: 0; right: 0; bottom: 0;
        z-index: 998;
        gap: 1px;
        box-shadow: 0 -2px 16px rgba(16, 34, 56, 0.18);
    }
    .im-mobilebar a {
        flex: 1;
        text-align: center;
        padding: 0.95rem 0.5rem;
        font-weight: 600;
        font-size: 0.98rem;
        text-decoration: none;
    }
    .im-mobilebar__call { background: #fff; color: var(--im-primary); }
    .im-mobilebar__cta  { background: var(--im-sand); color: var(--im-primary); }
    .im-whatsapp-float, .im-back-to-top { bottom: 84px !important; }
    body { padding-bottom: 56px; }
}
@media print { .im-mobilebar { display: none !important; } }


/* =================================================================
   26. LIGHTBOX & GALERIE (Referenzen)
   ================================================================= */

.im-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: rgba(12, 28, 46, 0.93);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}
.im-lightbox.is-open { display: flex; }
.im-lightbox img {
    max-width: 92vw;
    max-height: 88vh;
    border-radius: 6px;
    box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}
.im-lightbox__close {
    position: absolute;
    top: 0.8rem;
    right: 1.3rem;
    width: 44px;
    height: 44px;
    font-size: 2rem;
    line-height: 1;
    color: #fff;
    background: none;
    border: none;
    cursor: pointer;
    opacity: 0.85;
}
.im-lightbox__close:hover { opacity: 1; }

/* Galerie-Bilder: weiche Ecken + dezenter Hover-Zoom */
.im-page-referenzen .wp-block-image img {
    border-radius: var(--im-radius);
    transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), box-shadow 0.3s ease;
}
.im-page-referenzen .wp-block-image { overflow: hidden; border-radius: var(--im-radius); }
.im-page-referenzen .wp-block-image:hover img {
    transform: scale(1.05);
    box-shadow: 0 14px 30px -12px rgba(30, 58, 95, 0.4);
}


/* =================================================================
   27. KUNDENSTORIES (Vorher/Nachher, Kundenstimme, CTA-Outline)
   ================================================================= */

/* Outline-Button hell auch auf dem dunklen CTA-Band */
.im-cta-band .wp-block-button.is-style-im-outline .wp-block-button__link {
    color: #fff;
    border-color: rgba(255, 255, 255, 0.6);
    background: transparent;
}
.im-cta-band .wp-block-button.is-style-im-outline .wp-block-button__link:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: #fff;
}

/* Vorher / Nachher */
.im-beforeafter .wp-block-image img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: var(--im-radius);
    box-shadow: 0 12px 28px -16px rgba(30, 58, 95, 0.35);
}
.im-beforeafter p strong {
    display: inline-block;
    padding: 0.25rem 0.85rem;
    border-radius: 100px;
    background: var(--im-light);
    color: var(--im-primary);
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Kundenstimme */
.wp-block-post-content .im-kundenstimme {
    border: none;
    border-left: 4px solid var(--im-sand);
    background: var(--im-light);
    border-radius: var(--im-radius);
    padding: 1.5rem 1.75rem;
    margin: 1.75rem 0;
}
.wp-block-post-content .im-kundenstimme p {
    font-family: "Playfair Display", Georgia, serif;
    font-style: italic;
    font-size: 1.2rem;
    line-height: 1.5;
    color: var(--im-primary);
}
.wp-block-post-content .im-kundenstimme cite {
    display: block;
    margin-top: 0.75rem;
    font-style: normal;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--im-muted);
}


/* =================================================================
   28. MENÜ-BREAKPOINT + GRÖSSERE STORY-BILDER
   ================================================================= */

/* Navigation schon unter 900px als Burger (Tablets nicht scrollen lassen) */
@media (max-width: 1024px) {
    .wp-block-navigation__responsive-container-open:not(.always-shown) {
        display: flex !important;
    }
    .wp-block-navigation__responsive-container:not(.is-menu-open) {
        display: none !important;
    }
}

/* Vorher/Umsetzung/Nachher: auf Desktop deutlich größere Bilder */
.im-beforeafter.alignwide { margin-top: 1.5rem; }
.im-beforeafter .wp-block-image img { aspect-ratio: 4 / 3; }
@media (min-width: 782px) {
    .im-beforeafter .wp-block-column { flex-basis: 0; }
}


/* =================================================================
   29  RESPONSIVE LEISTUNGEN-RASTER (Startseite – 4 Karten: 4/2/1)
   ================================================================= */
#leistungen .wp-block-columns {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    align-items: stretch;
    max-width: var(--wp--style--global--wide-size, 1240px) !important;
    margin-left: auto !important;
    margin-right: auto !important;
}
#leistungen .wp-block-columns > .wp-block-column {
    width: auto !important;
    flex-basis: auto !important;
    margin: 0 !important;
}
@media (max-width: 1100px) {
    #leistungen .wp-block-columns { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    #leistungen .wp-block-columns { grid-template-columns: 1fr; }
}

/* Leistungen-Karten: gleiche Höhe + Buttons unten bündig */
#leistungen .wp-block-columns > .wp-block-column.im-service-card {
    display: flex;
    flex-direction: column;
}
#leistungen .wp-block-columns > .wp-block-column.im-service-card .wp-block-buttons {
    margin-top: auto;
}

/* =================================================================
   30  KUNDENSTORY-HERO – Template-Titel/Meta ausblenden (eigener Hero im Inhalt)
   ================================================================= */
.postid-285 .wp-block-post-title,
.postid-285 .wp-block-post-date,
.postid-285 .wp-block-post-terms { display: none !important; }
.postid-285 .entry-content { margin-top: 0 !important; }
.postid-285 .im-hero { margin-top: 0; }

.postid-293 .wp-block-post-title,
.postid-293 .wp-block-post-date,
.postid-293 .wp-block-post-terms { display: none !important; }
.postid-293 .entry-content { margin-top: 0 !important; }

/* Ältere Kundenstories: Template-Titel/Meta ausblenden (eigener Hero) */
.postid-214 .wp-block-post-title,
.postid-214 .wp-block-post-date,
.postid-214 .wp-block-post-terms,
.postid-216 .wp-block-post-title,
.postid-216 .wp-block-post-date,
.postid-216 .wp-block-post-terms,
.postid-218 .wp-block-post-title,
.postid-218 .wp-block-post-date,
.postid-218 .wp-block-post-terms,
.postid-220 .wp-block-post-title,
.postid-220 .wp-block-post-date,
.postid-220 .wp-block-post-terms { display: none !important; }
.postid-214 .entry-content { margin-top: 0 !important; }
.postid-216 .entry-content { margin-top: 0 !important; }
.postid-218 .entry-content { margin-top: 0 !important; }
.postid-220 .entry-content { margin-top: 0 !important; }

/* Kundenstories: Beitragsbild ausblenden (eigener Hero im Inhalt) */
.postid-214 .wp-block-post-featured-image,
.postid-216 .wp-block-post-featured-image,
.postid-218 .wp-block-post-featured-image,
.postid-220 .wp-block-post-featured-image,
.postid-285 .wp-block-post-featured-image,
.postid-293 .wp-block-post-featured-image { display: none !important; }

/* =================================================================
   31  KUNDENSTORY-KARTEN (Übersicht) – modernes Bild-Karten-Grid
   ================================================================= */
.im-story-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr));
    gap: 1.75rem;
}
.im-story-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e9edf2;
    border-radius: 14px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 6px 22px -16px rgba(30,58,95,.4);
    transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease;
}
.im-story-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 28px 52px -26px rgba(30,58,95,.55);
    border-color: #cfe0f0;
}
.im-story-card__img {
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
}
.im-story-card__img img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform .55s cubic-bezier(.25,.46,.45,.94);
}
.im-story-card:hover .im-story-card__img img { transform: scale(1.06); }
.im-story-card__body {
    display: flex; flex-direction: column;
    padding: 1.35rem 1.5rem 1.5rem;
    flex: 1;
}
.im-story-card__tag {
    align-self: flex-start;
    font-size: .72rem; font-weight: 700;
    letter-spacing: .1em; text-transform: uppercase;
    color: #2f76b0; background: #eaf3fb;
    padding: .3rem .65rem; border-radius: 999px;
    margin-bottom: .85rem;
}
.im-story-card__title {
    font-family: "Playfair Display", Georgia, serif;
    color: #1E3A5F; font-size: 1.3rem; font-weight: 600;
    line-height: 1.25; margin-bottom: .5rem;
}
.im-story-card__txt {
    color: #5a6573; font-size: .95rem; line-height: 1.55;
    margin-bottom: 1.15rem; flex: 1;
}
.im-story-card__more {
    font-weight: 700; color: #1E3A5F;
    display: inline-flex; align-items: center; gap: .45rem;
}
.im-story-card__more .arrow { color: #4A90C2; transition: transform .25s ease; }
.im-story-card:hover .im-story-card__more .arrow { transform: translateX(5px); }

.postid-320 .wp-block-post-title,
.postid-320 .wp-block-post-date,
.postid-320 .wp-block-post-terms,
.postid-320 .wp-block-post-featured-image { display: none !important; }
.postid-320 .entry-content { margin-top: 0 !important; }

.postid-329 .wp-block-post-title,
.postid-329 .wp-block-post-date,
.postid-329 .wp-block-post-terms,
.postid-329 .wp-block-post-featured-image { display: none !important; }
.postid-329 .entry-content { margin-top: 0 !important; }

.postid-346 .wp-block-post-title,
.postid-346 .wp-block-post-date,
.postid-346 .wp-block-post-terms,
.postid-346 .wp-block-post-featured-image { display: none !important; }
.postid-346 .entry-content { margin-top: 0 !important; }
/* =================================================================
   32  MOBILES MENÜ – Vollbild-Overlay, Liste als zentrierter Block
   ================================================================= */
@media (max-width: 1024px) {
  /* WICHTIG: Backdrop-Blur am Header aufheben – ein backdrop-filter macht den
     Header zum Containing-Block und sperrt das position:fixed-Overlay ein. */
  .im-sticky-header,
  .home .im-sticky-header:not(.is-scrolled),
  header.wp-block-template-part .im-sticky-header,
  .wp-site-blocks > header .im-sticky-header,
  .wp-site-blocks > .wp-block-template-part .im-sticky-header {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    background: rgba(255, 255, 255, 0.97) !important;
  }

  /* Overlay: Vollbild, navy */
  .wp-block-navigation__responsive-container.is-menu-open {
    position: fixed !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    background-color: #1E3A5F !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    z-index: 100000 !important;
  }

  /* Alle Zwischenebenen: volle Fläche, Inhalt mittig (h+v) */
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-close,
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-dialog,
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    width: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  /* Liste: zentrierter Block mit fester Maximalbreite */
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    justify-content: center !important;
    gap: 0 !important;
    width: min(86vw, 420px) !important;
    margin: 0 auto !important;
    padding: 3.5rem 0 2rem !important;
    list-style: none !important;
  }
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
  }
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
    display: block !important;
    width: 100% !important;
    margin: 0 !important;
    text-align: center !important;
    padding: 0.7rem 0 !important;
    font-size: 1.15rem !important;
    color: #ffffff !important;
    border-bottom: 1px solid rgba(255,255,255,0.12) !important;
  }
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:last-child .wp-block-navigation-item__content {
    border-bottom: 0 !important;
  }
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover,
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus {
    color: #E8D5A9 !important;
  }

  /* Schließen-Kreuz fest oben rechts */
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
    position: fixed !important;
    top: max(1rem, env(safe-area-inset-top)) !important;
    right: 1.1rem !important;
    z-index: 5 !important;
    color: #ffffff !important;
    padding: .55rem !important;
    background: transparent !important;
  }
  .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close svg {
    width: 28px !important;
    height: 28px !important;
  }
}

/* =================================================================
   33  DESKTOP-HEADER – volle Breite nutzen, Navigation einzeilig
   ================================================================= */
@media (min-width: 1025px) {
  /* Innere Header-Zeile (Logo + Nav) nicht auf contentSize einschnüren */
  .im-sticky-header > .wp-block-group {
    max-width: none !important;
  }
  /* Navigation: einzeilig, moderate Abstände */
  .im-sticky-header .wp-block-navigation,
  .im-sticky-header .wp-block-navigation__container {
    flex-wrap: nowrap !important;
    gap: 1.4rem !important;
  }
  .im-sticky-header .wp-block-navigation-item__content {
    white-space: nowrap;
  }
}

/* =================================================================
   34  FOOTER – Markenzeile + 4 ausgewogene Spalten
   ================================================================= */
.im-footer-brand {
    gap: 1.5rem;
    padding-bottom: 2.25rem;
    margin-bottom: 2.25rem !important;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}
.im-footer-claim {
    color: #cfd8e3;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    max-width: 52ch;
}
.im-footer-claim strong { color: #ffffff; }
.im-footer-h {
    color: #ffffff !important;
    font-family: "Manrope", "Inter", sans-serif !important;
    font-size: 0.8rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 1rem !important;
}
.im-footer-list {
    list-style: none;
    margin: 0;
    padding: 0;
    font-size: 0.95rem;
    line-height: 2.1;
    color: #cfd8e3;
}
.im-footer-list a { color: #cfd8e3; text-decoration: none; transition: color .2s ease; }
.im-footer-list a:hover { color: #E8D5A9; }
.im-footer .im-nowrap { white-space: nowrap; }
.im-footer-cols .wp-block-column { min-width: 0; }
@media (max-width: 781px) {
    .im-footer-brand { flex-direction: column; align-items: flex-start; }
}

/* =================================================================
   35  MOTION – Scroll-Reveals & Hero-Einstieg (Design v2.0)
   ================================================================= */
.im-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .65s cubic-bezier(.22,.61,.36,1), transform .65s cubic-bezier(.22,.61,.36,1);
    will-change: opacity, transform;
}
.im-reveal.im-inview { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
    .im-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

@media (prefers-reduced-motion: no-preference) {
    .im-hero .wp-block-cover__inner-container > * { animation: im-rise .65s cubic-bezier(.22,.61,.36,1) both; }
    .im-hero .wp-block-cover__inner-container > :nth-child(2) { animation-delay: .12s; }
    .im-hero .wp-block-cover__inner-container > :nth-child(3) { animation-delay: .24s; }
    .im-hero-split__text > * { animation: im-rise .7s cubic-bezier(.22,.61,.36,1) both; }
    .im-hero-split__text > :nth-child(2) { animation-delay: .1s; }
    .im-hero-split__text > :nth-child(3) { animation-delay: .2s; }
    .im-hero-split__text > :nth-child(4) { animation-delay: .3s; }
}
@keyframes im-rise {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: none; }
}

/* Buttons: sanfter Lift */
.wp-block-button__link {
    transition: transform .25s ease, box-shadow .25s ease, background-color .25s ease, color .25s ease;
}
.wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -12px rgba(30,58,95,.45);
}

/* Textlinks: wachsende Unterstreichung */
.entry-content p > a:not(.wp-block-button__link),
.entry-content li > a:not(.wp-block-button__link) {
    text-decoration: none;
    border-bottom: 1px solid rgba(74,144,194,.35);
    background-image: linear-gradient(90deg, #4A90C2, #4A90C2);
    background-size: 0% 2px;
    background-position: 0 100%;
    background-repeat: no-repeat;
    transition: background-size .35s ease, color .2s ease;
}
.entry-content p > a:not(.wp-block-button__link):hover,
.entry-content li > a:not(.wp-block-button__link):hover {
    background-size: 100% 2px;
}

/* =================================================================
   36  EDITORIALE TYPOGRAFIE (Design v2.0)
   ================================================================= */
.im-hero h1 {
    font-size: clamp(2.1rem, 4.5vw, 3.4rem) !important;
    line-height: 1.12;
    letter-spacing: -0.01em;
}
.entry-content h2.wp-block-heading {
    font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.05rem);
    line-height: 1.2;
}
/* Akzentlinie unter linksbündigen Abschnitts-H2 (zentrierte CTA-H2 bleiben frei) */
.entry-content h2.wp-block-heading:not(.has-text-align-center)::after {
    content: '';
    display: block;
    width: 58px;
    height: 3px;
    margin-top: .6rem;
    border-radius: 2px;
    background: linear-gradient(90deg, #4A90C2, #E8D5A9);
}

/* =================================================================
   37  MARITIME SIGNATUR – Wellen-Trenner & Bild-Treatment (v2.0)
   ================================================================= */
.im-hero { position: relative; }
.im-hero::after {
    content: '';
    position: absolute;
    left: 0; right: 0; bottom: -1px;
    height: 26px;
    z-index: 2;
    pointer-events: none;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 64' preserveAspectRatio='none'%3E%3Cpath d='M0 38C180 64 360 8 560 22 760 36 900 60 1080 48 1240 38 1360 16 1440 30L1440 64 0 64Z' fill='%23ffffff'/%3E%3C/svg%3E") bottom / 100% 100% no-repeat;
}
.entry-content figure img { transition: transform .5s cubic-bezier(.25,.46,.45,.94), filter .5s ease; }
.entry-content figure:hover img { filter: saturate(1.06) contrast(1.02); }

/* =================================================================
   38  REFERENZEN – Masonry + Hover-Captions (v2.0)
   ================================================================= */
.im-page-referenzen .entry-content div[style*="display:grid"] {
    display: block !important;
    columns: 17rem;
    column-gap: 14px;
}
.im-page-referenzen .entry-content div[style*="display:grid"] figure {
    break-inside: avoid;
    margin: 0 0 14px !important;
    position: relative;
}
.im-page-referenzen .entry-content div[style*="display:grid"] figure img {
    aspect-ratio: auto !important;
}
.im-figcap { position: relative; display: block; }
.im-figcap .im-cap {
    position: absolute;
    left: 0; right: 0; bottom: 0;
    padding: 1.6rem .9rem .7rem;
    font-size: .85rem;
    line-height: 1.35;
    color: #fff;
    background: linear-gradient(180deg, rgba(16,34,56,0) 0%, rgba(16,34,56,.78) 70%);
    border-radius: 0 0 8px 8px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .3s ease, transform .3s ease;
    pointer-events: none;
}
.im-figcap:hover .im-cap { opacity: 1; transform: none; }

/* =================================================================
   39  FLIESSTEXT-FONT: MANROPE (Headlines bleiben Playfair Display)
   ================================================================= */
html body {
    --wp--preset--font-family--body: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
body,
button, input, select, textarea,
.wp-block-button__link,
.wp-block-navigation {
    font-family: "Manrope", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
/* Manrope läuft minimal weiter: Lesbarkeit feinjustieren */
body { letter-spacing: 0.005em; }

/* =================================================================
   40  STARTSEITE "DARK-HERO DESIGN" – FINAL, KONSOLIDIERT (v2.3.0)
   Komplett .home-scoped: diese eine Sektion löschen = Licht-Design zurück.
   Stolperfallen, die hier gelöst sind:
   - WP constrained-Layout setzt max-width auf Kinder (kappte 100vw-Bänder)
   - is-vertically-aligned-center setzt align-self:center (verhinderte Stretch)
   - Alt-Reveal verschiebt Spalten ±48px (Dauerlücke ohne .is-visible)
   - WP Block-Gap erzeugt margin-block-start zwischen Sektionen
   ================================================================= */

/* ---------- Bühne ---------- */
.home .wp-site-blocks { background: #16263A; }
.home .im-hero-split { background: linear-gradient(168deg, #1E3A5F 0%, #16263A 82%) !important; }
.home main > * { margin-block-start: 0 !important; }
.home main > .wp-block-group.has-base-background-color,
.home main > .wp-block-group.has-light-background-color {
    background: linear-gradient(168deg, rgba(30,58,95,0.45) 0%, rgba(22,38,58,0) 62%) !important;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* ---------- Bühnen-Typografie (schwach: Inline-Styles & Inseln gewinnen) ---------- */
.home main h2, .home main h3 { color: #ffffff; }
.home main p, .home main li { color: rgba(255,255,255,0.85); }
.home main a:not(.wp-block-button__link) { color: #E8D5A9; }
.home main .is-style-im-outline .wp-block-button__link {
    color: #ffffff;
    border-color: rgba(255,255,255,0.55);
    background: transparent;
}
.home main .is-style-im-outline .wp-block-button__link:hover { background: rgba(255,255,255,0.1); }

/* Kicker: alle Vorzeilen exakt wie der Hero-Kicker (zusätzlich inline in story.php) */
.home .im-story__kicker,
.home main p[style*="#B08968"],
.home main p[style*="#4A90C2"],
.home main p[style*="#E8D5A9"] {
    font-size: 0.78rem !important;
    letter-spacing: 0.28em !important;
    font-weight: 500 !important;
    text-transform: uppercase !important;
    color: var(--im-sand) !important;
}

/* Goldene Akzentlinien unter Überschriften */
.home #leistungen > h2::after,
.home main > .wp-block-group:not(.im-section-dark):not(.im-story) h2.wp-block-heading:not(.has-text-align-center)::after,
.home .im-story__h::after {
    content: '';
    display: block;
    width: 58px;
    height: 2px;
    margin-top: 0.65rem;
    background: linear-gradient(90deg, #E8D5A9, rgba(232,213,169,0.2));
    border-radius: 1px;
}
.home #leistungen > h2::after { margin-left: auto; margin-right: auto; }
.home .im-story__h::after { width: 64px; margin-top: 1.15rem; }

/* ---------- Weiße Inseln (stark) ---------- */
.home main .im-service-card :is(h3, h4) { color: var(--im-primary) !important; }
.home main .im-service-card :is(p, li) { color: #444444 !important; }
.home main .im-service-card a:not(.wp-block-button__link) { color: #2f76b0 !important; }
.home main .im-service-card .is-style-im-outline .wp-block-button__link,
.home main > .wp-block-group :is(.has-base-background-color, .has-light-background-color) .is-style-im-outline .wp-block-button__link {
    color: var(--im-primary) !important;
    border-color: var(--im-primary) !important;
    background: transparent !important;
}
.home main > .wp-block-group :is(.has-base-background-color, .has-light-background-color) :is(h2, h3, h4) { color: #1E3A5F !important; }
.home main > .wp-block-group :is(.has-base-background-color, .has-light-background-color) :is(p, li) { color: #3c4854 !important; }
.home main > .wp-block-group :is(.has-base-background-color, .has-light-background-color) a:not(.wp-block-button__link) { color: #2f76b0 !important; }
.home #leistungen .im-service-card {
    border-color: rgba(255,255,255,0.10);
    box-shadow: 0 18px 44px -20px rgba(0,0,0,0.55);
}
.home #leistungen .im-service-card:hover {
    border-color: rgba(232,213,169,0.45);
    box-shadow: 0 26px 56px -22px rgba(0,0,0,0.7);
}

/* ---------- Story-Bänder: vollflächige Hero-Klone ---------- */
.home main > .wp-block-group.im-story {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    border-top: 1px solid rgba(232,213,169,0.28) !important;
}
.home .im-story { overflow-x: clip; }
.home .im-story > * + * { margin-block-start: 0 !important; }
.home .im-story .im-story__row {
    width: 100vw !important;
    max-width: none !important;
    margin: 0 calc(50% - 50vw) !important;
    gap: 0 !important;
    padding: 0 !important;
    min-height: 0;
    align-items: stretch !important;
}
.home .im-story .im-story__row + .im-story__row { border-top: 1px solid rgba(232,213,169,0.28); }
.home .im-story .im-story__row > .wp-block-column { align-self: stretch !important; }
.home .im-story .im-story__row > .wp-block-column.im-story__media {
    flex: 0 0 48% !important;
    position: relative;
    margin-left: -1px;
    margin-right: -1px;
}
.home .im-story .im-story__row > .wp-block-column:not(.im-story__media) {
    flex: 1 1 0% !important;
    max-width: none !important;
}
@media (min-width: 782px) {
    .home .im-story__media { min-height: 88vh; }
}
@media (max-width: 781px) {
    .home .im-story__media { min-height: 52vh; }
    .home .im-story .im-story__row > .wp-block-column.im-story__media { flex: 1 1 auto !important; }
}
.home .im-story__img {
    position: absolute !important;
    inset: 0 !important;
    margin: 0 !important;
    height: auto !important;
    max-height: none !important;
    border-radius: 0 !important;
}
.home .im-story__img img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: cover;
    border-radius: 0 !important;
    border: none !important;
    box-shadow: none !important;
}
.home .im-story .im-story__row--reverse .im-story__img img { object-position: 72% center; }

/* Text-Panels: exakter Hero-Verlauf, Inhalt vertikal zentriert */
.home .im-story .im-story__row .im-story__text {
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(225deg, #24506f, #16273a) !important;
    padding: clamp(2.5rem, 5vw, 5rem) clamp(1.5rem, 5vw, 5rem) !important;
}
.home .im-story .im-story__row--reverse .im-story__text {
    background: linear-gradient(135deg, #24506f, #16273a) !important;
}

/* Band-Typografie */
.home .im-story__h {
    font-family: "Playfair Display", Georgia, serif !important;
    font-weight: 500 !important;
    font-size: clamp(1.6rem, 1.2vw + 0.9rem, 2.5rem) !important;
    line-height: 1.1 !important;
    letter-spacing: -0.015em !important;
    color: #ffffff !important;
    margin: 0 !important;
}
.home .im-story__h .im-amp { color: var(--im-sand); font-style: italic; }
.home .im-story__text p {
    color: rgba(255,255,255,0.9) !important;
    font-size: clamp(1rem, 1.1vw + 0.4rem, 1.18rem) !important;
    line-height: 1.6 !important;
    max-width: 46ch !important;
    margin: 1.4rem 0 0 !important;
}

/* Alt-Reveal neutralisieren (Bänder animieren als Ganzes über .im-reveal) */
.home .im-story__media,
.home .im-story__text {
    opacity: 1 !important;
    transform: none !important;
}
