/* Course Tabs Specific Styles */
#courseTabs {
    border-bottom: none;
    background: transparent;
    padding: 0;
    margin-bottom: 1rem;
    gap: 0.5rem;
    display: flex;
}

#courseTabs .nav-link {
    border: 1px solid #e5e7eb;
    border-bottom: none;
    background: #fff;
    color: #495057;
    font-weight: bold;
    border-radius: 8px 8px 0 0;
    margin-right: 0.25rem;
    padding: 0.75rem 1.5rem;
    transition: background 0.2s, color 0.2s;
    position: relative;
    top: 2px;
}

#courseTabs .nav-link.active {
    background: #0066b3;
    color: #fff;
    border-color: #0066b3 #0066b3 #fff #0066b3;
    z-index: 2;
}

#courseTabs .nav-link:not(.active):hover {
    background: #f5f7fa;
    color: #0066b3;
    border-color: #bcdffb;
}

#courseTabs .nav-link:focus {
    outline: none;
    box-shadow: 0 0 0 2px #bcdffb;
}

#courseTabs .nav-item {
    margin-bottom: 0;
}

#courseTabsContent {
    padding: 1.5rem;
    background: #fff;
}

@media (max-width: 768px) {
    #courseTabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding: 0.5rem 0.5rem 0;
    }
    
    #courseTabs .nav-item {
        flex: 0 0 auto;
    }
    
    #courseTabs .nav-link {
        white-space: nowrap;
        padding: 0.75rem 1rem;
        margin-right: 0.25rem;
    }
}

/* Main Styles */
body {
    /* background-color: #f1f4fb; */
    background-color: #f1f4fb;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Barlow', sans-serif;
}

html, body {
    height: 100%;
    min-height: 100%;
}

.main-content, .container.py-5 {
    flex: 1 0 auto;
}

/* Information Section Styles */
.info-center-section {
    padding: 3rem 0;
    background-color: #fff;
}

.info-center-section .card {
    border: none;
    box-shadow: 0 0 20px rgba(0,0,0,0.05);
}

.info-center-section .card-body {
    padding: 0;
}

.info-center-section .nav-tabs {
    padding: 1rem 1rem 0;
    gap: 0.5rem;
    border-bottom: 1px solid #dee2e6;
}

.info-center-section .nav-tabs .nav-link {
    border: none;
    padding: 0.75rem 1.5rem;
    color: #6c757d;
    font-weight: 500;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.info-center-section .nav-tabs .nav-link i {
    font-size: 1.1rem;
}

.info-center-section .nav-tabs .nav-link:hover {
    background-color: #f1f4fb;
    color: #495057;
}

.info-center-section .nav-tabs .nav-link.active {
    background-color: var(--primary-color);
    color: #fff !important;
    border: none;
}

.info-center-section .nav-tabs .nav-link.active i {
    color: #fff;
}

.info-center-section .tab-content {
    padding: 1.5rem;
    min-height: 300px;
}

.info-center-section .table {
    margin-bottom: 0;
}

.info-center-section .table th {
    border-top: none;
    font-weight: 600;
    color: #495057;
    background-color: #f1f4fb;
    padding: 1rem;
}

.info-center-section .table td {
    padding: 1rem;
    vertical-align: middle;
}

.info-center-section .table tr:last-child td {
    border-bottom: none;
}

.info-center-section .btn-download {
    padding: 0.375rem 1rem;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    transition: all 0.3s ease;
}

.info-center-section .btn-download:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.info-center-section .empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: #6c757d;
}

.info-center-section .empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #dee2e6;
}

.info-center-section .empty-state p {
    font-size: 1rem;
    margin-bottom: 0;
}

/* Table Styles */
.table-responsive {
    border-radius: 0.5rem;
    overflow: hidden;
}

.table {
    width: 100%;
    margin-bottom: 0;
}

.table thead th {
    white-space: nowrap;
}

