/* =========================
   NEXO V LAW PAGE PREMIUM
========================= */

.rules-page {
    padding: 120px 0;
    min-height: 140vh; /* ganze Seite länger */
    background:
        radial-gradient(circle at top right, rgba(255,43,214,0.08), transparent 35%),
        radial-gradient(circle at bottom left, rgba(122,60,255,0.08), transparent 35%),
        #050507;
}

.rules-inner {
    max-width: 1700px;
    margin: 0 auto;
    padding: 0 70px;
}

.rules-layout {
    display: grid;
    grid-template-columns: 380px minmax(0, 1fr);
    gap: 70px;
    align-items: start;
}

/* =========================
   SIDEBAR
========================= */

.rules-sidebar {
    position: sticky;
    top: 95px;
    max-height: none;   /* ❗ wichtig */
    overflow-y: auto;
    overflow-x: hidden;
    overflow: visible;  /* ❗ wichtig */

    padding: 24px;
    border-radius: 24px;
    background: rgba(8,8,14,0.78);
    border: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(18px);

    box-shadow:
        0 30px 80px rgba(0,0,0,0.55),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

.rules-sidebar::-webkit-scrollbar {
    width: 8px;
}

.rules-sidebar::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.04);
    border-radius: 99px;
}

.rules-sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(#7a3cff, #ff2bd6);
    border-radius: 99px;
}

.rules-sidebar-head {
    position: sticky;
    top: 0;
    z-index: 10;
    background: linear-gradient(to bottom, rgba(8,8,14,0.98), rgba(8,8,14,0.82));
    padding-bottom: 18px;
}

.rules-sidebar-title {
    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.28em;
    color: #ff2bd6;
    text-transform: uppercase;
}

/* =========================
   SEARCH
========================= */

.law-search-box {
    position: sticky;
    top: 0;                 /* 👉 ganz oben kleben */

    z-index: 50;            /* 👉 über allem in der Sidebar */

    height: 64px;
    margin: 0 0 20px;       /* 👉 kein Abstand oben! */

    background: rgba(8,8,14,0.95); /* 👉 wichtig, sonst durchsichtig */
    backdrop-filter: blur(14px);

    border-bottom: 1px solid rgba(255,255,255,0.08);
}

.law-search-box i {
    color: #ff2bd6;
    font-size: 17px;
}

.law-search-box input {
    width: 100%;
    border: none;
    outline: none;
    background: transparent;

    color: #fdfbff;
    font-size: 16px;
    font-family: 'Barlow', sans-serif;
}

.law-search-box input::placeholder {
    color: rgba(253,251,255,0.45);
}

/* Wichtig: NICHT abschneiden */
.rules-sidebar-list {
    max-height: none;
    overflow: visible;
    padding-right: 8px;
}

/* =========================
   SIDEBAR BUTTONS
========================= */

.sidebar-group {
    margin-bottom: 12px;
}

.rules-nav-btn.main {
    min-height: 60px;
    padding: 0 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-radius: 16px;
    cursor: pointer;

    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.075);

    font-family: 'Oswald', sans-serif;
    font-size: 16px;
    letter-spacing: 0.03em;
    text-transform: uppercase;

    transition: 0.25s ease;
}

.rules-nav-btn.main:hover {
    border-color: rgba(255,43,214,0.45);
    background: rgba(255,43,214,0.08);
    transform: translateX(4px);
}

.rules-nav-btn.main .arrow {
    color: #a8a2b3;
    transition: 0.25s ease;
}

.sidebar-group.open .rules-nav-btn.main .arrow {
    transform: rotate(180deg);
    color: #ff2bd6;
}

/* ───────── SUB MENU ANIMATION ───────── */

.sidebar-sub {
    max-height: 0;
    opacity: 0;
    overflow: hidden;

    transform: translateY(-6px);

    transition:
        max-height 0.35s ease,
        opacity 0.25s ease,
        transform 0.25s ease;

    padding: 0 0 0 14px;
}

/* OPEN STATE */
.sidebar-group.open .sidebar-sub {
    max-height: 500px; /* groß genug */
    opacity: 1;
    transform: translateY(0);

    padding: 10px 0 4px 14px;
}

/* ───────── PREMIUM POP ANIMATION ───────── */

.sidebar-group.open .sidebar-sub {
    animation: dropdownPop 0.35s cubic-bezier(.2,.8,.2,1);
}

.sidebar-group.open .rules-sub-btn {
    animation: subItemPop 0.28s ease both;
}

