 .ais-wrapper * {
    font-family: 'Poppins', sans-serif;
}

.widgettitle {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    color: #374151;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.ais-Hits-item {
    width: 30%;
    margin-inline: 15px !important;
    margin-bottom: 30px !important;
    display: block;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-radius: 16px;
    max-width: 375px;
    min-width: 280px;
    background: white;
    border: 1px solid #f3f4f6;
    transition: all 0.3s ease;
}

.ais-Hits-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
    border-color: #e5e7eb;
}

.ais-hits--title-link {
    font-family: 'Poppins', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: #1f2937;
    text-decoration: none;
    line-height: 1.4;
    transition: color 0.2s ease;
}

.ais-hits--title-link:hover {
    color: #16abd8;
}

.ais-Hits-item article {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.ais-Hits-item article .suggestion-post-content {
    font-family: 'Poppins', sans-serif;
    color: #6b7280;
    line-height: 1.6;
    font-size: 0.95rem;
}

.ais-hits--thumbnail {
    overflow: hidden;
}

.ais-hits--thumbnail img {
    transition: transform 0.2s ease;
}

.ais-Hits-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0;
}

#algolia-hits {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

#algolia-hits > div {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: center;
}

.ais-Hits {
    width: 100%;
}

.ais-Hits-item h2 {
    font-size: 1.25rem;
    margin-bottom: 12px;
}

a.ais-Menu-link .ais-Menu-label,
.ais-HierarchicalMenu-link .ais-HierarchicalMenu-label {
    color: #6b7280 !important;
    font-weight: 500;
    transition: color 0.2s ease;
}

a.ais-Menu-link:hover .ais-Menu-label,
.ais-HierarchicalMenu-link:hover .ais-HierarchicalMenu-label {
    color: #374151 !important;
}

.ais-HierarchicalMenu-link--selected .ais-HierarchicalMenu-label,
.ais-Menu-item--selected .ais-Menu-label {
    font-weight: 600;
    color: #16abd8 !important;
}

.ais-Menu-item.ais-Menu-item--selected {
    background-color: #f0f9ff;
    border-radius: 6px;
    padding: 4px 8px;
    margin: 2px 0;
}

#ais-main {
    min-height: 100vh;
    padding-inline: 5%;
}

.algolia-search-box-wrapper {
    position: relative;
    width: 100%;
    max-width: none;
    margin: 0 0 2rem 0;
    padding: 0 2rem;
}

.algolia-search-box-wrapper .search-icon {
    position: absolute;
    left: calc(2rem + 15px);
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    fill: #9ca3af;
    transition: fill 0.2s ease;
}

#algolia-search-box {
    margin-bottom: 0;
}

#algolia-search-box input {
    font-size: 20px;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    padding: 16px 20px 16px 50px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    width: 100%;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
    background: white;
}

#algolia-search-box input:focus {
    outline: none;
    border-color: #16abd8;
    box-shadow: 0 4px 12px -1px rgba(22, 171, 216, 0.2);
}

#algolia-search-box input:focus + .search-icon {
    fill: #16abd8;
}

.ais-Menu-item.ais-Menu-item--selected .ais-HierarchicalMenu-count {
    color: black;
}

.ais-card-header {
    display: flex;
    margin-bottom: 16px;
    flex-direction: column;
    align-items: flex-start;
}

.ais-card-header h2 {
    margin: 0;
    flex: 1;
}

.excerpt {
    margin-top: auto;
    padding-top: 12px;
}

.excerpt p {
    margin: 0;
    line-height: 1.6;
}


/* fade in animation */
.ais-Hits-item {
    opacity: 0;
    -webkit-animation: fadeIn ease-in 0.4s;
    -moz-animation: fadeIn ease-in 0.4s;
    -o-animation: fadeIn ease-in 0.4s;
    animation: fadeIn ease-in 0.4s;

    -webkit-animation-fill-mode: forwards;
    -moz-animation-fill-mode: forwards;
    -o-animation-fill-mode: forwards;
    animation-fill-mode: forwards;

    -webkit-animation-duration: 0.4s;
    -moz-animation-duration: 0.4s;
    -o-animation-duration: 0.4s;
    animation-duration: 0.4s;
}

@keyframes fadeIn {
    0% {
        opacity:0;
    }
    100% {
        opacity:1;
    }
}

/* Pagination Improvements */
.ais-Pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
    padding: 20px 0;
}

.ais-Pagination-list {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    align-items: center;
}

.ais-Pagination-item {
    margin: 0;
}

.ais-Pagination-link {
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
    background: white;
}

.ais-Pagination-link:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
}

.ais-Pagination-item--selected .ais-Pagination-link {
    background: #16abd8;
    border-color: #16abd8;
    color: white;
}

.ais-Pagination-item--disabled .ais-Pagination-link {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Stats Improvements */
#algolia-stats {
    text-align: center;
    margin-top: 3rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: #6b7280;
    font-weight: 500;
    padding: 0 2rem;
}

/* Facets Container Improvements */
.facet-filter-post-type,
.facet-filter-blog,
.facet-filter-kb {
    margin-bottom: 30px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid #f3f4f6;
}

/* Hierarchical Menu Improvements */
.ais-HierarchicalMenu-item--selected {
    font-weight: 600;
    color: #16abd8;
}

.ais-HierarchicalMenu-list--child {
    margin-left: 20px;
    margin-top: 12px;
    padding-inline-start: 15px;
    border-left: 2px solid #e5e7eb;
    position: relative;
}

.ais-HierarchicalMenu-list--child::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, #16abd8, transparent);
    opacity: 0.5;
}

.ais-HierarchicalMenu-list--child .ais-HierarchicalMenu-item {
    color: #6b7280;
    font-weight: normal;
    padding: 2px 0;
}

.ais-HierarchicalMenu-count, .ais-Menu-count {
    font-weight: 600;
    color: #9ca3af;
    background: #f3f4f6;
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 8px;
}

/* Sidebar Background Improvement */
#ais-facets {
    width: 25%;
    font-family: 'Poppins', sans-serif;
    padding: 100px 30px 40px 30px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-right: 1px solid #e2e8f0;
}

/* Highlight Improvements */
.ais-hits--content mark, 
.ais-hits--title-link mark, 
.ais-Hits-item em, 
.ais-Hits-item a em, 
.ais-Hits-item mark, 
.ais-Hits-item a mark {
    background-color: #A3C23A;
    color: white;
    font-weight: 600;
    padding: 2px 4px;
    border-radius: 4px;
}

/* Powered By Styling */
#algolia-powered-by {
    text-align: center;
    margin-top: 20px;
    opacity: 0.7;
}

/* Responsive Improvements */
@media (max-width: 1024px) {
    .ais-Hits-item {
        width: 45%;
        min-width: 300px;
    }
    
    #ais-facets {
        width: 30%;
        padding: 80px 20px 30px 20px;
    }
}

@media (max-width: 768px) {
    .ais-Hits-item {
        width: 90%;
        max-width: none;
        margin-inline: 0 !important;
    }
    
    #ais-facets {
        width: 100%;
        padding: 20px;
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
    
    .algolia-search-box-wrapper {
        max-width: 100%;
        padding: 0 1rem;
    }
    
    .algolia-search-box-wrapper .search-icon {
        left: calc(1rem + 15px);
    }
    
    #algolia-stats {
        padding: 0 1rem;
    }
    
    #algolia-search-box input {
        font-size: 16px;
        padding: 14px 16px 14px 45px;
    }
} 

.ais-Stats-text {
    margin-top: 16px;
    display: block;
}