.table td {
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Button Styles */
.btn-info {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-info:hover {
    color: #fff;
    background-color: darken(var(--primary-color), 10%);
    border-color: darken(var(--primary-color), 10%);
}

/* Container Spacing */
.container {
    padding-top: 0rem !important;
    padding-bottom: 0rem !important;
}

/* Card Styles */
.card {
    border: none;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.card-body {
    padding: 1.5rem;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .info-center-section .nav-tabs {
        flex-direction: column;
        gap: 0.5rem;
        padding: 1rem;
    }

    .info-center-section .nav-tabs .nav-link {
        width: 100%;
        text-align: center;
        justify-content: center;
    }

    .info-center-section .table td {
        max-width: 200px;
    }
}

/* Table Cell Specific Styles */
.info-center-section .table tbody tr {
    border-bottom: 1px solid #dee2e6;
}

.info-center-section .table tbody tr:last-child {
    border-bottom: none;
}

.info-center-section .table tbody td {
    padding: 1rem;
    vertical-align: middle;
    line-height: 1.5;
}

.info-center-section .table tbody td:first-child {
    font-weight: 500;
    color: #2d3748;
    max-width: 50%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.info-center-section .table tbody td:nth-child(2) {
    color: #718096;
    width: 50% !important;
    white-space: nowrap;
}

.info-center-section .table tbody td:last-child {
    width: 50% !important;
    text-align: center;
}

.info-center-section .table thead th:first-child {
    width: 50% !important;
}

.info-center-section .table thead th:nth-child(2) {
    width: 50% !important;
}

.info-center-section .table thead th:last-child {
    width: 50% !important;
    text-align: center;
}

/* Table Responsive Fixes */
.info-center-section .table-responsive {
    margin: 0;
    border: none;
}

.info-center-section .table {
    margin: 0;
    width: 100%;
    border-collapse: collapse;
}

.info-center-section .table tbody {
    background-color: #fff;
}

/* Download Button Alignment */
.info-center-section .btn-download {
    margin: 0;
    white-space: nowrap;
    min-width: 120px;
}

/* Info Table Specific Styles */
.mavi-info-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin: 0;
    table-layout: fixed;
}

.mavi-info-table thead th {
    background: #f8f9fa;
    font-weight: 500;
    color: #64748b;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    height: 48px;
    vertical-align: middle;
}

.mavi-info-table tbody tr {
    border-bottom: 1px solid #e2e8f0;
    height: 56px;
}

.mavi-info-table tbody tr:last-child {
    border-bottom: none;
}

.mavi-info-table tbody td {
    padding: 12px 16px;
    vertical-align: middle;
    height: 56px;
}

/* Column specific styles */
.mavi-info-table td:first-child {
    text-align: left;
    font-weight: 500;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mavi-info-table td:nth-child(2) {
    text-align: center;
}

.mavi-info-table td:last-child {
    text-align: right;
}

/* Date styles */
.mavi-date {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: #64748b;
}

.mavi-date i {
    font-size: 14px;
}

/* Download button styles */
.mavi-download-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: var(--primary-color);
    color: #fff;
    padding: 6px 16px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid var(--primary-color);
}

.mavi-download-btn:hover {
    background: #fff;
    color: var(--primary-color);
}

.mavi-download-btn i {
    font-size: 14px;
}

/* Table wrapper styles */
.mavi-table-wrapper {
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

/* Empty state styles */
.mavi-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.mavi-empty-state i {
    font-size: 32px;
    color: #94a3b8;
    margin-bottom: 16px;
}

.mavi-empty-state p {
    color: #64748b;
    font-size: 16px;
    margin: 0;
}

/* Responsive styles */
@media (max-width: 768px) {
    .mavi-info-table thead th,
    .mavi-info-table tbody td {
        padding: 12px 16px;
    }

    .mavi-info-table tbody td:first-child {
        max-width: 200px;
    }
}

/* Navbar Styles */
.navbar {
    background-color: var(--secondary-color);
    padding: 0.5rem 0;
}

.navbar-brand {
    font-size: 1rem;
    padding: 0.25rem 0;
    margin-right: 0.35rem;
}

.navbar-brand img {
    max-height: 48px;
    vertical-align: middle;
}

.navbar-nav {
    font-family: 'Roboto Condensed', sans-serif;
}

.navbar-nav .nav-item {
    margin: 0 0.1rem;
    position: relative;
}

.navbar-nav .nav-link {
    padding: 0.25rem 0.4rem !important;
    font-size: 1rem;
    font-weight: 300 !important;
    color: var(--primary-color) !important;
    transition: color 0.3s ease;
    line-height: 1.2;
}

.navbar-nav .nav-link:hover {
    color: var(--primary-color) !important;
    opacity: 0.85;
}

.navbar-nav .dropdown-menu {
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    padding: 0.25rem 0;
    margin-top: 0;
    font-size: 0.8rem;
    display: none;
    font-family: 'Roboto Condensed', sans-serif;
}

.navbar-nav .dropdown-menu.show {
    display: block;
}

.navbar-nav .dropdown-item {
    padding: 0.25rem 0.75rem;
    font-size: 1rem;
    font-weight: 300 !important;
    color: var(--primary-color) !important;
}

.navbar-nav .dropdown-item:hover {
    background-color: rgba(var(--primary-color-rgb), 0.1);
    color: #ffffff !important;
    background-color: var(--primary-color);
}

/* Search Form in Navbar */
.navbar .search-form {
    margin-left: 0.25rem;
}

.navbar .search-form .form-control {
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    width: 150px;
    height: calc(1.5em + 0.5rem + 2px);
}

.navbar .search-form .btn {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
    height: calc(1.5em + 0.5rem + 2px);
}

/* Language Switcher */
.nav-item.dropdown.language-switcher {
    margin-left: 0.25rem;
}

.language-switcher .nav-link {
    padding: 0.25rem 0.4rem !important;
    font-size: 0.8rem;
}

.language-switcher .dropdown-menu {
    min-width: 100px;
}

.language-switcher img {
    width: 16px;
    height: auto;
    margin-right: 0.2rem;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .navbar .search-form {
        margin: 0.35rem 0;
        width: 100%;
    }
    
    .navbar .search-form .form-control {
        width: 100%;
    }
    
    .language-switcher {
        margin: 0.35rem 0;
    }
}

/* Top Contact Bar */
.top-contact-bar {
    background-color: var(--primary-color);
    padding: 0.2rem 0;
    font-size: 0.75rem;
}

.top-contact-bar a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    margin-right: 0.75rem;
}

.top-contact-bar a:hover {
    color: #fff;
}

.top-contact-bar i {
    margin-right: 0.2rem;
}

.social-icons a {
    margin-left: 0.35rem;
    font-size: 0.8rem;
}

/* Make navbar items wrap better */
.navbar-nav {
    flex-wrap: nowrap;
}

/* Adjust container padding for more space */
.navbar > .container {
    padding-left: 0.35rem;
    padding-right: 0.35rem;
}

/* Adjust dropdown toggle spacing */
.dropdown-toggle::after {
    margin-left: 0.2rem;
    vertical-align: 0.15em;
    font-size: 0.8rem;
}

/* Remove mobile menu styles */
@media (max-width: 991.98px) {
    /* Removing mobile grid layout styles */
}

/* Pagination Styles */
.pagination-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    margin-top: 1rem;
}

.pagination-number,
.pagination-link,
.page-link {
    padding: 6px 12px;
    border: 1px solid #dee2e6;
    color: #0d6efd;
    text-decoration: none;
    background: #fff;
    min-width: 35px;
    text-align: center;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.pagination-number:hover,
.pagination-link:hover,
.page-link:hover {
    background-color: #e9ecef;
    color: #0d6efd;
    border-color: #dee2e6;
}

.pagination-number.active,
.pagination-page-number {
    background-color: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
    min-width: 35px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: normal;
}

.pagination-link.disabled,
.page-link.disabled {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

/* Ellipsis */
.pagination-ellipsis {
    color: #6c757d;
    padding: 6px 12px;
}

/* Updates Section Card Layout Fixes */
.updates-section {
    padding: 2rem 0;
    margin-bottom: 1rem;
    border-radius: 0.75rem;
    overflow: visible;
}

.updates-section .card {
    border-radius: 0.5rem;
    overflow: hidden;
}

.updates-section .pagination-wrapper {
    border-radius: 0 0 0.5rem 0.5rem;
}

.updates-section .table-responsive {
    border-radius: 0.5rem;
    overflow: hidden;
}

.updates-section .table {
    margin-bottom: 0;
}

.updates-section .table tbody {
    min-height: 250px;
}

.updates-section .table tr {
    min-height: 50px;
    display: table;
    width: 100%;
    table-layout: fixed;
}

/* Mobile styles for updates section */
@media (max-width: 768px) {
    .updates-section .card-body {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        position: relative;
        padding-bottom: 0;
        display: block;
        white-space: nowrap;
    }
    .updates-section .nav-tabs {
        flex-wrap: nowrap;
        min-width: 800px;
        width: 800px;
        overflow: visible;
        padding: 0.5rem 0.5rem 0;
        margin-bottom: 0;
        display: flex;
    }
    .updates-section .nav-tabs .nav-item {
        flex: 0 0 auto;
    }
    .updates-section .nav-tabs .nav-link {
        white-space: nowrap;
        padding: 0.75rem 1rem !important;
        margin-right: 0.25rem !important;
    }
    .updates-section .table-responsive {
        min-width: 800px;
        width: 800px;
        overflow: visible;
        display: block;
    }
    /* Make pagination-wrapper full width and not scrollable */
    .updates-section .pagination-wrapper {
        position: static !important;
        width: 100% !important;
        min-width: 0 !important;
        overflow-x: visible !important;
        box-shadow: none !important;
        border-radius: 0 0 0.5rem 0.5rem;
        margin-top: 0;
        background: #fff;
        z-index: 10;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 0.25rem;
        border-top: 1px solid #dee2e6;
    }
}

/* Pagination positioning */
.updates-section .pagination-wrapper {
    position: absolute ;
    bottom: 0;
    right: 0;
    background: #fff;
    padding: 0.5rem;
    z-index: 10 ;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 0.25rem;
    min-height: 45px;
    border-top: 1px solid #dee2e6;
    width: auto;
    min-width: 200px;
    box-shadow: -2px -2px 5px rgba(0,0,0,0.05);
}

/* Keep consistent spacing for pagination */
.updates-section .pagination-wrapper .page-link {
    padding: 0.25rem 0.5rem;
    border: 1px solid #dee2e6;
    color: var(--primary-color);
    background-color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.3s ease;
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

.updates-section .pagination-wrapper .page-link:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.updates-section .pagination-wrapper .page-link.disabled {
    color: #6c757d;
    pointer-events: none;
    background-color: #fff;
    border-color: #dee2e6;
}

.updates-section .pagination-wrapper .pagination-page-number {
    min-width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--primary-color);
    color: #fff;
    border-radius: 4px;
    font-weight: normal;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

/* Tab content */
.updates-section .tab-content {
    position: relative;
    height: 415px !important;
}

.updates-section .tab-pane {
    position: relative;
    height: 100%;
}

/* Tab Navigation */
.updates-section .nav-tabs {
    border-bottom: 1px solid #dee2e6;
    background: #fff;
    padding: 0.5rem 1rem 0;
}

.updates-section .nav-tabs .nav-link {
    border: none;
    padding: 0.75rem 1.5rem !important;
    margin-right: 0.5rem !important;
    border-radius: 0;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.updates-section .nav-tabs .nav-link,
.updates-section .nav-tabs .nav-link i,
.updates-section .nav-tabs .nav-link span {
    color: #6c757d;
    transition: color 0.3s ease;
}

.updates-section .nav-tabs .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: transparent;
    transition: all 0.3s ease;
}

.updates-section .nav-tabs .nav-link:hover,
.updates-section .nav-tabs .nav-link:hover i,
.updates-section .nav-tabs .nav-link:hover span {
    color: var(--primary-color);
    border: none;
}

.updates-section .nav-tabs .nav-link.active,
.updates-section .nav-tabs .nav-link.active i,
.updates-section .nav-tabs .nav-link.active span {
    color: var(--primary-color);
    background: transparent;
    border: none;
}

.updates-section .nav-tabs .nav-link.active::after {
    background: var(--primary-color);
}

/* Table Styles */
.updates-section .table {
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
}

.updates-section .table th {
    background: #fff;
    font-weight: 500;
    color: #333;
    padding: 1rem;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
    height: 60px;
    position: relative;
}

.updates-section .table td {
    padding: 1rem;
    vertical-align: middle;
    color: #333;
    background: #fff;
    border-bottom: 1px solid #dee2e6;
    height: 60px;
    position: relative;
}

/* Center dash icon in table cells */
.updates-section .table td .text-muted,
#notices-list td .text-muted,
#results-list td .text-muted {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 24px;
    text-align: center;
    margin: 0 auto;
}

/* Add vertical lines between columns in updates-section table */
.updates-section .table th,
.updates-section .table td {
    border-right: 1px solid #dee2e6;
    position: relative;
}

.updates-section .table th:last-child,
.updates-section .table td:last-child {
    border-right: none;
}

/* Fix for vertical lines */
.updates-section .table th::after,
.updates-section .table td::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 1px;
    background-color: #dee2e6;
    height: 100%;
}

.updates-section .table th:last-child::after,
.updates-section .table td:last-child::after {
    display: none;
}

.updates-section .table tr:hover td {
    background-color: #f1f4fb;
}

/* Ensure consistent row heights */
.updates-section .table tbody tr {
    height: 60px;
}

.updates-section .table tr {
    min-height: 60px;
    display: table-row;
}

@media (max-width: 768px) {
    .updates-section .table th,
    .updates-section .table td {
        height: 60px;
    }
}

/* Column widths */
.updates-section .table th:nth-child(1), /* S.N */
.updates-section .table td:nth-child(1) {
    width: 5%;
    text-align: center;
}

.updates-section .table th:nth-child(2), /* Published Date */
.updates-section .table td:nth-child(2) {
    width: 15%;
}

.updates-section .table th:nth-child(3), /* Notice Title */
.updates-section .table td:nth-child(3) {
    width: 50%;
}

.updates-section .table th:nth-child(4), /* Files */
.updates-section .table td:nth-child(4) {
    width: 15%;
    text-align: center;
}

.updates-section .table th:nth-child(5), /* Published By */
.updates-section .table td:nth-child(5) {
    width: 15%;
}

/* File download button */
.btn-download,
.mavi-download-btn {
    padding: 0.25rem;
    font-size: 0.875rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
}

.btn-download:hover,
.mavi-download-btn:hover {
    transform: translateY(-2px);
    background-color: #fff !important;
    border-color: #ced4da;
}

.btn-download:last-child,
.mavi-download-btn:last-child {
    margin-right: 0;
}

.btn-download img,
.mavi-download-btn img {
    vertical-align: middle;
}

/* Multiple file buttons container */
.file-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Disabled download button */
.mavi-download-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* News Thumbnail */
.updates-section .news-thumbnail {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* Multiple attachments styling */
.updates-section .d-flex.gap-1 {
    flex-wrap: wrap;
}

.updates-section .btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
}

.updates-section td.text-center .d-flex {
    min-height: 31px;
}

.updates-section .btn-outline-primary:hover {
    color: #fff;
}

.updates-section .attachment-tooltip {
    position: relative;
    display: inline-block;
}

.updates-section .attachment-tooltip:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 8px;
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

/* Download Button */
.navbar .btn-light {
    background-color: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 999px;
    transition: all 0.3s ease;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.navbar .btn-light:hover {
    background-color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar .btn-light i {
    font-size: 0.9rem;
}

@media (max-width: 991.98px) {
    .navbar .btn-light {
        margin: 0.5rem 0;
        width: 100%;
        justify-content: center;
    }
}

.top-bar .contact-info .contact-item {
    font-size: 0.95rem;
    
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.top-bar .contact-info .contact-item:hover {
    color: rgba(255, 255, 255, 0.8);
}

.top-bar .contact-info .contact-item {
    transform: scale(1);
    transition: all 0.3s ease;
}

.top-bar .contact-info .contact-item:hover {
    transform: scale(1.05);
    color: rgba(255, 255, 255, 0.9);
}

.top-bar .contact-info .contact-item i {
    padding-top: 3px !important;
    font-size: 1rem;
    color: #ffffff !important;
    transition: color 0.3s, transform 0.3s;
    transform: scale(1);
}

.top-bar .contact-info .contact-item:hover i {
    color: #ffffff !important;
    transform: scale(1.12);
}

/* Top Bar Animation Styles */
.top-bar a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 100%;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: scale(1);
}

.top-bar a:hover {
    transform: scale(1.05);
    color: rgba(255, 255, 255, 0.9);
}

.btn-cms-login {
    color: var(--primary-color) !important;
    background-color: #ffffff;
    padding: 0.35rem 1rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: auto;
    transition: all 0.3s ease;
    transform: translateY(0);
}

.btn-cms-login:hover {
    background-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.btn-cms-login:hover i,
.btn-cms-login:hover span {
    color: #ffffff !important;
}

.language-switcher {
    transform: scale(1);
    transition: transform 0.3s ease;
}

.language-switcher:hover {
    transform: scale(1.05);
}

:root {
    --primary-color: <?php echo $SITE_SETTINGS['theme_color']; ?>;
    --primary-color-rgb: <?php 
        $color = $SITE_SETTINGS['theme_color'];
        if (preg_match('/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/i', $color, $matches)) {
            echo hexdec($matches[1]) . ',' . hexdec($matches[2]) . ',' . hexdec($matches[3]);
        } else {
            echo '0,102,153'; // Default fallback
        }
    ?>;
    --secondary-color: <?php echo $SITE_SETTINGS['secondary_color']; ?>;
    --topbar-height: 45px;  /* Original height */
    --navbar-height: 85px;  /* Increased height to accommodate larger logo */
    --total-nav-height: calc(var(--topbar-height) + var(--navbar-height));
}

/* News Table Styles */
#news .table {
    margin-bottom: 2rem;
}

#news .table th {
    background-color: #f1f4fb;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

#news .table td {
    vertical-align: middle;
}

#news .btn-download {
    padding: 0.25rem 0.5rem;
    border: none;
    background: transparent;
}

#news .btn-download:hover {
    background-color: #f1f4fb;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.pagination-wrapper .page-link {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #007bff;
    text-decoration: none;
}

.pagination-wrapper .page-link:hover {
    background-color: #e9ecef;
}

.pagination-wrapper .page-link.disabled {
    color: #6c757d;
    pointer-events: none;
    background-color: #e9ecef;
}

.pagination-page-number {
    padding: 0.5rem 1rem;
    background-color: #007bff;
    color: white;
    border-radius: 4px;
}

/* Modern News Section Styles */
.news-section {
    background-color: #f1f4fb;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0;
}

.featured-news {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.featured-news:hover {
    transform: translateY(-5px);
}

.featured-news .card-img-top {
    height: 300px;
    object-fit: cover;
}

.news-card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-3px);
}

.news-card .card-img-top {
    height: 180px;
    object-fit: cover;
}

.news-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

.news-meta span {
    margin-right: 1rem;
}

.news-meta i {
    margin-right: 0.25rem;
}

.read-more {
    color: var(--primary-color) !important;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.read-more i {
    color: var(--primary-color) !important;
    transition: transform 0.3s ease, color 0.3s ease;
}

.read-more:hover {
    color: #0056b3;
}

.read-more:hover i {
    transform: translateX(5px);
    color: #0056b3;
}

/* Enforce fixed height and aspect ratio for news images */
.news-section .card-img-top,
.featured-news .card-img-top,
.news-card .card-img-top {
    width: 100%;
    height: 200px !important;
    max-height: 200px;
    min-height: 200px;
    object-fit: cover;
    object-position: center;
    display: block;
    background: #e9ecef;
}

.news-section .featured-news .card-img-top {
    height: 300px !important;
    max-height: 300px;
    min-height: 300px;
}

.news-section .news-card .card-img-top {
    height: 200px !important;
    min-height: 200px;
    max-height: 200px;
}

.news-section .featured-news .card-body {
    padding: 1rem 1.25rem;
}

.news-section .news-card .card-body {
    padding: 0.75rem 1rem;
}

.news-section .card-title, .news-section .card-title h3, .news-section .card-title h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.news-section .card-text {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.news-section .read-more {
    font-size: inherit !important;
}

.news-section .col-lg-6.mb-4, .news-section .col-md-6.mb-4 {
    margin-bottom: 1rem !important;
}

.news-section .row > [class*='col-'] {
    padding-left: 8px;
    padding-right: 8px;
}

/* News section responsive styles */
@media (max-width: 768px) {
    .news-section .card-img-top,
    .news-card .card-img-top {
        height: 150px !important;
        max-height: 150px;
        min-height: 150px;
    }
    .news-section .featured-news .card-img-top {
        height: 200px !important;
        max-height: 200px;
        min-height: 200px;
    }
    .news-section .card-body {
        padding: 0.5rem 0.75rem;
    }
}

/* News section grid layout */
.news-section .row {
    display: flex;
    flex-wrap: wrap;
    margin: -8px;
}

.news-section .row > [class*='col-'] {
    padding: 8px;
    flex-shrink: 0;
    width: 100%;
}

@media (min-width: 992px) {
    .news-section .row > .col-lg-6 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .news-section .row > .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .news-section .row > .col-lg-6,
    .news-section .row > .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 767.98px) {
    .news-section .row > .col-lg-6,
    .news-section .row > .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.news-section .card {
    height: 100%;
    margin: 0;
}

.featured-news {
    height: 100%;
}

/* Remove custom .view-all-btn styles to match Bootstrap default */
/* .news-section .view-all-btn, .news-section .view-all-btn:hover { display: unset; margin: unset; padding: unset; font-size: unset; border: unset; color: unset; background: unset; border-radius: unset; transition: unset; font-weight: unset; box-shadow: unset; } */

/* Standardize all news cards */
.news-section .card,
.news-section .featured-news,
.news-section .news-card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    height: 100%;
    margin: 0;
}

.news-section .card:hover,
.news-section .featured-news:hover,
.news-section .news-card:hover {
    transform: translateY(-3px);
}

/* Standardize all news images */
.news-section .card-img-top,
.news-section .featured-news .card-img-top,
.news-section .news-card .card-img-top {
    width: 100%;
    height: 200px !important;
    max-height: 200px;
    min-height: 200px;
    object-fit: cover;
    object-position: center;
    display: block;
    background: #e9ecef;
}

/* Standardize all card bodies */
.news-section .card-body,
.news-section .featured-news .card-body,
.news-section .news-card .card-body {
    padding: 0.75rem 1rem;
}

/* Standardize all titles */
.news-section .card-title,
.news-section .card-title h3,
.news-section .card-title h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    line-height: 1.4;
    font-weight: 600;
}

/* Standardize all text content */
.news-section .card-text {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

/* Standardize meta information */
.news-section .news-meta {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
}

.news-section .news-meta span {
    margin-right: 1rem;
}

/* Standardize read more links */
.news-section .read-more {
    font-size: 0.9rem !important;
    color: var(--primary-color) !important;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive styles */
@media (max-width: 768px) {
    .news-section .card-img-top,
    .news-section .featured-news .card-img-top,
    .news-section .news-card .card-img-top {
        height: 150px !important;
        max-height: 150px;
        min-height: 150px;
    }

    .news-section .card-body,
    .news-section .featured-news .card-body,
    .news-section .news-card .card-body {
        padding: 0.5rem 0.75rem;
    }
}

/* News section grid layout */
.news-section .row {
    display: flex;
    flex-wrap: wrap;
    margin: -8px;
}

.news-section .row > [class*='col-'] {
    padding: 8px;
    flex-shrink: 0;
    width: 100%;
}

@media (min-width: 992px) {
    .news-section .row > .col-lg-6 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .news-section .row > .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .news-section .row > .col-lg-6,
    .news-section .row > .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 767.98px) {
    .news-section .row > .col-lg-6,
    .news-section .row > .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.news-section .card {
    height: 100%;
    margin: 0;
}

.featured-news {
    height: 100%;
}

/* News carousel styles */
.news-carousel {
    overflow: hidden;
    position: relative;
    padding: 0;
    margin: 0 40px;
}

#newsRow {
    display: flex;
    transition: transform 0.5s ease;
    margin: 0;
    flex-wrap: nowrap;
    width: 100%;
}

.news-item {
    flex: 0 0 25%;
    width: 25%;
    padding: 0 10px;
    margin-bottom: 0;
    visibility: visible;
    opacity: 1;
    transition: visibility 0.5s, opacity 0.5s;
}

.news-item.hidden {
    visibility: hidden;
    opacity: 0;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 2;
}

.carousel-control:hover {
    background: rgba(0, 0, 0, 0.7);
}

.carousel-control.prev {
    left: -20px;
}

.carousel-control.next {
    right: -20px;
}

@media (max-width: 768px) {
    .news-item {
        flex: 0 0 100%;
        width: 100%;
    }
    .news-carousel {
        margin: 0 20px;
    }
}

/* Mobile styles for tab navigation in updates section */
@media (max-width: 768px) {
    .updates-section .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
        padding: 0.5rem 0.5rem 0;
    }
    
    .updates-section .nav-tabs::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .updates-section .nav-tabs .nav-item {
        flex: 0 0 auto;
    }
    
    .updates-section .nav-tabs .nav-link {
        padding: 0.75rem 1rem !important;
        margin-right: 0.25rem !important;
    }
}

/* Nepali font for translated content */
.nepali-text,
[lang="np"],
.nepali-content,
.date-front,
.date-back,
*[data-lang="np"],
h1[lang="np"], h2[lang="np"], h3[lang="np"], 
h4[lang="np"], h5[lang="np"], h6[lang="np"],
.section-title[lang="np"] {
    font-family: 'Poppins', sans-serif !important;
}

/* Override font for Nepali text in specific components */
.navbar-nav .nav-link[lang="np"],
.dropdown-item[lang="np"],
.card-title[lang="np"],
.card-text[lang="np"],
.testimonial-text[lang="np"],
.testimonial-name[lang="np"],
.testimonial-position[lang="np"] {
    font-family: 'Poppins', sans-serif !important;
}

@media (max-width: 767px) {
  .main-content,
  .hero-section {
    margin-top: calc(var(--total-nav-height, 115px)); /* fallback if custom property missing */
  }
  .navbar-brand img {
    max-width: 140px;
    max-height: 40px;
    height: auto;
  }
  .navbar {
    min-height: 56px;
    height: auto;
  }
}

/* Font Settings */
h1, h2, h3, h4, h5, h6,
.section-title {
    font-family: 'Barlow', sans-serif !important;
    font-weight: 600;
}

/* Primary Button Styles */
.btn-primary,
.btn-add-program,
.btn-add-news,
.btn-add-notice,
.btn-add-tender {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
    padding: 0.5rem 1.25rem !important;
    font-weight: 500 !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    border: none !important;
}

.btn-primary:hover,
.btn-add-program:hover,
.btn-add-news:hover,
.btn-add-notice:hover,
.btn-add-tender:hover {
    background-color: var(--primary-color) !important;
    opacity: 0.9 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.btn-primary i,
.btn-add-program i,
.btn-add-news i,
.btn-add-notice i,
.btn-add-tender i {
    font-size: 0.9rem !important;
}

@media (max-width: 768px) {
  body.admin, .admin-main, .content {
    min-width: 768px;
    width: 768px;
    overflow-x: auto;
  }
  html, body {
    overflow-x: auto !important;
  }
}

/* File download button */
.btn-download,
.mavi-download-btn {
    padding: 0.25rem;
    font-size: 0.875rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
}

.btn-download:hover,
.mavi-download-btn:hover {
    transform: translateY(-2px);
    background-color: #fff !important;
    border-color: #ced4da;
}

.btn-download:last-child,
.mavi-download-btn:last-child {
    margin-right: 0;
}

.btn-download img,
.mavi-download-btn img {
    vertical-align: middle;
}

/* Multiple file buttons container */
.file-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Disabled download button */
.mavi-download-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Center dash icon in Updates section table cells */
.updates-section .table td .text-muted,
#notices-list td .text-muted,
#results-list td .text-muted {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 24px;
    text-align: center;
    margin: 0 auto;
}

.updates-section .table td,
#notices-list td,
#results-list td {
    vertical-align: middle;
}

/* Remove boldness from news tab table headers in updates section */
.updates-section #news th {
    font-weight: 400 !important;
} 

/* --- Horizontal scroll for tables on mobile (results, notices, tenders) --- */
@media (max-width: 768px) {
    /* Enable horizontal scroll for all main tables in results, notices, and tenders */
    .table-responsive,
    .mavi-table-wrapper,
    .updates-section .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        display: block;
    }
    .table-responsive > table,
    .mavi-table-wrapper > table,
    .updates-section .table-responsive > table {
        min-width: 600px;
        width: max-content;
    }
} 

