/* =========================================================
   NEWS PAGE STYLES (template-news.php)
   ========================================================= */

.news-page-wrapper {
    padding-top: 50px;
    padding-bottom: 100px;
}

/* Master Grid */
.news-feed-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    align-items: stretch;
}

@media (max-width: 1280px) {
    .news-feed-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .news-feed-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .news-feed-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================
   NEWS CARDS (REVIEW STYLE)
   ========================================= */

.news-card {
    background-color: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.news-card-image {
    width: 100%;
    margin: 0;
    padding: 0;
    position: relative;
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    aspect-ratio: 16 / 9;
    max-height: 220px;
    display: block;
}

.news-card-image.fallback-image {
    background-color: #f1f5f9; /* Soft gray-blue background */
    height: 220px;
}

.news-card-image.fallback-image a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.news-card-image.fallback-image img {
    width: auto;
    height: auto;
    max-height: 50px;
    max-width: 60%;
    object-fit: contain;
    opacity: 0.5;
    filter: grayscale(100%); /* Optional: makes logo subtle */
}

.fallback-placeholder-text {
    font-size: 24px;
    font-weight: 800;
    color: #cbd5e1;
    letter-spacing: 2px;
}

.news-date-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #ffffff;
    color: #1e3a8a;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.news-card-content {
    padding: 25px 25px 30px 25px;
    color: var(--text, #4b5563);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-card-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
    height: 81px; /* 3 lines fixed: 20px * 1.35 * 3 */
    margin: 0 0 15px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-title a {
    color: var(--heading, #111827);
    text-decoration: none;
    transition: color 0.2s ease;
}

.news-card-title a:hover {
    color: #4086F4;
}

.news-card-excerpt {
    font-size: 15px;
    line-height: 1.6;
    height: 72px; /* 3 lines fixed: 15px * 1.6 * 3 */
    color: var(--text, #4b5563);
    margin-bottom: 10px;
    font-family: 'Inter', sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card-disclaimer {
    font-size: 11.5px;
    line-height: 1.5;
    color: #4086F4;
    font-style: italic;
    margin-bottom: 25px;
    opacity: 0.85;
}

.news-source-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 10px 16px;
    background-color: #f8f9fa;
    color: #4086F4;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    border-radius: 6px;
    border: 1px solid rgba(64, 134, 244, 0.2);
    transition: all 0.2s ease;
}

.news-source-btn:hover {
    background-color: #4086F4;
    color: #ffffff;
    border-color: #4086F4;
}

/* =========================================
   PAGINATION (Aligned with Reviews)
   ========================================= */
.custom-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
}

.custom-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #f8f9fa;
    color: #4b5563;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.custom-pagination .page-numbers:hover {
    background: #4086F4;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(64, 134, 244, 0.15);
}

.custom-pagination .page-numbers.current {
    background: #4086F4;
    color: white;
    border-color: #4086F4;
    box-shadow: 0 5px 15px rgba(64, 134, 244, 0.2);
}
