/* ============================================================
   Rules & Regulations – Mukono Mayor's Cup 2026
   ============================================================ */

:root {
    --sport-football: #179A47;
    --sport-netball: #9B59B6;
    --sport-volleyball: #1B4DB3;
    --sport-kho-kho: #A0522D;
    --rules-navy: #0b2a6f;
    --rules-blue: #1B4DB3;
    --rules-gold: #F5B800;
}

/* ── Hero ── */
.rules-hero {
    position: relative;
    overflow: hidden;
    padding: 5rem 0 4rem;
    text-align: center;
    color: #fff;
}
.rules-hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, var(--rules-navy) 0%, var(--rules-blue) 50%, #2563eb 100%);
    z-index: 0;
}
.rules-hero-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M30 0l30 30-30 30L0 30z' fill='%23ffffff' fill-opacity='.03'/%3E%3C/svg%3E");
    animation: rulesBgShift 40s linear infinite;
}
@keyframes rulesBgShift { to { background-position: 600px 600px; } }

.rules-hero-inner { position: relative; z-index: 1; }

.rules-shield {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 90px;
    height: 90px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    backdrop-filter: blur(6px);
    font-size: 2.4rem;
    margin-bottom: 1.2rem;
    border: 2px solid rgba(255,255,255,.25);
}
.rules-hero h1 {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: .5rem;
}
.rules-hero-sub {
    font-size: 1.1rem;
    opacity: .85;
    max-width: 540px;
    margin: 0 auto 1.8rem;
}
.rules-hero-actions { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ── Stats Bar ── */
.rules-stats {
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    padding: 1rem 0;
}
.rules-stats-grid {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}
.rules-stat-item {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
    color: var(--accent, #333);
}
.rules-stat-item i { font-size: 1.3rem; }
.rules-stat-item.stat-count {
    --accent: var(--rules-navy);
    gap: .35rem;
}
.rules-stat-item.stat-count strong { font-size: 1.4rem; }

/* ── Search ── */
.rules-search-wrap {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}
.rules-search-wrap > i {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}
.rules-search-wrap input {
    padding-left: 2.8rem;
    padding-right: 3rem;
    border-radius: 99px;
    border: 2px solid #e5e7eb;
    transition: border-color .2s, box-shadow .2s;
}
.rules-search-wrap input:focus {
    border-color: var(--rules-blue);
    box-shadow: 0 0 0 3px rgba(27,77,179,.15);
}
.rules-kbd {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: #f3f4f6;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    padding: 0 6px;
    font-size: .75rem;
    color: #6b7280;
    line-height: 1.6;
}

/* ── Section Heading ── */
.rules-section-heading {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: .6rem;
    color: var(--rules-navy);
}
.rules-section-heading i { opacity: .7; }

/* ── Section Cards Grid ── */
.rules-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1rem;
}
.rules-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-left: 4px solid var(--rules-blue);
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.rules-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,.08);
    border-left-color: var(--rules-gold);
    color: inherit;
}
.rules-card-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eff3ff, #dbeafe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--rules-blue);
    flex-shrink: 0;
}
.rules-card-body { flex: 1; min-width: 0; }
.rules-card-num {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6b7280;
    font-weight: 600;
}
.rules-card h3 {
    font-size: .95rem;
    font-weight: 600;
    margin: .15rem 0 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.rules-card-arrow {
    color: #d1d5db;
    transition: color .2s, transform .2s;
}
.rules-card:hover .rules-card-arrow { color: var(--rules-blue); transform: translateX(3px); }

.rules-no-results {
    text-align: center;
    color: #9ca3af;
    padding: 2rem;
    font-size: 1.1rem;
}

/* ── Sport Cards ── */
.rules-sports-section {
    background: #f8fafc;
    padding: 3.5rem 0;
    border-top: 1px solid #e5e7eb;
    border-bottom: 1px solid #e5e7eb;
}
.rules-sports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 1.2rem;
}
.rules-sport-card {
    position: relative;
    overflow: hidden;
    padding: 2rem 1.5rem;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--sc), color-mix(in srgb, var(--sc) 70%, #000));
    color: #fff;
    text-decoration: none;
    transition: transform .25s, box-shadow .25s;
}
.rules-sport-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 12px 32px rgba(0,0,0,.18);
    color: #fff;
}
.rsc-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 1rem;
}
.rules-sport-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: .4rem; }
.rules-sport-card p { font-size: .85rem; opacity: .85; margin-bottom: 1rem; }
.rsc-link {
    font-size: .85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    opacity: .9;
}
.rules-sport-card:hover .rsc-link i { transform: translateX(4px); }
.rsc-link i { transition: transform .2s; }

