.section-header-with-search {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    width: 100%;
}

.section-header-with-search .section-title {
    text-align: center;
    margin-bottom: 1.5rem;
}
.section-header-with-search .section-title p {
    margin-bottom: 0;
}

.library-search-container {
    flex-shrink: 0;
    width: 100%;
    max-width: 450px;
}

.library-search-container form {
    display: flex;
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 50px;
    overflow: hidden;
    background: var(--color-bg);
    box-shadow: var(--shadow-light);
}

.library-search-container input[type="search"] {
    flex-grow: 1;
    border: none;
    padding: 0.8rem 1.2rem;
    font-size: 0.95rem;
    background: transparent;
    color: var(--color-text);
}

.library-search-container input[type="search"]:focus {
    outline: none;
    box-shadow: none;
}

.library-search-container button[type="submit"] {
    border: none;
    background: var(--color-primary);
    color: white;
    padding: 0 1.5rem;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.library-search-container button[type="submit"]:hover {
    background: var(--color-secondary);
}
@media (min-width: 992px) {
    .section-header-with-search {
        flex-wrap: nowrap;
    }
    .library-search-container {
        position: absolute;
        right: 0;
        top: 15%;
        width: auto;
        max-width: 400px;
    }
}

@media (max-width: 991.98px) {
    .section-header-with-search .section-title {
        margin-bottom: 1.5rem;
    }
}
.categories-grid {
    margin-top: 0 !important;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.result-card {
    background: var(--color-bg);
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    border: 1px solid var(--color-border);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    border-left: 4px solid var(--color-primary);
}

.result-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-dark);
    border-left-color: var(--color-secondary);
}

.result-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    font-size: 1.8rem;
    margin: 1.5rem 1.5rem 0;
    background: var(--gradient-primary);
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.result-card-content {
    padding: 1.5rem;
    flex-grow: 1;
}

.result-card-type {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--color-secondary);
    color: var(--color-text-light);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.result-card-content h4 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--color-accent-2);
}

.result-card-content p {
    color: #666;
    margin-bottom: 0;
    line-height: 1.6;
    font-size: 0.9rem;
}

.result-card-footer {
    padding: 1rem 1.5rem;
    background: var(--color-bg-light);
    border-top: 1px solid var(--color-border);
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.result-card-footer i {
    transition: transform 0.3s ease;
    margin-left: 0.25rem;
}

.result-card:hover .result-card-footer {
    background: var(--color-primary);
    color: var(--color-text-light);
}

.result-card:hover .result-card-footer i {
    transform: translateX(4px);
}

.pagination-container {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
}

.pagination {
    --bs-pagination-padding-x: 0.85rem;
    --bs-pagination-padding-y: 0.45rem;
    --bs-pagination-font-size: 0.95rem;
    --bs-pagination-color: var(--color-primary);
    --bs-pagination-bg: var(--color-bg);
    --bs-pagination-border-width: 1px;
    --bs-pagination-border-color: var(--color-border);
    --bs-pagination-border-radius: 0.375rem;
    --bs-pagination-hover-color: var(--color-secondary);
    --bs-pagination-hover-bg: #f8f9fa;
    --bs-pagination-hover-border-color: var(--color-border);
    --bs-pagination-focus-color: var(--color-secondary);
    --bs-pagination-focus-bg: #f8f9fa;
    --bs-pagination-focus-box-shadow: 0 0 0 0.25rem rgba(0, 123, 255, 0.25);
    --bs-pagination-active-color: #fff;
    --bs-pagination-active-bg: var(--color-primary);
    --bs-pagination-active-border-color: var(--color-primary);
    --bs-pagination-disabled-color: #6c757d;
    --bs-pagination-disabled-bg: var(--color-bg-light);
    --bs-pagination-disabled-border-color: var(--color-border);
    box-shadow: var(--shadow-light);
    border-radius: 0.375rem;
}

.page-item:first-child .page-link {
    border-top-left-radius: 0.375rem;
    border-bottom-left-radius: 0.375rem;
}

.page-item:last-child .page-link {
    border-top-right-radius: 0.375rem;
    border-bottom-right-radius: 0.375rem;
}
