﻿/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

/* ---------- Tablet: <= 991.98px ---------- */
@media (max-width: 991.98px) {

    .right-panel {
        width: 100%;
        flex-direction: row;
        flex-wrap: wrap;
        padding: 0 24px 24px 24px;
    }

        .right-panel .widget-card {
            flex: 1 1 280px;
        }

    .content-row {
        flex-wrap: wrap;
    }

    .portal-title {
        display: none !important;
    }
}

/* ---------- Mobile: <= 767.98px ---------- */
@media (max-width: 767.98px) {

    .topbar-inner {
        padding: 0 14px;
        gap: 10px;
    }

    .brand-logo-img {
        width: 38px;
        height: 38px;
    }

    /* Sidebar becomes an offcanvas overlay, detached from the header */
    .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: var(--sidebar-expanded);
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
        z-index: 1050;
        transition: transform var(--transition);
    }

        .sidebar.expanded {
            transform: translateX(0);
            width: var(--sidebar-expanded);
        }

        .sidebar .sidebar-text {
            opacity: 1;
            width: auto;
        }

        .sidebar .sidebar-toggle-btn {
            justify-content: flex-start;
            padding-left: 20px;
        }

        .sidebar .sidebar-link {
            justify-content: flex-start;
        }

    /* A static hamburger stays in the header flow to reopen the sidebar */
    .mobile-menu-btn {
        display: flex;
        border: none;
        background: transparent;
        font-size: 1.4rem;
        width: 40px;
        height: 40px;
        align-items: center;
        justify-content: center;
        border-radius: var(--radius-sm);
        color: var(--text);
        flex-shrink: 0;
    }

        .mobile-menu-btn:hover {
            background: var(--primary-light);
            color: var(--primary);
        }

    .sidebar-backdrop.visible {
        display: block;
        opacity: 1;
    }

    .main-content {
        padding: 16px;
    }

    .section-card {
        padding: 18px;
    }

    .right-panel {
        padding: 0 16px 16px 16px;
        flex-direction: column;
    }

    .course-title {
        font-size: 1.1rem;
    }

    .logout-fab {
        width: 44px;
        height: 44px;
        left: 12px;
        bottom: 12px;
    }

    .back-to-top {
        bottom: 18px;
        right: 18px;
        width: 42px;
        height: 42px;
    }
}

/* ---------- Small mobile: <= 575.98px ---------- */
@media (max-width: 575.98px) {
    .portal-title {
        display: none !important;
    }

    .welcome-text {
        display: none !important;
    }

    .announce-bar {
        padding: 0 14px;
    }

    .marquee-track span {
        font-size: 0.8rem;
    }

    .support-card-table {
        min-height: 220px;
    }
}


/* Login modal: single column, tight spacing so it fits without scrolling */
.login-modal-overlay {
    padding: 8px;
}

.login-modal-card {
    max-height: 98vh;
}

.login-modal-form {
    padding: 18px 18px;
}

.login-form-header {
    gap: 10px;
    display: flex;
    align-items: center;
}

.login-lock-icon {
    width: 36px;
    height: 36px;
    font-size: 1rem;
}

.login-captcha-row {
    flex-wrap: wrap;
}

.login-captcha-input {
    order: 3;
}

.viewall-card {
    width: 100%;
    max-width: 1000px;
    background: #fff;
    margin: 3% auto;
    border-radius: 14px;
    padding: 28px 32px;
    max-height: 88vh;
    overflow: auto;
}

.viewall-topline h3 {
    font-weight: 700;
    margin-bottom: 2px;
}

.viewall-subtitle {
    color: #888;
    font-size: .9rem;
    margin-bottom: 3px;
}

.viewall-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
    padding-bottom: 14px;
    margin-bottom: 8px;
}

.viewall-count {
    font-weight: 600;
}

.viewall-header-right {
    display: flex;
    align-items: center;
    gap: 14px;
}

.viewall-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.viewall-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 5px 10px;
    margin-bottom: 12px;
    border: 1px solid #eef0f5;
    border-radius: 12px;
    cursor: pointer;
    transition: box-shadow .15s ease, border-color .15s ease;
}

    .viewall-item:hover {
        box-shadow: 0 2px 10px rgba(0,0,0,.06);
        border-color: #e0e4f0;
    }

    .viewall-item:last-child {
        margin-bottom: 0;
    }

.viewall-filter-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 6px 12px;
}

    .viewall-filter-wrap i {
        color: #777;
        font-size: .9rem;
    }

    .viewall-filter-wrap select {
        border: none;
        outline: none;
        background: transparent;
        font-size: .9rem;
    }

