/**
 * Custom styling for Moodle course category pages
 * Enhances the visual appearance of category and course listings
 */

/* ============================================
   CATEGORY PAGE HEADER STYLING
   ============================================ */

/* Breadcrumb navigation */
.breadcrumb {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.breadcrumb-item + .breadcrumb-item::before {
    content: "›";
    font-size: 1.2rem;
    color: #6c757d;
}

.breadcrumb-item a {
    color: #1177d1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* ============================================
   CATEGORY TABS STYLING
   ============================================ */

.nav-tabs {
    border-bottom: 2px solid #dee2e6;
    margin-bottom: 2rem;
}

.nav-tabs .nav-link {
    color: #495057;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border: none;
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
}

.nav-tabs .nav-link:hover {
    color: #1177d1;
    border-bottom-color: #1177d1;
    background-color: rgba(17, 119, 209, 0.05);
}

.nav-tabs .nav-link.active {
    color: #1177d1;
    border-bottom-color: #1177d1;
    background-color: transparent;
    font-weight: 600;
}

/* ============================================
   SEARCH AND FILTER SECTION
   ============================================ */

.category-search-wrapper {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

select.custom-select,
input.form-control {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

select.custom-select:focus,
input.form-control:focus {
    border-color: #1177d1;
    box-shadow: 0 0 0 0.2rem rgba(17, 119, 209, 0.15);
    outline: none;
}

.btn-primary {
    background: linear-gradient(135deg, #1177d1 0%, #0056b3 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(17, 119, 209, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(17, 119, 209, 0.4);
}

/* ============================================
   COURSE LISTING STYLING
   ============================================ */

.course-listing {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 2rem;
}

.course-listing h3 {
    color: #2c3e50;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #e9ecef;
}

/* Individual course item */
.coursebox {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.coursebox::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, #1177d1 0%, #0056b3 100%);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.coursebox .coursename a {
    color: #1177d1;
    font-size: 1.25rem;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.coursebox .coursename a:hover {
    color: #0056b3;
    text-decoration: underline;
}

/* ============================================
   LEARNER OUTCOMES STYLING
   ============================================ */

.learner-outcomes,
.course-description {
    background: #f8f9fa;
    border-left: 4px solid #1177d1;
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

.learner-outcomes h4,
.course-description h4 {
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.learner-outcomes ul,
.course-description ul {
    list-style: none;
    padding-left: 0;
}

.learner-outcomes li,
.course-description li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
}

.learner-outcomes li::before,
.course-description li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 1.2rem;
}

/* ============================================
   COURSE METADATA STYLING
   ============================================ */

.course-metadata {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.metadata-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #6c757d;
    font-size: 0.9rem;
}

.metadata-item strong {
    color: #2c3e50;
    font-weight: 600;
}

.metadata-item .badge {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-weight: 500;
}

/* ============================================
   MATERIALS NEEDED SECTION
   ============================================ */

.materials-needed {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
}

.materials-needed strong {
    color: #856404;
    display: block;
    margin-bottom: 0.5rem;
}

.materials-needed a {
    color: #0056b3;
    font-weight: 500;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .page-header-headings h1 {
        font-size: 1.75rem;
    }
    
    .category-search-wrapper {
        flex-direction: column;
    }
    
    .course-metadata {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .coursebox {
        padding: 1rem;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-muted {
    color: #6c757d !important;
}

.font-weight-bold {
    font-weight: 600 !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}
