:root {
    /* Noura Farbpalette angepasst an Larisch (Seriös aber Modern) */
    --bg-color: #ffffff;
    --text-main: #111111;
    --text-muted: #666666;
    --card-bg: #f3f4f6; /* Helles Grau für Kacheln */
    --accent: #2c3e50;  /* Dunkelblau für Buttons */
    --radius: 24px;     /* Starke Rundungen (Noura Style) */
    --container: 1200px;
    --larisch-red: #D71920;
    --kanzlei-green: #006633;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.5;
    position: relative;
    overflow-x: hidden;
}

/* Dezent helles Hintergrundbild über die gesamte Seite */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../pictures/Hintergrund.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.25; 
    z-index: -1;
    pointer-events: none;
}

/* Container */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Responsive Content Padding */
.main-content {
    padding-top: 122px;
}

@media (max-width: 992px) {
    .main-content {
        padding-top: 82px;
    }
}

/* --- Navigation --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
}

.logo img {
    height: 80px; 
    width: auto;
    display: block; 
    transition: height 0.4s ease;
}

nav ul {
    display: flex;
    gap: 2rem;
    list-style: none;
    padding: 0;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
}

/* Der Pill-Button für Login */
.btn-pill {
    background: #D71920; 
    color: white !important;
    padding: 10px 24px;
    border-radius: 50px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-pill:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

/* --- Hero Section (Zitate) --- */
.hero {
    position: fixed;
    top: 0;
    left: 0;
    padding: 0;
    width: 100%;
    height: 122px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    z-index: 500;
    transition: height 0.4s ease;
}

.hero.scrolled {
    height: 82px;
}

@media (max-width: 992px) {
    .hero { height: 82px; }
    .hero.scrolled { height: 58px; }
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 5rem); 
    line-height: 1.1;
    margin-bottom: 1rem;
    letter-spacing: -2px;
}

.hero p {
    font-size: 1.5rem;
    color: var(--text-muted);
}

/* Hero Slider Styles */
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background-color: #000; 
}

.slider-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    z-index: 1;
    transform: scale(1.1);
    transition: opacity 3s ease-in-out;
}

.slider-image.active {
    opacity: 1; 
    z-index: 2;
}

.slider-image.kenburns {
    animation: kenburns 40s linear both;
}

@keyframes kenburns {
    0% { transform: scale(1.1) rotate(0deg) translate(var(--kb-start-x, 0), var(--kb-start-y, 0)); }
    100% { transform: scale(1.6) rotate(1.5deg) translate(var(--kb-x, -5%), var(--kb-y, -5%)); }
}

/* --- Grid Section --- */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 6rem;
}

.card {
    background: var(--card-bg);
    padding: 3rem 2rem;
    border-radius: var(--radius);
    transition: transform 0.3s ease;
    text-decoration: none;
    color: var(--text-main);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 300px;
}

.card:hover {
    transform: translateY(-10px);
}

.card h3 {
    font-size: 2rem;
    margin: 0 0 1rem 0;
}

.card .arrow {
    font-size: 2rem;
    align-self: flex-end;
}

/* --- Marquee / Laufschrift --- */
.marquee-container {
    background: var(--text-main);
    color: white;
    padding: 1.5rem 0;
    overflow: hidden;
    white-space: nowrap;
    margin: 4rem 0;
    transform: rotate(-1deg); 
}

.marquee-content {
    display: inline-block;
    animation: marquee 20s linear infinite;
    font-size: 1.5rem;
    font-weight: 700;
    text-transform: uppercase;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Footer --- */
footer {
    padding: 4rem 0;
    border-top: 1px solid #eee;
    margin-top: 4rem;
}

/* =========================================
   ORBIT SEKTION (Kreis-Animation)
   ========================================= */

.orbit-section {
    position: relative;
    height: 620px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: visible;
    z-index: 10;
}

/* --- NEU: Die feste Info-Box über den Kreisen --- */
#story-container {
    position: relative;
    width: 100%;
    max-width: 600px;
    min-height: 160px;
    margin: 0 auto 2rem auto;
    text-align: center;
    z-index: 50;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
    border: 1px solid rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
}

/* Der Pfeil der Sprechblase */
#story-container::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 15px 15px 0;
    border-style: solid;
    border-color: rgba(255, 255, 255, 0.95) transparent transparent transparent;
}

