/* ==========================================================================
   STYLE.CSS - PREMIUM GLASSMORPHISM & DYNAMIC BACKGROUNDS (inkl. Light Rays)
   ========================================================================== */

:root {
    /* Moderne, hochkonvertierende Farbpalette */
    --primary: #6366f1;       /* Leuchtendes Indigo - Strahlt Vertrauen & Moderne aus */
    --primary-hover: #4f46e5;
    --primary-glow: rgba(99, 102, 241, 0.25);
    
    --secondary: #14b8a6;     /* Frisches Teal für positive Elemente */
    
    --accent: #f43f5e;        /* Poppiges Pink-Rot für absolute Aufmerksamkeit (CTAs) */
    --accent-glow: rgba(244, 63, 94, 0.35);
    
    --bg-body: #eef2ff;       /* Fallback-Farbe */
    
    --text-main: #0f172a;     /* Tiefes Blaugrau (Edler als reines Schwarz) */
    --text-muted: #64748b;
    
    /* Typografie & Radien */
    --radius-lg: 24px;        /* Große, weiche Rundungen für das "App-Gefühl" */
    --radius-md: 16px;
    --radius-btn: 50px;       /* Pill-Shape für maximale Klickrate */
    
    /* Premium Glassmorphism Schatten & Transparenz */
    --shadow-glass: 0 8px 32px 0 rgba(31, 38, 135, 0.05);
    --shadow-glass-hover: 0 20px 40px 0 rgba(31, 38, 135, 0.12);
    
    /* Farbverläufe für Überschriften (Aktuelles etc.) - HARDCODIERT AUF LOGO-FARBEN */
    --grad-text-1: #5155c1; /* KJR Indigo/Purple aus Logo sampled */
    --grad-text-2: #67e8f9; /* KJR Light Blue/Cyan aus Logo sampled */
    --gradient-brand: linear-gradient(135deg, var(--grad-text-1), var(--grad-text-2));
    
    /* Etwas transparenter gemacht, damit der neue Hintergrund besser durchscheint */
    --glass-bg: linear-gradient(135deg, rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.4));
    --glass-border: rgba(255, 255, 255, 0.8);
}

/* =========================================
   GLOBAL RESET
   ========================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    flex: 1 0 auto; 
    padding-bottom: 6rem; 
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
}

/* =========================================
   TYPOGRAFIE (Marketing-Optimiert)
   ========================================= */
h1, h2, h3, h4 {
    letter-spacing: -0.03em; /* Kompakter, wirkt moderner und lesbarer */
    line-height: 1.2;
}

/* Magischer Text-Gradient für absolute Hingucker-Überschriften (wie "Aktuelles") */
.text-gradient {
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* =========================================
   GRID-SYSTEM
   ========================================= */
.grid {
    display: grid;
    gap: 2.5rem; 
    align-items: stretch; 
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

/* =========================================
   PREMIUM GLASSMORPHISM KARTEN
   ========================================= */
.card {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-glass);
    
    position: relative; 
    z-index: 1; 
    height: auto; 
    overflow: hidden; 
    
    /* Bouncy & Smooth Animation für Hover */
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275), 
                box-shadow 0.4s ease, 
                border-color 0.4s ease;
}

/* Der Hover-Effekt: Hebt sich an, leuchtet leicht und bekommt einen blauen Rand */
.card:hover {
    transform: translateY(-8px) scale(1.015);
    box-shadow: var(--shadow-glass-hover), 0 10px 30px var(--primary-glow);
    border-color: rgba(99, 102, 241, 0.3);
    z-index: 10; 
}

/* Marketing-Trick: Spezielle Hervorhebung (Zieht den Blick an) */
.highlight-card {
    border: 2px solid var(--accent);
    box-shadow: 0 10px 30px var(--accent-glow);
}

.highlight-card:hover {
    border-color: #e11d48;
    box-shadow: 0 15px 40px var(--accent-glow);
}

