:root {
    --orange: #f57c00;
    --blue: #005cb9;
    --white: #ffffff;
    --dark: #333333;
    --light-gray: #f8f9fa;
    --navbar-height: 100px;
}

body {
    margin: 0;
    font-family: Arial, sans-serif;
    background: #f8f9fa;
}

html {
    scroll-behavior: smooth;
}

/* Ensure navbar has proper z-index */
.navbar,
.page-header {
    z-index: 1000;
}

.page-header {
    background: var(--orange);
    color: var(--white);
    margin-top: 20px;
    padding: 15px 0 !important;
    text-align: center;
    position: relative;
    z-index: 999;
}

.page-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--white) !important;
    margin-bottom: 8px;
}

.page-header p {
    font-size: 16px;
}

.breadcrumb {
    background: transparent;
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    margin: 0 auto;
}

.breadcrumb a {
    color: var(--white);
    text-decoration: none;
}

.breadcrumb-item.active {
    color: #fff;
    font-weight: 500;
}

@media (max-width: 576px) {
    .breadcrumb {
        font-size: 0.85rem;
        padding: 0.25rem 0.5rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 12px 0;
        margin-top: 0 !important;
    }

    .page-header h1 {
        font-size: 20px;
        margin-bottom: 6px;
    }
}

@media (max-width: 991.98px) {
    .page-header {
        margin-top: 0 !important;
    }
}

@media (max-width: 480px) {
    .page-header {
        margin-top: 0 !important;
    }
}

.main-content {
    padding: 0;
    margin: 0;
}

.main-content .row {
    margin: 0;
}

.main-content .row .col-lg-2 {
    padding: 0;
    position: relative;
}

.main-content .row .col-lg-10 {
    padding: 30px 30px 60px 30px;
}

/* FIXED STICKY SIDEBAR - Restored original positioning */
.sidebar {
    background: #ffffff;
    border: 1px solid #ddd;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin: 20px 15px;
    position: sticky;
    top: 120px;
    /* Fixed positioning below navbar */
    height: fit-content;
    max-height: calc(100vh - 140px);
    /* Account for navbar space */
    overflow-y: auto;
    z-index: 100;
    /* Ensure it stays above content but below navbar */
    pointer-events: auto !important;
}

.sidebar h4 {
    color: var(--white) !important;
    font-weight: 600;
    margin-bottom: 15px;
    margin-top: 0;
    font-size: 1.1rem;
    text-align: center;
    background: linear-gradient(135deg, var(--blue) 0%, #004494 100%);
    padding: 12px 15px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 92, 185, 0.3);
    letter-spacing: 0.5px;
    margin-left: -15px;
    margin-right: -15px;
    margin-top: -15px;
    margin-bottom: 20px;
}

.sidebar h4::after {
    content: '';
    display: block;
    width: 30px;
    height: 2px;
    background-color: var(--white);
    margin: 8px auto 0;
    border-radius: 1px;
}

.sidebar ul {
    padding-left: 0;
    margin: 0;
    list-style: none;
}

.sidebar ul li {
    margin-bottom: 5px;
}

.sidebar ul li a {
    text-decoration: none;
    color: var(--orange);
    font-weight: 500;
    transition: all 0.3s ease;
    display: block;
    padding: 8px 12px;
    font-size: 0.9rem;
    border-radius: 4px;
}

.sidebar ul li a:hover,
.sidebar ul li a.active {
    color: var(--white);
    background-color: var(--blue);
    padding-left: 16px;
}

/* Mobile Dropdown Menu */
.mobile-dropdown {
    display: none;
    background: var(--white);
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    overflow: hidden;
}

.mobile-toggle-btn {
    width: 100%;
    background: var(--blue);
    color: var(--white);
    border: none;
    padding: 15px 20px;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    border-radius: 0;
    transition: background-color 0.3s ease;
}

.mobile-toggle-btn:hover {
    background: #004494;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    font-size: 1.1rem;
}

.mobile-toggle-btn.active .dropdown-arrow {
    transform: rotate(180deg);
}

.mobile-menu-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background: var(--white);
}

.mobile-menu-list.open {
    max-height: 800px;
    padding: 10px 0;
}

