/* 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);
    }

    .qiratoch-filter-card {
        background: transparent; /* remove inner card background */
        border-radius: 24px;
        padding: 0; /* shell has padding */
        box-shadow: none;
        border: 0;
        margin-bottom: 0;
    }
    
    .qiratoch-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);
    }
    
    .qiratoch-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;
    }
    
    .qiratoch-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 */
    }
    
    .qiratoch-types-nav {
        background: linear-gradient(180deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.82) 100%);
        padding: 15px;
        border-radius: 20px;
        box-shadow: 0 8px 24px rgba(2, 6, 23, 0.12);
        border: 1px solid rgba(242, 222, 26, 0.2);
        backdrop-filter: blur(6px);
        margin-bottom: 20px;
        overflow-x: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(242, 222, 26, 0.6) #f0f0f0;
    }
    
    .qiratoch-types-nav::-webkit-scrollbar {
        height: 8px;
    }
    
    .qiratoch-types-nav::-webkit-scrollbar-track {
        background: #f0f0f0;
        border-radius: 10px;
    }
    
    .qiratoch-types-nav::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, rgba(242,222,26,0.8) 0%, rgba(27,127,27,0.8) 100%);
        border-radius: 10px;
    }
    
    .qiratoch-tab {
        border: 2px solid rgba(242, 222, 26, 0.8) !important;
        color: #063406 !important;
        font-weight: 600;
        padding: 8px 16px;
        border-radius: 20px;
        transition: all 0.3s ease;
        white-space: nowrap;
        font-size: 13px;
        flex: 0 0 auto;
        width: auto;
        min-width: 120px;
    }
    
    .qiratoch-tab:hover {
        background: linear-gradient(135deg, rgba(242,222,26,1) 0%, rgba(27,127,27,1) 100%);
        color: #ffffff !important;
        border-color: rgba(242, 222, 26, 0.8) !important;
        transform: translateY(-2px);
        box-shadow: 0 5px 15px rgba(242, 222, 26, 0.4);
    }
    
    .qiratoch-tab.active {
        background: linear-gradient(135deg, rgba(242,222,26,1) 0%, rgba(27,127,27,1) 100%);
        color: #ffffff !important;
        border-color: rgba(242, 222, 26, 0.8) !important;
        box-shadow: 0 5px 15px rgba(242, 222, 26, 0.4);
    }
    
    .qiratoch-type-content {
        animation: fadeIn 0.5s ease-in-out;
    }
    
    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    .qiratoch-type-content .heading {
        background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
        padding: 25px 30px;
        border-radius: 15px;
        margin-bottom: 30px;
        box-shadow: 0 5px 20px rgba(0,0,0,0.08);
    }
    
    .qiratoch-type-content .heading h2 {
        margin: 0;
        color: #2c3e50;
        font-weight: 700;
        text-shadow: 0 2px 4px rgba(0,0,0,0.05);
    }
    
    .qiratoch-type-content .heading img {
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
    }
    
    .courses {
        border-radius: 20px;
        overflow: hidden;
        box-shadow: 0 8px 25px rgba(0,0,0,0.1);
        transition: all 0.4s ease;
        background: white;
        min-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);
    }
    
    .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;
        text-align: center;
    }
    
    .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 2px;
        line-height: 1.3;
        height: auto;
        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: auto;
        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;
    }

    /* Center inner flex and tighten spacing */
    .courses .scholar > .d-flex {
        width: 100%;
        flex-direction: column !important;
        justify-content: center;
        align-items: center !important;
        gap: 6px;
    }
    
    .courses .courses-text {
    /* margin-top: 6px; */
    padding-left: 10px;
    padding-right: 10px;
    flex-grow: 1;
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}
    
    .courses .courses-text a {
        color: #2c3e50;
        font-size: 25px;
        font-weight: 700;
        text-decoration: none;
        display: flex;
        align-items: baseline;
        gap: 8px;
        transition: color 0.3s ease;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .courses .courses-text a .text-muted { margin-left: auto; flex: 0 0 auto; white-space: nowrap; }
    
    .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: 18px;
    }
    
    .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: 25px;
    }
    
    .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;
    }
    
    .courses .courses-weeks .border {
        width: 1px;
        height: 20px;
        background: #dee2e6;
    }
    
    /* convert from horizontal scroll to wrapped grid to avoid broken cards */
    .qiratoch-scroll-container { padding-bottom: 8px; }
    .qira-col { display: flex; margin-bottom: 30px; }
    
    .qiratoch-scroll-container::-webkit-scrollbar {
        height: 10px;
    }
    
    .qiratoch-scroll-container::-webkit-scrollbar-track {
        background: #f0f0f0;
        border-radius: 10px;
    }
    
    .qiratoch-scroll-container::-webkit-scrollbar-thumb {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
        border-radius: 10px;
    }
    
    .qiratoch-scroll-container .row { flex-wrap: wrap; margin: 0 -10px; }
    
    .qiratoch-scroll-container .col-lg-3 { padding: 0 10px; }
    
    .empty-state {
        text-align: center;
        padding: 60px 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;
    }
    
    /* Ensure equal height columns */
    .qiratoch-scroll-container .row { display: flex; flex-wrap: wrap; }
    
    .qiratoch-scroll-container .col-lg-3 { display: flex; margin-bottom: 30px; }
    
    @media (max-width: 768px) {
        .qiratoch-filter-card {
            padding: 20px;
        }
        
        .qiratoch-tab {
            padding: 10px 20px;
            font-size: 14px;
        }
        
        .qiratoch-scroll-container .col-lg-3 {
            flex: 0 0 280px;
        }
        
        .courses { min-height: 480px; }
        
        .courses .scholar {
            height: 100px;
        }
        
        .courses .scholar .scholar-info {
            height: 60px;
        }
        
        .courses .scholar h4 {
            font-size: 14px;
            height: 36px;
        }
    }

    /* Modern polish overrides (non-destructive) */
    .qiratoch-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); }

    .qiratoch-types-nav {
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid #eef2ff;
        backdrop-filter: blur(6px);
        box-shadow: 0 10px 30px rgba(17, 24, 39, 0.08);
    }

    .qiratoch-tab {
        letter-spacing: 0.2px;
    }
    .qiratoch-tab:hover,
    .qiratoch-tab.active {
        box-shadow: 0 10px 22px rgba(102, 126, 234, 0.25);
    }

    .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;
    }
    .text-muted{
        text-align: right;
        font-size: 12px;
        font-weight: 400;
        color: #6c757d;
        margin-top: 5px;
    }