/* ── Annexes List (Index page) ── */
.rules-annexes-list { display: flex; flex-direction: column; gap: .5rem; }
.rules-annex-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .85rem 1.2rem;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: background .2s, border-color .2s;
}
.rules-annex-item:hover { background: #f0f4ff; border-color: var(--rules-blue); color: inherit; }
.annex-code {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: var(--rules-navy);
    color: #fff;
    font-weight: 700;
    font-size: .9rem;
    flex-shrink: 0;
}
.annex-title { flex: 1; font-weight: 500; }
.annex-icon { color: #9ca3af; }

/* ── Annexes Grid (Annexes page) ── */
.rules-annex-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 2rem 1.5rem;
    background: #fff;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    text-decoration: none;
    color: inherit;
    transition: transform .2s, box-shadow .2s, border-color .2s;
    height: 100%;
}
.rules-annex-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,.08);
    border-color: var(--rules-blue);
    color: inherit;
}
.rac-code {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--rules-blue);
    margin-bottom: .75rem;
}
.rac-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #eff3ff, #dbeafe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: var(--rules-navy);
    margin-bottom: .75rem;
}
.rules-annex-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: .75rem; }
.rac-link { font-size: .85rem; color: var(--rules-blue); font-weight: 600; margin-top: auto; }

/* ── Quick Ref CTA ── */
.rules-quick-cta {
    background: linear-gradient(135deg, var(--rules-navy), var(--rules-blue));
    color: #fff;
    border-radius: 14px;
    padding: 2rem;
    text-align: center;
}
.rules-quick-cta i { font-size: 2.5rem; margin-bottom: .75rem; color: var(--rules-gold); }
.rules-quick-cta h3 { font-weight: 700; margin-bottom: .5rem; }
.rules-quick-cta p { font-size: .9rem; opacity: .85; margin-bottom: 1.2rem; }

/* ── Sidebar ── */
.rules-sidebar {
    position: sticky;
    top: 90px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}
.rules-sidebar h6 {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: #6b7280;
    margin-bottom: .75rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.rules-sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0 0 .75rem;
}
.rules-sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .4rem .6rem;
    border-radius: 6px;
    text-decoration: none;
    color: #4b5563;
    font-size: .82rem;
    transition: background .15s, color .15s;
}
.rules-sidebar-nav li a:hover { background: #f0f4ff; color: var(--rules-blue); }
.rules-sidebar-nav li.active a {
    background: var(--rules-blue);
    color: #fff;
    font-weight: 600;
}
.rsn-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #f3f4f6;
    font-size: .7rem;
    font-weight: 700;
    flex-shrink: 0;
    color: #6b7280;
}
.rules-sidebar-nav li.active .rsn-num { background: rgba(255,255,255,.2); color: #fff; }
.rsn-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rules-sidebar-actions { border-top: 1px solid #e5e7eb; padding-top: .75rem; }

/* ── Section Content ── */
.rules-content-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #e5e7eb;
}
.rch-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--rules-blue), var(--rules-navy));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #fff;
    flex-shrink: 0;
}
.rch-num {
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--rules-blue);
    font-weight: 700;
}
.rules-content-header h1 {
    font-size: 1.6rem;
    font-weight: 700;
    margin: .15rem 0 0;
    color: var(--rules-navy);
}

