/* News API Widget Styles - WordPress Compatible */
.news-api-widget-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.news-api-header {
    text-align: center;
    color: #333;
    margin-bottom: 40px;
    padding: 30px 0;
}

.news-api-header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: #333;
}

.news-api-subtitle {
    font-size: 1.2rem;
    color: #666;
}

.news-api-search-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
}

.news-api-search-container {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

#newsApiSearchInput {
    flex: 1;
    padding: 15px 20px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.3s;
}

#newsApiSearchInput:focus {
    border-color: #667eea;
}

.news-api-search-section button {
    padding: 15px 30px;
    font-size: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
}

.news-api-search-section button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.news-api-search-section button:active {
    transform: translateY(0);
}

.news-api-filter-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.news-api-filter-container select {
    padding: 15px 20px;
    font-size: 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    outline: none;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s;
    flex: 1;
    min-width: 150px;
}

.news-api-filter-container select:focus {
    border-color: #667eea;
}

.news-api-loading {
    text-align: center;
    padding: 40px;
    color: #333;
}

.news-api-spinner {
    border: 4px solid rgba(102, 126, 234, 0.3);
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: news-api-spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes news-api-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.news-api-error {
    background: #ff6b6b;
    color: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 500;
}

.news-api-error.news-api-hidden {
    display: none;
}

.news-api-hidden {
    display: none;
}

.news-api-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.news-api-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
}

.news-api-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.news-api-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.news-api-content {
    padding: 20px;
}

.news-api-source {
    display: inline-block;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.news-api-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
    line-height: 1.4;
}

.news-api-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-api-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: #999;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.news-api-date {
    display: flex;
    align-items: center;
    gap: 5px;
}

.news-api-read-more {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.news-api-read-more:hover {
    color: #764ba2;
}

.news-api-refresh-indicator {
    background: #f0f4ff;
    color: #667eea;
    padding: 12px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.9rem;
    border-left: 4px solid #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.news-api-new-notification {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    animation: news-api-slide-down 0.3s ease-out;
}

@keyframes news-api-slide-down {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .news-api-header h1 {
        font-size: 2rem;
    }

    .news-api-search-container {
        flex-direction: column;
    }

    .news-api-filter-container {
        flex-direction: column;
    }

    .news-api-container {
        grid-template-columns: 1fr;
    }

    .news-api-refresh-indicator {
        font-size: 0.8rem;
        padding: 10px 15px;
    }
}