/* Top Bar Links */
.top-bar a,
.btn-cms-login {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 100%;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: scale(1);
}

.top-bar a:hover,
.btn-cms-login:hover {
    transform: scale(1.1);
    color: rgba(255, 255, 255, 0.9);
}

.top-bar a i,
.btn-cms-login i {
    transition: color 0.3s, transform 0.3s;
    transform: scale(1);
}

.top-bar a:hover i,
.btn-cms-login:hover i {
    color: #ffe082 !important;
    transform: scale(1.2);
}

/* News Table Styles */
#news .table {
    margin-bottom: 2rem;
}

#news .table th {
    background-color: #f1f4fb;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

#news .table td {
    vertical-align: middle;
}

#news .btn-download {
    padding: 0.25rem 0.5rem;
    border: none;
    background: transparent;
}

#news .btn-download:hover {
    background-color: #f1f4fb;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.pagination-wrapper .page-link {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #007bff;
    text-decoration: none;
}

.pagination-wrapper .page-link:hover {
    background-color: #e9ecef;
}

.pagination-wrapper .page-link.disabled {
    color: #6c757d;
    pointer-events: none;
    background-color: #e9ecef;
}

.pagination-page-number {
    padding: 0.5rem 1rem;
    background-color: #007bff;
    color: white;
    border-radius: 4px;
}

