/* General Styles */
body {
    font-family: 'Roboto', sans-serif;
    background-color: #f4f5f7;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    margin: 0 0 15px 0;
}

p {
    margin: 0 0 15px 0;
}

/* Links */
a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover, a:focus {
    color: #0056b3;
}

/* Button Styles */
.btn {
    display: inline-block;
    font-weight: 400;
    color: #fff;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    background-color: #007bff;
    border: 1px solid transparent;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    border-radius: 0.25rem;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.btn:hover, .btn:focus {
    background-color: #0056b3;
    border-color: #004085;
}

.btn:focus-visible {
    outline: 2px solid #0056b3;
    outline-offset: 2px;
}

.btn:active {
    background-color: #004085;
    border-color: #003768;
}

.btn:disabled {
    background-color: #6c757d;
    border-color: #6c757d;
    cursor: not-allowed;
    opacity: 0.65;
}

.btn-primary {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-primary:hover, .btn-primary:focus {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-secondary:hover, .btn-secondary:focus {
    background-color: #5a6268;
    border-color: #545b62;
}

/* Form Elements */
input[type="text"], input[type="password"], input[type="email"], input[type="date"], select, textarea, input[type="radio"], input[type="checkbox"] {
    display: block;
    width: 100%;
    padding: 0.375rem 0.75rem;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

input:focus, select:focus, textarea:focus {
    border-color: #80bdff;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.25);
}

input[type="radio"], input[type="checkbox"] {
    display: inline-block;
    width: auto;
    margin-right: 10px;
}

input[type="radio"]:checked, input[type="checkbox"]:checked {
    background-color: #007bff;
    border-color: #007bff;
}

input:invalid, select:invalid, textarea:invalid {
    border-color: #dc3545;
    background-color: #f8d7da;
}

input:invalid:focus, select:invalid:focus, textarea:invalid:focus {
    box-shadow: 0 0 5px rgba(220, 53, 69, 0.25);
}

.is-invalid {
    border-color: #dc3545;
}

.is-invalid:focus {
    box-shadow: 0 0 5px rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    color: #dc3545;
    display: block;
    margin-top: 0.25rem;
}

.is-valid {
    border-color: #28a745;
}

.is-valid:focus {
    box-shadow: 0 0 5px rgba(40, 167, 69, 0.25);
}

.valid-feedback {
    color: #28a745;
    display: block;
    margin-top: 0.25rem;
}

/* Navbar */
.navbar {
    background-color: #343a40;
    padding: 1rem;
}

.navbar-brand {
    color: #fff;
    font-size: 1.5rem;
    font-weight: bold;
}

.navbar-nav .nav-link {
    color: #ddd;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover, .navbar-nav .nav-link:focus {
    color: #fff;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 240px;
    background-color: #343a40;
    padding-top: 1rem;
    transition: width 0.3s ease;
}

.sidebar a {
    color: #ddd;
    display: block;
    padding: 0.75rem 1rem;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.sidebar a:hover, .sidebar a:focus {
    background-color: #007bff;
    color: #fff;
}

.sidebar .active {
    background-color: #007bff;
    color: #fff;
}

.sidebar .active::before {
    content: '';
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background-color: #ffdd57;
}

/* Content Area */
.content {
    margin-left: 240px;
    padding: 2rem;
}

.content h1, .content h2, .content h3 {
    margin-bottom: 20px;
}

/* Cards */
.card {
    border: 1px solid #e3e6f0;
    border-radius: 0.35rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.card-header {
    background-color: #f8f9fc;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #e3e6f0;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 0;
}

.card-body {
    padding: 1.0rem;
}

.card-body .btn {
    margin-top: auto;
}

/* Jumbotron */
.jumbotron {
    padding: 2rem 1rem;
    margin-bottom: 2rem;
    background-color: #e9ecef;
    border-radius: 0.3rem;
}

/* Footer */
footer.footer {
    background-color: #343a40;
    color: #fff;
    text-align: center;
    padding: 1rem 0;
    position: fixed;
    bottom: 0;
    width: 100%;
}

.footer a {
    color: #007bff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover, .footer a:focus {
    color: #0056b3;
}

/* Chat Box */
.chat-box {
    margin-top: 20px;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    background-color: #fff;
    padding: 1rem;
}

.chat-box ul {
    max-height: 300px;
    overflow-y: auto;
    list-style: none;
    padding: 0;
    margin-bottom: 10px;
}

.chat-box ul li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e3e6f0;
}

.chat-box form {
    margin-top: 10px;
}

.chat-box input[type="text"] {
    width: calc(100% - 110px);
    margin-right: 10px;
    display: inline-block;
}

.chat-box button {
    width: 100px;
    display: inline-block;
}

/* Award Voting System */
.vote-bar {
    height: 10px;
    background-color: #e9ecef;
    border-radius: 0.25rem;
    margin-top: 10px;
    overflow: hidden;
    position: relative;
}

.vote-bar .progress {
    height: 100%;
    background-color: #007bff;
    width: 50%; /* Dynamic width based on votes */
}

.vote-button {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    background-color: #ffc107;
    border: none;
    border-radius: 0.25rem;
    cursor: pointer;
    color: #343a40;
    transition: background-color 0.3s ease;
}

.vote-button:hover {
    background-color: #e0a800;
}

/* Media Queries for Responsiveness */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    .sidebar a {
        text-align: center;
        padding: 1rem;
    }
    .content {
        margin-left: 0;
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .navbar-nav .nav-link {
        padding: 0.25rem 0.5rem;
    }
    .card-title {
        font-size: 1.1rem;
    }
    .chat-box input[type="text"] {
        width: calc(100% - 90px);
    }
    .chat-box button {
        width: 80px;
    }
}

/* Course Catalog Enhancements */
.course-catalog .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.course-catalog .card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.course-catalog .card-body .btn {
    margin-top: auto;
}

.course-catalog .card-img-top {
    height: 180px;
    object-fit: cover;
}

/* Webinars Page Enhancements */
.webinars .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.webinars .card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.webinars .card-body .btn {
    margin-top: auto;
}

/* Sign Up and Login Form Enhancements */
.signup-form, .login-form {
    margin-top: 5rem;
    text-align: center;
}

.signup-form .card, .login-form .card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.signup-form .form-group, .login-form .form-group {
    margin-bottom: 1rem;
}

.signup-form .form-control, .login-form .form-control {
    border-radius: 0.25rem;
}

.signup-form .btn, .login-form .btn {
    font-size: 1rem;
    padding: 0.5rem 1rem;
}

/* Filter and Search Bar Enhancements */
.filter-form .form-inline {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.filter-form .form-control {
    width: auto;
    min-width: 200px;
    margin-bottom: 0.5rem;
}

/* Alerts and Feedback */
.alert {
    padding: 0.75rem 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid transparent;
    border-radius: 0.25rem;
}

.alert-info {
    color: #0c5460;
    background-color: #d1ecf1;
    border-color: #bee5eb;
}

.alert-warning {
    color: #856404;
    background-color: #fff3cd;
    border-color: #ffeeba;
}

/* Performance Enhancements */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

.lazy-load.loaded {
    opacity: 1;
}

/* Task and Event Management Enhancements */
.task-list .card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.task-list .card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.task-list .btn {
    margin-top: auto;
}

/* Resource Library Enhancements */
.resource-library .card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.resource-library .card-body {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

.resource-library .btn {
    margin-top: auto;
}

/* Dynamic Content Loading Enhancements */
.dynamic-content .loading-spinner {
    margin: 20px auto;
    display: block;
}

/* Form Error Handling */
.form-control.is-invalid {
    border-color: #dc3545;
}

.form-control.is-invalid:focus {
    box-shadow: 0 0 5px rgba(220, 53, 69, 0.25);
}

.invalid-feedback {
    display: block;
    color: #dc3545;
}

.form-control.is-valid {
    border-color: #28a745;
}

.form-control.is-valid:focus {
    box-shadow: 0 0 5px rgba(40, 167, 69, 0.25);
}

.valid-feedback {
    display: block;
    color: #28a745;
}

/* Consistent Spacing and Layout */
.mt-5 {
    margin-top: 3rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

/* Responsive Utility Classes */
.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

@media (min-width: 768px) {
    .d-md-none {
        display: none !important;
    }
    .d-md-block {
        display: block !important;
    }
}

@media (min-width: 992px) {
    .d-lg-none {
        display: none !important;
    }
    .d-lg-block {
        display: block !important;
    }
}

.message-box {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background-color: #f9f9f9;
    position: relative;
}

.message-content {
    margin: 0;
    font-size: 1.1em;
}

.timestamp {
    font-size: 0.9em;
    position: absolute;
    bottom: -20px;
    right: 10px;
    color: #aaa;
}
/* Ensure there's enough space at the bottom of the content */
.content-wrapper {
    padding-bottom: 100px; /* Adjust this value as needed */
}

/* Make sure the footer does not overlap content */
footer {
    position: relative;
    bottom: 0;
    width: 100%;
    clear: both;
    margin-top: 50px; /* Add space between content and footer */
}
.table td, .table th {
    white-space: normal; /* Allow text wrapping */
    padding: 5px;        /* Reduce cell padding */
}

.table th {
    max-width: 100px; /* Set a maximum width for headers, adjust as needed */
}

.table td {
    max-width: 150px; /* Set a maximum width for table cells */
}
/* Reduce the size of the table text */
.table th, .table td {
    font-size: 0.875rem; /* Slightly smaller font size */
}

/* You can also reduce padding for a more compact appearance */
.table th, .table td {
    padding: 4px; /* Reduce padding */
}
