/* ========================================================================
   NEWS ARCHIVE – KARTICE (grid)
   ======================================================================== */

.integrator--news-archive {
    padding: 0 2vw;
}

.news-archive-header {
    margin-bottom: 0;
}

.news-archive-header h1 {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
}

.news-archive-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* ============================================================
   SVE KARTICE - ZAJEDNIČKI STILOVI
   ============================================================ */
.news-archive-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid #e0e0e0;
}

.news-archive-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.10);
}

/* ============================================================
   SLIKA (DEFAULT KARTICE)
   ============================================================ */
.news-archive-card__image {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #f5f5f5;
}

.news-archive-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.news-archive-card__image-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #e0e0e0, #f0f0f0);
}

/* ============================================================
   MATCH SADRŽAJ (INFO) - Meč u slim modu umesto slike
   ============================================================ */
.news-archive-card__match {
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    padding: 8px 12px;
    overflow: hidden;
    width: 100%;
}

/* SLIM MOD UNUTAR KARTICE - ISTI KAO NA STRANICI LIGE */
.news-archive-card__match .match-row--slim {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 8px;
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
}

.news-archive-card__match .match-row--slim .match-row__team {
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    min-width: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1a1a1a;
}

.news-archive-card__match .match-row--slim .match-row__team--home {
    justify-content: flex-end;
    text-align: right;
}

.news-archive-card__match .match-row--slim .match-row__team--away {
    justify-content: flex-start;
    text-align: left;
}

.news-archive-card__match .match-row--slim .match-row__team-name {
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 80px;
}

.news-archive-card__match .match-row--slim .match-row__team-logo {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 50%;
}

.news-archive-card__match .match-row--slim .match-row__score {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 35px;
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
}

.news-archive-card__match .match-row--slim .match-row__score-value {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
}

.news-archive-card__match .match-row--slim .match-row__score-time {
    font-size: 12px;
    font-weight: 600;
    color: #888;
}

.news-archive-card__match .match-row--slim .match-row__score-status {
    font-size: 10px;
    font-weight: 700;
    color: #e65100;
    text-transform: uppercase;
}

.news-archive-card__match .match-row--slim .match-row__elapsed {
    font-size: 11px;
    font-weight: 700;
    color: #d32f2f;
    background: #ffebee;
    padding: 0 8px;
    border-radius: 4px;
}

.news-archive-card__match .match-row--slim .match-row__live-badge {
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    background: #d32f2f;
    padding: 0 8px;
    border-radius: 4px;
    text-transform: uppercase;
    animation: pulse-live 2s ease-in-out infinite;
}

/* ============================================================
   MATCHDAY SADRŽAJ (INFO) - Header lige umesto slike
   ============================================================ */
.news-archive-card__matchday {
    aspect-ratio: 16 / 9;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    padding: 8px;
    overflow: hidden;
    width: 100%;
}

.news-archive-card__matchday .match-row__league {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
}

.news-archive-card__matchday .match-row__league-img {
    height: 32px;
    width: auto;
    object-fit: contain;
}

.news-archive-card__matchday .match-row__league-link {
    font-size: 14px;
    font-weight: 700;
    color: #1a1a1a;
    text-decoration: none;
}

.news-archive-card__matchday .match-row__league-link:hover {
    color: #1a73e8;
}

.news-archive-card__matchday .match-row__country {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: #666;
}

.news-archive-card__matchday .match-row__flag {
    height: 12px;
    width: auto;
    object-fit: contain;
}

.news-archive-card__matchday .match-row__round {
    font-size: 12px;
    color: #666;
    font-weight: 600;
}

/* ============================================================
   IZVOR I NASLOV - ZAJEDNIČKI ZA SVE KARTICE
   ============================================================ */
.news-archive-card__source {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px 4px 14px;
}

.news-archive-card__source-logo {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: contain;
    flex-shrink: 0;
    background: #f5f5f5;
}

.news-archive-card__source-logo-placeholder {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #d0d0d0;
    color: #666;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    text-transform: uppercase;
}