/* =========================================
   BILDER & MEDIEN (Emotionales Design)
   ========================================= */
.zoom-wrapper {
    overflow: hidden;
    position: relative;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.zoom-wrapper img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Wenn man über die Karte fährt, zoomt das Bild sanft hinein */
.card:hover .zoom-wrapper img {
    transform: scale(1.08);
}

/* =========================================
   BUTTONS (Call to Action / Nudging)
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-btn);
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 6px 20px var(--primary-glow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px var(--primary-glow);
    color: white;
}

/* Marketing Trick: Pulsierender CTA-Button */
.btn-pulse {
    background: var(--accent);
    color: white;
    box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.7);
    animation: pulse-attention 2.5s infinite cubic-bezier(0.66, 0, 0, 1);
}

.btn-pulse:hover {
    background: #e11d48;
    animation: none;
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 25px var(--accent-glow);
}

@keyframes pulse-attention {
    0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.6); }
    70% { box-shadow: 0 0 0 15px rgba(244, 63, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

/* =========================================
   FOOTER (Fester Abschluss)
   ========================================= */
footer {
    flex-shrink: 0;
    margin-top: auto;
    position: relative;
    z-index: 100; 
    background: #0f172a; 
    border-top: 4px solid var(--primary); 
}

/* =========================================
   SCROLLBAR (Elegantes Detail)
   ========================================= */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #eef2ff; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ============================================================
   DYNAMIC BACKGROUND SYSTEM (PREMIUM STYLES)
   ============================================================ */
#dynamic-bg-container {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: -1; 
    overflow: hidden;
    pointer-events: none; 
}

/* 1. SOLID & GRADIENT */
.bg-solid { background-color: var(--bg-value); }
.bg-gradient { background: var(--bg-value); }

/* 2. ANIMATION: COLOR BENDS (Farbwirbel) */
.bg-color-bends { background: #020617; }
.bg-color-bends::before, .bg-color-bends::after {
    content: ''; position: absolute; width: 80vw; height: 80vw;
    border-radius: 50%; filter: blur(100px); opacity: 0.6;
    animation: colorBendsAnim 20s infinite alternate ease-in-out;
}
.bg-color-bends::before {
    top: -20%; left: -10%;
    background: radial-gradient(circle, var(--primary), transparent 60%);
    animation-delay: -5s;
}
.bg-color-bends::after {
    bottom: -20%; right: -10%;
    background: radial-gradient(circle, #06b6d4, transparent 60%);
}
@keyframes colorBendsAnim {
    0% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(10%, 15%) scale(1.2); }
    100% { transform: translate(-10%, -10%) scale(0.9); }
}

/* 3. ANIMATION: DOT GRID (Pulsierendes Raster) */
.bg-dot-grid {
    background-color: #030014;
    background-image: radial-gradient(var(--primary-glow) 2px, transparent 2px);
    background-size: 30px 30px; animation: dotGridAnim 30s linear infinite;
}
.bg-dot-grid::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at center, transparent 0%, #030014 80%);
}
@keyframes dotGridAnim {
    from { background-position: 0 0; }
    to { background-position: -60px -60px; }
}

/* 4. ANIMATION: DARK VEIL (Tiefer Nebel) */
.bg-dark-veil {
    background: linear-gradient(-45deg, #020617, #0f172a, #1e1b4b, #000000);
    background-size: 400% 400%; animation: darkVeilAnim 15s ease infinite;
}
@keyframes darkVeilAnim {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* 5. ANIMATION: PARTICLES (Floating Beams) */
.bg-particles { background: #000; }
.bg-particles .beam {
    position: absolute; bottom: -20%; width: 2px; height: 50vh;
    background: linear-gradient(to top, transparent, var(--primary), transparent);
    opacity: 0.3; animation: beamFloat infinite linear;
}
@keyframes beamFloat {
    from { transform: translateY(0); opacity: 0; }
    50% { opacity: 0.5; }
    to { transform: translateY(-150vh); opacity: 0; }
}

/* 6. ANIMATION: AURORA (Sanfte Polarlichter) */
.bg-aurora { background: #020617; }
.bg-aurora::before, .bg-aurora::after {
    content: ''; position: absolute; width: 200vw; height: 200vh;
    background: radial-gradient(circle at 50% 50%, var(--primary-glow), transparent 60%);
    animation: auroraAnim 15s linear infinite; filter: blur(80px); opacity: 0.5;
    top: -50%; left: -50%;
}
.bg-aurora::after {
    background: radial-gradient(circle at 50% 50%, rgba(6,182,212,0.3), transparent 60%);
    animation: auroraAnim 20s linear infinite reverse; top: 0; left: 0;
}
@keyframes auroraAnim {
    0% { transform: rotate(0deg) translate(5%, 5%); }
    50% { transform: rotate(180deg) translate(-5%, -5%); }
    100% { transform: rotate(360deg) translate(5%, 5%); }
}

/* 7. ANIMATION: CYBER GRID (Retro 3D Gitter) */
.bg-cyber-wrapper { background: #030014; perspective: 1000px; }
.bg-cyber-wrapper .cyber-grid {
    position: absolute; width: 200vw; height: 200vh; left: -50%; top: 0;
    background-image: linear-gradient(var(--primary-glow) 2px, transparent 2px), linear-gradient(90deg, var(--primary-glow) 2px, transparent 2px);
    background-size: 60px 60px; transform: rotateX(60deg) translateY(0); animation: cyberGridAnim 3s linear infinite;
}
.bg-cyber-wrapper::after {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(to bottom, #030014 20%, transparent 80%);
}
@keyframes cyberGridAnim {
    0% { transform: rotateX(60deg) translateY(0); }
    100% { transform: rotateX(60deg) translateY(60px); }
}

/* =========================================================================
   8. ANIMATION: LIGHT RAYS (REACT BITS STYLE)
   ========================================================================= */

#light-rays-container {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 2 !important; /* Über dem Background, aber unter dem Content */
    pointer-events: none !important;
    overflow: hidden !important;
}

#light-rays-container.bg-light-rays {
    background: transparent !important;
}

/* Der weiße, zentrale Lichtkegel */
#light-rays-container .ray-main {
    position: absolute !important;
    top: -20% !important;
    left: -50% !important;
    width: 200% !important;
    height: 150% !important;
    
    background: conic-gradient(
        from 180deg at 50% 15%, 
        transparent 40%, 
        rgba(255, 255, 255, 0.45) 50%, 
        transparent 60%
    ) !important;
    
    filter: blur(40px) !important;
    transform-origin: 50% 15% !important;
    transform: rotate(calc((var(--mouse-x, 0.5) - 0.5) * 40deg)) !important;
    will-change: transform;
    transition: transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    
    -webkit-mask-image: radial-gradient(circle at 50% 0%, black 10%, transparent 70%);
    mask-image: radial-gradient(circle at 50% 0%, black 10%, transparent 70%);
}

/* Der farbige Glow außenrum */
#light-rays-container .ray-color {
    position: absolute !important;
    top: -20% !important;
    left: -50% !important;
    width: 200% !important;
    height: 150% !important;
    
    background: conic-gradient(
        from 180deg at 50% 15%, 
        transparent 35%, 
        var(--primary) 50%, /* Nimmt deine eingestellte Akzentfarbe */
        transparent 65%
    ) !important;
    
    filter: blur(80px) !important;
    opacity: 0.8 !important;
    transform-origin: 50% 15% !important;
    transform: rotate(calc((var(--mouse-x, 0.5) - 0.5) * 60deg)) !important; 
    will-change: transform;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
    
    -webkit-mask-image: radial-gradient(circle at 50% 0%, black 20%, transparent 80%);
    mask-image: radial-gradient(circle at 50% 0%, black 20%, transparent 80%);
}