/* departments.css */


/* ===== Base Styles ===== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}


/* ===== Department Section ===== */

.department-block {
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin: 20px auto;
    max-width: 1200px;
    overflow: hidden;
}

.department-info {
    padding: 25px;
    background: linear-gradient(135deg, #f5f5f5 0%, #ffffff 100%);
    border-bottom: 1px solid #eee;
}


/* ===== Tab System ===== */

.ct-tabs {
    border-radius: 0 0 10px 10px;
    overflow: hidden;
}

.ct-tabs-title {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    padding: 10px;
    background: #f8f8f8;
    border-bottom: 2px solid #4c4576;
    /* #ed1c24 */
    overflow-x: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.ct-tabs-title::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.ct-tab-title {
    cursor: pointer;
    padding: 12px 20px;
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 6px 6px 0 0;
    color: #555;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
    margin-bottom: -1px;
    flex-shrink: 0;
}

.ct-tab-title:hover {
    background-color: #f0f0f0;
    color: #333;
}

.ct-tab-title.active {
    background-color: #2f5676;
    color: white;
    border-color: #1a3042;
    /* #ed1c24 */
    position: relative;
    z-index: 1;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.ct-tab-title.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 10px solid transparent;
    border-right: 10px solid transparent;
    border-bottom: 10px solid white;
}

.ct-tabs-content {
    background: white;
    padding: 25px;
    min-height: 200px;
}

.ct-tab-content {
    display: none;
    animation: fadeIn 0.3s ease-out;
}

.ct-tab-content.active {
    display: block;
}


/* ===== Course Content ===== */

.course-box {
    margin-bottom: 30px;
    animation: slideUp 0.4s ease-out;
}

.course-box table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.course-box th {
    background-color: #5567a3;
    /* #ed1c24 */
    color: white;
    padding: 12px 15px;
    text-align: left;
    font-weight: 600;
}

.course-box td {
    padding: 12px 15px;
    border: 1px solid #eee;
    vertical-align: top;
}

.course-box tr:nth-child(even) {
    background-color: #f9f9f9;
}

.course-box tr:hover {
    background-color: #f5f5f5;
}


/* ===== Loading States ===== */

.loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.loading-spinner p {
    margin-top: 15px;
    color: #666;
    font-weight: 500;
    position: relative;
    padding-left: 30px;
}

.loading-spinner p:before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(237, 28, 36, 0.2);
    border-top-color: #2f5676;
    /* #ed1c24 */
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}


/* ===== Empty States ===== */

.text-center {
    text-align: center;
}

.no-programmes {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.no-programmes img {
    width: 120px;
    opacity: 0.6;
    margin-bottom: 20px;
}


/* ===== Error States ===== */

.error-state {
    text-align: center;
    padding: 30px;
    color: #721c24;
    background-color: #f8d7da;
    border-radius: 6px;
}

.error-state img {
    width: 80px;
    margin-bottom: 15px;
}

.retry-btn {
    background-color: #ed1c24;
    color: white;
    border: none;
    padding: 8px 20px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 15px;
    font-weight: 600;
    transition: background-color 0.3s;
}

.retry-btn:hover {
    background-color: #c5161c;
}


/* ===== Animations ===== */

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* ===== Responsive Styles ===== */

@media (max-width: 768px) {
    .department-info {
        padding: 20px;
    }
    .ct-tabs-title {
        padding: 8px;
        gap: 4px;
    }
    .ct-tab-title {
        padding: 10px 15px;
        font-size: 14px;
    }
    .ct-tabs-content {
        padding: 20px;
    }
    .course-box th,
    .course-box td {
        padding: 10px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .department-block {
        margin: 10px;
        border-radius: 8px;
    }
    .ct-tab-title {
        padding: 8px 12px;
        font-size: 13px;
    }
    .ct-tabs-content {
        padding: 15px;
    }
    .course-box table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    .loading-spinner {
        padding: 30px 20px;
    }
}