/*
 * Neon-Modus: Neon-Farbschema (Synthwave/Miami-Nacht).
 * Aktiv, wenn <html> die Klasse "neon-mode" hat (gesetzt in header.php, Schalter in template-parts/neon-mode-toggle.php).
 * Selektor html:root.neon-mode ist spezifischer als :root.blue/.red/.light usw. und gewinnt daher immer.
 */

html:root.neon-mode {
    --neonPink: #ff2ec4;
    --neonCyan: #00f0ff;
    --neonPurple: #9d4dff;
    --neonOrange: #ff9f1c;
    --neonYellow: #ffe45e;

    --primary: var(--neonPink);
    --primaryHover: var(--neonCyan);
    --primaryGradientMix: var(--neonPurple);
    --background: #12062b;
    --backgroundOpacity: rgba(18, 6, 43, 0.75);
    --backgroundAccent: #1f0b42;
    --backgroundAccentOpacity: rgba(31, 11, 66, 0.75);
    --whiteOpacity: rgba(255, 46, 196, 0.2);
    --textColor: #fdf0ff;
    --featureBackgroundColor: #2a0f55;
    --featureTextColor: var(--neonCyan);
    --featureLogoColor: var(--neonOrange);
    --invertedBackground: #ff8a3d;
    --invertedTextColor: #1a0533;
    --patternColor: #3a1470;
    --featureGradient: transparent
        linear-gradient(172deg, #ff2ec400 0%, #9d4dffaa 64%, #00f0fff5 100%) 0% 0%
        no-repeat padding-box;
    --gradient-bg: linear-gradient(349deg,
            transparent,
            transparent 0%,
            #ff2ec460 63.03%,
            var(--neonPurple));
}

/* Leuchteffekte */
html.neon-mode h1,
html.neon-mode .hs-title {
    color: var(--textColor);
    text-shadow:
        0 0 6px rgba(255, 46, 196, 0.9),
        0 0 18px rgba(255, 46, 196, 0.6),
        0 0 36px rgba(157, 77, 255, 0.5);
}

html.neon-mode h2,
html.neon-mode h3,
html.neon-mode .hs-subtitle {
    text-shadow: 0 0 10px rgba(0, 240, 255, 0.55);
}

html.neon-mode .cta a,
html.neon-mode .hero-slideshow .hs-sound[aria-pressed="true"] {
    box-shadow: 0 0 12px rgba(255, 46, 196, 0.7), 0 0 28px rgba(255, 46, 196, 0.35);
}

html.neon-mode .cta a:hover {
    box-shadow: 0 0 12px rgba(0, 240, 255, 0.8), 0 0 28px rgba(0, 240, 255, 0.4);
}

/* Hero-Hintergrund ohne Bild: Sonnenuntergang über der Stadt */
html.neon-mode .hero-slideshow .hs-slide:not(.has-image) {
    background-image:
        linear-gradient(180deg, transparent 55%, rgba(18, 6, 43, 0.9) 100%),
        linear-gradient(180deg, #12062b 0%, #3b0a5c 45%, #b3166f 75%, #ff8a3d 100%);
}

/* Invertierte (helle) Abschnitte: Sonnenuntergang statt Blassrosa, dunkle Schrift ohne Glow */
html.neon-mode section.inverted {
    background: linear-gradient(160deg, #ff2ec4 0%, #ff5f7e 45%, #ff9f1c 100%);
}

html.neon-mode section.inverted h1,
html.neon-mode section.inverted h2,
html.neon-mode section.inverted h3,
html.neon-mode section.inverted .hs-title {
    text-shadow: none;
}

/* Akzent-Überschriften wären sonst Pink auf Pink */
/* !important nötig: der Referenz-Slider setzt die h3-Farbe mit eigenem, spezifischerem Selektor */
html.neon-mode section.inverted h3 {
    color: #3a0a6b !important;
    border-color: #3a0a6b !important;
}

/* Auf Cyan (--primaryHover als Hintergrund) schwarze Schrift, weiße Icons invertieren */
html.neon-mode .fullslider .slider figcaption,
html.neon-mode .fullslider .slider figcaption * {
    color: #000 !important;
    text-shadow: none !important;
}

html.neon-mode .fullslider .slider figcaption img {
    filter: invert(1);
}

html.neon-mode header nav a:hover,
html.neon-mode header nav .current-menu-item > a,
html.neon-mode header nav li.contact-button a,
html.neon-mode .cta a:hover {
    color: #000;
}

/* Nur auf Desktop cyan hinterlegt: Untermenüs und letzter Hauptmenüpunkt ("Erstgespräch").
   Im mobilen Menü sind beide dunkel hinterlegt und behalten die helle Schrift. */
@media screen and (min-width: 1025px) {
    html.neon-mode header nav ul ul a,
    html.neon-mode header nav ul li:last-of-type a {
        color: #000;
    }

    html.neon-mode header nav ul li:last-of-type a::after {
        filter: invert(1);
    }
}

/* BoldCrew-Box (hellblau hinterlegt): Fließtext wäre Cyan auf Hellblau.
   Kräftigeres Neon-Pink, weil #ff2ec4 auf dem hellen Grund nur ~2:1 Kontrast hat. */
html.neon-mode section.boldcrew .text p {
    color: #c4007f;
    font-weight: 400;
}

/* Alternative Bilder: .neon-only nur im Neon-Modus, .neon-hide nur außerhalb */
.neon-only {
    display: none !important;
}

html.neon-mode .neon-only {
    display: block !important;
}

html.neon-mode .neon-hide {
    display: none !important;
}

html.neon-mode ::selection {
    background: var(--neonPink);
    color: #12062b;
}

/* Sanfter Übergang beim Umschalten */
html.neon-switching,
html.neon-switching body,
html.neon-switching body * {
    transition: background-color 0.4s ease, color 0.4s ease, border-color 0.4s ease, text-shadow 0.4s ease, box-shadow 0.4s ease !important;
}

@media (prefers-reduced-motion: reduce) {
    html.neon-switching,
    html.neon-switching body,
    html.neon-switching body * {
        transition: none !important;
    }
}