#story-title {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--larisch-red);
    margin-bottom: 0.5rem;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

/* Aktiv-Status für den gesamten Container */
#story-container.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#story-text {
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--text-main);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.3s ease;
}

/* Aktiv-Status per JS */
#story-container.active #story-title,
#story-container.active #story-text {
    opacity: 1;
    transform: translateY(0);
}

/* Der mittlere Text-Kreis */
.center-teaser {
    position: absolute;
    z-index: 20;
    width: 300px; 
    height: 300px;
    background: #ffffff;
    border-radius: 50%;
    box-shadow: 0 30px 70px rgba(0,0,0,0.25); 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem; 
    box-sizing: border-box; 
    animation: pulse-center 4s ease-in-out infinite;
}

.center-teaser h2 {
    font-size: 2rem;
    font-weight: 800;
    margin: 0 0 1rem 0;
    color: #111;
    line-height: 1.2;
}

.center-teaser p {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 0.75rem; 
}

/* Der rotierende Ring */
.orbit-ring {
    position: absolute;
    width: 488px; 
    height: 488px;
    border-radius: 50%;
    border: none; 
    animation: spin-right 80s linear infinite; 
}

/* Die Satelliten (Icons) */
.orbit-item {
    position: absolute;
    width: 90px;
    height: 90px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: -45px;
    margin-left: -45px;
    animation: spin-left 80s linear infinite;
    cursor: pointer;
}

/* BUGFIX 2026-07-03: Beim Hover pausierte bisher NUR die Gegenrotation des
   angehoberten Satelliten (spin-left) -- der Ring selbst (spin-right) lief
   weiter. Dadurch liefen beide Animationen sofort auseinander und Symbol/
   Text kippten aus der Waagerechten, sobald man einen Satelliten hoverte
   (Live-Befund: "Besseres Rating" stand schraeg). Fix: Ring UND Satellit
   pausieren gemeinsam, sobald irgendein Satellit gehovert wird -- so bleibt
   die Gegenrotation exakt synchron und Inhalt bleibt waagerecht, auch waehrend
   der Pause. :has() wird von allen aktuellen Desktop-/Mobile-Browsern
   unterstuetzt (Chrome/Edge/Safari >=105, Firefox >=121); ohne :has()-Support
   pausiert nur der Satellit selbst (Rueckfallverhalten wie zuvor -- kein
   Funktionsverlust, nur die Synchronitaet waere in diesem seltenen Fall wieder
   wie vor dem Fix). */
.orbit-ring:has(.orbit-item:hover) {
    animation-play-state: paused;
}

.orbit-item:hover {
    animation-play-state: paused;
}

/* === EXAKTE POSITIONIERUNG === */
.orbit-item:nth-child(1) { top: 0%; left: 50%; }
.orbit-item:nth-child(2) { top: 14.65%; left: 85.35%; }
.orbit-item:nth-child(3) { top: 50%; left: 100%; }
.orbit-item:nth-child(4) { top: 85.35%; left: 85.35%; }
.orbit-item:nth-child(5) { top: 100%; left: 50%; }
.orbit-item:nth-child(6) { top: 85.35%; left: 14.65%; }
.orbit-item:nth-child(7) { top: 50%; left: 0%; }
.orbit-item:nth-child(8) { top: 14.65%; left: 14.65%; }

@keyframes spin-right { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
@keyframes spin-left { 0% { transform: rotate(0deg); } 100% { transform: rotate(-360deg); } }

/* =========================================
   HOVER TEXTE & STORY 
   ========================================= */

/* Der kleine Titel direkt am Icon (Label) */
.hover-text {
    position: absolute;
    bottom: 110%; 
    left: 50%;
    transform: translateX(-50%) translateY(10px); 
    background-color: #1a1a1a; 
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 50px; 
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap; 
    opacity: 0;       
    visibility: hidden; 
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    z-index: 100;
    pointer-events: none; 
}

.hover-text::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: #1a1a1a transparent transparent transparent;
}

/* WICHTIG: Die Story-Box im Ring standardmäßig VERSTECKEN (Desktop) */
/* Der Text wird per JS in den #story-container oben kopiert */
.orbit-story {
    display: none; 
}

