body {
    background-color: #f8f9fa;
    color: #212529;
}

.search-container {
    padding: 2rem 0;
}

/* Search Box */
.search-box {
    background: white;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    padding: 0;
    margin-bottom: 2rem;
    overflow: hidden;
}

.search-input {
    border: 1px solid #dee2e6;
    border-right: none;
    border-radius: 5px 0 0 5px;
    padding: 12px 20px;
    font-size: 16px;
    height: 50px;
}

.search-input:focus {
    box-shadow: none;
    border-color: #dee2e6;
}

.search-btn {
    background: var(--nav-bg) !important; /* #0d6efd; */
    border: none;
    border-radius: 0 5px 5px 0;
    padding: 0 24px;
    color: white;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-btn:hover {
    background: #0b5ed7;
}

/* Sidebar Filters */
.filters-sidebar {
    background: white;
    padding: 0.9rem;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #f0f0f0;
}

.filters-header {
    display: flex;
    align-items: center;
    font-weight: 700;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
}

.filter-section {
    margin-bottom: 2rem;
}

.filter-title {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #192f38;
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.category-tree {
    font-size: 0.9rem;
}

.category-item {
    margin-bottom: 2px;
}

.category-header {
    display: flex;
    align-items: center;
    padding: 6px 8px 6px 0px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    color: #212529;
    position: relative;
}

.category-header:hover {
    background-color: #f0f7ff;
    color: #0d6efd;
}

/* Specific alignment for radio and label */
.category-header input[type="radio"] {
    margin-right: 10px;
    cursor: pointer;
    accent-color: #0d6efd;
}

.category-header label {
    cursor: pointer;
    flex: 1;
    line-height: 1.3;
    user-select: none;
}

/* Toggle Icon Styling */
.category-toggle {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    color: #adb5bd;
    transition: transform 0.2s ease;
    font-size: 0.75rem;
    border-radius: 4px;
}

.category-toggle:hover {
    background-color: rgba(0,0,0,0.05);
    color: #0d6efd;
}

.category-toggle.expanded {
    transform: rotate(90deg);
    color: #0d6efd;
}

/* Children indentation */
.category-children {
    padding-left: 0.75rem;
    margin-left: 0.5rem; /* Center of the icon (24/2) */
    border-left: 1px dashed #dee2e6;
}

/* Duration and other lists */
.duration-options {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.duration-item {
    display: flex;
    align-items: center;
    padding: 6px 8px;
    color: #495057;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
}

.duration-item:hover {
    background-color: #f0f7ff;
    color: #0d6efd;
}

.duration-item input {
    margin-right: 10px;
    cursor: pointer;
    accent-color: #0d6efd;
}

.duration-item label {
    cursor: pointer;
    flex: 1;
    user-select: none;
}

/* Results Area */
.results-header {
    background: transparent;
    color: #212529;
    padding: 0 0 0 0;
    border-radius: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.results-info {
    font-weight: 500;
    font-size: 1rem;
}

.view-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.sort-select {
    border: 1px solid #dee2e6;
    border-radius: 4px;
    padding: 6px 30px 6px 8px;
    font-size: 0.9rem;
    background-color: white;
    cursor: pointer;
}

.view-toggle {
    display: flex;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    overflow: hidden;
    background: white;
}

.view-btn {
    background: white;
    border: none;
    color: #6c757d;
    padding: 3px 12px;
    cursor: pointer;
    border-right: 1px solid #dee2e6;
}

.view-btn:last-child {
    border-right: none;
}

.view-btn.active {
    background: #e9ecef;
    color: #212529;
}

/* Cards (List & Grid) */
.result-card {
    background: white;
    border: 1px solid #e6f3ff;
    border-radius: 5px;
    margin-bottom: 1rem;
    transition: box-shadow 0.2s;
    overflow: hidden;
    box-shadow: #e6f3ff 0px 0px 0px 0.5px;
}

.result-card:hover {
    /* box-shadow: rgba(0, 0, 0, 0.05) 0px 0px 0px 1px; */
    background: linear-gradient(135deg, #e6f3ff 0%, #ffffff 100%);
}

/* List View Styles */
.list-view .result-card {
    display: flex;
    padding: 1rem;
}

.list-view .card-img-wrapper {
    width: 120px;
    flex-shrink: 0;
    margin-right: 1rem;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #f0f0f0;
    max-height: 150px;
    padding: 0;
    overflow: hidden;
}

.list-view .card-img-wrapper img {
    max-height: 100%;
    /* max-width: 100%; */
    object-fit: contain;
}

.list-view .card-body {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
}

.list-view .card-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #212529;
    margin-bottom: 0.5rem;
    line-height: 1.25;
    text-decoration: none;
}

.list-view .card-title.report-name > span {
    font-size: 0.95rem;
    font-weight: 500;
}

.list-view .card-title:hover {
    color: #0d6efd;
}

.list-view .card-text {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.list-view .card-footer-items {
    display: flex;
    flex-direction: row;
    gap: 0.25rem;
}

.list-view .card-meta {
    font-size: 0.85rem;
    color: #203a43;
    font-weight: 600;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 15px;
}

.list-view .card-price {
    font-size: 1.1rem;
    color: #d20000;
    font-weight: 700;
}

.list-view .card-actions {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    margin-left: 1.5rem;
    /* min-width: 160px; */
    justify-content: end;
}

/* Grid View Styles */
.grid-view .result-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.grid-view .card-img-wrapper {
    max-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    padding: 0.75rem;
    border-bottom: 1px solid #f0f0f0;
    width: 100%;
    overflow: hidden;
}

.grid-view .card-img-wrapper img {
    /* max-height: 100%; */
    max-width: 100%;
    object-fit: contain;
}

.grid-view .card-body {
    padding: 1rem;
    padding-bottom: 0.3rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.grid-view .card-text {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.25;
}

.grid-view .card-title {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 0.75rem;
    line-height: 1.2;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.grid-view .card-title span {
    font-size: 0.9rem;
    font-weight: 500;
}

.grid-view .card-meta {
    margin-top: auto;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.grid-view .card-price {
    color: #0d6efd;
    font-weight: 700;
    font-size: 1rem;
}

.grid-view .card-actions {
    display: flex;
    gap: 0.5rem;
}

.grid-view .card-actions > a, .grid-view .card-actions > button {
    width: 50%;
}

/* Buttons */
.btn-outline-primary {
    color: var(--accent-blue);
    border-color: var(--accent-blue);
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--primary-blue) 0%, #00223d 100%);
    color: #fff;
    border-color: #0d6efd;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .list-view .result-card {
        flex-direction: column;
    }
    
    .list-view .card-img-wrapper {
        width: 100%;
        height: 180px;
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .list-view .card-actions {
        margin-left: 0;
        margin-top: 1rem;
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
    }
    
    .list-view .card-actions .btn {
        flex: 1;
    }
}

@media (max-width: 991px) {

    .results-header {
        display: flex;
        justify-content: space-between;
        align-items: start;
        margin-bottom: 1rem;
        flex-direction: column;
    }

    .results-header > div {
        padding-top: 0.5rem;
    }

    .list-view .card-footer-items {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    /* Mobile Filter Styles */
    .search-box.w-75 {
        width: 100% !important;
    }

    /* Backdrop */
    .filter-backdrop {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0,0,0,0.5);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        backdrop-filter: blur(5px);
        -webkit-backdrop-filter: blur(5px);
        border: 1px solid rgba(255, 255, 255, 0.3);
        transition: opacity 0.3s ease;
    }

    .filter-backdrop.show {
        opacity: 1;
        visibility: visible;
    }

    .filters-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        width: 300px;
        max-width: 85vw;
        z-index: 1090;
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
        margin: 0;
        border-radius: 0;
        overflow-y: auto;
        height: 100vh;
        border: none;
        box-shadow: 4px 0 12px rgba(0,0,0,0.1);
    }
    
    .filters-sidebar.show {
        transform: translateX(0);
    }

    
}

/* Pagination */
.pagination {
    margin-top: 2rem;
    gap: 5px;
}

.page-link {
    border: 1px solid #dee2e6;
    color: #212529;
    padding: 8px 14px;
    text-decoration: none;
    background: white;
    border-radius: 4px;
}

.page-link:hover {
    background: #e9ecef;
}

.page-link.active {
    background: #0d6efd;
    color: white;
    border-color: #0d6efd;
}

.loading-overlay {
    background: rgba(255,255,255,0.8);
}

/* Mobile Filter Toggle Button */
.mobile-filter-toggle {
    position: fixed;
    bottom: -1px;
    z-index: 1050;
    padding: 1rem 1.5rem;
    font-weight: 500;
    color: white;
    border: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.2s ease, background-color 0.2s;
    left: 0;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(9.6px);
    -webkit-backdrop-filter: blur(9.6px);
    border-top: 2px solid rgba(255, 255, 255, 0.6);
}

.mobile-filter-toggle:hover {
    background: rgba(255, 255, 255, 0.75);
    transform: translateY(-2px);
}

/* Mobile Close Button in Filter Header */
.mobile-filter-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 1.25rem;
    color: #6c757d;
    cursor: pointer;
    padding: 5px;
    z-index: 10;
}

.mobile-filter-close:hover {
    color: #dc3545;
}

#subs-banner{
    background: linear-gradient(135deg, var(--primary-blue), #001f3f);
}

#subs-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}