/* ── Rules Body (rendered HTML content) ── */
.rules-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--rules-navy);
    margin: 1.8rem 0 .8rem;
    padding-bottom: .35rem;
    border-bottom: 1px solid #e5e7eb;
}
.rules-body h4 {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 1.4rem 0 .6rem;
}
.rules-body p { line-height: 1.7; margin-bottom: .8rem; }
.rules-body ol, .rules-body ul { padding-left: 1.4rem; margin-bottom: 1rem; }
.rules-body li { margin-bottom: .4rem; line-height: 1.6; }
.rules-body .table { font-size: .88rem; }
.rules-body .table th { background: #f8fafc; font-weight: 600; white-space: nowrap; }
.rules-body .alert { font-size: .9rem; border-radius: 8px; }

/* ── Table of Contents ── */
.rules-toc {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 1rem 1.2rem;
    margin-bottom: 1.5rem;
}
.rules-toc h6 {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6b7280;
    margin-bottom: .5rem;
    display: flex;
    align-items: center;
    gap: .4rem;
}
.rules-toc ol { margin: 0; padding-left: 1.2rem; }
.rules-toc li { margin-bottom: .25rem; }
.rules-toc a {
    font-size: .85rem;
    color: var(--rules-blue);
    text-decoration: none;
}
.rules-toc a:hover { text-decoration: underline; }

/* ── Prev / Next Pager ── */
.rules-pager {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e5e7eb;
}
.rules-pager-link {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .8rem 1.2rem;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    text-decoration: none;
    color: inherit;
    transition: background .2s, border-color .2s;
    max-width: 48%;
}
.rules-pager-link:hover { background: #f0f4ff; border-color: var(--rules-blue); color: inherit; }
.rules-pager-link.next { margin-left: auto; text-align: right; }
.rules-pager-link small { font-size: .72rem; color: #9ca3af; text-transform: uppercase; letter-spacing: .05em; display: block; }
.rules-pager-link strong { font-size: .9rem; color: var(--rules-navy); display: block; }
.rules-pager-link i { font-size: 1.1rem; color: var(--rules-blue); }

/* ── Reading Progress ── */
.rules-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    z-index: 1100;
    background: transparent;
}
.rules-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, var(--rules-blue), var(--rules-gold));
    transition: width .1s;
}

/* ── Sport Header ── */
.rules-sport-header {
    padding: 3rem 0 2rem;
    background: linear-gradient(135deg, var(--sc), color-mix(in srgb, var(--sc) 70%, #000));
    color: #fff;
}
.breadcrumb-light .breadcrumb-item a { color: rgba(255,255,255,.7); }
.breadcrumb-light .breadcrumb-item.active { color: rgba(255,255,255,.9); }
.breadcrumb-light .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,.4); }
.rsh-inner { display: flex; align-items: center; gap: 1.2rem; }
.rsh-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
}
.rules-sport-header h1 { font-size: 2rem; font-weight: 800; margin: 0; }
.rules-sport-header p { margin: .25rem 0 0; opacity: .85; }

/* ── Sport Quick Facts ── */
.rules-sport-facts {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-top: 4px solid var(--sc);
    border-radius: 12px;
    padding: 1.2rem;
}
.rules-sport-facts h5 {
    font-size: .9rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--rules-navy);
    display: flex;
    align-items: center;
    gap: .4rem;
}
.rules-sport-facts dl { margin: 0; }
.rules-sport-facts dt {
    font-size: .78rem;
    color: #6b7280;
    font-weight: 600;
    margin-top: .6rem;
    display: flex;
    align-items: center;
    gap: .35rem;
}
.rules-sport-facts dt i { width: 16px; text-align: center; color: var(--sc); font-size: .75rem; }
.rules-sport-facts dd {
    font-size: .88rem;
    font-weight: 500;
    margin: .15rem 0 0 1.2rem;
    color: #1f2937;
}

