/* Responsive Tables CSS */

/* Enhanced table responsiveness */
.table-responsive-md {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

/* Style for striped tables */
.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(0, 0, 0, 0.02);
}

.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

/* Table header styling */
.table-light {
    background-color: #f8f9fa;
}

.course-table th {
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

.course-table td, .course-table th {
    padding: 0.75rem;
    vertical-align: middle;
}

/* Mobile card view styling */
.course-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.course-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.course-card .card-header {
    background-color: #f8f9fa;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

.course-card .card-body {
    padding: 1rem;
}

/* Mobile menu styling */
#mobileMenu {
    transition: all 0.3s ease;
}

#mobileMenu.show {
    display: block;
}

#mobileMenu a {
    transition: all 0.2s ease;
    padding: 10px 15px;
    border-radius: 4px;
}

#mobileMenu a:hover {
    background-color: #f8f9fa;
    color: #0d6efd;
}

/* Responsive styles */
@media (max-width: 767.98px) {
    /* Hide table headers on small screens */
    .table-responsive-md thead {
        display: none;
    }
    
    /* Make table rows behave like cards */
    .table-responsive-md tr {
        display: block;
        margin-bottom: 1rem;
        border: 1px solid #dee2e6;
        border-radius: 0.25rem;
    }
    
    .table-responsive-md td {
        display: block;
        text-align: right;
        padding: 0.5rem 0.75rem;
        border-top: none;
        position: relative;
    }
    
    /* Add labels for each cell */
    .table-responsive-md td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
    }
    
    /* Hide the desktop table on mobile */
    .d-md-none .table-responsive-md {
        display: none;
    }
    
    /* Show mobile cards */
    .d-md-none .course-card {
        display: block;
    }
}