/* Modern News Section Styles */
.news-section {
    background-color: #f1f4fb;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0;
}

.featured-news {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.featured-news:hover {
    transform: translateY(-5px);
}

.featured-news .card-img-top {
    height: 300px;
    object-fit: cover;
}

.news-card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-3px);
}

.news-card .card-img-top {
    height: 180px;
    object-fit: cover;
}

.news-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

.news-meta span {
    margin-right: 1rem;
}

.news-meta i {
    margin-right: 0.25rem;
}

.read-more {
    color: var(--primary-color) !important;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.read-more i {
    color: var(--primary-color) !important;
    transition: transform 0.3s ease, color 0.3s ease;
}

.read-more:hover {
    color: #0056b3;
}

.read-more:hover i {
    transform: translateX(5px);
    color: #0056b3;
}

/* Enforce fixed height and aspect ratio for news images */
.news-section .card-img-top,
.featured-news .card-img-top,
.news-card .card-img-top {
    width: 100%;
    height: 200px !important;
    max-height: 200px;
    min-height: 200px;
    object-fit: cover;
    object-position: center;
    display: block;
    background: #e9ecef;
}

.news-section .featured-news .card-img-top {
    height: 300px !important;
    max-height: 300px;
    min-height: 300px;
}

.news-section .news-card .card-img-top {
    height: 200px !important;
    min-height: 200px;
    max-height: 200px;
}

.news-section .featured-news .card-body {
    padding: 1rem 1.25rem;
}

.news-section .news-card .card-body {
    padding: 0.75rem 1rem;
}

.news-section .card-title, .news-section .card-title h3, .news-section .card-title h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.news-section .card-text {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.news-section .read-more {
    font-size: inherit !important;
}

.news-section .col-lg-6.mb-4, .news-section .col-md-6.mb-4 {
    margin-bottom: 1rem !important;
}

.news-section .row > [class*='col-'] {
    padding-left: 8px;
    padding-right: 8px;
}

/* News section responsive styles */
@media (max-width: 768px) {
    .news-section .card-img-top,
    .news-card .card-img-top {
        height: 150px !important;
        max-height: 150px;
        min-height: 150px;
    }
    .news-section .featured-news .card-img-top {
        height: 200px !important;
        max-height: 200px;
        min-height: 200px;
    }
    .news-section .card-body {
        padding: 0.5rem 0.75rem;
    }
}

/* News section grid layout */
.news-section .row {
    display: flex;
    flex-wrap: wrap;
    margin: -8px;
}

.news-section .row > [class*='col-'] {
    padding: 8px;
    flex-shrink: 0;
    width: 100%;
}

@media (min-width: 992px) {
    .news-section .row > .col-lg-6 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .news-section .row > .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .news-section .row > .col-lg-6,
    .news-section .row > .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 767.98px) {
    .news-section .row > .col-lg-6,
    .news-section .row > .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.news-section .card {
    height: 100%;
    margin: 0;
}

.featured-news {
    height: 100%;
}

/* News carousel styles */
.news-carousel {
    overflow: hidden;
    position: relative;
    padding: 0;
    margin: 0 40px;
}

#newsRow {
    display: flex;
    transition: transform 0.5s ease;
    margin: 0;
    flex-wrap: nowrap;
    width: 100%;
}

.news-item {
    flex: 0 0 25%;
    width: 25%;
    padding: 0 10px;
    margin-bottom: 0;
    visibility: visible;
    opacity: 1;
    transition: visibility 0.5s, opacity 0.5s;
}

.news-item.hidden {
    visibility: hidden;
    opacity: 0;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 2;
}

.carousel-control:hover {
    background: rgba(0, 0, 0, 0.7);
}

.carousel-control.prev {
    left: -20px;
}

.carousel-control.next {
    right: -20px;
}

@media (max-width: 768px) {
    .news-item {
        flex: 0 0 100%;
        width: 100%;
    }
    .news-carousel {
        margin: 0 20px;
    }
}

/* Mobile styles for tab navigation in updates section */
@media (max-width: 768px) {
    .updates-section .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
        padding: 0.5rem 0.5rem 0;
    }
    
    .updates-section .nav-tabs::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .updates-section .nav-tabs .nav-item {
        flex: 0 0 auto;
    }
    
    .updates-section .nav-tabs .nav-link {
        padding: 0.75rem 1rem !important;
        margin-right: 0.25rem !important;
    }
}

/* Nepali font for translated content */
.nepali-text,
[lang="np"],
.nepali-content,
.date-front,
.date-back,
*[data-lang="np"],
h1[lang="np"], h2[lang="np"], h3[lang="np"], 
h4[lang="np"], h5[lang="np"], h6[lang="np"],
.section-title[lang="np"] {
    font-family: 'Poppins', sans-serif !important;
}

/* Override font for Nepali text in specific components */
.navbar-nav .nav-link[lang="np"],
.dropdown-item[lang="np"],
.card-title[lang="np"],
.card-text[lang="np"],
.testimonial-text[lang="np"],
.testimonial-name[lang="np"],
.testimonial-position[lang="np"] {
    font-family: 'Poppins', sans-serif !important;
}

@media (max-width: 767px) {
  .main-content,
  .hero-section {
    margin-top: calc(var(--total-nav-height, 115px)); /* fallback if custom property missing */
  }
  .navbar-brand img {
    max-width: 140px;
    max-height: 40px;
    height: auto;
  }
  .navbar {
    min-height: 56px;
    height: auto;
  }
}

/* Font Settings */
h1, h2, h3, h4, h5, h6,
.section-title {
    font-family: 'Barlow', sans-serif !important;
    font-weight: 600;
}

/* Primary Button Styles */
.btn-primary,
.btn-add-program,
.btn-add-news,
.btn-add-notice,
.btn-add-tender {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
    padding: 0.5rem 1.25rem !important;
    font-weight: 500 !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    border: none !important;
}

.btn-primary:hover,
.btn-add-program:hover,
.btn-add-news:hover,
.btn-add-notice:hover,
.btn-add-tender:hover {
    background-color: var(--primary-color) !important;
    opacity: 0.9 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.btn-primary i,
.btn-add-program i,
.btn-add-news i,
.btn-add-notice i,
.btn-add-tender i {
    font-size: 0.9rem !important;
}

@media (max-width: 768px) {
  body.admin, .admin-main, .content {
    min-width: 768px;
    width: 768px;
    overflow-x: auto;
  }
  html, body {
    overflow-x: auto !important;
  }
}

/* File download button */
.btn-download,
.mavi-download-btn {
    padding: 0.25rem;
    font-size: 0.875rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
}

.btn-download:hover,
.mavi-download-btn:hover {
    transform: translateY(-2px);
    background-color: #fff !important;
    border-color: #ced4da;
}

.btn-download:last-child,
.mavi-download-btn:last-child {
    margin-right: 0;
}

.btn-download img,
.mavi-download-btn img {
    vertical-align: middle;
}

/* Multiple file buttons container */
.file-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Disabled download button */
.mavi-download-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Center dash icon in Updates section table cells */
.updates-section .table td .text-muted,
#notices-list td .text-muted,
#results-list td .text-muted {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 24px;
    text-align: center;
    margin: 0 auto;
}

.updates-section .table td,
#notices-list td,
#results-list td {
    vertical-align: middle;
}

