/* Beekeeping News Aggregator - Frontend Styles */

.beekeeping-news-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.bna-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.bna-title {
    color: #2c3e50;
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.bna-title::before {
    content: "🐝";
    font-size: 32px;
}

.bna-filters {
    display: flex;
    gap: 20px;
    align-items: center;
    flex-wrap: wrap;
}

.bna-category-tabs {
    display: flex;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 4px;
    gap: 2px;
}

.bna-tab {
    background: transparent;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    color: #6c757d;
    transition: all 0.2s ease;
}

.bna-tab:hover {
    background: #e9ecef;
    color: #495057;
}

.bna-tab.active {
    background: #007cba;
    color: white;
    box-shadow: 0 2px 4px rgba(0, 124, 186, 0.2);
}

.bna-date-filter {
    padding: 8px 12px;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    background: white;
    color: #495057;
    font-size: 14px;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

.bna-date-filter:focus {
    outline: none;
    border-color: #007cba;
}

.bna-loading {
    text-align: center;
    padding: 40px;
    color: #6c757d;
}

.bna-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #007cba;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

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

.bna-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.bna-news-item {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.bna-news-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.bna-news-image {
    position: relative;
    height: 200px;
    overflow: hidden;
}

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

.bna-news-item:hover .bna-news-image img {
    transform: scale(1.05);
}

.bna-category-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bna-category-news {
    background: #007cba;
    color: white;
}

.bna-category-research {
    background: #28a745;
    color: white;
}

.bna-category-courses {
    background: #ffc107;
    color: #212529;
}

.bna-news-content {
    padding: 20px;
}

.bna-news-title {
    margin: 0 0 12px 0;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

.bna-news-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.2s ease;
}

.bna-news-title a:hover {
    color: #007cba;
}

.bna-news-summary {
    color: #6c757d;
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.bna-news-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #868e96;
    padding-top: 16px;
    border-top: 1px solid #f1f3f4;
}

.bna-source {
    font-weight: 600;
    color: #495057;
}

.bna-date {
    font-style: italic;
}

.bna-no-news {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.bna-no-news-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.bna-no-news h4 {
    font-size: 24px;
    color: #495057;
    margin: 0 0 12px 0;
}

.bna-no-news p {
    font-size: 16px;
    margin: 0;
}

.bna-load-more {
    text-align: center;
    margin-top: 40px;
}

.bna-load-more-btn {
    background: #007cba;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bna-load-more-btn:hover {
    background: #005a87;
    transform: translateY(-1px);
}

.bna-load-more-btn:disabled {
    background: #6c757d;
    cursor: not-allowed;
    transform: none;
}

/* Responsive Design */
@media (max-width: 768px) {
    .beekeeping-news-container {
        padding: 15px;
    }
    
    .bna-header {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }
    
    .bna-filters {
        justify-content: center;
        flex-direction: column;
        gap: 15px;
    }
    
    .bna-news-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .bna-category-tabs {
        justify-content: center;
    }
    
    .bna-tab {
        padding: 8px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .bna-title {
        font-size: 24px;
    }
    
    .bna-news-content {
        padding: 16px;
    }
    
    .bna-news-title {
        font-size: 16px;
    }
    
    .bna-news-summary {
        font-size: 13px;
    }
}

/* Animation for filtering */
.bna-news-item.filtering {
    opacity: 0.5;
    transform: scale(0.95);
}

.bna-news-item.hidden {
    display: none;
}

/* Accessibility improvements */
.bna-tab:focus,
.bna-date-filter:focus,
.bna-load-more-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    .bna-filters,
    .bna-load-more {
        display: none;
    }
    
    .bna-news-item {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}