/* ── Sport Accordion ── */
.rules-accordion-item {
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    margin-bottom: .75rem;
    overflow: hidden;
}
.rules-accordion-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem 1.2rem;
    background: #fff;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    color: var(--rules-navy);
    cursor: pointer;
    transition: background .2s;
    text-align: left;
}
.rules-accordion-btn:hover { background: #f8fafc; }
.acc-chevron {
    margin-left: auto;
    transition: transform .3s;
    font-size: .8rem;
    color: #9ca3af;
}
.rules-accordion-btn:not(.collapsed) .acc-chevron { transform: rotate(180deg); }
.rules-accordion-body { padding: 0 1.2rem 1.2rem; }

/* ── Quick Reference Table ── */
.rules-qr-table {
    border-radius: 14px;
    overflow: hidden;
    border: 2px solid #e5e7eb;
    background: #fff;
}
.rules-qr-table .table { margin: 0; }
.qr-label-col { width: 180px; }
.qr-sport-col {
    text-align: center;
    font-weight: 700;
    background: var(--sc) !important;
    color: #fff;
    font-size: .95rem;
}
.qr-sport-col i { margin-right: .3rem; }
.qr-label {
    font-weight: 600;
    font-size: .85rem;
    color: #374151;
    white-space: nowrap;
}
.qr-label i { width: 20px; text-align: center; color: var(--rules-blue); margin-right: .3rem; }
.rules-qr-table td { vertical-align: middle; text-align: center; font-size: .88rem; }
.rules-qr-table td:first-child { text-align: left; }

/* ── Quick Reference Mobile Cards ── */
.rules-qr-tabs .nav-link {
    font-weight: 600;
    font-size: .85rem;
    color: #6b7280;
    border: 2px solid transparent;
    border-radius: 99px;
    transition: all .2s;
}
.rules-qr-tabs .nav-link.active {
    background: var(--sc) !important;
    color: #fff !important;
    border-color: var(--sc);
}
.rules-qr-card {
    background: linear-gradient(135deg, var(--sc), color-mix(in srgb, var(--sc) 70%, #000));
    border-radius: 14px;
    padding: 1.5rem;
    color: #fff;
}
.rules-qr-card h3 { font-weight: 700; margin-bottom: 1rem; }
.qr-card-dl { margin: 0; }
.qr-card-dl dt {
    font-size: .78rem;
    opacity: .7;
    margin-top: .6rem;
    display: flex;
    align-items: center;
    gap: .3rem;
}
.qr-card-dl dd { font-weight: 500; margin: .1rem 0 0 1.2rem; }

/* ── Dark Mode ── */
[data-theme="dark"] .rules-stats { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .rules-stat-item { color: #e2e8f0; }
[data-theme="dark"] .rules-stat-item.stat-count { --accent: #93c5fd; }
[data-theme="dark"] .rules-search-wrap input { background: #1e293b; border-color: #475569; color: #e2e8f0; }
[data-theme="dark"] .rules-card { background: #1e293b; border-color: #334155; color: #e2e8f0; }
[data-theme="dark"] .rules-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.3); }
[data-theme="dark"] .rules-card-icon { background: linear-gradient(135deg, #1e3a5f, #1e40af); }
[data-theme="dark"] .rules-sports-section { background: #0f172a; border-color: #1e293b; }
[data-theme="dark"] .rules-annex-item { background: #1e293b; border-color: #334155; color: #e2e8f0; }
[data-theme="dark"] .rules-annex-item:hover { background: #1e3a5f; }
[data-theme="dark"] .rules-annex-card { background: #1e293b; border-color: #334155; color: #e2e8f0; }
[data-theme="dark"] .rules-sidebar { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .rules-sidebar-nav li a { color: #cbd5e1; }
[data-theme="dark"] .rules-sidebar-nav li a:hover { background: #334155; }
[data-theme="dark"] .rules-content-header { border-color: #334155; }
[data-theme="dark"] .rules-content-header h1 { color: #e2e8f0; }
[data-theme="dark"] .rules-body h3 { color: #93c5fd; border-color: #334155; }
[data-theme="dark"] .rules-body h4 { color: #cbd5e1; }
[data-theme="dark"] .rules-body .table th { background: #334155; color: #e2e8f0; }
[data-theme="dark"] .rules-toc { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .rules-pager-link { border-color: #334155; }
[data-theme="dark"] .rules-pager-link:hover { background: #334155; }
[data-theme="dark"] .rules-pager-link strong { color: #e2e8f0; }
[data-theme="dark"] .rules-accordion-item { border-color: #334155; }
[data-theme="dark"] .rules-accordion-btn { background: #1e293b; color: #e2e8f0; }
[data-theme="dark"] .rules-accordion-btn:hover { background: #334155; }
[data-theme="dark"] .rules-sport-facts { background: #1e293b; border-color: #334155; }
[data-theme="dark"] .rules-sport-facts dd { color: #e2e8f0; }
[data-theme="dark"] .rules-qr-table { border-color: #334155; background: #1e293b; }
[data-theme="dark"] .rules-qr-table td { color: #e2e8f0; }
[data-theme="dark"] .rsn-num { background: #334155; color: #cbd5e1; }
[data-theme="dark"] .rules-kbd { background: #334155; border-color: #475569; color: #9ca3af; }

/* ── Developer Credit Banner ── */
.rules-dev-credit {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    border-top: 3px solid var(--rules-gold);
    padding: 2rem 0;
    color: #cbd5e1;
    font-size: .88rem;
}
.rules-dev-credit .credit-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
}
.rules-dev-credit .credit-badge {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    background: rgba(245,184,0,.12);
    border: 1px solid rgba(245,184,0,.3);
    border-radius: 99px;
    padding: .4rem 1rem;
    color: var(--rules-gold);
    font-weight: 600;
    font-size: .82rem;
}
.rules-dev-credit .credit-badge i { font-size: 1rem; }
.rules-dev-credit .credit-name {
    font-weight: 700;
    font-size: 1rem;
    color: #f8fafc;
}
.rules-dev-credit .credit-role {
    color: #94a3b8;
    font-size: .82rem;
}

/* ── Foul Category Cards (for expanded discipline sections) ── */
.rules-body .foul-category {
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-left: 4px solid var(--rules-blue);
    border-radius: 8px;
    padding: 1rem 1.2rem;
    margin-bottom: 1rem;
}
.rules-body .foul-category h4 {
    margin-top: 0;
    color: var(--rules-navy);
}
.rules-body .foul-category.foul-danger {
    border-left-color: #dc2626;
}
.rules-body .foul-category.foul-warning {
    border-left-color: #f59e0b;
}
.rules-body .foul-category.foul-info {
    border-left-color: #3b82f6;
}
[data-theme="dark"] .rules-body .foul-category {
    background: #1e293b;
    border-color: #334155;
}

/* ── Hero Logo ── */
.rules-hero-logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid rgba(255,255,255,.3);
    margin-bottom: 1rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.2);
}

/* ── Enhanced Table Styles ── */
.rules-body .table {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.rules-body .table thead th {
    background: linear-gradient(135deg, var(--rules-navy), var(--rules-blue));
    color: #fff;
    font-weight: 600;
    font-size: .82rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    padding: .65rem .75rem;
    border: none;
}
.rules-body .table tbody tr:nth-child(even) { background: #f8fafc; }
.rules-body .table tbody tr:hover { background: #eff6ff; }
.rules-body .table td { padding: .6rem .75rem; border-color: #e5e7eb; vertical-align: middle; }
.rules-body .table .badge { font-size: .72rem; font-weight: 600; padding: .25em .55em; }
[data-theme="dark"] .rules-body .table thead th { background: linear-gradient(135deg, #1e3a5f, #1e40af); }
[data-theme="dark"] .rules-body .table tbody tr:nth-child(even) { background: #0f172a; }
[data-theme="dark"] .rules-body .table tbody tr:hover { background: #1e3a5f; }
[data-theme="dark"] .rules-body .table td { border-color: #334155; }

/* ── Animated Hero Shimmer ── */
.rules-hero-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.04) 40%, rgba(255,255,255,.08) 50%, rgba(255,255,255,.04) 60%, transparent 80%);
    background-size: 200% 100%;
    animation: heroShimmer 8s ease-in-out infinite;
}
@keyframes heroShimmer { 0%,100% { background-position: 200% 0; } 50% { background-position: -200% 0; } }

.rules-hero-logo {
    backdrop-filter: blur(8px);
    background: rgba(255,255,255,.1);
    transition: transform .3s, box-shadow .3s;
}
.rules-hero-logo:hover { transform: scale(1.08); box-shadow: 0 8px 32px rgba(0,0,0,.3); }

/* ── Sport Item Glow on Hover ── */
.rules-stat-item { transition: transform .2s; }
.rules-stat-item:hover { transform: scale(1.05); }
.rules-stat-item i { transition: text-shadow .3s, transform .2s; }
.rules-stat-item:hover i { text-shadow: 0 0 12px var(--accent, var(--rules-blue)); transform: scale(1.15); }

/* ── Section Dividers ── */
.rules-divider {
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--rules-gold) 20%, var(--rules-blue) 50%, var(--rules-gold) 80%, transparent);
    border: none;
    margin: 3rem 0;
    border-radius: 2px;
    opacity: .5;
}

/* ── Back to Top ── */
.rules-back-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--rules-navy);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 16px rgba(11,42,111,.3);
    opacity: 0;
    transform: translateY(20px);
    transition: opacity .3s, transform .3s, background .2s;
    z-index: 1000;
    cursor: pointer;
    border: none;
    text-decoration: none;
}
.rules-back-top.visible { opacity: 1; transform: translateY(0); }
.rules-back-top:hover { background: var(--rules-blue); color: #fff; box-shadow: 0 6px 24px rgba(27,77,179,.4); }

/* ── Scroll Margin for Anchors ── */
.rules-body h3[id], .rules-body h4[id] { scroll-margin-top: 80px; }

/* ── Card Reveal Animation ── */
.rules-card, .rules-sport-card, .rules-annex-item, .rules-annex-card {
    animation: cardReveal .5s ease-out both;
}
@keyframes cardReveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ── Badge Styles for Sanctions ── */
.rules-body .sanction-badge {
    display: inline-block;
    padding: .2em .6em;
    border-radius: 99px;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.4;
}
.sanction-badge.sanction-minor { background: #dbeafe; color: #1d4ed8; }
.sanction-badge.sanction-moderate { background: #fef3c7; color: #92400e; }
.sanction-badge.sanction-severe { background: #fecaca; color: #991b1b; }
.sanction-badge.sanction-ban { background: #1f2937; color: #f87171; }
[data-theme="dark"] .sanction-badge.sanction-minor { background: #1e3a5f; }
[data-theme="dark"] .sanction-badge.sanction-moderate { background: #78350f; }
[data-theme="dark"] .sanction-badge.sanction-severe { background: #7f1d1d; }

/* ── Reading Time Badge ── */
.rules-read-time {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .78rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: .2rem .7rem;
    border-radius: 99px;
    font-weight: 500;
}
.rules-read-time i { font-size: .7rem; }
[data-theme="dark"] .rules-read-time { background: #334155; color: #94a3b8; }

/* ── Enhanced Alert Styles ── */
.rules-body .alert {
    border-left: 4px solid;
    background-clip: padding-box;
}
.rules-body .alert-info { border-left-color: #3b82f6; }
.rules-body .alert-warning { border-left-color: #f59e0b; }
.rules-body .alert-danger { border-left-color: #ef4444; }

/* ── Print ── */
@media print {
    .rules-hero, .rules-stats, .rules-search-wrap, .rules-sidebar,
    .rules-pager, .rules-progress, .rules-hero-actions,
    .rules-quick-cta, .d-lg-none, .rules-sidebar-actions { display: none !important; }
    .rules-content-header { break-after: avoid; }
    .rules-body { font-size: 11pt; }
    .rules-body h3 { break-after: avoid; }
    .rules-body .table { font-size: 9pt; }
    .col-lg-9 { width: 100% !important; max-width: 100% !important; }
}

/* ── Responsive ── */
@media (max-width: 767.98px) {
    .rules-hero { padding: 3rem 0 2.5rem; }
    .rules-shield { width: 64px; height: 64px; font-size: 1.6rem; }
    .rules-cards-grid { grid-template-columns: 1fr; }
    .rules-sports-grid { grid-template-columns: 1fr 1fr; }
    .rules-pager { flex-direction: column; }
    .rules-pager-link { max-width: 100%; }
    .rsh-inner { flex-direction: column; text-align: center; }
    .rules-sport-header h1 { font-size: 1.5rem; }
}
@media (max-width: 575.98px) {
    .rules-sports-grid { grid-template-columns: 1fr; }
    .rules-stats-grid { gap: 1rem; }
}
