/* Article Filter Component Styles - Agricultural Blog Design */
.aaf-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    /*background: #f8f9fa;*/
}

.aaf-main-container {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 40px;
    padding: 0;
    /*background: #f8f9fa;*/
}

.aaf-content-area {
    background: transparent;
    padding: 0;
}

/* Loading Indicator */
.aaf-loading {
    text-align: center;
    padding: 3rem;
    color: #6b7280;
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
}

.aaf-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #f7c35f;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Articles List */
.aaf-articles-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Article Item */
.aaf-article-item {
    background: white;
    margin-bottom: 0;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid #e5e7eb;
    /*padding-bottom: 40px;*/
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

.aaf-article-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

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

.aaf-article-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: #f8f9fa;
    border-radius: 8px;
    /*margin-bottom: 20px;*/
}

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

.aaf-article-item:hover .aaf-article-image img {
    transform: scale(1.02);
}

.aaf-article-content {
    padding: 50px;
}

.aaf-article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #6b7280;
}

.aaf-article-author {
    color: #6b7280;
    font-weight: 500;
}

.aaf-article-date {
    color: #6b7280;
}

.aaf-article-title {
    margin: 0 0 20px 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: #1f2937;
}

.aaf-article-title a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.aaf-article-title a:hover {
    color: #374151;
}

.aaf-article-excerpt {
    color: #6b7280;
    line-height: 1.7;
    margin-bottom: 25px;
    font-size: 16px;
}

.aaf-article-actions {
    margin-top: 25px;
}

.aaf-learn-more-btn {
    display: inline-block;
    background: #f7c35f;
    color: #04000b;
    padding: 17px 45px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    font-size: 18px;
    transition: all 0.3s ease;
    text-transform: none;
}

.aaf-learn-more-btn:hover {
    background: #7e925c;
    color: white;
    transform: translateY(-1px);
}

/* Sidebar */
.aaf-sidebar {
    background: transparent;
    padding: 0;
    height: fit-content;
    position: sticky;
    top: 20px;
}

