/* Knowledge Archive Styles */
:root {
    --primary-color: #0066FF;
    --primary-dark: #0050c7;
    --secondary-color: #333;
    --background-light: #fff;
    --background-gray: #f8f9fa;
    --background-accent: #f0f7ff;
    --text-primary: #222;
    --text-secondary: #555;
    --text-light: #777;
    --accent-color: #0066FF;
    --accent-yellow: #FFB800;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
    --transition: all 0.3s ease;
    --content-width: 1160px;
}

.container {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* Wave Background */
.wave-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 50vh;
    background: linear-gradient(135deg, #fdba373d 0%, #fdba3726 100%);
    clip-path: polygon(0 0, 100% 0, 100% 80%, 0 100%);
    z-index: -1;
    opacity: 0.8;
}

.gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 20%, rgba(0, 102, 255, 0.05) 0%, transparent 70%);
}

/* Archive Header */
.knowledge-archive-header {
    text-align: center;
    padding: 3rem 1rem 2rem;
    margin-bottom: 2rem;
}

.archive-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.2;
    letter-spacing: -0.5px;
    background: linear-gradient(90deg, var(--text-primary) 0%, var(--secondary-color) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-fill-color: transparent;
}

.archive-description {
    max-width: 700px;
    margin: 0 auto 2rem;
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Search Bar */
.knowledge-search-container {
    max-width: 600px;
    margin: 0 auto 2rem;
    position: relative;
}

.knowledge-search-form {
    display: flex;
    position: relative;
}

.knowledge-search-form .search-field {
    width: 100%;
    padding: 1rem 1.2rem;
    padding-right: 3.5rem;
    border-radius: 30px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    background-color: #222222 !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
    font-size: 1rem;
    transition: var(--transition);
    color:white;
}

.knowledge-search-form .search-field:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 5px 25px rgba(0, 102, 255, 0.15);
}

.knowledge-search-form .search-submit {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-secondary);
    padding: 0.5rem;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.knowledge-search-form .search-submit:hover {
    color: var(--primary-color);
}

.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

/* Search Spinner */
.search-spinner {
    position: absolute;
    right: 45px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1;
}

.spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(0, 102, 255, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* AJAX Search Results */
.knowledge-ajax-results {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 3rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.ajax-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    background-color: var(--background-gray);
}

.results-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
}

.results-title:before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 24px;
    background-color: var(--primary-color);
    margin-right: 12px;
    border-radius: 3px;
}

.close-search-results {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-search-results:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.ajax-results-content {
    padding: 1.5rem 2rem;
    max-height: 600px;
    overflow-y: auto;
}

.ajax-results-content .article-card {
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
}

.ajax-results-content .article-card:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.no-search-results {
    text-align: center;
    padding: 3rem 2rem;
}

.no-search-results svg {
    margin-bottom: 1rem;
    color: var(--text-light);
}

.no-search-results h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.no-search-results p {
    max-width: 500px;
    margin: 0 auto;
    color: var(--text-secondary);
}

/* View All Results Link */
.view-all-results {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    background-color: var(--background-gray);
    padding-bottom: 1.5rem;
}

.view-all-link {
    display: inline-flex;
    align-items: center;
    background-color: var(--background-accent);
    color: var(--primary-color);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0, 102, 255, 0.1);
}

.view-all-link svg {
    margin-left: 0.5rem;
    transition: transform 0.3s ease;
}

.view-all-link:hover {
    background-color: rgba(0, 102, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(0, 102, 255, 0.15);
}

.view-all-link:hover svg {
    transform: translateX(3px);
}

/* Categories Filter */
.knowledge-categories {
    margin-bottom: 3rem;
    padding: 0 1rem;
}

.categories-wrapper {
    max-width: 100%;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.8rem;
    padding: 0.5rem;
}

.category-pill {
    display: inline-block;
    padding: 0.5rem 1.2rem;
    background-color: white;
    color: var(--text-secondary);
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.category-pill:hover {
    background-color: #fef5e3;
    color: #7d5c05;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
}

.category-pill.active {
    background-color: #fdba37;
    color: black;
    border-color: #fdba37;
}

/* Enhanced Category Pill Animations */
.category-pill {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
    overflow: hidden;
}

.category-pill:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(255,255,255,0.8) 0%, transparent 80%);
    transform: scale(0);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border-radius: 30px;
}

.category-pill.clicked:after {
    animation: ripple 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
}

