 :root {
        --primary-color: {{ $themeColors['primary'] ?? '#20246b' }};
        --secondary-color: {{ $themeColors['secondary'] ?? '#ebf5ff' }};
        --tertiary-color: {{ $themeColors['tertiary'] ?? '#ffcf01' }};
    }

    a.nav-link.active.system-overview {
        border-bottom: 3px solid white;
        border-radius: 2px;
    }

    .home-section {
        position: relative;
        background-color: var(--primary-color);
        height: 80vh;
        overflow: hidden;
        display: flex;
        align-items: center;
        width: 100%;
        justify-content: space-between;
        padding: 0 2rem 0 3.5rem;
    }

    .home-section::after {
        content: "";
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        background: url('/images/libpic1.jpg') no-repeat center center;
        background-size: cover;
        opacity: 0.1;
        z-index: 1;
    }

    .home-section>* {
        position: relative;
        z-index: 3;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .home-container {
        max-width: 700px;
        display: flex;
        flex-direction: column;
    }

    .home-container h1 {
        color: rgb(252, 253, 255);
        font-size: 2.8rem;
        margin-bottom: 15px;
        font-family: 'IBM Plex Serif', serif;
        font-weight: bold;
    }

    .home-container p {
        color: rgba(207, 222, 255, 0.9);
        font-size: 1rem;
        line-height: 1.6;
        font-weight: 300;
    }

    .home-container p strong {
        color: rgb(199, 215, 248);
        font-weight: 600;
    }

    .home-section .right-logo img {
        height: 23rem;
    }

    .card-container {
        display: flex;
        gap: 2rem;
        padding: 2.5rem;
    }

    .card-container .card {
        border: none;
    }

    .card-container .card .icon {
        height: 3.5rem;
        width: 3.5rem;
        background: var(--tertiary-color);
        border-radius: 50%;
        padding: .3rem;
    }

    .card-container .card {
        background: var(--primary-color);
        border-radius: 10px;
        padding: 1.5rem;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        transition: transform 0.3s ease;
        cursor: pointer;
    }

    .card-container .card:hover {
        transform: translateY(-5px);
    }

    .card-container .card-1 {
        background: none;
        box-shadow: none;
        border: none;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        cursor: default;
    }

    .card-container .card-1 h2 {
        color: var(--primary-color);
        font-size: 2rem;
        margin-bottom: 10px;
        font-family: 'IBM Plex Serif', serif;
        font-weight: bold;
    }

    .card-container .card-1 p {
        color: rgba(0, 0, 0, 0.9) !important;
        font-size: 1rem;
        line-height: 1.6;
        font-weight: 300;
        margin-top: 10px;
    }

    .card-container .card-1:hover {
        transform: none;
    }

    .card-container .card h4 {
        color: rgba(252, 253, 255, 0.89);
        margin: 1rem 0 0 0;
        font-weight: 600;
    }

    .card-container .card hr {
        width: 5rem;
        height: 2px;
        border-radius: 1rem;
        background-color: var(--tertiary-color);
        border: 0;
        opacity: 1 !important;
    }

    .card-container .card p {
        color: rgba(207, 222, 255, 0.9);
        font-size: 1rem;
        line-height: 1.6;
        font-weight: 300;
        margin-top: 10px;
    }

    .explore {
        border: none;
        border-radius: 5rem;
        width: 8rem;
        padding: .5rem .4rem;
        background-color: var(--tertiary-color);
        cursor: pointer;
    }

    .explore:hover {
        transform: translateX(8px);
        color: white;
        transition: 0.3s ease-in-out;
    }

    .explore a {
        text-decoration: none;
        color: var(--primary-color);
        font-weight: 600;
        font-size: .8rem;
    }

    /* ✅ NEW: Library Rules Section */
    .rules-section {
        background: linear-gradient(135deg, #f8f9fa 0%, #f0f2f7 100%);
        padding: 4rem 2rem;
        position: relative;
    }

    .rules-container {
        max-width: 1200px;
        margin: 0 auto;
    }

    .rules-header {
        text-align: center;
        margin-bottom: 3rem;
    }

    .rules-header h2 {
        color: var(--primary-color);
        font-size: 2.5rem;
        font-family: 'IBM Plex Serif', serif;
        font-weight: bold;
        margin-bottom: 1rem;
        position: relative;
        display: inline-block;
    }

    .rules-header h2::after {
        content: "";
        position: absolute;
        bottom: -12px;
        left: 50%;
        transform: translateX(-50%);
        width: 80px;
        height: 4px;
        background: linear-gradient(90deg, var(--tertiary-color) 0%, var(--tertiary-color) 100%);
        border-radius: 2px;
    }

    .rules-header p {
        color: #4a5568;
        font-size: 1rem;
        line-height: 1.8;
        margin-top: 2rem;
    }

    .rules-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 2rem;
        margin-top: 3rem;
    }

    .rule-card {
        background: white;
        border-radius: 12px;
        padding: 2rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
        transition: all 0.3s ease;
        border-left: 4px solid var(--tertiary-color);
        position: relative;
    }

    .rule-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12);
        border-left: 4px solid var(--primary-color);
    }

    .rule-card::before {
        content: attr(data-number);
        position: absolute;
        top: -15px;
        left: 20px;
        background: var(--primary-color);
        color: var(--tertiary-color);
        width: 35px;
        height: 35px;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: bold;
        font-size: 1rem;
    }

    .rule-card h4 {
        color: var(--primary-color);
        font-weight: 700;
        margin-bottom: 0.8rem;
        margin-top: 0.5rem;
        font-size: 1.1rem;
    }

    .rule-card p {
        color: #4a5568;
        font-size: 0.95rem;
        line-height: 1.6;
    }

    .rule-card .icon-box {
        font-size: 2rem;
        margin-bottom: 0.8rem;
        color: var(--tertiary-color);
    }

    @media (max-width: 992px) {
        .card-container {
            flex-direction: column;
        }

        .home-section {
            flex-direction: column;
            height: auto;
            padding: 2rem;
            text-align: center;
        }

        .home-container {
            max-width: 100%;
        }

        .home-section .right-logo img {
            height: 15rem;
            margin-top: 2rem;
        }

        .rules-grid {
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        }
    }

    @media (max-width: 768px) {
        .card-container {
            flex-direction: column;
            padding: 1.5rem;
        }

        .home-container h1 {
            font-size: 2rem;
        }

        .card-container .card-1 h2 {
            font-size: 1.5rem;
        }

        .home-section .right-logo img {
            height: 12rem;
        }

        .rules-header h2 {
            font-size: 2rem;
        }

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

    @media (max-width: 576px) {
        .card-container {
            flex-direction: column;
            padding: 1rem;
            gap: 1rem;
        }

        .home-container h1 {
            font-size: 1.5rem;
        }

        .card-container .card-1 h2 {
            font-size: 1.3rem;
        }

        .card-container .card h4 {
            font-size: 1rem;
        }

        .home-section .right-logo img {
            height: 10rem;
        }

        .home-section {
            padding: 1.5rem;
        }

        .rules-header h2 {
            font-size: 1.5rem;
        }

        .rule-card {
            padding: 1.5rem;
        }

        .rules-section {
            padding: 2rem 1rem;
        }
    }