/* =========================================================
   DN SHINE — Vorher/Nachher Video-Vergleich
   Scoped unter .dns-compare, gleiche Blau-Palette wie Hero
   (#158ddd / #0769af) fuer einen einheitlichen Look.
========================================================= */

.dns-compare {
    position: relative;
    padding: 7.75rem 0;
    /* .row.g-5 hat groesseren Bootstrap-Gutter (-24px Rand) als .container
       ausgleicht (nur 12px Padding) -> 12px Ueberlauf pro Seite, der auf
       Mobile zu horizontalem Scrollen fuehrt. */
    overflow-x: hidden;
}

.dns-compare__text h3 {
    margin: 0 0 1.5rem;
    font-size: 1.5rem;
}

.dns-compare__text h3 + ul {
    margin-bottom: 3rem;
}

.dns-compare__text ul:last-of-type {
    margin-bottom: 0;
}

.dns-compare__text .fas {
    color: #3edaff;
    margin-top: .3rem;
    margin-right: .6rem;
}

/* =========================== BÜHNE =============================== */

.dns-compare__panel {
    position: relative;
    margin: 0;
    aspect-ratio: 16/10;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,.13);
    background: #141922;
    box-shadow:
        0 60px 90px -40px rgba(0,0,0,.9),
        0 0 0 1px rgba(255,255,255,.05) inset,
        0 30px 80px -30px rgba(0,130,220,.45);
    animation: dnsCompareFloat 7s ease-in-out infinite;
    cursor: ew-resize;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}

@keyframes dnsCompareFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-11px); }
}

.dns-compare__media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    background: #141922;
}

.dns-compare__clip {
    position: absolute;
    inset: 0;
    clip-path: inset(0 calc(100% - var(--pos,50%)) 0 0);
    will-change: clip-path;
}

/* Vorher leicht entsaettigt -> Kontrast zum Ergebnis */
.dns-compare__clip .dns-compare__media {
    filter: saturate(.72) brightness(.9) contrast(1.02);
}

/* Labels */
.dns-compare__tag {
    position: absolute;
    top: 1rem;
    z-index: 4;
    font-weight: 600;
    font-size: .68rem;
    letter-spacing: .16em;
    text-transform: uppercase;
    padding: .4rem .8rem;
    border-radius: 100px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.dns-compare__tag--before {
    left: 1rem;
    color: #dfe6ef;
    background: rgba(10,12,17,.6);
    border: 1px solid rgba(255,255,255,.10);
}

.dns-compare__tag--after {
    right: 1rem;
    color: #06131f;
    background: linear-gradient(135deg, #158ddd, #0769af);
}

/* Glanzkante wandert ueber das Panel */
.dns-compare__gloss {
    position: absolute;
    top: -40%;
    left: -35%;
    z-index: 3;
    width: 34%;
    height: 180%;
    background: linear-gradient(100deg, transparent, rgba(255,255,255,.13), transparent);
    transform: rotate(14deg);
    animation: dnsCompareSweep 6.5s ease-in-out 1.5s infinite;
    pointer-events: none;
}

@keyframes dnsCompareSweep {
    0% { left: -35%; }
    55%, 100% { left: 125%; }
}

/* Trennlinie + Griff */
.dns-compare__handle {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 5;
    left: var(--pos,50%);
    translate: -50% 0;
    width: 56px;
    display: grid;
    place-items: center;
    cursor: ew-resize;
    touch-action: none;
    outline: none;
}

.dns-compare__handle-line {
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, transparent, #fff 12%, #fff 88%, transparent);
    box-shadow: 0 0 22px rgba(0,180,255,.85);
}

.dns-compare__handle-knob {
    position: relative;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    color: #06131f;
    background: linear-gradient(160deg, #eaf6ff, #b6d9f6);
    box-shadow: 0 10px 26px rgba(0,0,0,.55), 0 0 0 6px rgba(0,180,255,.16);
    transition: transform .22s cubic-bezier(.2,.8,.2,1), box-shadow .22s;
}

.dns-compare__handle:hover .dns-compare__handle-knob,
.dns-compare__handle:focus-visible .dns-compare__handle-knob {
    transform: scale(1.1);
    box-shadow: 0 12px 32px rgba(0,0,0,.6), 0 0 0 10px rgba(0,180,255,.24);
}

.dns-compare__handle:focus-visible {
    outline: 2px solid #3edaff;
    outline-offset: 6px;
    border-radius: 14px;
}

/* =========================== RESPONSIVE ============================ */

@media (max-width: 991.98px) {
    .dns-compare {
        padding: 4.5rem 0;
        text-align: center;
    }

    .dns-compare__text {
        order: 2;
        margin-top: 3rem;
    }

    .dns-compare__stage {
        order: 1;
    }

    .dns-compare__panel {
        aspect-ratio: 4/3;
        border-radius: 18px;
    }
}

@media (max-width: 575.98px) {
    .dns-compare__handle-knob {
        width: 44px;
        height: 44px;
    }

    .dns-compare__tag {
        font-size: .6rem;
        padding: .32rem .62rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dns-compare__panel,
    .dns-compare__gloss {
        animation: none;
    }
}