/* Remove boldness from news tab table headers in updates section */
.updates-section #news th {
    font-weight: 400 !important;
} 

/* --- Horizontal scroll for tables on mobile (results, notices, tenders) --- */
@media (max-width: 768px) {
    /* Enable horizontal scroll for all main tables in results, notices, and tenders */
    .table-responsive,
    .mavi-table-wrapper,
    .updates-section .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        display: block;
    }
    .table-responsive > table,
    .mavi-table-wrapper > table,
    .updates-section .table-responsive > table {
        min-width: 600px;
        width: max-content;
    }
} 

/* Top Bar Links */
.top-bar a,
.btn-cms-login {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    height: 100%;
    pointer-events: auto;
    cursor: pointer;
    transition: all 0.3s ease;
    transform: scale(1);
}

.top-bar a:hover,
.btn-cms-login:hover {
    transform: scale(1.1);
    color: rgba(255, 255, 255, 0.9);
}

.top-bar a i,
.btn-cms-login i {
    transition: color 0.3s, transform 0.3s;
    transform: scale(1);
}

.top-bar a:hover i,
.btn-cms-login:hover i {
    color: #ffe082 !important;
    transform: scale(1.2);
}

/* News Table Styles */
#news .table {
    margin-bottom: 2rem;
}

#news .table th {
    background-color: #f1f4fb;
    border-bottom: 2px solid #dee2e6;
    font-weight: 600;
}

