/* DailyBspark News Portal — Frontend Styles */
.dnpp-news-grid { width: 100%; margin: 0 auto; }
.dnpp-grid-inner {
    display: grid;
    grid-template-columns: repeat(var(--cols, 3), 1fr);
    gap: 20px;
}
.dnpp-news-grid[data-columns="1"] .dnpp-grid-inner { --cols: 1; }
.dnpp-news-grid[data-columns="2"] .dnpp-grid-inner { --cols: 2; }
.dnpp-news-grid[data-columns="3"] .dnpp-grid-inner { --cols: 3; }
.dnpp-news-grid[data-columns="4"] .dnpp-grid-inner { --cols: 4; }

/* News Card */
.dnpp-news-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.2s;
    display: flex;
    flex-direction: column;
}
.dnpp-news-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    transform: translateY(-3px);
}

/* Card Image */
.dnpp-card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #f0f0f0;
}
.dnpp-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s;
}
.dnpp-news-card:hover .dnpp-card-image img { transform: scale(1.05); }

/* Category Pill */
.dnpp-category-pill {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.dnpp-category-pill a { color: #fff !important; text-decoration: none; }

/* Viral Badge */
.dnpp-viral-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(255,0,0,0.9);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: bold;
}

/* Card Body */
.dnpp-card-body { padding: 16px; flex: 1; display: flex; flex-direction: column; }
.dnpp-card-title {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 8px;
}
.dnpp-card-title a { color: #1a1a1a; text-decoration: none; }
.dnpp-card-title a:hover { color: #2196F3; }
.dnpp-card-excerpt {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin: 0 0 12px;
    flex: 1;
}

/* Card Meta */
.dnpp-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #888;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}
.dnpp-card-date .dashicons { font-size: 12px; width: 12px; height: 12px; }
.dnpp-card-source { font-weight: 600; }

/* Region Tags */
.dnpp-card-regions { margin-top: 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.dnpp-region-tag {
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 10px;
    background: #e3f2fd;
    color: #1565c0;
}

/* Load More */
.dnpp-load-more-wrap { text-align: center; padding: 30px 0; }
.dnpp-load-more {
    background: #2196F3;
    color: #fff;
    border: none;
    padding: 12px 40px;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}
.dnpp-load-more:hover { background: #1976D2; }
.dnpp-load-more:disabled { opacity: 0.6; cursor: default; }

/* News Ticker */
.dnpp-news-ticker {
    display: flex;
    align-items: center;
    background: #1a1a2e;
    color: #fff;
    padding: 0 15px;
    height: 40px;
    border-radius: 8px;
    overflow: hidden;
    margin: 10px 0;
}
.dnpp-ticker-label {
    background: #e91e63;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
    white-space: nowrap;
    margin-right: 15px;
}
.dnpp-ticker-content {
    flex: 1;
    overflow: hidden;
    white-space: nowrap;
}
.dnpp-ticker-track {
    display: inline-block;
    animation: dnpp-ticker-scroll linear infinite;
    white-space: nowrap;
}
@keyframes dnpp-ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
.dnpp-ticker-item {
    margin-right: 40px;
    font-size: 14px;
}
.dnpp-ticker-item a { color: #fff; text-decoration: none; }
.dnpp-ticker-item a:hover { color: #90caf9; }

/* Search */
.dnpp-search-wrap { max-width: 800px; margin: 20px auto; }
.dnpp-search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.dnpp-search-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 25px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s;
}
.dnpp-search-input:focus { border-color: #2196F3; }
.dnpp-search-btn {
    background: #2196F3;
    color: #fff;
    border: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.dnpp-search-btn:hover { background: #1976D2; }
.dnpp-search-filters {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.dnpp-search-filters select {
    padding: 8px 12px;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    font-size: 14px;
    background: #fff;
}
.dnpp-search-results { margin-top: 20px; }
.dnpp-no-results { text-align: center; padding: 30px; color: #999; font-size: 15px; }

/* Categories Grid */
.dnpp-categories-grid {
    display: grid;
    grid-template-columns: repeat(var(--dnpp-cat-columns, 4), 1fr);
    gap: 12px;
}
.dnpp-category-card {
    border-left: 4px solid #ccc;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: box-shadow 0.3s;
}
.dnpp-category-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.12); }
.dnpp-category-card a { text-decoration: none; color: #333; }
.dnpp-cat-name { display: block; font-weight: 700; font-size: 15px; }
.dnpp-cat-count { font-size: 13px; color: #888; }

/* No News */
.dnpp-no-news { text-align: center; padding: 40px; color: #999; }

/* Responsive */
@media (max-width: 768px) {
    .dnpp-grid-inner { grid-template-columns: 1fr 1fr; gap: 12px; }
    .dnpp-categories-grid { grid-template-columns: 1fr 1fr; }
    .dnpp-card-title { font-size: 14px; }
    .dnpp-card-excerpt { font-size: 13px; }
}
@media (max-width: 480px) {
    .dnpp-grid-inner { grid-template-columns: 1fr; }
    .dnpp-categories-grid { grid-template-columns: 1fr; }
    .dnpp-search-filters { flex-direction: column; }
}