.mobile-menu-list a {
    display: block;
    padding: 12px 20px;
    color: var(--orange);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.3s ease;
}

.mobile-menu-list a:hover,
.mobile-menu-list a.active {
    color: var(--blue);
    background: rgba(245, 124, 0, 0.08);
    padding-left: 30px;
}

.mobile-menu-list a:last-child {
    border-bottom: none;
}

.section-heading-full,
h2.section-heading-full,
.content-section .section-heading-full {
    background-color: #005cb9 !important;
    color: #ffffff !important;
    padding: 12px 20px !important;
    font-weight: 600 !important;
    font-size: 22px !important;
    text-align: left !important;
    margin-bottom: 20px !important;
    position: relative !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 12px rgba(0, 92, 185, 0.3) !important;
    width: 100% !important;
    box-sizing: border-box !important;
    line-height: 1.3 !important;
}

.section-heading-full::after {
    content: '';
    display: block;
    width: 65px;
    height: 3px;
    background-color: #f57c00;
    margin-top: 6px;
    border-radius: 2px;
}

@media (max-width: 768px) {

    .section-heading-full,
    h2.section-heading-full,
    .content-section .section-heading-full {
        font-size: 18px !important;
        padding: 10px 16px !important;
        text-align: left !important;
        margin-bottom: 16px !important;
    }

    .section-heading-full::after {
        width: 40px !important;
        height: 2px !important;
        margin-top: 4px !important;
        margin-left: 0 !important;
    }
}

.content-section {
    display: block;
    margin-bottom: 40px;
}

.content-section.active {
    display: block;
}

/* PRECISE SCROLL OFFSET: Desktop original + Mobile fixes */
.anchor-offset {
    scroll-margin-top: 100px !important;
    /* Desktop - original setting */
    padding-top: 0px;
    /* No extra padding */
}

/* Mobile-only scroll offset adjustments - INCREASED VALUES */
@media (max-width: 991.98px) {
    .anchor-offset {
        scroll-margin-top: 180px !important;
        /* Mobile - increased to clear navbar */
    }
}

@media (max-width: 768px) {
    .anchor-offset {
        scroll-margin-top: 170px !important;
        /* Tablet - increased offset */
    }
}

@media (max-width: 576px) {
    .anchor-offset {
        scroll-margin-top: 165px !important;
        /* Small mobile - increased */
    }
}

@media (max-width: 480px) {
    .anchor-offset {
        scroll-margin-top: 175px !important;
        /* Very small mobile - increased */
    }
}

.section-content {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    margin-bottom: 2rem;
    border-top: 4px solid var(--orange);
}

.section-body {
    padding: 30px;
}

.section-text {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--dark);
    margin-bottom: 1.5rem;
    text-align: justify;
}

/* Image styling for text wrap */
.about-image {
    float: left;
    margin: 0 25px 20px 0;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border: 3px solid var(--orange);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    max-width: 350px;
    width: 100%;
    height: auto;
}

.about-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.2);
}

.clearfix::after {
    content: "";
    display: table;
    clear: both;
}

@media (max-width: 768px) {
    .about-image {
        float: none;
        display: block;
        margin: 0 auto 20px auto;
        max-width: 280px;
    }
}

.dean-message {
    background: var(--white);
    color: var(--dark);
    padding: 30px;
    border-radius: 15px;
    margin-top: 40px;
    display: flex;
    align-items: flex-start;
    gap: 20px;
    flex-wrap: wrap;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border-left: 5px solid var(--orange);
}

.dean-photo {
    max-width: 140px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    border: 4px solid var(--orange);
}

.dean-message-content {
    flex: 1;
    min-width: 200px;
}

.dean-message h3 {
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--blue);
}

.dean-message p {
    text-align: justify;
    margin-bottom: 15px;
}

.dean-message ul {
    padding-left: 20px;
}

.dean-message ul li {
    margin-bottom: 8px;
}

.vision-mission-card {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border-left: 5px solid var(--orange);
    transition: all 0.3s ease;
    height: 100%;
}

.vision-mission-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.vision-mission-card h4 {
    color: var(--blue);
    font-weight: 600;
    margin-bottom: 15px;
}