#news .table td {
    vertical-align: middle;
}

#news .btn-download {
    padding: 0.25rem 0.5rem;
    border: none;
    background: transparent;
}

#news .btn-download:hover {
    background-color: #f1f4fb;
}

.pagination-wrapper {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.pagination-wrapper .page-link {
    padding: 0.5rem 1rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    color: #007bff;
    text-decoration: none;
}

.pagination-wrapper .page-link:hover {
    background-color: #e9ecef;
}

.pagination-wrapper .page-link.disabled {
    color: #6c757d;
    pointer-events: none;
    background-color: #e9ecef;
}

.pagination-page-number {
    padding: 0.5rem 1rem;
    background-color: #007bff;
    color: white;
    border-radius: 4px;
}

/* Modern News Section Styles */
.news-section {
    background-color: #f1f4fb;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.section-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0;
}

.featured-news {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.featured-news:hover {
    transform: translateY(-5px);
}

.featured-news .card-img-top {
    height: 300px;
    object-fit: cover;
}

.news-card {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: translateY(-3px);
}

.news-card .card-img-top {
    height: 180px;
    object-fit: cover;
}

.news-meta {
    font-size: 0.875rem;
    color: #6c757d;
}

.news-meta span {
    margin-right: 1rem;
}

.news-meta i {
    margin-right: 0.25rem;
}

.read-more {
    color: var(--primary-color) !important;
    text-decoration: none;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s ease;
}

.read-more i {
    color: var(--primary-color) !important;
    transition: transform 0.3s ease, color 0.3s ease;
}

.read-more:hover {
    color: #0056b3;
}

.read-more:hover i {
    transform: translateX(5px);
    color: #0056b3;
}

/* Enforce fixed height and aspect ratio for news images */
.news-section .card-img-top,
.featured-news .card-img-top,
.news-card .card-img-top {
    width: 100%;
    height: 200px !important;
    max-height: 200px;
    min-height: 200px;
    object-fit: cover;
    object-position: center;
    display: block;
    background: #e9ecef;
}

.news-section .featured-news .card-img-top {
    height: 300px !important;
    max-height: 300px;
    min-height: 300px;
}

.news-section .news-card .card-img-top {
    height: 200px !important;
    min-height: 200px;
    max-height: 200px;
}

.news-section .featured-news .card-body {
    padding: 1rem 1.25rem;
}

.news-section .news-card .card-body {
    padding: 0.75rem 1rem;
}

.news-section .card-title, .news-section .card-title h3, .news-section .card-title h4 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.news-section .card-text {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.news-section .read-more {
    font-size: inherit !important;
}

.news-section .col-lg-6.mb-4, .news-section .col-md-6.mb-4 {
    margin-bottom: 1rem !important;
}

.news-section .row > [class*='col-'] {
    padding-left: 8px;
    padding-right: 8px;
}

/* News section responsive styles */
@media (max-width: 768px) {
    .news-section .card-img-top,
    .news-card .card-img-top {
        height: 150px !important;
        max-height: 150px;
        min-height: 150px;
    }
    .news-section .featured-news .card-img-top {
        height: 200px !important;
        max-height: 200px;
        min-height: 200px;
    }
    .news-section .card-body {
        padding: 0.5rem 0.75rem;
    }
}

/* News section grid layout */
.news-section .row {
    display: flex;
    flex-wrap: wrap;
    margin: -8px;
}

.news-section .row > [class*='col-'] {
    padding: 8px;
    flex-shrink: 0;
    width: 100%;
}

@media (min-width: 992px) {
    .news-section .row > .col-lg-6 {
        flex: 0 0 25%;
        max-width: 25%;
    }

    .news-section .row > .col-lg-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .news-section .row > .col-lg-6,
    .news-section .row > .col-lg-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 767.98px) {
    .news-section .row > .col-lg-6,
    .news-section .row > .col-lg-3 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.news-section .card {
    height: 100%;
    margin: 0;
}

.featured-news {
    height: 100%;
}

/* News carousel styles */
.news-carousel {
    overflow: hidden;
    position: relative;
    padding: 0;
    margin: 0 40px;
}

#newsRow {
    display: flex;
    transition: transform 0.5s ease;
    margin: 0;
    flex-wrap: nowrap;
    width: 100%;
}

.news-item {
    flex: 0 0 25%;
    width: 25%;
    padding: 0 10px;
    margin-bottom: 0;
    visibility: visible;
    opacity: 1;
    transition: visibility 0.5s, opacity 0.5s;
}

.news-item.hidden {
    visibility: hidden;
    opacity: 0;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s ease;
    z-index: 2;
}

.carousel-control:hover {
    background: rgba(0, 0, 0, 0.7);
}

.carousel-control.prev {
    left: -20px;
}

.carousel-control.next {
    right: -20px;
}

@media (max-width: 768px) {
    .news-item {
        flex: 0 0 100%;
        width: 100%;
    }
    .news-carousel {
        margin: 0 20px;
    }
}

/* Mobile styles for tab navigation in updates section */
@media (max-width: 768px) {
    .updates-section .nav-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Firefox */
        -ms-overflow-style: none; /* IE and Edge */
        padding: 0.5rem 0.5rem 0;
    }
    
    .updates-section .nav-tabs::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }
    
    .updates-section .nav-tabs .nav-item {
        flex: 0 0 auto;
    }
    
    .updates-section .nav-tabs .nav-link {
        padding: 0.75rem 1rem !important;
        margin-right: 0.25rem !important;
    }
}

/* Nepali font for translated content */
.nepali-text,
[lang="np"],
.nepali-content,
.date-front,
.date-back,
*[data-lang="np"],
h1[lang="np"], h2[lang="np"], h3[lang="np"], 
h4[lang="np"], h5[lang="np"], h6[lang="np"],
.section-title[lang="np"] {
    font-family: 'Poppins', sans-serif !important;
}

/* Override font for Nepali text in specific components */
.navbar-nav .nav-link[lang="np"],
.dropdown-item[lang="np"],
.card-title[lang="np"],
.card-text[lang="np"],
.testimonial-text[lang="np"],
.testimonial-name[lang="np"],
.testimonial-position[lang="np"] {
    font-family: 'Poppins', sans-serif !important;
}

@media (max-width: 767px) {
  .main-content,
  .hero-section {
    margin-top: calc(var(--total-nav-height, 115px)); /* fallback if custom property missing */
  }
  .navbar-brand img {
    max-width: 225px;
    max-height: 40px;
    height: auto;
  }
  .navbar {
    min-height: 56px;
    height: auto;
  }
}

/* Font Settings */
h1, h2, h3, h4, h5, h6,
.section-title {
    font-family: 'Barlow', sans-serif !important;
    font-weight: 600;
}

/* Primary Button Styles */
.btn-primary,
.btn-add-program,
.btn-add-news,
.btn-add-notice,
.btn-add-tender {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #ffffff !important;
    padding: 0.5rem 1.25rem !important;
    font-weight: 500 !important;
    border-radius: 4px !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    transition: all 0.3s ease !important;
    text-decoration: none !important;
    border: none !important;
}

.btn-primary:hover,
.btn-add-program:hover,
.btn-add-news:hover,
.btn-add-notice:hover,
.btn-add-tender:hover {
    background-color: var(--primary-color) !important;
    opacity: 0.9 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.btn-primary i,
.btn-add-program i,
.btn-add-news i,
.btn-add-notice i,
.btn-add-tender i {
    font-size: 0.9rem !important;
}

@media (max-width: 768px) {
  body.admin, .admin-main, .content {
    min-width: 768px;
    width: 768px;
    overflow-x: auto;
  }
  html, body {
    overflow-x: auto !important;
  }
}

/* File download button */
.btn-download,
.mavi-download-btn {
    padding: 0.25rem;
    font-size: 0.875rem;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    transition: transform 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.5rem;
}

.btn-download:hover,
.mavi-download-btn:hover {
    transform: translateY(-2px);
    background-color: #fff !important;
    border-color: #ced4da;
}

.btn-download:last-child,
.mavi-download-btn:last-child {
    margin-right: 0;
}

.btn-download img,
.mavi-download-btn img {
    vertical-align: middle;
}

/* Multiple file buttons container */
.file-buttons {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Disabled download button */
.mavi-download-btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

/* Center dash icon in Updates section table cells */
.updates-section .table td .text-muted,
#notices-list td .text-muted,
#results-list td .text-muted {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 24px;
    text-align: center;
    margin: 0 auto;
}

.updates-section .table td,
#notices-list td,
#results-list td {
    vertical-align: middle;
}

/* Remove boldness from news tab table headers in updates section */
.updates-section #news th {
    font-weight: 400 !important;
} 

