/* ==========================================================================
   Regelwerk
   ========================================================================== */

.rules-page {
    width: 100%;
}


/* ==========================================================================
   Seitenkopf
   ========================================================================== */

.rules-header {
    max-width: 900px;
    margin-bottom: 2.5rem;
}

.rules-header h1 {
    margin: 0;
}

.rules-header__subtitle {
    max-width: 780px;
    margin: 1rem 0 0;
    color: var(--color-text-muted, #94a3b8);
    font-size: 1.05rem;
    line-height: 1.75;
}


/* ==========================================================================
   Hinweis zur offiziellen Fassung
   ========================================================================== */

.rules-notice {
    max-width: 1000px;
    margin-bottom: 2rem;
    padding: 1.5rem 1.75rem;
    background:
        linear-gradient(
            145deg,
            rgba(30, 58, 95, 0.86),
            rgba(17, 35, 61, 0.96)
        );
    border: 1px solid rgba(96, 165, 250, 0.28);
    border-left: 5px solid var(--color-primary, #3b82f6);
    border-radius: 14px;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
}

.rules-notice h2 {
    margin: 0 0 0.85rem;
    color: var(--color-text, #f8fafc);
    font-size: 1.2rem;
    line-height: 1.4;
}

.rules-notice p {
    margin: 0 0 0.75rem;
    color: var(--color-text-muted, #cbd5e1);
    line-height: 1.7;
}

.rules-notice p:last-child {
    margin-bottom: 0;
}


/* ==========================================================================
   Inhaltsübersicht
   ========================================================================== */

.rules-navigation {
    max-width: 1000px;
    margin-bottom: 3rem;
    padding: 1.5rem 1.75rem;
    background: rgba(8, 22, 42, 0.52);
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-radius: 14px;
}

.rules-navigation h2 {
    margin: 0 0 1rem;
    color: var(--color-text, #f8fafc);
    font-size: 1.1rem;
    line-height: 1.4;
}

.rules-navigation__links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.rules-navigation__links a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    padding: 0.65rem 1rem;
    background: rgba(37, 99, 235, 0.14);
    border: 1px solid rgba(96, 165, 250, 0.24);
    border-radius: 999px;
    color: #bfdbfe;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    text-decoration: none;
    transition:
        background-color 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

.rules-navigation__links a:hover,
.rules-navigation__links a:focus-visible {
    background: rgba(37, 99, 235, 0.28);
    border-color: rgba(96, 165, 250, 0.48);
    color: #ffffff;
}


/* ==========================================================================
   Regelabschnitte
   ========================================================================== */

.rules-sections {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.rules-section {
    scroll-margin-top: 2rem;
}

.rules-section__header {
    max-width: 1000px;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.rules-section__label {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--color-primary, #60a5fa);
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1.4;
    text-transform: uppercase;
}

.rules-section__header h2 {
    margin: 0;
    color: var(--color-text, #f8fafc);
    font-size: clamp(1.45rem, 3vw, 2rem);
    line-height: 1.35;
}


/* ==========================================================================
   Regelliste
   ========================================================================== */

.rules-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.9rem;
    max-width: 1100px;
}


/* ==========================================================================
   Einzelne Regelkarte
   ========================================================================== */

.rule-card {
    display: grid;
    grid-template-columns: 2.8rem minmax(0, 1fr);
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem 1.4rem;
    background:
        linear-gradient(
            145deg,
            rgba(30, 58, 95, 0.72),
            rgba(17, 35, 61, 0.9)
        );
    border: 1px solid rgba(96, 165, 250, 0.18);
    border-radius: 14px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.12);
}

.rule-card__letter {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    background: rgba(37, 99, 235, 0.16);
    border: 1px solid rgba(96, 165, 250, 0.28);
    border-radius: 50%;
    color: #93c5fd;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.rule-card p {
    margin: 0;
    color: var(--color-text-muted, #cbd5e1);
    font-size: 0.98rem;
    line-height: 1.75;
}


/* ==========================================================================
   Hervorgehobene Regeln
   ========================================================================== */

.rule-card--important {
    border-color: rgba(251, 191, 36, 0.28);
    background:
        linear-gradient(
            145deg,
            rgba(92, 65, 20, 0.34),
            rgba(30, 39, 55, 0.94)
        );
}

.rule-card--important .rule-card__letter {
    background: rgba(245, 158, 11, 0.16);
    border-color: rgba(251, 191, 36, 0.34);
    color: #fde68a;
}

.rule-card--danger {
    border-color: rgba(248, 113, 113, 0.3);
    background:
        linear-gradient(
            145deg,
            rgba(92, 34, 34, 0.38),
            rgba(36, 29, 40, 0.94)
        );
}

.rule-card--danger .rule-card__letter {
    background: rgba(220, 38, 38, 0.16);
    border-color: rgba(248, 113, 113, 0.34);
    color: #fecaca;
}


/* ==========================================================================
   Tablet
   ========================================================================== */

@media (max-width: 900px) {

    .rules-header,
    .rules-notice,
    .rules-navigation,
    .rules-section__header,
    .rules-list {
        max-width: none;
    }

}


/* ==========================================================================
   Smartphone
   ========================================================================== */

@media (max-width: 700px) {

    .rules-header {
        margin-bottom: 2rem;
    }

    .rules-header__subtitle {
        font-size: 1rem;
    }

    .rules-notice,
    .rules-navigation {
        padding: 1.25rem;
        border-radius: 12px;
    }

    .rules-navigation__links {
        flex-direction: column;
    }

    .rules-navigation__links a {
        width: 100%;
        border-radius: 10px;
    }

    .rules-sections {
        gap: 2.5rem;
    }

    .rule-card {
        grid-template-columns: 2.5rem minmax(0, 1fr);
        gap: 0.85rem;
        padding: 1.15rem;
        border-radius: 12px;
    }

    .rule-card__letter {
        width: 2.25rem;
        height: 2.25rem;
        font-size: 0.82rem;
    }

    .rule-card p {
        font-size: 0.95rem;
        line-height: 1.7;
    }

}


/* ==========================================================================
   Sehr kleine Displays
   ========================================================================== */

@media (max-width: 430px) {

    .rule-card {
        grid-template-columns: 1fr;
    }

    .rule-card__letter {
        width: 2.15rem;
        height: 2.15rem;
    }

}