.news-archive-card__source-name {
    font-size: 13px;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-archive-card__title {
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    margin: 4px 14px 16px 14px;
    color: #1a1a1a;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ============================================================
   LOAD MORE DUGME
   ============================================================ */
.news-archive-load-more-wrapper {
    text-align: center;
    margin: 30px 0 20px 0;
}

.news-archive-load-more {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 32px;
    background: #1a73e8;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}

.news-archive-load-more:hover {
    background: #1557b0;
    transform: translateY(-2px);
}

.news-archive-load-more:active {
    transform: scale(0.97);
}

.news-archive-load-more .load-more-spinner {
    display: none;
}

.news-archive-load-more.loading .load-more-text {
    display: none;
}

.news-archive-load-more.loading .load-more-spinner {
    display: inline;
}

/* ---- KRAJ LISTE ---- */
.news-archive-end {
    text-align: center;
    padding: 20px 0 40px 0;
    color: #888;
    font-size: 14px;
}

.news-archive-end p {
    margin: 0;
}

/* ---- PRAZNO STANJE ---- */
.news-archive-empty {
    text-align: center;
    color: #999;
    padding: 40px 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
    .news-archive-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 18px;
    }
}

@media (max-width: 768px) {
    .news-archive-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }

    .news-archive-card__title {
        font-size: 14px;
        margin: 4px 12px 14px 12px;
    }

    .news-archive-card__source {
        padding: 10px 12px 2px 12px;
    }

    .news-archive-load-more {
        padding: 10px 24px;
        font-size: 14px;
    }

    .news-archive-card__match .match-row--slim .match-row__team {
        font-size: 11px;
    }
    
    .news-archive-card__match .match-row--slim .match-row__team-name {
        font-size: 11px;
        max-width: 60px;
    }
    
    .news-archive-card__match .match-row--slim .match-row__team-logo {
        width: 16px;
        height: 16px;
    }
    
    .news-archive-card__match .match-row--slim .match-row__score {
        font-size: 12px;
        min-width: 28px;
    }
    
    .news-archive-card__match .match-row--slim .match-row__score-value {
        font-size: 12px;
    }
    
    .news-archive-card__matchday .match-row__league-img {
        height: 26px;
    }
    
    .news-archive-card__matchday .match-row__league-link {
        font-size: 12px;
    }
    
    .news-archive-card__matchday .match-row__country {
        font-size: 10px;
    }
    
    .news-archive-card__matchday .match-row__round {
        font-size: 10px;
    }
}

@media (max-width: 480px) {
    .integrator--news-archive {
        padding: 0 4vw;
    }

    .news-archive-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .news-archive-card__title {
        font-size: 13px;
        margin: 2px 10px 12px 10px;
    }

    .news-archive-card__source {
        padding: 8px 10px 0 10px;
    }

    .news-archive-card__source-name {
        font-size: 11px;
    }

    .news-archive-card__source-logo {
        width: 20px;
        height: 20px;
    }

    .news-archive-card__source-logo-placeholder {
        width: 20px;
        height: 20px;
        font-size: 9px;
    }

    .news-archive-load-more {
        padding: 8px 18px;
        font-size: 13px;
        width: 100%;
        justify-content: center;
    }

    .news-archive-card__match {
        padding: 4px 6px;
    }
    
    .news-archive-card__match .match-row--slim .match-row__team {
        font-size: 10px;
        gap: 3px;
    }
    
    .news-archive-card__match .match-row--slim .match-row__team-name {
        font-size: 10px;
        max-width: 45px;
    }
    
    .news-archive-card__match .match-row--slim .match-row__team-logo {
        width: 14px;
        height: 14px;
    }
    
    .news-archive-card__match .match-row--slim .match-row__score {
        font-size: 11px;
        min-width: 24px;
    }
    
    .news-archive-card__match .match-row--slim .match-row__score-value {
        font-size: 11px;
    }
    
    .news-archive-card__matchday .match-row__league-img {
        height: 22px;
    }
    
    .news-archive-card__matchday .match-row__league-link {
        font-size: 11px;
    }
    
    .news-archive-card__matchday .match-row__country {
        font-size: 9px;
    }
    
    .news-archive-card__matchday .match-row__round {
        font-size: 9px;
    }
    
    .news-archive-card__matchday {
        padding: 4px;
    }
}