/* Courses Sub-page Styling */

.course-table-section {
    padding: 60px 0;
    background-color: #f8fafc; /* Sleek light-gray background to pop cards */
}

.course-table-container {
    margin-bottom: 30px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(15, 44, 89, 0.05); /* Premium soft shadow */
    border: 1px solid rgba(0, 0, 0, 0.08);
    overflow: hidden; /* Round the inner elements */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-table-container:hover {
    box-shadow: 0 15px 40px rgba(15, 44, 89, 0.08);
}

.course-table-header-stripe {
    height: 5px;
    background: linear-gradient(90deg, var(--accent-red) 0%, #ff4d6d 100%);
    width: 100%;
}

.table-responsive-custom {
    padding: 0;
}

.course-table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: separate;
    border-spacing: 0;
    border: none;
}

.course-table th {
    background-color: var(--primary-navy) !important;
    color: #ffffff !important;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.75px;
    padding: 18px 24px;
    text-align: left; /* Align headers to left by default */
    border-bottom: 3px solid rgba(0, 0, 0, 0.1);
    border-top: none;
    border-left: none;
    border-right: none;
}

.course-table td {
    padding: 18px 24px;
    font-size: 0.95rem;
    color: #475569; /* Slate grey for modern look */
    text-align: left; /* Align cells to left by default */
    vertical-align: middle;
    border-bottom: 1px solid #e2e8f0;
    border-top: none;
    border-left: none;
    border-right: none;
    font-weight: 500;
}

/* Alignments based on content types */
/* Center-align columns containing numbers/durations/semesters by default */
.course-table th:nth-child(2), .course-table td:nth-child(2) {
    text-align: center;
}
.course-table th:nth-child(3), .course-table td:nth-child(3) {
    text-align: center;
}

/* Make sure the last column (Eligibility) is always left-aligned */
.course-table th:last-child, .course-table td:last-child {
    text-align: left;
}

.course-table tbody tr {
    transition: background-color 0.2s ease;
}

.course-table tbody tr:last-child td {
    border-bottom: none; /* Clean bottom row */
}

.course-table tbody tr:nth-of-type(odd) {
    background-color: #ffffff;
}

.course-table tbody tr:nth-of-type(even) {
    background-color: #f8fafc;
}

.course-table tbody tr:hover {
    background-color: rgba(15, 44, 89, 0.02) !important; /* Extremely soft navy highlight on hover */
}

/* Program titles bold styling */
.course-table td:first-child {
    color: var(--primary-navy);
    font-weight: 600;
}

/* Support for secondary details (specializations, descriptions) inside table cells */
.course-table td .text-muted {
    display: block;
    margin-top: 6px;
    font-size: 0.82rem;
    line-height: 1.4;
    color: #64748b !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .course-table {
        min-width: 800px; /* Prevent columns from squishing and breaking on small screens */
    }
    .course-table th, .course-table td {
        padding: 14px 16px;
        font-size: 0.88rem;
        white-space: normal;
        word-break: keep-all;
    }
    .table-responsive-custom {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
    }
}