.viewall-icon {
    background: #fde8d8;
    color: #e8590c;
    border-radius: 10px;
    padding: 10px;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.viewall-title {
    font-weight: 600;
    margin: 0 0 4px;
    font-size: 1rem;
}

.viewall-desc {
    color: #777;
    font-size: .85rem;
    margin: 0;
    line-height: 1.4;
}

.viewall-time {
    margin-left: auto;
    font-size: .8rem;
    color: #3b4d8c;
    background: #eef1ff;
    padding: 6px 12px;
    border-radius: 8px;
    white-space: nowrap;
    flex-shrink: 0;
}

.viewall-pager {
    display: flex;
    gap: 6px;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
}

.pdf-modal-card {
    position: relative;
    width: 85%;
    max-width: 900px;
    height: 85vh;
    margin: 4vh auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0,0,0,.25);
}

    .pdf-modal-card .crossImg {
        position: absolute;
        top: 10px;
        right: 15px;
        background: rgb(245, 244, 244);
        color: red;
        cursor: pointer;
        font-size: 20px;
        -webkit-text-stroke: 1.5px red;
        padding: 6px;
        border-radius: 50%;
        z-index: 1;
    }

    .pdf-modal-card iframe {
        width: 100%;
        height: 100%;
        border: 0;
    }

.pager-btn, .pager-arrow {
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 8px;
    padding: 6px 12px;
    cursor: pointer;
    font-size: .9rem;
}

    .pager-btn.active {
        background: #2b3a67;
        color: #fff;
        border-color: #2b3a67;
    }

    .pager-arrow:disabled {
        opacity: .4;
        cursor: not-allowed;
    }

.pager-btn {
    border: 1px solid #ddd;
    background: #fff;
    border-radius: 6px;
    padding: 4px 10px;
    cursor: pointer;
}

    .pager-btn.active {
        background: #2b3a67;
        color: #fff;
        border-color: #2b3a67;
    }

#announcementMarquee {
    cursor: pointer;
}




/* ===================== MS-CIT ABOUT EXAMINATION ===================== */

.course-about-row.about-mscit {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 1.25rem;
    width: 100%;
    margin: 1rem 0 1.25rem;
    padding: 1.25rem;
    background: #fff;
    border: 1px solid #e8ebf2;
    border-radius: 14px;
    box-shadow: 0 4px 12px rgba(22, 34, 56, 0.045);
    overflow: hidden;
}

.about-mscit .course-about-copy {
    flex: 1 1 73%;
    min-width: 0;
}

.about-mscit .course-about-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
    color: #16834a;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
}

.about-mscit .course-about-title {
    margin-bottom: 0.5rem;
    color: #1e5b22;
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.4;
}

.about-mscit .course-about-text {
    margin: 0;
    color: #6b7280;
    font-size: 0.88rem;
    line-height: 1.75;
}

.about-mscit .course-about-visual {
    flex: 0 0 27%;
    width: 27%;
    max-width: 27%;
    height: 190px;
    overflow: hidden;
    border-radius: 12px;
    background: #f4f6fb;
}

    .about-mscit .course-about-visual img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }


/* ===================== THREE EXAM DETAIL COLUMNS ===================== */

.exam-info-row {
    margin-top: 0.75rem;
    margin-bottom: 0;
}

    .exam-info-row > div {
        display: flex;
    }

    .exam-info-row .info-panel {
        width: 100%;
        height: 100%;
        padding: 1.25rem;
        border-radius: 14px;
    }

    .exam-info-row .col-heading {
        margin-bottom: 1rem;
        line-height: 1.5;
    }

    .exam-info-row .tick-list li,
    .exam-info-row .dot-list li {
        line-height: 1.6;
        margin-bottom: 0.65rem;
    }

    .exam-info-row .criteria-row {
        align-items: flex-start;
        line-height: 1.6;
        margin-bottom: 0.8rem;
    }

        .exam-info-row .criteria-row:last-child {
            margin-bottom: 0;
        }


/* ===================== TABLET RESPONSIVENESS ===================== */

@media (max-width: 991.98px) {
    .course-about-row.about-mscit {
        gap: 1rem;
        padding: 1rem;
    }

    .about-mscit .course-about-visual {
        flex-basis: 30%;
        width: 30%;
        max-width: 30%;
        height: 170px;
    }

    .exam-info-row > .col-lg-4 {
        margin-bottom: 0;
    }
}


/* ===================== MOBILE RESPONSIVENESS ===================== */

@media (max-width: 767.98px) {
    .course-about-row.about-mscit {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 1rem;
        padding: 1rem;
    }

    .about-mscit .course-about-visual {
        flex: none;
        width: 100%;
        max-width: 100%;
        height: 180px;
    }

    .about-mscit .course-about-title {
        font-size: 1.1rem;
    }

    .about-mscit .course-about-text {
        font-size: 0.85rem;
    }

    .exam-info-row {
        row-gap: 1rem;
    }

        .exam-info-row .info-panel {
            padding: 1rem;
        }
}



/* MS-ACIT About Examination Section */
.course-about-row.about-msacit {
    margin-bottom: 24px;
}

/* About section image */
.about-msacit .course-about-visual img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: 16px;
}

@media (max-width: 991.98px) {
    .about-msacit .course-about-visual img {
        height: 240px;
    }
}

@media (max-width: 575.98px) {
    .about-msacit .course-about-visual img {
        height: 200px;
    }
}
