﻿/* ===============================
   CONTAINER FIX
================================= */
.container {
    padding-left: 12px;
    padding-right: 12px;
}

/* ===============================
   GLASS HEADER
================================= */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

    .glass-card h4 {
        font-size: 1.25rem;
    }

/* ===============================
   TEST TABS
================================= */
.test-tabs {
    display: flex;
    gap: 8px;
    border-bottom: 2px solid #eee;
    overflow-x: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

    .test-tabs::-webkit-scrollbar {
        display: none;
    }

.tab-btn {
    white-space: nowrap;
    padding: 8px 14px;
    font-size: 0.9rem;
}

/* ===============================
   SEARCH BAR
================================= */
.search-bar {
    background: #fff;
}

#search-filter-global {
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.95rem;
}

/* ===============================
   TEST CARD
================================= */
.test-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

    .test-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 20px rgba(0,0,0,0.08);
    }

    .test-card .badge {
        font-size: 12px;
    }

    .test-card i {
        font-size: 14px;
    }

@media (hover: hover) {
    .test-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 10px 22px rgba(0,0,0,0.08);
    }
}

/* ===============================
   LOAD MORE BUTTON
================================= */
#loadMoreBtn {
    border-radius: 10px;
    font-size: 0.95rem;
}

/* ===============================
   MOBILE VIEW
================================= */
@media (max-width: 576px) {

    /* Header text stacking */
    .glass-card .row {
        row-gap: 10px;
    }

    .glass-card h4 {
        font-size: 1.1rem;
    }

    .breadcrumb {
        font-size: 0.8rem;
    }

    /* Stats layout */
    .glass-card .col-6 p {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }

    /* Search bar */
    #search-filter-global {
        font-size: 0.9rem;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    /* Tabs become swipeable */
    .test-tabs {
        padding-bottom: 6px;
        margin-bottom: 12px;
    }

    .tab-btn {
        font-size: 0.85rem;
        padding: 7px 12px;
    }

    /* Load more */
    #loadMoreBtn {
        width: 100%;
    }
}

/* ===============================
   TABLET VIEW
================================= */
@media (min-width: 577px) and (max-width: 991px) {

    .tab-btn {
        font-size: 0.9rem;
    }

    .glass-card h4 {
        font-size: 1.2rem;
    }
}

@media (max-width: 576px) {
    .test-tabs {
        position: sticky;
        top: 56px; /* after navbar */
        background: white;
        z-index: 9;
    }
}
/* ===============================
   SEARCH BAR WRAPPER
================================= */
.search-bar-wrap {
    width: 100%;
}

/* Main Bar */
.search-bar {
    background: #ffffff;
    transition: box-shadow 0.2s ease;
}

/* Hover (Desktop only) */
@media (hover: hover) {
    .search-bar:hover {
        box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    }
}

/* Input */
#search-filter-global {
    border: none;
    outline: none;
    font-size: 0.95rem;
    width: 100%;
    background: transparent;
}

/* Icon */
.search-bar .icon svg {
    display: block;
}

/* ===============================
   MOBILE VIEW
================================= */
@media (max-width: 576px) {

    .flex-fill {
        margin-top: 0.5rem !important;
    }

    .search-bar {
        padding-left: 10px;
        padding-right: 10px;
    }

    #search-filter-global {
        font-size: 0.9rem;
        padding-top: 12px;
        padding-bottom: 12px;
    }

    .search-bar .icon svg {
        width: 14px;
        height: 14px;
    }
}

/* ===============================
   TABLET VIEW
================================= */
@media (min-width: 577px) and (max-width: 991px) {
    #search-filter-global {
        font-size: 0.95rem;
    }
}

.badge.difficulty {
    font-size: 0.75rem;
    padding: 4px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.difficulty i {
    margin-right: 4px;
    font-size: 0.8em;
}

.easy {
    color: #2e7d32;
}

.medium {
    color: #f57c00;
}

.hard {
    color: #c62828;
}

.fa-bg {
    color: #6f42c1;
}

@media (max-width: 576px) {
    .tab-btn.active {
        border-bottom-width: 4px;
    }
}

.test-tabs {
    display: flex;
    gap: 10px;
    border-bottom: 2px solid #eee;
}

.tab-btn {
    background: none;
    border: none;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    color: #555;
    position: relative;
}

    .tab-btn.active {
        color: #6f42c1;
        font-weight: 600; /* slightly bolder */
        border-bottom: 3px solid #6f42c1;
        background-color: #f8f9ff; /* very light highlight */
    }

        .tab-btn.active::after {
            content: '';
            position: absolute;
            bottom: -2px;
            left: 0;
            width: 100%;
            height: 3px;
            background: #6f42c1;
            border-radius: 3px;
        }

.tab-content {
    display: none;
}

    .tab-content.active {
        display: block;
    }

.bg-primary-100 {
    --bs-bg-opacity: 1;
    background-color: rgba(var(--bs-primary-100-rgb), var(--bs-bg-opacity)) !important;
}

.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
}
.attempted-badge {
    background: #e7f5ff;
    color: #0d6efd;
    border: 1px solid #b6d4fe;
    font-weight: 500;
}
.title-truncate {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}