/* =========================================
   VAIKOM VARTHA: CUSTOM NEWS LIST PAGE
   ========================================= */

:root {
    --vibrant-red: #d32f2f;
    --vibrant-dark: #2c3e50;
    --vibrant-gold: #f39c12;
    --heavy-shadow: 0 4px 15px rgba(0,0,0,0.08);
    --hover-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.news-portal-main { background-color: #fcfcfc; }
.news-portal-main .container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }

/* --- Section Heading --- */
.section-header {
    position: relative;
    margin: 50px 0 80px;
    display: flex;
    flex-direction: column;
}

.heading-underline {
    display: block;
    width: 150px; /* Length of the underline */
    height: 4px; /* Thickness */
    background: #d32f2f; /* Vibrant red color */
    margin-top: 5px;
    border-radius: 2px;
}
/* --- LIST STYLES --- */
.news-list-container { position: relative; z-index: 10; }
.vibrant-news-list-wrapper { display: flex; flex-direction: column; gap: 30px; }

/* DISPLAY FLEX ON THE CARD ITSELF */
.vibrant-list-card {
    display: flex;
    align-items: stretch;
    min-height: 220px;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--heavy-shadow);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    border-left: 5px solid transparent;
}

.vibrant-list-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
    border-left: 5px solid var(--vibrant-red);
}

/* 1. FIXED IMAGE CONTAINER */
.vibrant-card-image-wrap {
    flex: 0 0 320px; 
    width: 320px;
    background-color: #000; 
    position: relative;
    overflow: hidden;
}

.vibrant-card-img {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    transition: opacity 0.3s ease;
}

.vibrant-list-card:hover .vibrant-card-img { opacity: 0.85; }

/* New Header Tag Style */
.header-tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: white;
    margin-right: 10px;
}

/* Specific Tag Colors (Scoped) */
.news-portal-main .tag-politics { background-color: #d32f2f !important; }
.news-portal-main .tag-sports { background-color: #228be6 !important; }
.news-portal-main .tag-health { background-color: #27ae60 !important; }
.news-portal-main .tag-business { background-color: #1976d2 !important; }
.news-portal-main .tag-latest-report { background-color: #9c27b0 !important; }
.news-portal-main .tag-local-news { background-color: #d26f19 !important; }
.news-portal-main .tag-national-news { background-color: #d21991 !important; }

/* --- Content Area --- */
.vibrant-card-content {
    flex: 1;
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Link Wrapping the Text */
.vibrant-text-link {
    display: flex;
    flex-direction: column;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.vibrant-card-header {
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Aligned to the left */
    gap: 10px;
    margin-bottom: 12px;
}

.post-time { font-size: 0.95rem; color: var(--vibrant-red); font-weight: 800; letter-spacing: 0.5px; }
.post-date-highlight { background: #fff3e0; color: #e65100; padding: 4px 10px; border-radius: 4px; font-size: 0.8rem; font-weight: 700; border: 1px solid #ffe0b2; }

/* Heading Hover Styles */
.vibrant-card-title {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 10px 0 15px 0;
    line-height: 1.35;
    color: var(--vibrant-dark);
    transition: color 0.3s ease; 
}

.vibrant-list-card:hover .vibrant-card-title { color: #e74c3c; }

/* Three-Line Excerpt Clamp */
.vibrant-card-excerpt {
    font-size: 1.4rem;
    color: #555;
    line-height: 1.6;
    margin: 0 0 15px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Footer & Share */
.vibrant-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.footer-author { font-weight: 600; color: #888; font-size: 0.9rem; }
.footer-share-actions { display: flex; align-items: center; gap: 10px; }

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: white;
    transition: transform 0.2s ease;
}
.share-btn:hover { transform: scale(1.15); }
.share-btn svg { width: 14px; height: 14px; }

.share-btn.wa { background-color: #25D366; }
.share-btn.fb { background-color: #1877F2; }
.share-btn.x { background-color: #000000; }
.share-btn.ig { background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%); }

.share-text { display: flex; align-items: center; gap: 5px; font-size: 0.85rem; font-weight: 600; color: #888; margin-left: 5px; }

/* --- PAGINATION --- */
.news-list-pagination {
    margin: 50px 0 80px; /* Large bottom margin for spacing from footer */
    display: flex;
    justify-content: center;
}

/* --- ENTRANCE ANIMATIONS --- */
.fade-in-up { opacity: 0; transform: translateY(30px); animation: fadeInUpHeavy 0.6s ease forwards; }
@keyframes fadeInUpHeavy { to { opacity: 1; transform: translateY(0); } }

.vibrant-list-card:nth-child(1) { animation-delay: 0.1s; }
.vibrant-list-card:nth-child(2) { animation-delay: 0.2s; }
.vibrant-list-card:nth-child(3) { animation-delay: 0.3s; }
.vibrant-list-card:nth-child(4) { animation-delay: 0.4s; }
.vibrant-list-card:nth-child(5) { animation-delay: 0.5s; }
.vibrant-list-card:nth-child(n+6) { animation-delay: 0.6s; }

/* --- NEW: "Load More" Button Styles --- */
.news-list-pagination {
    margin: 50px 0 80px;
    display: flex;
    justify-content: center; /* Centers the button */
}

/* The button itself */
.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: #1a1a1a; /* Dark background from reference */
    color: #ffffff !important; /* White text */
    padding: 14px 35px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

/* Hover effect */
.load-more-btn:hover {
    background-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* The download icon style */
.load-more-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    transition: transform 0.3s ease;
}

.load-more-btn:hover .load-more-icon {
    transform: translateY(3px); /* Small animation on hover */
}

/* Hide the default "Page 1 of X" text */
.page-number {
    display: none;
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 900px) {
    .vibrant-list-card { flex-direction: column; min-height: auto; }
    .vibrant-card-image-wrap { width: 100%; flex: 0 0 250px; height: 250px; }
}

@media (max-width: 600px) {
    /* 1. Remove container padding for edge-to-edge fill */
    .news-portal-main .container { 
        padding: 0; 
    }
    
    /* 2. Add padding back to header and pagination so they don't touch the screen edge */
    .section-header { 
        padding: 0 20px; 
    }
    .news-list-pagination { 
        padding: 0 20px; 
    }

    /* 3. Make the cards completely flat and edge-to-edge */
    .vibrant-list-card { 
        border-radius: 0; 
        border-left: none; /* Remove left highlight bar on mobile for full width */
        border-right: none;
        box-shadow: 0 4px 10px rgba(0,0,0,0.05); /* Softer shadow for stacked mobile feed */
    }

    /* 4. Reduce gap between cards for a tighter mobile feed */
    .vibrant-news-list-wrapper { 
        gap: 15px; 
    }

    /* 5. Internal Card Adjustments */
    .vibrant-card-image-wrap { 
        flex: 0 0 220px; /* Slightly taller image on mobile */
        height: 220px; 
        width: 100%;
    }
    .vibrant-card-content { 
        padding: 20px; 
    }
    .vibrant-card-title { 
        font-size: 1.4rem; 
        margin-top: 5px; 
    }
    .vibrant-card-excerpt { 
        -webkit-line-clamp: 2; /* Drops to 2 lines on small phones */
    } 
    .vibrant-card-footer { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 15px; 
    }
    .footer-share-actions { 
        width: 100%; 
        justify-content: flex-start; 
    }
}