/* Trigger: Label anzeigen */
.orbit-item:hover .hover-text {
    opacity: 1; 
    visibility: visible;
    transform: translateX(-50%) translateY(0); 
}

/* Trigger: Icon vergrößern */
.orbit-item .icon {
    background: white;
    border-radius: 50%;
    box-shadow: 0 20px 45px rgba(0,0,0,0.25);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.orbit-item .icon img {
    width: 60%;
    height: 60%;
    object-fit: contain;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.orbit-item:hover .icon {
    transform: scale(1.3);
    box-shadow: 0 30px 60px rgba(0,0,0,0.3);
}

/* === MOBILE ANPASSUNG === */
@media (max-width: 900px) {
    
    /* Box oben auf Mobile ausblenden (dafür Texte inline) */
    #story-container {
        display: none !important;
    }

    .orbit-section { 
        height: auto; 
        flex-direction: column; 
        padding: 2rem 1rem; 
        overflow: visible;
    }
    
    .center-teaser { 
        position: relative; 
        width: 100%; 
        height: auto; 
        border-radius: 30px; 
        margin-bottom: 3rem;
        padding: 2rem;
        animation: none; 
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }

    .orbit-ring { 
        position: relative; 
        width: 100%; 
        height: auto; 
        border: none; 
        animation: none; 
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
        gap: 2rem; 
        margin-top: 0;
    }

    .orbit-item {
        position: relative;
        top: auto !important;
        left: auto !important;
        margin: 0 !important;
        animation: none; 
        transform: none;
        width: 100%;
        height: auto;
        flex-direction: column;
        display: flex;
        align-items: center;
        background: white;
        padding: 2rem;
        border-radius: 20px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    }

    /* Mobil: Label unter dem Icon */
    .hover-text {
        position: relative;
        bottom: auto;
        left: auto;
        transform: none !important;
        opacity: 1;
        visibility: visible;
        background: transparent;
        color: var(--larisch-red);
        box-shadow: none;
        padding: 1rem 0 0.5rem 0;
        font-size: 1.2rem;
        font-weight: 800;
        display: block;
        width: 100%;
        text-align: center;
        white-space: normal; 
    }
    .hover-text::after { display: none; }

    /* Mobil: Story-Text sichtbar machen! */
    .orbit-story {
        display: block !important; /* Hier überschreiben wir das Desktop-None */
        position: relative;
        width: 100%;
        background: transparent;
        color: var(--text-muted);
        box-shadow: none;
        border: none;
        padding: 0;
        font-size: 1rem;
        text-align: center;
        margin-top: 0.5rem;
    }
    .orbit-story::after { display: none; }

    .orbit-item .icon {
        width: 80px;
        height: 80px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    }
}

/* =========================================
   BENEFIT CARDS 
   ========================================= */

.benefit-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(15px);
    padding: 0.4rem 1.2rem; 
    border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-left: 6px solid var(--kanzlei-green);
    transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    font-size: 0.95rem;
}

.benefit-card img {
    width: 40px;
    height: 40px;
    display: block;
    margin-bottom: 0.25rem;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.98);
    z-index: 10;
    cursor: pointer;
}

/* Sanfte Hervorhebung des Ziel-Abschnitts nach Klick auf einen Orbit-Satelliten */
@keyframes saeule-highlight-fade {
    0%   { background-color: rgba(255, 221, 87, 0.55); }
    100% { background-color: rgba(255, 255, 255, 0.8); }
}

.saeule-highlight {
    animation: saeule-highlight-fade 2s ease-out;
}

/* Dauerhafte Auswahl-Markierung des angesprungenen Abschnitts ("wie
   angeklickt") — wandert beim nächsten Satelliten-Klick zum neuen Ziel. */
