/* =========================
   OFSS - Clean Global CSS
   Bootstrap-friendly
   No inner forced scroll
   ========================= */

/* Base typography */
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

/* Theme variables */
:root {
    --brand: #a11b28;
    --brand-dark: #7f1520;
    --muted: #6c757d;
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 72px;
}

/* Global page behavior: NORMAL browser scroll */
html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    height: auto;
    overflow-x: hidden;
    overflow-y: auto;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: #f8f9fa;
    color: #212529;
}

/* Focus ring accessibility */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem rgba(161, 27, 40, 0.25);
    border-color: var(--brand);
}

/* Brand helpers */
.text-brand {
    color: var(--brand) !important;
}

.bg-brand {
    background-color: var(--brand) !important;
}

.border-brand {
    border-color: var(--brand) !important;
}

/* Active list-group item */
.list-group-item.active {
    background-color: var(--brand);
    border-color: var(--brand);
    color: #fff;
}

/* Header / navbar polish */
.navbar-brand img {
    object-fit: contain;
}

.navbar .nav-link {
    transition: all 0.2s ease;
}

    .navbar .nav-link:hover {
        opacity: 0.9;
    }

/* Student page layout (no forced inner scroll) */
.student-page {
    display: flex;
    flex-wrap: nowrap;
    min-height: auto;
}

.student-sidebar {
    width: var(--sidebar-width);
    flex: 0 0 var(--sidebar-width);
    background: #fff;
    border-right: 1px solid #e9ecef;
}

.student-content {
    flex: 1 1 auto;
    min-width: 0;
    padding: 1rem;
}

/* Sidebar collapse support (if JS toggles body.sidebar-collapsed) */
body.sidebar-collapsed .student-sidebar {
    width: var(--sidebar-collapsed-width);
    flex-basis: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .student-left-menu .menu-text,
body.sidebar-collapsed .student-left-menu h6 {
    display: none !important;
}

body.sidebar-collapsed .student-left-menu .list-group-item {
    justify-content: center;
}

body.sidebar-collapsed .student-left-menu .menu-icon {
    width: auto;
    margin-right: 0;
}

/* Student left menu */
.student-left-menu .list-group-item {
    border: 1px solid #e9ecef;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    padding: 0.625rem 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .student-left-menu .list-group-item:hover {
        background-color: #f8f9fa;
    }

    .student-left-menu .list-group-item.disabled,
    .student-left-menu .list-group-item[aria-disabled="true"] {
        color: var(--muted);
        background-color: #f8f9fa;
    }

.student-left-menu .menu-icon {
    width: 24px;
    text-align: center;
    color: var(--brand);
    flex-shrink: 0;
}

.student-left-menu .menu-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Cards/forms should grow naturally */
.card,
.card-body,
.content-wrapper,
main[role="main"],
.inner-scroll {
    height: auto;
    max-height: none;
    overflow: visible;
}

/* Remove old inner-scroll behavior safely */
.inner-scroll {
    padding-right: 0;
}

/* Footer */
footer,
.footer,
.site-footer {
    border-top: 1px solid #e9ecef;
    background: #fff;
}

/* Utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0, 0, 0, 0);
}

/* Mobile */
@media (max-width: 991.98px) {
    .student-page {
        flex-direction: column;
    }

    .student-sidebar {
        width: 100%;
        flex-basis: auto;
        border-right: 0;
        border-bottom: 1px solid #e9ecef;
    }

    .student-content {
        padding: 0.75rem;
    }

    body.sidebar-collapsed .student-left-menu .menu-text,
    body.sidebar-collapsed .student-left-menu h6 {
        display: inline !important;
    }

    body.sidebar-collapsed .student-sidebar {
        width: 100%;
        flex-basis: auto;
    }
}


footer .bottom-footer p {
    font-size: 13px;
}

footer .bottom-footer {
    background: #192031;
    padding: 10px;
    color: #fff;
    text-align: center;
}


    footer .bottom-footer p {
        margin-bottom: 0;
    }
