/* Mobile and narrow-screen fixes for the Layv/FIFA home page */

.home-sidebar,
.side-card,
.home-side-card {
    min-width: 0;
}

.news-list,
.popular-news-list {
    overflow: hidden;
}

.news-row,
.popular-news-row {
    min-width: 0;
}

.news-row h3,
.popular-news-row h3 {
    overflow-wrap: anywhere;
}

.news-thumb,
.popular-news-thumb {
    flex: 0 0 auto;
}

.news-thumb img,
.popular-news-thumb img {
    max-width: 100%;
}

@media (min-width: 821px) {
    .container {
        width: min(1180px, calc(100% - 32px));
    }

    .home-layout {
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 22px;
    }
}

@media (max-width: 820px) {
    .header-top {
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 12px;
    }

    .brand img {
        max-width: 172px;
    }

    .home-layout {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        padding-top: 8px;
    }

    .home-sidebar {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
        width: 100%;
    }

    .home-side-card {
        overflow: hidden;
        padding: 12px;
    }

    .home-live-grid {
        grid-template-columns: 1fr;
    }

    .live-score-row {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 8px !important;
        padding: 16px 0 !important;
    }

    .live-team {
        flex: 1 1 0 !important;
        display: inline-flex !important;
        align-items: center !important;
        gap: 6px !important;
        min-width: 0 !important;
        font-size: 15px !important;
        line-height: 1.2 !important;
        white-space: nowrap !important;
    }

    .live-team span {
        display: block !important;
        min-width: 0 !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .live-team--right {
        justify-content: flex-end !important;
        text-align: right !important;
    }

    .live-score {
        flex: 0 0 56px !important;
        min-width: 56px !important;
        padding: 8px 6px !important;
    }

    .home-live-score strong,
    .live-score,
    .finished-score {
        background: white !important;
        color: #25984a !important;
        border: 1px solid rgba(53, 173, 90, 0.36) !important;
        box-shadow: 0 7px 14px rgba(53, 173, 90, 0.12), 5px 0 12px rgba(53, 173, 90, 0.08), -5px 0 12px rgba(53, 173, 90, 0.08) !important;
    }

    .fixture-row {
        text-align: left;
    }

    .fixture-teams {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 8px;
        align-items: center;
    }

    .news-list,
    .popular-news-list {
        display: grid;
        gap: 0;
        margin-top: 10px;
    }

    .news-row,
    .popular-news-row {
        display: grid;
        grid-template-columns: 82px minmax(0, 1fr);
        gap: 10px;
        align-items: start;
        padding: 10px 0;
        border-bottom: 1px solid #edf0ef;
    }

    .news-thumb,
    .popular-news-thumb {
        display: block;
        width: 82px;
        height: 58px;
        overflow: hidden;
        border-radius: 4px;
        background: linear-gradient(135deg, #d7e7dc, #f3f5f4);
    }

    .news-thumb img,
    .popular-news-thumb img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .news-row h3,
    .popular-news-row h3 {
        margin: 0 0 6px;
        font-size: 13px;
        line-height: 1.32;
    }

    .news-row time,
    .popular-news-row small {
        display: block;
        color: var(--fanat-green);
        font-size: 12px;
        font-weight: 800;
    }
}

@media (max-width: 480px) {
    .container {
        width: min(100% - 20px, 1052px);
    }

    .home-section-head h1 {
        font-size: 24px;
    }

    .section-link {
        font-size: 13px;
    }

    .fixture-teams {
        font-size: 13px;
    }

    .live-score-row {
        gap: 6px !important;
    }

    .live-team {
        font-size: 14px !important;
    }

    .live-team .flag-img {
        width: 22px;
        height: 22px;
        flex: 0 0 22px;
    }

    .live-score {
        flex-basis: 52px !important;
        min-width: 52px !important;
        padding: 7px 5px !important;
    }

    .home-live-score strong,
    .live-score,
    .finished-score {
        background: white !important;
        color: #25984a !important;
        border: 1px solid rgba(53, 173, 90, 0.36) !important;
        box-shadow: 0 7px 14px rgba(53, 173, 90, 0.12), 5px 0 12px rgba(53, 173, 90, 0.08), -5px 0 12px rgba(53, 173, 90, 0.08) !important;
    }
}
