/* ===============================
   PULSE NEWS PAGE
================================ */
/* =========================
   HARD FIX: Force Donate button visible on mobile
   ========================= */

@media (max-width: 768px) {

    /* Force ALL standalone buttons visible */
    a.btn {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }

    /* Specifically target Donate button */
    a[href="donate/index.php"] {
        display: flex !important;
        width: 100% !important;
        margin-top: 2rem !important;
        justify-content: center;
        align-items: center;
        z-index: 9999 !important;
        position: relative !important;
    }

    /* Kill parent clipping */
    .hero,
    .hero-section,
    .give-back,
    .container,
    .center {
        overflow: visible !important;
        height: auto !important;
        max-height: none !important;
    }
}

.news-wrapper {
    padding: 6rem 0;
}

/* Filters */
.category-filter {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 3rem 0;
    flex-wrap: wrap;
}

.category-btn {
    border: 2px solid var(--color-primary);
    background: transparent;
    color: var(--color-primary);
    padding: .5rem 1.6rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
}

.category-btn.active,
.category-btn:hover {
    background: var(--color-primary);
    color: #fff;
}

/* Grid */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2.5rem;
}
/* MAIN GRID (sections only) */
.news-grid {
    display: grid;
    grid-template-columns: 1fr;
}

/* CARD GRIDS */
#our-news,
#pulse-news {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
}

/* Large screens */
@media (min-width: 1200px) {
    #our-news,
    #pulse-news {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Tablets */
@media (max-width: 991px) {
    #our-news,
    #pulse-news {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Phones */
@media (max-width: 600px) {
    #our-news,
    #pulse-news {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
/* Make child containers span full grid width */
#our-news,
#pulse-news {
    grid-column: 1 / -1;
}

/* Card */
.news-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
    display: flex;
    flex-direction: column;
    transition: .3s;
}

.news-card:hover {
    transform: translateY(-6px);
}

/* Image */
.news-image {
    height: 220px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.category-tag {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: .75rem;
    font-weight: 700;
    color: #fff;
    background: var(--color-primary);
}

/* Content */
.news-content {
    padding: 1.6rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.news-date {
    font-size: .8rem;
    color: #888;
    margin-bottom: .6rem;
}

.news-summary {
    font-size: .95rem;
    color: #555;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-card.expanded .news-summary {
    -webkit-line-clamp: unset;
}

.read-more-btn {
    margin-top: auto;
    background: none;
    border: none;
    color: var(--color-primary);
    font-weight: 700;
    cursor: pointer;
}

/* Admin badge */
.our-news {
    background: #111;
}

/* Loader */
.loading-spinner {
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem;
    display: none;
}

.loading-spinner i {
    font-size: 2.5rem;
    animation: spin 1s linear infinite;
}

@keyframes  spin {
    to { transform: rotate(360deg); }
}
