: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;
}

.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;
}

.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;
}

/* 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;
    background: var(--blue);
    color: white;
}

.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,
.program-card,
.faculty-card {
    pointer-events: auto !important;
}

/* 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;
    }

    .faculty-card .card-body {
        padding: 15px;
    }

    .sidebar {
        top: 150px;
        max-height: calc(100vh - 170px);
    }

    .modal {
        padding: 0.5rem !important;
    }

    .modal-dialog {
        max-width: calc(100% - 1rem) !important;
        max-height: 95vh !important;
    }

    .modal-body {
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .sidebar {
        top: 160px;
        max-height: calc(100vh - 180px);
    }
}