/* E-Learning Platform Custom Styles */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #0dcaf0;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

/* Navbar Styles */
.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

/* Logo with Background */
.logo-with-background {
    max-height: 50px;
    padding: 8px 12px;
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.logo-with-background:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    transition: color 0.3s;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: #fff;
}

/* Card Styles */
.card {
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1) !important;
}

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

/* Button Styles */
.btn {
    transition: all 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

/* Badge Styles */
.badge {
    padding: 0.5em 0.75em;
    font-weight: 500;
}

/* Progress Bar */
.progress {
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.6s ease;
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: 10px;
}

/* Table Styles */
.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.02);
}

/* Footer Styles */
footer {
    margin-top: auto;
}

footer a {
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover {
    color: #fff !important;
}

/* Dashboard Cards */
.dashboard-card {
    border-left: 4px solid var(--primary-color);
}

/* Video Player Container */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Exam Question Styles */
.question-card {
    border-left: 4px solid var(--primary-color);
}

.question-option {
    cursor: pointer;
    transition: all 0.3s;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    margin-bottom: 10px;
}

.question-option:hover {
    background-color: #f8f9fa;
    border-color: var(--primary-color);
}

.question-option input[type="radio"],
.question-option input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.question-option.selected {
    background-color: #e7f3ff;
    border-color: var(--primary-color);
}

.question-option.correct {
    background-color: #d1e7dd;
    border-color: var(--success-color);
}

.question-option.incorrect {
    background-color: #f8d7da;
    border-color: var(--danger-color);
}

/* Notification Dropdown */
.dropdown-menu {
    max-height: 400px;
    overflow-y: auto;
}

.dropdown-item {
    white-space: normal;
    padding: 10px 15px;
}

/* Loading Spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Course Grid */
.course-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

/* Sidebar */
.sidebar {
    background-color: #f8f9fa;
    min-height: calc(100vh - 56px);
    padding: 20px;
}

.sidebar .nav-link {
    color: #495057;
    padding: 10px 15px;
    border-radius: 5px;
    margin-bottom: 5px;
    transition: all 0.3s;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: #fff;
}

.sidebar .nav-link i {
    margin-right: 10px;
    width: 20px;
}

/* Responsive Video Embed */
.embed-responsive {
    position: relative;
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
}

.embed-responsive::before {
    display: block;
    content: "";
}

.embed-responsive-16by9::before {
    padding-top: 56.25%;
}

.embed-responsive iframe,
.embed-responsive embed,
.embed-responsive object,
.embed-responsive video {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.5s ease-in;
}

/* Print Styles */
@media print {
    .navbar,
    .sidebar,
    footer,
    .btn,
    .no-print {
        display: none !important;
    }
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.2rem;
    }
    
    .card-img-top {
        height: 150px;
    }
    
    .sidebar {
        min-height: auto;
    }
}

/* Utility Classes */
.text-truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.text-truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.cursor-pointer {
    cursor: pointer;
}

.shadow-hover:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Status Badges */
.status-active {
    background-color: var(--success-color);
}

.status-inactive {
    background-color: var(--secondary-color);
}

.status-pending {
    background-color: var(--warning-color);
}

.status-rejected {
    background-color: var(--danger-color);
}