@keyframes ripple {
    0% {
        transform: scale(0);
        opacity: 0.6;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

.category-pill.active {
    background-color: #fdba37;
    color: black;
    border-color: #fdba37;
    animation: pulse-glow 2s infinite alternate;
    position: relative;
    z-index: 1;
    transform: translateY(-2px);
}

@keyframes pulse-glow {
    0% { box-shadow: 0 0 0 0 rgba(249, 186, 55, 0.4); }
    100% { box-shadow: 0 0 8px 0 rgba(249, 186, 55, 0.6); }
}

.category-pill:hover {
    background-color: #fef5e3;
    color: #7d5c05;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.05);
}


/* Animated transition for category change */
.articles-grid.category-change .article-card {
    animation: card-shift 0.5s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}

@keyframes card-shift {
    0% {
        opacity: 0;
        transform: translateX(-10px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Special entry animation for category results */
.articles-grid.category-filtered .article-card:nth-child(odd) {
    animation-name: slide-in-left;
}

.articles-grid.category-filtered .article-card:nth-child(even) {
    animation-name: slide-in-right;
}

@keyframes slide-in-left {
    from {
        opacity: 0;
        transform: translateX(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slide-in-right {
    from {
        opacity: 0;
        transform: translateX(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

/* Featured Article */
.featured-article {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 3rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
}

.featured-article-content {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
}

.featured-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}

.featured-label {
    display: inline-block;
    background-color: #00000021;
    color: #000000;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.article-category {
    display: inline-block;
    background-color: rgba(249, 186, 55, 0.15);
    color: #7a5900;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.featured-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.featured-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}


.featured-excerpt {
    margin-bottom: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin-bottom: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.meta-item {
    display: flex;
    align-items: center;
}

.meta-item svg {
    width: 16px;
    height: 16px;
    margin-right: 0.4rem;
    color: var(--text-secondary);
}

.read-more-btn {
    display: inline-flex;
    align-items: center;
    background-color: #fdba37;
    color: black;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    margin-top: auto;
    position: relative;
    width: fit-content;
    padding-right: 60px;
    transition: all 0.3s ease-in-out;
}


.featured-image {
    height: 100%;
    min-height: 400px;
    overflow: hidden;
}

.featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.6s ease;
}

.featured-article:hover .featured-image img {
    transform: scale(1.05);
}

/* Section Heading */
.section-heading {
    font-size: 1.8rem;
    font-weight: 700;
    margin: 2rem 0 1.5rem;
    color: var(--text-primary);
    position: relative;
    display: inline-block;
}

.section-heading:after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: #fdba37;
    border-radius: 2px;
}

/* Articles Grid */
.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.article-card {
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.article-card-image {
    height: 200px;
    overflow: hidden;
}

.article-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.article-card:hover .article-card-image img {
    transform: scale(1.05);
}

.article-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.article-card-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.article-card-category {
    font-size: 0.8rem;
    background-color: #00000021;
    color: #000000;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    display: inline-block;
}

.article-card-date {
    font-size: 0.8rem;
    color: var(--text-light);
}

.article-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    line-height: 1.4;
}

.article-card-title a {
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition);
}



.article-card-excerpt {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
}

.article-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.article-card-readtime {
    font-size: 0.85rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
}

.article-card-readtime svg {
    width: 14px;
    height: 14px;
    margin-right: 0.3rem;
}

.article-card-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: black;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.article-card-link svg {
    width: 16px;
    height: 16px;
    margin-left: 0.3rem;
    transition: transform 0.3s ease;
}




/* Pagination */
.pagination-container {
    margin: 2rem 0 4rem;
    text-align: center;
}

.pagination {
    display: inline-flex;
    gap: 0.5rem;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.8rem;
    border-radius: 20px;
    background-color: white;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.page-numbers.current {
    background-color: var(--primary-color);
    color: white;
}

.page-numbers:not(.current):hover {
    background-color: var(--background-accent);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

.page-numbers.prev, .page-numbers.next {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 1.2rem;
}

.page-numbers svg {
    width: 14px;
    height: 14px;
}

/* No Results */
.no-results {
    text-align: center;
    padding: 4rem 2rem;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    margin-bottom: 3rem;
}

.no-results svg {
    margin-bottom: 1.5rem;
    color: #fdba37;
}

.no-results h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.no-results p {
    max-width: 600px;
    margin: 0 auto 2rem;
    color: var(--text-secondary);
}

.button-secondary {
    display: inline-block;
    background-color: var(--background-accent);
    color: var(--primary-color);
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.button-secondary:hover {
    background-color: rgba(0, 102, 255, 0.15);
    transform: translateY(-2px);
}

/* CTA Section */
.archive-cta {
    padding: 3rem 2rem;
    background: linear-gradient(135deg, #f9ba37 0%, #f9ba37 100%);
    color: black;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 3rem;
    border-radius: var(--border-radius);
    max-width:1160px; 
    margin:auto;
    margin-bottom:250px;
}

.cta-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.1;
    background-image: url('data:image/svg+xml;charset=utf8,%3Csvg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100" preserveAspectRatio="none"%3E%3Cpolygon fill="%23ffffff" points="0,100 100,0 100,100"%3E%3C/polygon%3E%3C/svg%3E');
    background-size: 100% 100%;
}

.archive-cta h3 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
}

.archive-cta p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 1.5rem;
    opacity: 0.9;
    position: relative;
}

.cta-button {
    display: inline-block;
    background-color: white;
    color: black;
    padding: 0.8rem 2.2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    position: relative;
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .featured-article {
        grid-template-columns: 1fr;
    }
    
    .featured-article-content {
        order: 2;
    }
    
    .featured-image {
        order: 1;
        min-height: 300px;
    }
    
    .articles-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    }
}

@media (max-width: 768px) {
    .archive-title {
        font-size: 2.2rem;
    }
    
    .archive-description {
        font-size: 1.1rem;
    }
    
    .featured-title {
        font-size: 1.7rem;
    }
    
    .featured-article-content {
        padding: 1.5rem;
    }
    
    .container {
        padding: 0 1.5rem;
    }
    
    .knowledge-archive-header {
        padding: 2rem 1rem 1.5rem;
    }
    
    .category-pill {
        font-size: 0.85rem;
        padding: 0.4rem 1rem;
    }
}

@media (max-width: 480px) {
    .archive-title {
        font-size: 1.8rem;
    }
    
    .archive-description {
        font-size: 1rem;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .featured-title {
        font-size: 1.5rem;
    }
    
    .categories-wrapper {
        gap: 0.5rem;
    }
    
    .category-pill {
        font-size: 0.8rem;
        padding: 0.3rem 0.8rem;
    }
    
    .container {
        padding: 0 1rem;
    }
    
    .article-card-image {
        height: 180px;
    }
}

/* Search Indicator */
.search-indicator {
    display: flex;
    align-items: center;
    background-color: #fdba371c;
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 2rem;
    transition: var(--transition);
    animation: slideInDown 0.4s ease forwards;
}



.search-indicator span {
    color: var(--text-secondary);
    margin-right: 0.5rem;
}

.search-indicator strong {
    margin-right: auto;
    background: #fdba37;
    display: inline-block;
    background-color: rgba(249, 186, 55, 0.15);
    color: #7a5900;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 10px;
    letter-spacing: 0.5px;
}

.reset-search {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1.4rem;
    line-height: 1;
    padding: 0.2rem 0.6rem;
    border-radius: 50%;
    transition: var(--transition);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.reset-search:hover:after {
    left: 100%;
}

.reset-search:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background:none!important;
    box-shadow:unset!important; 
    color:black!important;
}

.reset-search:after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
    z-index: -1;
}

/* CSS animations for search transitions */
@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-20px);
        opacity: 0;
    }
}

/* Hide pagination during search */
.articles-grid.searching + .pagination-container {
    display: none;
}

/* Transition for articles in grid */
.articles-grid .article-card {
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform-origin: center;
    will-change: transform, opacity;
}

/* Staggered Animation for Search Results */
.articles-grid .article-card:nth-child(1) { transition-delay: 0.05s; }
.articles-grid .article-card:nth-child(2) { transition-delay: 0.1s; }
.articles-grid .article-card:nth-child(3) { transition-delay: 0.15s; }
.articles-grid .article-card:nth-child(4) { transition-delay: 0.2s; }
.articles-grid .article-card:nth-child(5) { transition-delay: 0.25s; }
.articles-grid .article-card:nth-child(6) { transition-delay: 0.3s; }
.articles-grid .article-card:nth-child(7) { transition-delay: 0.35s; }
.articles-grid .article-card:nth-child(8) { transition-delay: 0.4s; }
.articles-grid .article-card:nth-child(9) { transition-delay: 0.45s; }
.articles-grid .article-card:nth-child(10) { transition-delay: 0.5s; }
.articles-grid .article-card:nth-child(n+11) { transition-delay: 0.55s; }

/* Improved Animation for Loading State */
.articles-grid.loading {
    position: relative;
}

.articles-grid.loading:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.6);
    z-index: 5;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.articles-grid.loading.active:after {
    opacity: 1;
}

.articles-grid.loading .article-card {
    opacity: 0.4;
    transform: scale(0.97);
    pointer-events: none;
    filter: blur(1px);
}

/* Animation for New Search Results */
.articles-grid.refreshed .article-card {
    animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
    opacity: 0;
    transform: translateY(20px) scale(0.98);
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Smooth Slide Animation */
@keyframes slideInDown {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideOutUp {
    from {
        transform: translateY(0);
        opacity: 1;
    }
    to {
        transform: translateY(-20px);
        opacity: 0;
    }
}

/* No Results Found Animation */
.no-results {
    animation: fadeInUp 0.6s ease forwards;
    transform-origin: center;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Empty State Animation */
.no-results svg {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
    100% {
        transform: translateY(0px);
    }
}

/* Typing Effect for Search Field */
.knowledge-search-form .search-field:focus {
    box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
    animation: pulse-border 1.5s infinite;
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 102, 255, 0.4);
    }
    70% {
        box-shadow: 0 0 0 5px rgba(0, 102, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 102, 255, 0);
    }
}

/* Search Button Animation */
.knowledge-search-form .search-submit:hover svg {
    animation: wiggle 0.5s ease;
}

@keyframes wiggle {
    0%, 100% { transform: rotate(0); }
    25% { transform: rotate(-10deg); }
    50% { transform: rotate(0); }
    75% { transform: rotate(10deg); }
}

/* When No Articles Are Found */
.no-results h2 {
    position: relative;
    display: inline-block;
}

.no-results h2:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 2px;
    bottom: -8px;
    left: 0;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.5s ease-out;
    animation: expand 1s ease forwards 0.5s;
}

@keyframes expand {
    from { transform: scaleX(0); transform-origin: bottom left; }
    to { transform: scaleX(1); transform-origin: bottom left; }
}

/* Additional Search Form Animation States */
.knowledge-search-form.focused .search-field {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.1);
    transform: scale(1.01);
}

.knowledge-search-form .search-field.typing {
    background-color: var(--background-accent);
    transition: background-color 0.3s ease;
}

.knowledge-search-form .search-field.submitted {
    animation: pulse 0.4s ease;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

.knowledge-search-form .search-field.initial {
    animation: highlight 1.5s ease;
}

@keyframes highlight {
    0% { background-color: var(--background-accent); }
    100% { background-color: white; }
}

.knowledge-search-form .search-field.navigated {
    animation: flash 0.6s ease;
}

@keyframes flash {
    0% { background-color: rgba(0, 102, 255, 0.1); }
    100% { background-color: white; }
}

/* Enhanced search indicator with animation when updated */
.search-indicator.updated {
    animation: pulse 0.4s ease;
}

/* Search error message style */
.search-error {
    background-color: #fff5f5;
    border-left: 4px solid #e53e3e;
    color: #c53030;
    padding: 1rem 1.5rem;
    margin: 1rem 0;
    border-radius: var(--border-radius);
    animation: slideInDown 0.4s ease forwards;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Search transition helper classes */
.articles-grid.refreshed {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Focus animation for search field */
.knowledge-search-form .search-field:focus {
    animation: gentle-glow 2s infinite alternate;
}

@keyframes gentle-glow {
    from { box-shadow: 0 0 2px rgba(0, 102, 255, 0.2); }
    to { box-shadow: 0 0 8px rgba(0, 102, 255, 0.4); }
}

/* Enhanced Article Card Hover Effects */
.article-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    position: relative;
}

.article-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 30px rgba(0, 0, 0, 0.1);
}

.article-card:after {
    content: "";
    border-radius: var(--border-radius);
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.article-card:hover:after {
    opacity: 1;
}

.article-card:hover .article-card-image img {
    transform: scale(1.05);
}

.article-card-image {
    overflow: hidden;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.article-card-image img {
    transition: transform 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}



.article-card-title a {
    background-image: linear-gradient(transparent 97%, var(--primary-color) 3%);
    background-repeat: no-repeat;
    background-size: 0% 2px;
    background-position: left bottom;
    transition: background-size 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), color 0.4s ease;
}



.article-card-link {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.article-card-link svg {
    transition: transform 0.4s cubic-bezier(0.19, 1, 0.22, 1);
}

.article-card:hover .article-card-link svg {
    transform: translateX(4px);
} 



.read-more-btn:before {
    content: "";
    background-image: url(/wp-content/uploads/2025/02/arrowbg-yellow.svg);
    height: 33px;
    width: 33px;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translatey(-50%);
    z-index: 1;
    background-repeat: no-repeat;
    background-size: contain;
    transition: all 0.3sease-in-out;
}
.read-more-btn:after {
    content: "";
    background-image: url(/wp-content/uploads/2025/02/arrow-right.svg);
    height: 33px;
    width: 33px;
    background-size: initial;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translatey(-50%);
    z-index: 2;
    background-repeat: no-repeat;
    background-position: center center;
    transition: all 0.3sease-in-out;
}

.read-more-btn:hover:after {
    transform: translatey(-50%) rotate(-45deg);
    transition: all 0.3s ease-in-out;

}