﻿/* Page Header */
.page-header {
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    border-radius: 0 0 20px 20px;
}

/* Filter Section */
.filter-section {
    background: linear-gradient(to right, #f8f9fa, #f1f3f5);
}

/* Card Styles */
.card-header {
    border-radius: 8px 8px 0 0 !important;
}

.course-card {
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
    height: 100%;
    position: relative;
}

    .course-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08) !important;
    }

    .course-card.funded-section:hover {
        border-color: #007bff;
        box-shadow: 0 5px 15px rgba(0, 123, 255, 0.1) !important;
    }

    .course-card.feebased-section:hover {
        border-color: #28a745;
        box-shadow: 0 5px 15px rgba(40, 167, 69, 0.1) !important;
    }

    .course-card.search-section:hover {
        border-color: #6c757d;
        box-shadow: 0 5px 15px rgba(108, 117, 125, 0.1) !important;
    }

/* Time Slot */
.time-slot {
    font-size: 0.85rem;
    padding: 0.5rem;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background-color: #f8f9fa;
    transition: background-color 0.2s ease;
}

    .time-slot:hover {
        background-color: #e9ecef;
    }

/* Course Icons */
.course-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

.funded-icon {
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

.feebased-icon {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.search-icon {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

/* Text Wrapping Utilities */
.text-break {
    word-break: break-word;
    overflow-wrap: break-word;
}

.min-width-0 {
    min-width: 0;
}

.course-card .card-title {
    word-break: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
    line-height: 1.3;
}

/* Enhanced Tab Styling */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
    padding: 0.5rem 0.5rem 0 0.5rem;
}

    .nav-tabs .nav-link {
        border: 2px solid transparent;
        color: #6c757d;
        font-weight: 500;
        padding: 0.75rem 1.5rem;
        transition: all 0.3s ease;
        border-radius: 6px 6px 0 0;
        margin: 0 0.25rem;
        background-color: white;
        position: relative;
        bottom: -1px;
    }

        .nav-tabs .nav-link:hover {
            color: #007bff;
            background-color: rgba(0, 123, 255, 0.05);
            border-color: #dee2e6 #dee2e6 #f8f9fa;
        }

        .nav-tabs .nav-link.active {
            color: #007bff;
            background-color: white;
            border: 2px solid #dee2e6;
            border-bottom-color: white;
            font-weight: 600;
            box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.05);
            z-index: 1;
        }

            /* Tab-specific active state colors */
            .nav-tabs .nav-link.active#funded-tab {
                color: #007bff;
                border-top: 3px solid #007bff;
            }

            .nav-tabs .nav-link.active#feebased-tab {
                color: #28a745;
                border-top: 3px solid #28a745;
            }

            .nav-tabs .nav-link.active#search-tab {
                color: #6c757d;
                border-top: 3px solid #6c757d;
            }

/* Tab content area */
.tab-content {
    border: 2px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 8px 8px;
    background-color: white;
}

.tab-pane {
    padding: 0;
}

/* Tab icons */
.nav-tabs .nav-link i {
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* Tab count badges */
.nav-tabs .nav-link .tab-badge {
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    margin-left: 0.5rem;
    border-radius: 10px;
    font-weight: 500;
}

#funded-tab .tab-badge {
    background-color: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

#feebased-tab .tab-badge {
    background-color: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

#search-tab .tab-badge {
    background-color: rgba(108, 117, 125, 0.1);
    color: #6c757d;
}

/* Card body padding within tabs */
.tab-pane .card-body,
.tab-pane > div {
    padding: 1.5rem;
}

/* Tab hover animations */
.nav-tabs .nav-link {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Subtle shadow for the entire tabs card */
#courseTabs {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Better spacing for tab content */
.tab-pane h2,
.tab-pane h3,
.tab-pane h4 {
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Improved filter section spacing within tabs */
.tab-pane .filter-section {
    margin-bottom: 1.5rem;
}

/* Better alignment for results headers */
.tab-pane .d-flex.justify-content-between.align-items-center {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

/* Seat badge */
.seat-badge {
    min-width: 80px;
    display: inline-block;
    text-align: center;
    white-space: nowrap;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .course-card {
        margin-bottom: 1rem;
    }

    .time-slot {
        flex-direction: column;
        align-items: flex-start;
    }

        .time-slot > div {
            width: 100%;
            margin-bottom: 0.5rem;
        }

            .time-slot > div:last-child {
                margin-bottom: 0;
            }

    .course-card .card-title {
        font-size: 1rem;
    }

    .course-card .small {
        font-size: 0.8rem;
    }

    .time-slot {
        padding: 0.4rem;
    }

    .btn-sm {
        padding: 0.2rem 0.4rem;
        font-size: 0.75rem;
    }

    /* Tab responsive adjustments */
    .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.9rem;
        margin: 0 0.125rem;
    }

        .nav-tabs .nav-link i {
            font-size: 1rem;
            margin-right: 0.25rem;
        }

    .tab-pane .card-body,
    .tab-pane > div {
        padding: 1rem;
    }
}

@media (max-width: 576px) {
    .nav-tabs {
        flex-direction: column;
        padding: 0.5rem;
    }

        .nav-tabs .nav-link {
            margin: 0.125rem 0;
            border-radius: 6px;
            border-bottom: 2px solid transparent;
            text-align: left;
        }

            .nav-tabs .nav-link.active {
                border-bottom: 2px solid;
                border-top: 2px solid transparent;
            }

                .nav-tabs .nav-link.active#funded-tab {
                    border-left: 3px solid #007bff;
                    border-top: 2px solid transparent;
                }

                .nav-tabs .nav-link.active#feebased-tab {
                    border-left: 3px solid #28a745;
                    border-top: 2px solid transparent;
                }

                .nav-tabs .nav-link.active#search-tab {
                    border-left: 3px solid #6c757d;
                    border-top: 2px solid transparent;
                }

    .tab-content {
        border-top: 2px solid #dee2e6;
    }

    .course-card .card-title {
        font-size: 0.95rem;
    }

    .course-card .small {
        font-size: 0.75rem;
    }

    .seat-badge {
        min-width: 70px;
        font-size: 0.75rem;
    }
}

/* Ensure proper text wrapping in all containers */
.course-card * {
    word-wrap: break-word;
}
