/*
 * Shared presentation for every Self-Finance UG and PG department page.
 * The visual language follows the B.Sc. Mathematics (Computer Applications)
 * page while allowing each department to keep its own content and assets.
 */

:root {
    --dept-navy: #102b54;
    --dept-red: #b52632;
    --dept-text: #334155;
    --dept-muted: #64748b;
    --dept-border: #e1e8f0;
    --dept-soft: #f8fafc;
}

.academics-section {
    background: #f6f8fb;
}

.academics-section .row {
    align-items: flex-start;
}

.academics-section .ac-overview {
    min-width: 0;
}

.academics-left {
    margin-bottom: 0;
}

.ac-category {
    background: #fff;
    border: 1px solid var(--dept-border);
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(17, 43, 74, 0.07);
    overflow: hidden;
}

.ac-category ul {
    margin: 0;
    padding: 8px;
}

.ac-category ul li {
    border-bottom: 1px solid #edf1f5;
    margin: 0;
}

.ac-category ul li:last-child {
    border-bottom: 0;
}

.ac-category ul li a {
    border-radius: 6px;
    color: var(--dept-text);
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    overflow-wrap: anywhere;
    padding: 12px 13px;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.ac-category ul li a:hover,
.ac-category ul li a:focus-visible {
    background: #f6e9eb;
    color: var(--dept-red);
}

.ac-category ul li a.active {
    background: var(--dept-red);
    color: #fff;
}

.dept-content-box,
.mathca-content-box,
.mcomca-card,
.bcompa-card,
.bca-profile-card {
    background: #fff;
    border: 1px solid var(--dept-border);
    border-radius: 8px;
    box-shadow: 0 14px 35px rgba(17, 43, 74, 0.08);
    min-width: 0;
    overflow: hidden;
}

.dept-content-box {
    padding: 34px;
}

.mathca-body,
.mcomca-body,
.bcompa-body,
.bca-body {
    padding: 34px;
}

body .dept-title,
.mcomca-title-block,
.bcompa-title-block,
.bca-title-block {
    display: none;
}

body .cdf-header,
body .dept-title + .dept-divider {
    display: none;
}

.mathca-hero img,
body .dept-img-box img {
    aspect-ratio: 16 / 7;
    border-radius: 0;
    display: block;
    object-fit: cover;
    width: 100%;
}

body .dept-img-box {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    margin: -34px -34px 28px;
    max-width: none;
    overflow: hidden;
    padding: 0 !important;
    text-align: left;
    width: calc(100% + 68px);
}

.dept-img-box + p {
    background: var(--dept-soft);
    border: 1px solid var(--dept-border);
    border-radius: 8px;
    color: var(--dept-navy);
    font-weight: 700;
    padding: 15px 17px;
}

.dept-divider {
    border: 0;
    border-top: 1px solid #e7edf4;
    margin: 24px 0;
    opacity: 1;
}

.mathca-block,
.mcomca-block,
.bcompa-block,
.bca-block,
.cdf-section {
    border-top: 1px solid #e7edf4;
    margin-top: 24px;
    padding-top: 24px;
}

.bca-body > .bca-block:first-of-type {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

.dept-heading,
.mathca-block h3,
.mcomca-block h3,
.bcompa-block h3,
.bca-block h3,
.cdf-section h3 {
    color: var(--dept-red);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.35;
    margin: 0 0 12px;
    overflow-wrap: anywhere;
    text-transform: uppercase;
}

.bca-block h4,
.bcompa-block h4,
.mcomca-block h4,
.cdf-section h4,
.dept-subheading {
    color: var(--dept-navy);
    font-size: 17px;
    font-weight: 800;
    line-height: 1.4;
    margin: 16px 0 10px;
}

.academics-section .ac-overview p {
    color: var(--dept-text);
    font-size: 16px;
    hyphens: auto;
    line-height: 1.8;
    margin-bottom: 12px;
    max-width: 100%;
    overflow-wrap: break-word;
    text-align: justify !important;
    text-align-last: left;
    word-break: normal;
}

body .dept-list,
.mathca-list,
.mcomca-list,
.bcompa-list,
.bca-list,
.course-list {
    background: var(--dept-soft);
    border: 1px solid var(--dept-border);
    border-radius: 8px;
    list-style: none;
    margin: 14px 0 0;
    padding: 18px 22px;
}

body .dept-list li,
.mathca-list li,
.mcomca-list li,
.bcompa-list li,
.bca-list li,
.course-list li {
    color: var(--dept-text);
    font-size: 16px;
    line-height: 1.7;
    overflow-wrap: anywhere;
    padding-left: 28px;
    position: relative;
}

body .dept-list li + li,
.mathca-list li + li,
.mcomca-list li + li,
.bcompa-list li + li,
.bca-list li + li,
.course-list li + li {
    margin-top: 10px;
}

body .dept-list li::before,
.mathca-list li::before,
.mcomca-list li::before,
.bcompa-list li::before,
.bca-list li::before,
.course-list li::before {
    background: var(--dept-red);
    border-radius: 50%;
    content: "";
    height: 8px;
    left: 4px;
    position: absolute;
    top: 10px;
    width: 8px;
}

.mathca-meta-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 12px;
}

.mathca-meta-item,
.dept-box {
    background: var(--dept-soft);
    border: 1px solid var(--dept-border);
    border-radius: 8px;
}

.mathca-meta-item {
    min-width: 0;
    padding: 16px;
}

.mathca-meta-item span {
    color: var(--dept-muted);
    display: block;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 5px;
    overflow-wrap: anywhere;
    text-transform: uppercase;
}

.mathca-meta-item strong {
    color: var(--dept-navy);
    display: block;
    font-size: 17px;
    font-weight: 800;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.mathca-table-wrap,
.mcomca-table-wrap,
.bcompa-table-wrap,
.bca-table-wrap,
.cdf-table-wrap {
    margin-top: 14px;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.mathca-table,
.mcomca-table,
.bcompa-table,
.bca-table,
.cdf-table {
    border-collapse: collapse;
    min-width: 680px;
    width: 100%;
}

.mathca-table th,
.mathca-table td,
.mcomca-table th,
.mcomca-table td,
.bcompa-table th,
.bcompa-table td,
.bca-table th,
.bca-table td,
.cdf-table th,
.cdf-table td {
    border: 1px solid #dbe4ee;
    color: var(--dept-text);
    font-size: 15px;
    line-height: 1.55;
    padding: 12px 14px;
    vertical-align: top;
}

.mathca-table th,
.mcomca-table th,
.bcompa-table th,
.bca-table th,
.cdf-table th {
    background: #edf3ff;
    color: var(--dept-navy);
    font-weight: 800;
}

.mathca-table img,
.mcomca-table img,
.bcompa-table img,
.bca-table img,
.cdf-table img {
    border-radius: 8px;
    display: block;
    height: auto;
    max-width: 180px;
    width: 100%;
}

.bca-doc-image,
.mcomca-photo {
    border-radius: 8px;
    overflow: hidden;
}

.bca-doc-image img,
.mcomca-photo img {
    display: block;
    height: auto;
    max-width: 100%;
    width: 100%;
}

.bca-body > .bca-block:first-of-type {
    margin: -34px -34px 28px;
    padding: 0;
}

.bca-body > .bca-block:first-of-type .bca-doc-image {
    border-radius: 0;
}

.bca-body > .bca-block:first-of-type img {
    aspect-ratio: 16 / 7;
    object-fit: cover;
}

.mathca-photo-grid,
.bcompa-gallery {
    gap: 16px;
}

.mathca-photo-card,
.bcompa-gallery img {
    border-radius: 8px;
}

.mathca-actions,
.mcomca-actions,
.bcompa-actions,
.bca-syllabus-actions,
.sf-dept-actions,
.ai-actions,
.dept-action-buttons,
.dept-content-box > .d-flex {
    border-top: 1px solid #e7edf4;
    display: flex !important;
    flex-wrap: wrap;
    gap: 10px !important;
    justify-content: flex-start !important;
    margin-top: 26px;
    padding-top: 24px;
}

.mathca-actions .btn,
.mcomca-actions .btn,
.bcompa-actions .btn,
.bca-syllabus-actions .btn,
.sf-dept-actions .btn,
.ai-actions .btn,
.dept-action-buttons .default-btn,
.dept-content-box > .default-btn,
.dept-content-box > a.default-btn {
    align-items: center;
    background: var(--dept-red) !important;
    border: 1px solid var(--dept-red) !important;
    border-radius: 999px !important;
    color: #fff !important;
    display: inline-flex;
    flex: 1 1 150px;
    font-size: 14px !important;
    font-weight: 700;
    justify-content: center;
    line-height: 1.35;
    max-width: none;
    min-height: 44px;
    padding: 11px 16px !important;
    text-align: center;
    white-space: normal;
}

.mathca-actions .btn:hover,
.mcomca-actions .btn:hover,
.bcompa-actions .btn:hover,
.bca-syllabus-actions .btn:hover,
.sf-dept-actions .btn:hover,
.ai-actions .btn:hover,
.dept-action-buttons .default-btn:hover,
.dept-content-box > .default-btn:hover {
    background: var(--dept-navy) !important;
    border-color: var(--dept-navy) !important;
}

@media (min-width: 992px) {
    .academics-left {
        position: sticky;
        top: 110px;
    }
}

@media (max-width: 991.98px) {
    .academics-left {
        margin-bottom: 28px;
    }

    .ac-category {
        max-height: 300px;
        overflow-y: auto;
    }

    .mathca-meta-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    .section-banner .section-info h2 {
        font-size: 27px;
        line-height: 1.25;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .academics-section {
        padding-bottom: 45px;
        padding-top: 45px;
    }

    .academics-section .container,
    .academics-section .row,
    .academics-section [class*="col-"] {
        max-width: 100%;
    }

    .academics-section .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .academics-section .row {
        margin-left: 0;
        margin-right: 0;
    }

    .academics-section [class*="col-"] {
        flex: 0 0 100%;
        padding-left: 0;
        padding-right: 0;
        width: 100%;
    }

    .dept-content-box,
    .mathca-body,
    .mcomca-body,
    .bcompa-body,
    .bca-body {
        padding: 22px;
    }

    body .dept-img-box {
        margin: -22px -22px 24px;
        width: calc(100% + 44px);
    }

    .bca-body > .bca-block:first-of-type {
        margin: -22px -22px 24px;
    }

    .mathca-title {
        font-size: 24px;
        line-height: 1.25;
    }

    .dept-heading,
    .mathca-block h3,
    .mcomca-block h3,
    .bcompa-block h3,
    .bca-block h3,
    .cdf-section h3 {
        font-size: 18px;
    }

    .dept-list li,
    .mathca-list li,
    .mcomca-list li,
    .bcompa-list li,
    .bca-list li,
    .course-list li,
    .mathca-table th,
    .mathca-table td,
    .mcomca-table th,
    .mcomca-table td,
    .bcompa-table th,
    .bcompa-table td,
    .bca-table th,
    .bca-table td,
    .cdf-table th,
    .cdf-table td {
        font-size: 15px;
        text-align: left !important;
    }

    .academics-section .ac-overview p {
        font-size: 15px;
        line-height: 1.75;
        text-align: justify !important;
        text-align-last: left;
    }

    body .dept-list,
    .mathca-list,
    .mcomca-list,
    .bcompa-list,
    .bca-list,
    .course-list {
        padding: 16px;
    }

    .mathca-photo-grid,
    .bcompa-gallery {
        grid-template-columns: 1fr;
    }

    .mathca-actions .btn,
    .mcomca-actions .btn,
    .bcompa-actions .btn,
    .bca-syllabus-actions .btn,
    .sf-dept-actions .btn,
    .ai-actions .btn,
    .dept-action-buttons .default-btn,
    .dept-content-box > .default-btn,
    .dept-content-box > a.default-btn {
        flex-basis: 100%;
        width: 100%;
    }
}