.saeule-aktiv {
    border-left: 5px solid var(--larisch-red, #D71920) !important;
    box-shadow: 0 10px 30px rgba(215, 25, 32, 0.18);
    transform: translateY(-2px);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

/* ---------------------------------------------------------------------------
   Schwebendes Popup fuer die ErfolgsReport-Satelliten (Klick auf einen
   Satelliten). Schwebt ueber allen Objekten (sehr hohe z-index) mit
   abdunkelndem Backdrop; weiche Ein-/Ausblend-Animation.
   --------------------------------------------------------------------------- */
.satellit-popup[hidden],
.satellit-popup-backdrop[hidden] { display: none; }

.satellit-popup-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(16, 24, 40, 0.6);
    z-index: 99998;
    opacity: 0;
    transition: opacity 0.26s ease;
}
.satellit-popup-backdrop.aktiv { opacity: 1; }

.satellit-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    z-index: 99999;
    width: min(92vw, 520px);
    max-height: 88vh;
    overflow-y: auto;
    background: #ffffff;
    border-radius: 24px;
    padding: 2.75rem 2.25rem 2.25rem;
    box-shadow: 0 40px 100px rgba(16, 24, 40, 0.45);
    border-top: 6px solid var(--larisch-red);
    text-align: center;
    opacity: 0;
    transition: opacity 0.26s ease,
                transform 0.26s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.satellit-popup.aktiv {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.satellit-popup__close {
    position: absolute;
    top: 12px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: none;
    background: rgba(16, 24, 40, 0.06);
    color: var(--text-dark);
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}
.satellit-popup__close:hover {
    background: var(--larisch-red);
    color: #ffffff;
}

.satellit-popup__icon img {
    width: 74px;
    height: 74px;
    object-fit: contain;
    display: block;
    margin: 0 auto 1.1rem;
    filter: drop-shadow(0 12px 20px rgba(16, 24, 40, 0.18));
}

.satellit-popup__titel {
    color: var(--larisch-red);
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin: 0 0 0.9rem;
}

.satellit-popup__text {
    color: var(--text-dark);
    font-size: 1.12rem;
    line-height: 1.65;
}

@media (max-width: 992px) {
    .satellit-popup { padding: 2.25rem 1.5rem 1.75rem; }
    .satellit-popup__titel { font-size: 1.4rem; }
    .satellit-popup__icon img { width: 62px; height: 62px; }
}

.team-section {
    display: flex; 
    align-items: center; 
    gap: 5rem; 
    max-width: 1100px; 
    margin: 6rem auto 10rem auto; 
    text-align: left; 
    flex-wrap: wrap;
}

@media (max-width: 992px) {
    .team-section {
        margin: 4rem auto;
        gap: 3rem;
        text-align: center;
    }
}

.team-image-container {
    position: relative;
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
}

.team-image-container:hover {
    transform: scale(1.05);
}

.team-image {
    width: 100%;
    border-radius: 40px;
    box-shadow: 0 40px 80px rgba(0,0,0,0.3);
    display: block;
    position: relative;
    z-index: 2;
    transition: box-shadow 0.5s ease;
}

.team-image-container:hover .team-image {
    box-shadow: 0 50px 100px rgba(0,0,0,0.4);
}

.team-image-decoration {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 100%;
    height: 100%;
    border: 2px solid var(--larisch-red);
    border-radius: 40px;
    z-index: 1;
}

.benefit-card:hover img {
    transform: scale(1.3); 
}

@media (max-width: 768px) {
    .benefit-card {
        padding: 1rem; 
        text-align: center;
    }
}

/* --- Animationen für Content --- */
.fade-in-up {
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse-center {
    0% { box-shadow: 0 30px 70px rgba(0,0,0,0.25); }
    50% { box-shadow: 0 40px 90px rgba(215, 25, 32, 0.35); }
    100% { box-shadow: 0 30px 70px rgba(0,0,0,0.25); }
}
.stagger-1 { animation-delay: 0.2s; }
.stagger-2 { animation-delay: 0.4s; }
.stagger-3 { animation-delay: 0.6s; }
.stagger-4 { animation-delay: 0.8s; }
/* --- CSP-Härtung: Hover-Effekte als Klassen statt Inline-Handlern ---------- */
.hover-lift { transition: transform 0.3s ease; }
.hover-lift:hover { transform: translateY(-5px); }
.hover-zoom { transition: transform 0.5s ease; }
.hover-zoom:hover { transform: scale(1.05); }


/* --- Chat-Bot: gruener PDF-Download-Button in Antworten ------------------- */
.chat-pdf-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 6px 14px;
    background: var(--kanzlei-green, #006633);
    color: #fff !important;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
}
.chat-pdf-btn:hover { background: #00522a; }