.sidebar-group.open .rules-sub-btn:nth-child(1) { animation-delay: 0.03s; }
.sidebar-group.open .rules-sub-btn:nth-child(2) { animation-delay: 0.06s; }
.sidebar-group.open .rules-sub-btn:nth-child(3) { animation-delay: 0.09s; }
.sidebar-group.open .rules-sub-btn:nth-child(4) { animation-delay: 0.12s; }
.sidebar-group.open .rules-sub-btn:nth-child(5) { animation-delay: 0.15s; }
.sidebar-group.open .rules-sub-btn:nth-child(6) { animation-delay: 0.18s; }
.sidebar-group.open .rules-sub-btn:nth-child(7) { animation-delay: 0.21s; }
.sidebar-group.open .rules-sub-btn:nth-child(8) { animation-delay: 0.24s; }
.sidebar-group.open .rules-sub-btn:nth-child(9) { animation-delay: 0.27s; }
.sidebar-group.open .rules-sub-btn:nth-child(10) { animation-delay: 0.30s; }

@keyframes dropdownPop {
    0% {
        transform: translateY(-10px) scale(0.97);
        opacity: 0;
        filter: blur(4px);
    }

    100% {
        transform: translateY(0) scale(1);
        opacity: 1;
        filter: blur(0);
    }
}

@keyframes subItemPop {
    0% {
        transform: translateX(-12px) scale(0.96);
        opacity: 0;
    }

    100% {
        transform: translateX(0) scale(1);
        opacity: 1;
    }
}

.rules-sub-btn {
    min-height: 46px;
    margin: 6px 0;
    padding: 12px 15px;

    display: flex;
    align-items: center;

    border-radius: 13px;
    cursor: pointer;

    color: #a8a2b3;
    font-size: 14px;
    line-height: 1.35;

    background: rgba(255,255,255,0.025);
    border: 1px solid transparent;

    transition: 0.22s ease;
}

.rules-sub-btn:hover {
    color: #fdfbff;
    border-color: rgba(122,60,255,0.45);
    background: rgba(122,60,255,0.08);
}

.rules-sub-btn.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(122,60,255,0.75), rgba(255,43,214,0.65));
    border-color: rgba(255,255,255,0.12);
    box-shadow: 0 12px 30px rgba(255,43,214,0.16);
}

.rules-sub-btn.search-hit {
    box-shadow: inset 3px 0 0 #ff2bd6;
}

/* =========================
   SIDEBAR FOOTER
========================= */

.rules-sidebar-footer {
    position: sticky;
    bottom: 0;
    z-index: 10;

    margin-top: 18px;
    padding-top: 16px;

    background: linear-gradient(to top, rgba(8,8,14,0.98), rgba(8,8,14,0.75));
}

.sidebar-info {
    padding: 14px 16px;
    border-radius: 14px;

    color: rgba(253,251,255,0.55);
    font-size: 12px;

    background: rgba(255,255,255,0.035);
    border: 1px solid rgba(255,255,255,0.06);
}

/* =========================
   CONTENT
========================= */

#law-content {
    min-width: 0;
}

.law-view {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 390px;
    gap: 42px;
    align-items: start;
}

.law-main {
    min-height: 520px;
    padding: 58px;

    border-radius: 26px;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));
    border: 1px solid rgba(255,255,255,0.08);

    box-shadow:
        0 30px 90px rgba(0,0,0,0.42),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

.law-title {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(24px, 4.5vw, 48px);
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: -0.02em;

    margin-bottom: 38px;

    background: linear-gradient(90deg, #fdfbff, #ff2bd6);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.law-text {
    font-size: 18px;
    line-height: 1.95;
    color: #c9c4d4;
}

/* =========================
   PREMIUM ABSÄTZE
========================= */

.law-abs {
    position: relative;

    padding: 26px 28px 26px 34px;
    margin-bottom: 18px;

    border-radius: 18px;

    background:
        linear-gradient(135deg, rgba(255,255,255,0.04), rgba(255,255,255,0.015));

    border: 1px solid rgba(255,255,255,0.08);

    backdrop-filter: blur(8px);

    transition: 0.25s ease;
}

.law-abs:hover {
    transform: translateY(-2px);
    border-color: rgba(255,43,214,0.4);
    box-shadow: 0 10px 30px rgba(255,43,214,0.08);
}

.law-abs::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18px;
    bottom: 18px;
    width: 4px;
    border-radius: 99px;

    background: linear-gradient(#7a3cff, #ff2bd6);
}

.abs-num {
    display: inline-block;

    margin-bottom: 12px;

    font-family: 'Share Tech Mono', monospace;
    font-size: 13px;
    letter-spacing: 0.15em;

    color: #ff2bd6;

    padding: 4px 10px;
    border-radius: 6px;

    background: rgba(255,43,214,0.08);
    border: 1px solid rgba(255,43,214,0.2);
}

.law-abs div {
    font-size: 17px;
    line-height: 1.9;
    color: #d5d0e0;
}

.law-abs + .law-abs {
    margin-top: 14px;
}

/* =========================
   PENALTY CARD
========================= */

.law-penalty-card {
    position: sticky;
    top: 95px;

    padding: 34px;
    border-radius: 26px;

    background:
        linear-gradient(145deg, rgba(255,255,255,0.045), rgba(255,255,255,0.015));
    border: 1px solid rgba(255,255,255,0.08);

    box-shadow:
        0 30px 80px rgba(0,0,0,0.45),
        inset 0 1px 0 rgba(255,255,255,0.04);
}

.penalty-header {
    font-family: 'Oswald', sans-serif;
    font-size: 28px;
    text-transform: uppercase;
    margin-bottom: 28px;
}

.penalty-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.penalty-box {
    padding: 24px 20px;
    border-radius: 18px;

    background: rgba(0,0,0,0.28);
    border: 1px solid rgba(255,255,255,0.065);
}

.penalty-label {
    font-size: 13px;
    color: #a8a2b3;
    margin-bottom: 8px;
}

.penalty-value {
    font-family: 'Oswald', sans-serif;
    font-size: 36px;
    color: #fdfbff;
}

.penalty-bar {
    height: 9px;
    margin: 30px 0;

    border-radius: 99px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}

.penalty-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #7a3cff, #ff2bd6);
}

