/* Page background pattern and Amharic serif font */
    @import url('https://fonts.googleapis.com/css2?family=Noto+Serif+Ethiopic:wght@400;600;700&display=swap');
    .page-pattern { padding-top: 18px; }
    .page-pattern, .page-pattern * {
        font-family: 'Noto Serif Ethiopic', 'Abyssinica SIL', 'Nyala', 'Kefa', serif;
    }
    .content-layout .sidebar { position: sticky; top: 90px; }
    /* Sidebar shell styling (requested radius + shadow, blue-black scheme) */
    .sidebar {
        background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.82) 100%);
        border-radius: 24px;
        box-shadow: 0 18px 40px rgba(2, 6, 23, 0.12), 0 4px 10px rgba(2, 6, 23, 0.06);
        border: 1px solid rgba(15, 23, 42, 0.06);
        padding: 18px;
        overflow: hidden;
        backdrop-filter: blur(6px);
    }

    .content-filter-card {
        background: transparent; /* remove inner card background */
        border-radius: 24px;
        padding: 0; /* shell has padding */
        box-shadow: none;
        border: 0;
        margin-bottom: 0;
    }
    
    .content-filter-card label {
        color: #0f172a;
        font-size: 16px;
        font-weight: 600;
        margin-bottom: 12px;
        text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }
    
    .content-filter-card select {
        border: 1px solid #cbd5e1;
        border-radius: 14px;
        padding: 14px 20px;
        font-size: 15px;
        background: #ffffff;
        box-shadow: 0 4px 12px rgba(2,6,23,0.08);
        transition: all 0.3s ease;
    }
    
    .content-filter-card select:focus {
        outline: none;
        box-shadow: 0 6px 18px rgba(14, 165, 233, 0.25);
        transform: translateY(-1px);
        border-color: #0ea5a8; /* cyan/teal focus */
    }
    
    .courses {
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 8px 25px rgba(0,0,0,0.1);
        transition: all 0.4s ease;
        background: white;
        height: 520px;
        display: flex;
        flex-direction: column;
    }
    
    .courses:hover {
        transform: translateY(-8px);
        box-shadow: 0 18px 40px rgba(2, 6, 23, 0.18);
    }
    
    .courses .courses-img {
        position: relative;
        overflow: hidden;
        height: 250px;
    }
    
    .courses .courses-img figure {
        margin: 0;
        height: 100%;
    }
    
    .courses .courses-img img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: all 0.5s ease;
    }
    
    .courses:hover .courses-img img {
        transform: scale(1.1);
    }
    
    .courses .courses-img a {
        position: absolute;
        bottom: 20px;
        right: 20px;
        width: 52px;
        height: 52px;
        background: linear-gradient(135deg, #14b8a6 0%, #06b6d4 100%);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        transition: all 0.3s ease;
        opacity: 0;
        transform: scale(0);
        box-shadow: 0 12px 28px rgba(20, 184, 166, 0.35);
    }
    
    .courses:hover .courses-img a {
        opacity: 1;
        transform: scale(1);
    }
    
    .courses .scholar {
        padding: 14px 16px;
        background: linear-gradient(180deg, rgba(241, 245, 249, 0.85) 0%, rgba(241, 245, 249, 0.60) 100%);
        border-bottom: 1px solid #e2e8f0;
        height: 108px;
        display: flex;
        align-items: center;
        flex-shrink: 0;
    }
    
    .courses .scholar img {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        object-fit: cover;
        border: 3px solid #14b8a6;
        box-shadow: 0 4px 10px rgba(20, 184, 166, 0.25);
        margin-right: 15px;
    }
    
    .courses .scholar h4 {
        font-size: 15px;
        font-weight: 700;
        color: #0f172a;
        margin: 0 0 4px;
        line-height: 1.35;
        height: 38px;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    .courses .scholar span {
        font-size: 12px;
        color: #0f766e;
        font-weight: 600;
        line-height: 1.2;
        height: 16px;
        overflow: hidden;
    }
    
    .courses .scholar .scholar-info {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 2px;
    height: auto;
    flex: 1;
    overflow: hidden;
 }
    
   
    
    
    .courses .courses-text a {
        color: #2c3e50;
        font-size: 18px;
        font-weight: 700;
        text-decoration: none;
        display: block;
        margin-bottom: 10px;
        transition: color 0.3s ease;
    }
    
    .courses .courses-text a:hover {
        color: #667eea;
    }
    
    .courses .courses-text h4 {
        color: #667eea;
        font-size: 24px;
        font-weight: 700;
        margin-bottom: 5px;
    }
    
    .courses .courses-text span {
        color: #7f8c8d;
        font-size: 14px;
    }
    .courses .scholar > .d-flex {
    width: 100%;
    flex-direction: column !important;
    justify-content: center;
    align-items: center !important;
    gap: 6px;
   }
    
    .courses .wrapper {
        padding: 16px 18px;
        background: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(6px);
        margin: 15px;
        border-radius: 16px;
        border: 1px solid #e2e8f0;
        box-shadow: 0 8px 20px rgba(2, 6, 23, 0.08);
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .courses .audio-placeholder {
        padding: 20px;
        background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
        margin: 15px;
        border-radius: 15px;
        height: 140px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #7f8c8d;
        font-style: italic;
        border: 2px dashed #dee2e6;
        flex-shrink: 0;
    }
    
    .courses .wrapper h4 {
        font-size: 15px;
        font-weight: 700;
        color: #0f172a;
        margin: 0;
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .courses .wrapper h5 {
        font-size: 13px;
        color: #0f766e;
        margin: 0 0 2px;
        font-weight: 600;
    }
    
    .courses .wrapper audio {
        width: 100%;
        border-radius: 10px;
        outline: none;
    }
    
    .courses .courses-weeks {
        padding: 15px 20px;
        background: #f8f9fa;
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 60px;
        margin-top: auto;
        flex-shrink: 0;
    }
    
    .courses .courses-weeks h6 {
        margin: 0;
        font-size: 13px;
        color: #7f8c8d;
        font-weight: 600;
    }
    
    .empty-state {
        text-align: center;
        padding: 80px 20px;
        background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
        border-radius: 20px;
        margin: 40px 0;
    }
    
    .empty-state i {
        font-size: 80px;
        color: #667eea;
        margin-bottom: 20px;
        opacity: 0.5;
    }
    
    .empty-state p {
        font-size: 18px;
        color: #7f8c8d;
        font-weight: 500;
    }
    
    .content-grid {
        animation: fadeIn 0.6s ease-in-out;
    }

    .courses .wrapper {
    /* padding: 12px 14px; */
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(6px);
    margin: 10px 12px 12px;
    border-radius: 16px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.08);
    display: flex;
    flex-direction: column;
    gap: 35px;
}


    
    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Ensure equal height columns */
    .content-grid .row {
        display: flex;
        flex-wrap: wrap;
    }
    
    .content-grid .col-lg-3,
    .content-grid .col-lg-4,
    .content-grid .col-md-6 {
        display: flex;
        margin-bottom: 30px;
    }
    
    @media (max-width: 768px) {
        .content-filter-card {
            padding: 20px;
        }
        
        .courses .courses-img {
            height: 200px;
        }
        
        .courses { height: auto; }
        
        .courses .scholar {
            height: 100px;
        }


        
        .courses .scholar .scholar-info {
            height: 60px;
        }
        
        .courses .scholar h4 {
            font-size: 14px;
            height: 36px;
        }
    }

    /* Let cards auto-size on narrower desktops to avoid clipping */
    @media (max-width: 1199.98px) {
        .courses { height: auto; }
    }

    /* Modern polish overrides (non-destructive) */
    .content-filter-card { backdrop-filter: blur(0); border: 0; box-shadow: none; }

    /* Slightly cooler card accents */
    .courses { border: 1px solid #e5e7eb; box-shadow: 0 10px 24px rgba(2,6,23,0.12); }
    .courses:hover { border-color: #cbd5e1; box-shadow: 0 18px 36px rgba(2,6,23,0.18); }

    .courses {
        border: 1px solid #edf2ff;
        background: #ffffff;
        box-shadow: 0 8px 22px rgba(17, 24, 39, 0.08);
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease, border-color 0.35s ease;
    }
    .courses:hover {
        transform: translateY(-8px);
        border-color: #c7d2fe;
        box-shadow: 0 18px 40px rgba(102, 126, 234, 0.25);
    }
    .courses .courses-img a {
        width: 56px;
        height: 56px;
        box-shadow: 0 12px 28px rgba(102, 126, 234, 0.35);
    }
    .courses .courses-weeks {
        background: #f9fafb;
        border-top: 1px solid #eef2ff;
    }