.uniqueness-card {
    background: var(--white);
    border-radius: 15px;
    padding: 30px 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
    border-top: 4px solid var(--orange);
    position: relative;
    overflow: hidden;
}

.uniqueness-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-top-color: var(--blue);
}

.uniqueness-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 30%, rgba(245, 124, 0, 0.05) 50%, transparent 70%);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.uniqueness-card:hover::before {
    opacity: 1;
    transform: rotate(45deg) translate(20%, 20%);
}

.uniqueness-icon {
    background: linear-gradient(135deg, var(--orange) 0%, #e65100 100%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    box-shadow: 0 8px 20px rgba(245, 124, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.uniqueness-icon i {
    font-size: 2.2rem;
    color: var(--white);
    transition: transform 0.3s ease;
}

.uniqueness-card:hover .uniqueness-icon {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 12px 30px rgba(245, 124, 0, 0.4);
}

.uniqueness-card:hover .uniqueness-icon i {
    transform: scale(1.1);
}

.uniqueness-title {
    color: var(--blue);
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1.2rem;
    line-height: 1.3;
    position: relative;
    z-index: 2;
}

.uniqueness-description {
    color: var(--dark);
    line-height: 1.6;
    text-align: justify;
    margin: 0;
    position: relative;
    z-index: 2;
}

.highlights-banner {
    background: linear-gradient(135deg, var(--blue) 0%, #004494 100%);
    color: white;
    border-radius: 20px;
    padding: 30px;
    margin-top: 40px;
    position: relative;
    overflow: hidden;
}

.highlights-banner::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transform: translate(30px, -30px);
}

.highlights-banner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
    transform: translate(-50px, 50px);
}

.banner-title {
    color: white;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.banner-text {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0;
    position: relative;
    z-index: 2;
}

.excellence-badge {
    background: var(--orange);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 20px rgba(245, 124, 0, 0.3);
    position: relative;
    z-index: 2;
}

.excellence-badge i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 10px;
}

.excellence-badge span {
    font-weight: 600;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

@media (max-width: 768px) {
    .uniqueness-card {
        padding: 25px 20px;
        margin-bottom: 20px;
    }

    .uniqueness-icon {
        width: 70px;
        height: 70px;
    }

    .uniqueness-icon i {
        font-size: 2rem;
    }

    .uniqueness-title {
        font-size: 1.1rem;
    }

    .highlights-banner {
        padding: 25px 20px;
        text-align: center;
    }

    .excellence-badge {
        margin-top: 20px;
        padding: 15px;
    }

    .excellence-badge i {
        font-size: 2rem;
    }
}

.department-card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    border-top: 4px solid var(--orange);
    position: relative;
}

.department-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}

.department-header {
    background: linear-gradient(135deg, var(--blue) 0%, #004494 100%);
    color: var(--white);
    padding: 40px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.department-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 30%, rgba(255, 255, 255, 0.1) 50%, transparent 70%);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(100%);
    }
}

.department-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 2;
}

.department-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.department-card .card-body {
    padding: 25px;
}

.department-card .card-title {
    color: var(--blue);
    font-weight: 600;
    margin-bottom: 15px;
}

.department-card .card-text {
    text-align: justify;
    line-height: 1.6;
}

.department-card .btn {
    background-color: var(--orange);
    border-color: var(--orange);
    color: var(--white) !important;
    transition: all 0.3s ease;
}

.department-card .btn:hover {
    background-color: #e65100;
    border-color: #e65100;
    color: var(--white) !important;
    transform: translateY(-2px);
}

/* Research Thrust Area Styles */
.research-grid {
    margin-top: 30px;
}

.research-area-card {
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    overflow: hidden;
    border-top: 5px solid var(--orange);
}

.research-area-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.research-area-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, transparent 60%, rgba(245, 124, 0, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.research-area-card:hover::before {
    opacity: 1;
}

.research-area-card.security {
    border-top-color: #e74c3c;
}

.research-area-card.nuclear {
    border-top-color: #f39c12;
}

.research-area-card.defense {
    border-top-color: #27ae60;
}

.research-area-card.conflict {
    border-top-color: #3498db;
}

.research-area-card.environmental {
    border-top-color: #2ecc71;
}

.research-area-card.maritime {
    border-top-color: #1abc9c;
}

.research-area-card.warfare {
    border-top-color: #9b59b6;
}

.research-area-card.technology {
    border-top-color: var(--blue);
}

.research-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--orange) 0%, #e65100 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    box-shadow: 0 8px 20px rgba(245, 124, 0, 0.3);
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
}

