/* GNews Fetcher Plugin Styles */

.gnews-articles {
    display: grid;
    gap: 20px;
    margin: 20px 0;
}

.gnews-article {
    background: #ffffff;
    border: 1px solid #e1e5e9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gnews-article:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.gnews-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

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

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

.gnews-content {
    padding: 20px;
}

.gnews-title {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
}

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

.gnews-title a:hover {
    color: #3498db;
}

.gnews-description {
    color: #666;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 15px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gnews-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #888;
    border-top: 1px solid #f0f0f0;
    padding-top: 12px;
}

.gnews-source {
    font-weight: 500;
    color: #3498db;
}

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

/* Responsive Design */
@media (min-width: 768px) {
    .gnews-articles {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

@media (min-width: 1024px) {
    .gnews-articles {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

/* Single column layout for mobile */
@media (max-width: 767px) {
    .gnews-article {
        margin-bottom: 15px;
    }
    
    .gnews-content {
        padding: 15px;
    }
    
    .gnews-title {
        font-size: 1.1rem;
    }
    
    .gnews-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* Loading state */
.gnews-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.gnews-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Error state */
.gnews-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    margin: 20px 0;
}

/* No articles state */
.gnews-no-articles {
    text-align: center;
    padding: 40px;
    color: #666;
    font-style: italic;
}

/* Admin page styles */
.gnews-admin .card {
    margin-bottom: 20px;
}

.gnews-admin .notice {
    margin: 10px 0;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .gnews-article {
        background: #2c3e50;
        border-color: #34495e;
        color: #ecf0f1;
    }
    
    .gnews-title a {
        color: #ecf0f1;
    }
    
    .gnews-title a:hover {
        color: #3498db;
    }
    
    .gnews-description {
        color: #bdc3c7;
    }
    
    .gnews-meta {
        border-top-color: #34495e;
        color: #95a5a6;
    }
}