.aaf-sidebar-widget {
    position: relative;
    background-color: #f4f5f8;
    border-radius: 8px;
    padding: 40px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.aaf-sidebar-widget:last-child {
    margin-bottom: 0;
}

.aaf-search-widget{
    position: relative;
}
.aaf-widget-title::after{
    position: absolute;
    top: 75px;
    left: 40px;
    bottom: 0;
    content: "";
    height: 2px;
    width: 50px;
    background:  #7e925c
}

.aaf-widget-title {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 30px;
    padding-bottom: 10px;
    border-bottom: none;
}

/* Search Widget */
.aaf-search-form {
    position: relative;
}

.aaf-search-input {
    width: 100%;
    padding: 12px 45px 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.aaf-search-input:focus {
    outline: none;
    border-color: #f7c35f;
    background: white;
}

.aaf-search-btn {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6b7280;
    cursor: pointer;
    padding: 8px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.aaf-search-btn:hover {
    color: #f7c35f;
}

.aaf-search-btn svg {
    width: 18px;
    height: 18px;
}

/* Recent Posts Widget */
.aaf-recent-posts {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.aaf-recent-post-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.aaf-recent-post-image {
    width: 60px;
    height: 60px;
    border-radius: 6px;
    overflow: hidden;
    flex-shrink: 0;
    background: #f8f9fa;
}

.aaf-recent-post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.aaf-recent-post-content {
    flex: 1;
}

.aaf-recent-post-content h4 {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
}

.aaf-recent-post-content h4 a {
    color: #1f2937;
    text-decoration: none;
    transition: color 0.3s ease;
}

.aaf-recent-post-content h4 a:hover {
    color: #f7c35f;
}

/* Tags Widget */
.aaf-tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.aaf-tag-filter {
    background: #f8f9fa;
    border: 1px solid #e5e7eb;
    color: #6b7280;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
    font-weight: 500;
}

.aaf-tag-filter:hover,
.aaf-tag-filter.active {
    background: #f7c35f;
    border-color: #f7c35f;
    color: white;
}

/* Categories Widget */
.aaf-categories-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.aaf-category-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
}

.aaf-category-item:last-child {
    border-bottom: none;
}

.aaf-tag-filter:hover::after{
    background-color: transparent;
    transition: none;
    transform: none;
}

.aaf-tag-filter::after{
    background-color: transparent;
    transition: none;
    transform: none;
}

.aaf-search-btn:hover::after{
    background-color: transparent;
    transition: none;
    transform: none;
}

.aaf-search-btn::after{
    background-color: transparent;
    transition: none;
    transform: none;
}

.aaf-category-filter:hover::after{
    background-color: transparent;
    transition: none;
    transform: none;
}

.activeCategory{
    color: #7e925c!important;
}

.aaf-category-filter::after{
    background-color: transparent;
    transition: none;
    transform: none;
}

.aaf-category-filter {
    background: none;
    border: none;
    color: #374151;
    cursor: pointer;
    font-size: 16px;
    transition: color 0.3s ease;
    text-align: left;
    padding: 0;
    font-weight: 600;
}

.aaf-category-filter:hover {
    color: #7e925c;
    /*background-color: #f7c35f;*/
}

.aaf-category-count {
    background: #f1f3f4;
    color: #6b7280;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

/* Pagination */
.aaf-pagination-wrapper {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid #e5e7eb;
}

.aaf-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.aaf-page-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e5e7eb;
    background: white;
    color: #6b7280;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.aaf-page-btn:hover {
    border-color: #f7c35f;
    background: #f7c35f;
    color: white;
}

.aaf-page-btn.active {
    background: #1f2937;
    border-color: #1f2937;
    color: white;
}

.aaf-prev-btn,
.aaf-next-btn {
    font-size: 18px;
}

/* No Results */
.aaf-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    background: white;
    border-radius: 8px;
}

.aaf-no-results h3 {
    font-size: 24px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 10px;
}

.aaf-no-results p {
    font-size: 16px;
    line-height: 1.5;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .aaf-main-container {
        grid-template-columns: 1fr 300px;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .aaf-wrapper {
        padding: 20px;
    }

    .aaf-main-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .aaf-sidebar {
        order: -1;
        position: static;
    }

    .aaf-article-title {
        font-size: 24px;
    }

    .aaf-article-image {
        height: 250px;
    }

    .aaf-sidebar-widget {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .aaf-wrapper {
        padding: 15px;
    }

    .aaf-article-image {
        height: 200px;
    }

    .aaf-article-title {
        font-size: 20px;
    }

    .aaf-sidebar-widget {
        padding: 15px;
    }

    .aaf-recent-post-item {
        flex-direction: column;
        text-align: center;
    }

    .aaf-recent-post-image {
        width: 80px;
        height: 80px;
        margin: 0 auto;
    }

    .aaf-pagination {
        gap: 4px;
    }

    .aaf-page-btn {
        width: 36px;
        height: 36px;
        font-size: 13px;
    }
}

/* Animation delays for staggered effect */
.aaf-article-item:nth-child(1) {
    animation-delay: 0.1s;
}
.aaf-article-item:nth-child(2) {
    animation-delay: 0.2s;
}
.aaf-article-item:nth-child(3) {
    animation-delay: 0.3s;
}
.aaf-article-item:nth-child(4) {
    animation-delay: 0.4s;
}
.aaf-article-item:nth-child(5) {
    animation-delay: 0.5s;
}
.aaf-article-item:nth-child(6) {
    animation-delay: 0.6s;
}

/* Focus styles for accessibility */
.aaf-search-input:focus,
.aaf-page-btn:focus,
.aaf-tag-filter:focus,
.aaf-category-filter:focus,
.aaf-learn-more-btn:focus {
    outline: 2px solid #f7c35f;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .aaf-article-item {
        border: 2px solid #000;
    }

    .aaf-search-input {
        border-color: #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .aaf-article-item,
    .aaf-article-image img,
    .aaf-spinner,
    .aaf-learn-more-btn {
        animation: none;
        transition: none;
    }

    .aaf-article-item:hover .aaf-article-image img,
    .aaf-learn-more-btn:hover {
        transform: none;
    }
}

/* Screen reader only */
.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}