.research-icon i {
    font-size: 2.2rem;
    color: white;
    transition: transform 0.3s ease;
}

.research-area-card:hover .research-icon {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 12px 30px rgba(245, 124, 0, 0.4);
}

.research-area-card:hover .research-icon i {
    transform: scale(1.1);
}

.research-title {
    color: var(--blue);
    font-weight: 700;
    font-size: 1.3rem;
    margin-bottom: 20px;
    line-height: 1.3;
    position: relative;
    z-index: 2;
}

.research-topics {
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.topic-tag {
    display: inline-block;
    background: rgba(0, 92, 185, 0.1);
    color: var(--blue);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin: 3px;
    border: 1px solid rgba(0, 92, 185, 0.2);
    transition: all 0.3s ease;
}

.research-area-card:hover .topic-tag {
    background: var(--blue);
    color: white;
    border-color: var(--blue);
}

.research-description {
    color: var(--dark);
    line-height: 1.7;
    text-align: justify;
    margin: 0;
    position: relative;
    z-index: 2;
}

.research-footer {
    background: linear-gradient(135deg, var(--blue) 0%, #004494 100%);
    color: white;
    border-radius: 20px;
    padding: 30px;
    margin-top: 40px;
    position: relative;
    overflow: hidden;
}

.research-footer::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 150px;
    height: 150px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
}

.research-footer::after {
    content: '';
    position: absolute;
    bottom: -30px;
    left: -30px;
    width: 100px;
    height: 100px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.footer-title {
    color: white;
    font-weight: 700;
    margin-bottom: 15px;
    position: relative;
    z-index: 2;
}

.footer-text {
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin: 0;
    position: relative;
    z-index: 2;
}

.research-stats {
    background: var(--orange);
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 8px 20px rgba(245, 124, 0, 0.3);
    position: relative;
    z-index: 2;
}

.stat-item {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    display: block;
    line-height: 1;
}

.stat-label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

@media (max-width: 768px) {
    .research-area-card {
        padding: 25px 20px;
        margin-bottom: 20px;
    }

    .research-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }

    .research-icon i {
        font-size: 2rem;
    }

    .research-title {
        font-size: 1.2rem;
    }

    .topic-tag {
        font-size: 0.75rem;
        padding: 5px 10px;
    }

    .research-footer {
        padding: 25px 20px;
        text-align: center;
    }

    .research-stats {
        margin-top: 20px;
        padding: 15px;
    }

    .stat-number {
        font-size: 2rem;
    }
}

.program-card {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 20px;
    border-left: 5px solid var(--blue);
    transition: all 0.3s ease;
    height: 100%;
}

.program-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-left-color: var(--orange);
}

.program-card .card-title {
    color: var(--blue);
    font-weight: 600;
    margin-bottom: 15px;
}

.faculty-card {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    max-width: 300px;
    margin: auto;
    overflow: hidden;
    border-top: 4px solid var(--orange);
}

.faculty-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 92, 185, 0.15);
}

.faculty-img-wrapper {
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.faculty-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.faculty-card:hover .faculty-img-wrapper img {
    transform: scale(1.05);
}

.faculty-card .card-body {
    padding: 20px;
}

.faculty-card .card-title {
    color: var(--blue);
    font-weight: 600;
    margin-bottom: 10px;
    font-size: 1rem;
}

.faculty-card .card-text {
    font-size: 0.9rem;
    line-height: 1.5;
    margin-bottom: 8px;
}

.faculty-card .btn {
    background-color: var(--orange);
    border-color: var(--orange);
    color: var(--white) !important;
    font-size: 0.85rem;
    padding: 6px 12px;
}

.faculty-card .btn:hover {
    background-color: #e65100;
    border-color: #e65100;
    color: var(--white) !important;
}

.filter-section {
    margin-bottom: 30px;
}

.filter-btn {
    background-color: transparent;
    border: 2px solid var(--orange);
    color: var(--orange);
    padding: 8px 16px;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 5px;
}

.filter-btn:hover,
.filter-btn.active {
    background-color: var(--orange);
    color: var(--white);
    transform: translateY(-2px);
}

.form-select {
    border: 2px solid var(--orange);
    border-radius: 8px;
}

.form-select:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 0.2rem rgba(0, 92, 185, 0.25);
}

