@media (prefers-color-scheme: dark) {
    [data-bs-theme="dark"] .bg-primary {
        color: #212529 !important;
    }
    [data-bs-theme="dark"] .bg-primary a,
    [data-bs-theme="dark"] .bg-primary a:visited {
        color: #212529 !important;
    }
}
header {
    display: flex;
    justify-content: space-between;
    background-color: #f8f8f8;
}
:root {
  --clamp-lines: 6; /* <-- change here to 3, 6, 8, etc. */
  --line-multiplier: 1.5; /* line-height multiplier (used if line-height === 'normal') */
}
:root, [data-bs-theme=light] {
    --bs-primary: rgb(0, 89, 173);
    --bs-primary-rgb: 0, 89, 173;
    --bs-secondary: #6c757d;
    --bs-secondary-rgb: 108, 117, 125;
    --bs-success: #198754;
    --bs-success-rgb: 25, 135, 84;
    --bs-info: #0dcaf0;
    --bs-info-rgb: 13, 202, 240;
    --bs-warning: #ffcc35;
    --bs-warning-rgb: 255, 193, 7;
    --bs-danger: #dc3545;
    --bs-danger-rgb: 220, 53, 69;
    --bs-light: #f8f9fa;
    --bs-light-rgb: 248, 249, 250;
    --bs-dark: #212529;
    --bs-dark-rgb: 33, 37, 41;
    --bs-body-bg: #fffffc;
    --bs-body-bg-rgb: 255, 255, 252;
    --bs-body-color: #212529;
    --bs-link-color: #3e8ee8;
    --bs-link-hover-color: #266cd6;
}

[data-bs-theme=dark] {
    --bs-primary: rgb(48, 172, 255);
    --bs-primary-rgb: 48, 172, 255;
    --bs-secondary: #adb5bd;
    --bs-secondary-rgb: 173, 181, 189;
    --bs-success: #3dd68c;
    --bs-success-rgb: 61, 214, 140;
    --bs-info: rgb(102, 170, 255);
    --bs-info-rgb: 102, 170, 255;
    --bs-warning: #ffd966;
    --bs-warning-rgb: 255, 217, 102;
    --bs-danger: #ff6b81;
    --bs-danger-rgb: 255, 107, 129;
    --bs-light: #23272b;
    --bs-light-rgb: 35, 39, 43;
    --bs-dark: #e1e1e1;
    --bs-dark-rgb: 225, 225, 225;
    --bs-body-bg: #121212;
    --bs-body-bg-rgb: 18, 18, 18;
    --bs-body-color: #e1e1e1;
    --bs-body-color-rgb: 225, 225, 225;
    --bs-info-text-emphasis: #66aaff;
    --bs-link-color: #66aaff;
    --bs-link-hover-color: #99cfff;
}
body {
    font-family: var(--bs-font-sans-serif);
    background-color: var(--bs-body-bg);
    color: var(--bs-body-color);
    margin: 0;
    padding: 0;
    gap: 0;
    min-height: 100vh;
    overflow-x: hidden;
    width: 100%;
    display: flex;
    flex-direction: column;
}

.empty:empty {
    display: none;
}
.navbar-lead {
    background-color: #f8f9fa;
    box-shadow: 0 1.5px 6px rgba(0,0,0,0.06);
    border-bottom: 1px solid #e5e5e5;
    font-weight: 600;
}
.navbar-lead .nav-link {
    color: black;
}

.bottom-nav {
    display: flex;
    max-height: 70px;
    background-color: rgba(85, 85, 85, 0.5);
}

.navbar-nav {
    align-items: center;
}
.navbar-nav .nav-item {
    height: 100%;
}
.navbar-nav .nav-link:hover {
    background-color: rgba(0, 0, 0, 0.05); /* light highlight */
    color: #000; /* darker text if desired */
}

.navbar-nav .nav-link {
    padding: 0.25em;
    display: flex;
    align-items: center;
    height: 100%;
}
.navbar .dropdown-menu[data-bs-popper] {
    margin-top: -0.25rem;
}
.readmore-summary {
  display: -webkit-box;
  -webkit-line-clamp: var(--clamp-lines);
  line-clamp: var(--clamp-lines);
  -webkit-box-orient: vertical;
  overflow: hidden;
}


.text-justify {
    text-align: justify;
}

html {
    height: 100%;
    margin: 0;
    padding: 0;
}
footer {
    flex-shrink: 0;
}
.card-text {
    display: block;
    max-height: 10em;
    overflow-y: auto;
    text-align: start;
    /* Scrollbar outside the bounding box */
}
.course-card {
    width: 250px;
    transition: transform 0.2s, box-shadow 0.2s;
}
.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 250px); /* Fixed column width */
    justify-content: center; /* Centers the entire grid */
    gap: 1rem;
    max-width: 100%;
    margin: 0 auto;
}
.link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 20rem); /* Fixed column width */
    justify-content: center; /* Centers the entire grid */
    gap: 1rem;
    margin: 0 auto;
}

.link-grid li {
    padding: 0 4px;
}

.banner {
  width: 100vw;
  position: relative;
  margin-inline: calc(50% - 50vw);
}

.welcome-banner {
    min-height: 500px;
    background-image: url('/static/img/HeaderImagePaint.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-direction: row;
}
.welcome-banner-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 3rem;
}

.nu {
    text-decoration: none;
}
sup {
    top: 0;
    vertical-align: super;
    font-size: smaller;
}

/*Ensure that the scroll bar appears to the right of its container*/
.protected-scroll {
        position: relative;
}
.protected-scroll::-webkit-scrollbar {
        width: 10px;
        background: #f1f1f1;
        border-radius: 8px;
        position: absolute;
        right: -10px;
}
.protected-scroll::-webkit-scrollbar-thumb {
        background: #888;
        border-radius: 8px;
}
.protected-scroll::-webkit-scrollbar-thumb:hover {
        background: #555;
}

/* Ensure readable text color on bg-primary backgrounds */
.bg-primary {
    color: #fff !important;
}
.bg-primary a,
.bg-primary a:visited {
    color: #f8f9fa !important;
    text-decoration: underline;
}

@media (max-width: 700px) {
    .justify-text {
        text-align: start;
    }
}
@media (max-width: 576px) {
    #student-panel-carousel .carousel-inner {
        width: 100vw;
        position: relative;
        margin-inline: calc(50% - 50vw);
    }
}