/* --- Horizontal scroll for tables on mobile (results, notices, tenders) --- */
@media (max-width: 768px) {
    /* Enable horizontal scroll for all main tables in results, notices, and tenders */
    .table-responsive,
    .mavi-table-wrapper,
    .updates-section .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        width: 100%;
        display: block;
    }
    .table-responsive > table,
    .mavi-table-wrapper > table,
    .updates-section .table-responsive > table {
        min-width: 600px;
        width: max-content;
    }
} 

/* Animate both icon and text in top bar buttons */
.top-bar a span,
.btn-cms-login span {
    display: inline-block;
    transition: color 0.3s, transform 0.3s;
    transform: scale(1);
}

.top-bar a:hover span,
.btn-cms-login:hover span {
    color: #ffe082 !important;
    transform: scale(1.12);
}

.top-bar a i,
.btn-cms-login i {
    transition: color 0.3s, transform 0.3s;
    transform: scale(1);
}

.top-bar a:hover i,
.btn-cms-login:hover i {
    color: #ffe082 !important;
    transform: scale(1.2);
} 

/* Strong override for course tabs styling */
/* Override Bootstrap tab styles with high specificity */
body .nav.nav-tabs#courseTabs {
    border: none !important;
    margin: 0 !important;
    padding: 0 !important;
    gap: 2px !important;
}

body .nav.nav-tabs#courseTabs .nav-item {
    margin: 0 !important;
}

body .nav.nav-tabs#courseTabs .nav-link {
    margin: 0 !important;
    padding: 10px 15px !important;
    border: 1px solid #dee2e6 !important;
    border-radius: 4px 4px 0 0 !important;
    background: #fff !important;
    color: #000 !important;
    text-decoration: none !important;
    font-size: 14px !important;
    font-weight: normal !important;
    position: relative !important;
    z-index: 1 !important;
}

body .nav.nav-tabs#courseTabs .nav-link.active {
    background: var(--primary-color, #0066b3) !important;
    color: white !important;
    font-weight: bold !important;
}

body .nav.nav-tabs#courseTabs .nav-link:not(.active):hover {
    background: #f8f9fa !important;
    border-color: #dee2e6 !important;
}

#courseTabsContent {
    border: 1px solid #dee2e6 !important;
    padding: 15px !important;
    background: white !important;
    position: relative !important;
    z-index: 0 !important;
    margin-top: -1px !important;
}

.pdf-viewer {
    background: white;
    overflow: hidden;
    height: 800px;
}

.pdf-viewer object {
    display: block;
    width: 100%;
    height: 100%;
    border: none;
}