/* Responsive - mobile fixes only, desktop unchanged */
@media (max-width: 991.98px) {
    :root {
        --navbar-height: 140px;
        /* Mobile navbar height */
    }

    .sidebar {
        display: none !important;
        top: 160px;
        max-height: calc(100vh - 180px);
    }

    .mobile-dropdown {
        display: block !important;
        margin-bottom: 15px !important;
        margin-top: 0 !important;
    }

    .main-content .row .col-lg-2,
    .main-content .row .col-lg-10 {
        padding: 10px 15px 30px 15px !important;
    }

    .main-content {
        padding-top: 0 !important;
        margin-top: 0 !important;
    }

    .dean-message {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .dean-photo {
        margin-bottom: 20px;
    }

    .dean-message-content {
        text-align: justify;
    }
}

@media (max-width: 768px) {

    .main-content .row .col-lg-2,
    .main-content .row .col-lg-10 {
        padding: 5px 15px 20px 15px !important;
    }

    .mobile-dropdown {
        margin-bottom: 10px !important;
    }

    .section-body {
        padding: 20px;
    }

    .dean-message {
        padding: 20px;
    }

    .dean-photo {
        max-width: 120px;
    }

    .vision-mission-card,
    .program-card {
        padding: 20px;
    }

    .department-card .card-body,
    .faculty-card .card-body {
        padding: 15px;
    }

    .sidebar {
        top: 150px;
        max-height: calc(100vh - 170px);
    }
}

@media (max-width: 480px) {
    .sidebar {
        top: 160px;
        max-height: calc(100vh - 180px);
    }
}

@media (max-width: 576px) {
    .filter-section .d-md-flex {
        flex-direction: column;
        gap: 10px;
    }

    .filter-btn {
        width: 100%;
        margin: 2px 0;
    }
}

/* Modal fixes for z-index and visibility */
.modal {
    z-index: 10050 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1rem !important;
    pointer-events: none !important;
}

.modal.show {
    display: flex !important;
    pointer-events: auto !important;
}

.modal-backdrop {
    z-index: 10040 !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    pointer-events: auto !important;
}

.modal-dialog {
    z-index: 10060 !important;
    margin: 0 !important;
    position: relative !important;
    max-width: 800px !important;
    width: 100% !important;
    max-height: 90vh !important;
    pointer-events: auto !important;
    transform: none !important;
}

.modal-content {
    background-color: white !important;
    border: none !important;
    border-radius: 12px !important;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3) !important;
    pointer-events: auto !important;
    position: relative !important;
    display: flex !important;
    flex-direction: column !important;
    max-height: 90vh !important;
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    border-radius: 12px 12px 0 0;
    flex-shrink: 0;
}

.modal-body {
    padding: 2rem;
    line-height: 1.6;
    overflow-y: auto;
    flex: 1;
}

.modal-body p {
    margin-bottom: 1rem;
    text-align: justify;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 12px 12px;
    flex-shrink: 0;
}

/* Ensure modal appears above all other content when open */
body.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important;
}

/* Ensure normal elements remain clickable when modal is closed */
body:not(.modal-open) .modal {
    display: none !important;
    pointer-events: none !important;
}

body:not(.modal-open) .modal-backdrop {
    display: none !important;
    pointer-events: none !important;
}

/* Override any container constraints */
.container,
.container-fluid,
.main-content {
    position: relative !important;
}

/* Ensure no parent container interferes */
.modal * {
    box-sizing: border-box;
}

/* Ensure sidebar and other elements remain clickable */
.sidebar a,
.mobile-menu-list a,
.department-card,
.faculty-card {
    pointer-events: auto !important;
}

@media (max-width: 768px) {
    .modal {
        padding: 0.5rem !important;
    }

    .modal-dialog {
        max-width: calc(100% - 1rem) !important;
        max-height: 95vh !important;
    }

    .modal-body {
        padding: 1.5rem;
    }
}