.penalty-note {
    font-size: 15px;
    line-height: 1.75;
    color: #a8a2b3;
}

.law-penalty-card.low {
    border-color: rgba(0,255,170,0.18);
}

.law-penalty-card.mid {
    border-color: rgba(255,170,0,0.22);
}

.law-penalty-card.high {
    border-color: rgba(255,50,90,0.25);
}

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

@media (max-width: 1300px) {
    .rules-inner {
        padding: 0 36px;
    }

    .rules-layout {
        grid-template-columns: 320px minmax(0, 1fr);
        gap: 38px;
    }

    .law-view {
        grid-template-columns: 1fr;
    }

    .law-penalty-card {
        position: relative;
        top: auto;
    }
}


.rules-sidebar {
    position: sticky;
    top: 95px;

    height: auto;          /* ❗ nicht mehr 100vh */
    min-height: 1200px;    /* 👉 hier machst du sie länger */

    overflow: visible;     /* ❗ nichts abschneiden */
}


.rules-sidebar-list {
    flex: 1;
    overflow: hidden;
}

.sidebar-sub {
    display: none;
    padding: 10px 0 4px 14px;
}

.sidebar-group.open .sidebar-sub {
    display: block;
    max-height: 420px;
    overflow-y: auto;
    padding-right: 6px;
}

@media (max-width: 900px) {
    .rules-page {
        padding: 80px 0;
    }

    .rules-inner {
        padding: 0 20px;
    }

    .rules-layout {
        grid-template-columns: 1fr;
    }

    .rules-sidebar {
        position: relative;
        top: auto;
        max-height: 520px;
        overflow-y: auto;
    }

    .rules-sidebar-list {
        max-height: none;
        overflow: visible;
    }

    .law-main {
        padding: 32px;
    }

    .law-title {
        font-size: 38px;
    }

    .law-text {
        font-size: 16px;
    }
}

/* ⚖️ GESETZ GRUNDSATZ */
.law-principle {
    position: relative;
    padding: 100px 20px;
    text-align: center;
    overflow: hidden;
}

/* Background Glow */
.law-principle::before {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(122,60,255,0.08), transparent 70%);
    z-index: 0;
}

/* Inhalt */
.law-principle-inner {
    position: relative;
    max-width: 900px;
    margin: auto;
    z-index: 1;
}

/* Eyebrow */
.law-principle-eyebrow {
    font-size: 12px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.4);
    margin-bottom: 20px;
}

/* Titel */
.law-principle-title {
    font-family: 'Oswald', sans-serif;
    font-size: clamp(28px, 4vw, 48px);
    font-weight: 700;
    line-height: 1.1;
    color: var(--w);
}

/* Highlight */
.law-principle-title span {
    display: block;
    color: var(--b);
    text-shadow: 0 0 18px rgba(0,212,255,0.5);
}

/* Divider */
.law-principle-divider {
    width: 80px;
    height: 2px;
    margin: 30px auto;
    background: linear-gradient(90deg, transparent, var(--b), transparent);
}

/* Text */
.law-principle-text {
    font-size: 14px;
    line-height: 1.8;
    color: var(--g);
    max-width: 600px;
    margin: auto;
}

/* 🔥 Animation (Fade + Slide) */
.law-principle-inner {
    opacity: 0;
    transform: translateY(40px);
    animation: lawFadeIn 1s ease forwards;
}

@keyframes lawFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}