/* ==========================================================================
   1. Admin Panel Styles
   ========================================================================== */
   .partner-news-aggregator-admin .source-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #fff;
    border: 1px solid #ccd0d4;
    border-radius: 4px;
}

.site-entry {
    margin-bottom: 15px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.site-inputs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 10px;
}

.site-inputs input[type="text"],
.site-inputs input[type="url"] {
    flex: 1;
    min-width: 200px;
}

.site-options {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 20px;
}

.site-options label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-options input[type="number"] {
    width: 80px;
}

/* Admin Status Messages */
.status-message {
    display: inline-block;
    margin-left: 10px;
    padding: 5px 10px;
    border-radius: 3px;
    line-height: 28px;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
}

/* Admin Debug Info */
.fetch-debug-info {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
}

/* Articles Manager */
.articles-manager .wp-list-table {
    margin-top: 15px;
}

.articles-manager .row-actions {
    visibility: hidden;
    padding: 2px 0;
}

.articles-manager tr:hover .row-actions {
    visibility: visible;
}

/* ==========================================================================
   2. News Feed Layout
   ========================================================================== */
.partner-news-feed {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

/* Article Layout */
.news-item {
    margin-bottom: 3rem;
    padding-bottom: 3rem;
    border-bottom: 1px solid #eee;
}

.news-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.news-item-inner {
    display: grid;
    grid-template-columns: minmax(200px, 300px) 1fr;
    gap: 2rem;
    align-items: start;
}

/* Thumbnail Styles */
.news-thumbnail {
    position: relative;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 4/3;
}

.news-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.news-thumbnail:hover img {
    transform: scale(1.05);
}

/* Content Styles */
.news-content {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0;
}

.news-title {
    font-size: 1.4rem;
    line-height: 1.3;
    margin: 0 0 0.5rem;
}

.news-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-title a:hover {
    color: #0073aa;
}

.news-meta {
    font-size: 0.9rem;
    color: #666;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
}

.news-source {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.source-link {
    color: #0073aa;
    text-decoration: none;
    font-size: 0.85rem;
}

.source-link:hover {
    text-decoration: underline;
}

.entry-content {
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
}

/* Read More Button */
.read-more-container {
    margin-top: 1rem;
}

.read-more {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    background: #0073aa;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background 0.2s ease;
    border: none;
}

.read-more:hover {
    background: #005177;
    color: white;
}

/* Pagination */
.news-pagination,
.partner-news-feed .navigation.pagination {
    margin-top: 3rem;
    text-align: center;
}

.nav-links {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.page-numbers {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #0073aa;
}

.page-numbers.current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

.page-numbers:hover:not(.current) {
    background: #f5f5f5;
}

/* Error States */
.news-thumbnail.error {
    position: relative;
    background-color: #f8f9fa;
}

.news-thumbnail.error::before {
    content: "News";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 1.2em;
    color: #6c757d;
}

/* Utility Classes */
.hidden {
    display: none !important;
}

/* ==========================================================================
   3. Responsive Design
   ========================================================================== */
@media (max-width: 768px) {
    .news-item-inner {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .news-thumbnail {
        max-width: 100%;
    }

    .news-title {
        font-size: 1.3rem;
    }
    
    .partner-news-feed.grid-layout .news-items {
        grid-template-columns: 1fr;
    }
}

/* Placeholder Styles */
.news-thumbnail.placeholder {
    background-color: #f5f7fa;
    position: relative;
    min-height: 200px;
}

.placeholder-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, #f5f7fa 25%, #e4e7eb 25%, #e4e7eb 50%, #f5f7fa 50%, #f5f7fa 75%, #e4e7eb 75%, #e4e7eb);
    background-size: 20px 20px;
    border-radius: 8px;
}

.placeholder-text {
    background: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #555;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    max-width: 80%;
    text-align: center;
    word-break: break-word;
}

/* Hover effect for placeholder */
.news-thumbnail.placeholder:hover .placeholder-image {
    background-position: 20px 20px;
    transition: background-position 0.3s ease;
}

/* Grid Layout Styles */
.partner-news-feed.grid-layout .news-items {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.partner-news-feed.grid-layout .news-item {
    margin-bottom: 0;
    padding-bottom: 0;
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
}

.partner-news-feed.grid-layout .news-item-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.partner-news-feed.grid-layout .news-thumbnail {
    width: 100%;
    margin-right: 0;
}

.partner-news-feed.grid-layout .news-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.partner-news-feed.grid-layout .news-title {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.partner-news-feed.grid-layout .entry-content {
    flex: 1;
}

.partner-news-feed.grid-layout .read-more-container {
    margin-top: 1.5rem;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .partner-news-feed.grid-layout .news-items {
        grid-template-columns: 1fr;
    }
}