/* File: assets/css/home.css */

/* Shared Post List Styles */
.post-list {
    list-style: none;
    padding: 0;
    margin: 0;
    overflow-y: auto;
    flex-grow: 1;
}

.post-list li {
    border-bottom: 1px dashed var(--border);
}

.post-list li a {
    display: flex;
    align-items: center;
    padding: 12px 10px;
    font-size: 0.95rem;
    color: var(--link-color);
}

.post-list li a:hover {
    background: var(--bg-hover);
}

.post-list li a:visited {
    color: var(--link-color-visited); /* Gray/Dull color */
    font-weight: normal;
}

.new-badge {
    background: var(--warning);
    color: var(--fixed-white);
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    animation: blink 1s infinite;
}

.post-list li a:visited .new-badge {
    opacity: 0.5;
}

@keyframes blink {
    50% { opacity: 0.5; }
}

/* Load More Button */
.load-more-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-top: 10px;
    background: var(--primary);
    color: var(--fixed-white);
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
}

/* DESKTOP VIEW */
@media (min-width: 769px) {
    .mobile-layout { display: none; }

    .desktop-top-nav {
        background: var(--card-bg);
        padding: 15px 20px;
        margin-bottom: 20px;
        box-shadow: 0 2px 5px var(--overlay-bg);
        display: flex;
        gap: 20px;
    }

    .desktop-top-nav a {
        font-weight: bold;
        color: var(--text-light);
    }

    .desktop-top-nav a.active,
    .desktop-top-nav a:hover {
        color: var(--primary-text);
    }

    .desktop-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* 3 columns */
        gap: 20px;
    }

    /* Card ka layout fix */
    .grid-card {
        background: var(--card-bg);
        border-radius: 8px;
        border: 1px solid var(--border);
        display: flex;
        flex-direction: column;
        height: auto;      /* Height ab content ke hisaab se badhegi */
    }

    .grid-card.tall {min-height: 450px;}
    .grid-card.short {min-height: 300px;}



    /* Row-wise equal height ka magic (Grid item apne aap stretch honge) */
    .desktop-grid {
        align-items: stretch; 
    }

    .card-head {
        background: var(--primary);
        padding: 12px;
        font-weight: bold;
        border-bottom: 2px solid var(--primary);
        border-radius: 8px 8px 0 0;
        color: var(--fixed-white);
        text-align: center;
        flex-shrink: 0; /* Header nahi dabega */
    }

    .see-more {
        display: block;
        text-align: center;
        padding: 10px;
        background: var(--card-bg);
        font-weight: bold;
        border-top: 1px solid var(--border);
        border-radius: 0 0 8px 8px;
        color: var(--primary-text);
        margin-top: auto; /* Footer hamesha niche rahega */
    }

    .post-list {
        overflow-y: visible; /* Scroll hata kar height auto ki */
    }
}

/* MOBILE VIEW */
@media (max-width: 768px) {
    .desktop-layout, .desktop-top-nav { display: none; }

    .mobile-tab-scroll {
        display: flex;
        overflow-x: auto;
        background: var(--card-bg);
        position: sticky;
        top: 55px;
        z-index: 90;
        margin: -15px -15px 15px -15px;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 2px 4px var(--overlay-bg);
    }

    .mobile-tab-scroll::-webkit-scrollbar { display: none; }

    .m-tab {
        flex: 0 0 auto;
        background: none;
        border: none;
        padding: 15px 20px;
        font-size: 1rem;
        font-weight: 600;
        color: var(--text-light);
        border-bottom: 3px solid transparent;
        cursor: pointer;
    }

    .m-tab.active {
        color: var(--primary-text);
        border-bottom-color: var(--primary);
    }

    .vp-panel {
        background: var(--card-bg);
        padding: 10px;
        border-radius: 8px;
        box-shadow: 0 2px 5px var(--overlay-bg);
    }
}