/* indyBlog V2 - Homepage grid + responsive video player */
.indy-v2-home .listcontent {
    padding-top: 34px;
    padding-bottom: 34px;
}

.indy-v2-grid {
    display: grid;
    gap: 22px 18px;
    width: 100%;
}

.indy-v2-grid--desktop-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.indy-v2-grid--desktop-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.indy-v2-grid--desktop-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.indy-v2-grid--desktop-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.indy-v2-card {
    min-width: 0;
    margin: 0;
    padding: 0;
}

.indy-v2-card__inner {
    position: relative;
    height: 100%;
    overflow: hidden;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .09);
    transition: transform .2s ease, box-shadow .2s ease;
}

.indy-v2-card__inner:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 22px rgba(0, 0, 0, .14);
}

.indy-v2-card__cover {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #eee;
}

.indy-v2-card__cover img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.indy-v2-card__inner:hover .indy-v2-card__cover img {
    transform: scale(1.045);
}

.indy-v2-card__tag {
    position: absolute;
    top: 9px;
    right: 9px;
    z-index: 2;
    max-width: calc(100% - 18px);
    padding: 4px 8px;
    overflow: hidden;
    border-radius: 4px;
    color: #fff !important;
    font-size: 11px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-decoration: none !important;
    opacity: .92;
}

.indy-v2-card__tag.tag--0 { background: #c0392b; }
.indy-v2-card__tag.tag--1 { background: #d35400; }
.indy-v2-card__tag.tag--2 { background: #2980b9; }
.indy-v2-card__tag.tag--3 { background: #8e44ad; }
.indy-v2-card__tag.tag--4 { background: #16a085; }

.indy-v2-card__body {
    padding: 11px 12px 10px;
}

.indy-v2-card__title {
    display: -webkit-box;
    min-height: 2.7em;
    margin: 0 0 9px;
    overflow: hidden;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.indy-v2-card__title a {
    color: #203994;
    text-decoration: none;
}

.indy-v2-card__title a:hover {
    color: #3d59ba;
}

.indy-v2-card__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #999;
    font-size: 11px;
    line-height: 1.2;
}

.indy-v2-pagination {
    margin-top: 30px;
}

/* Video iframe field on single post */
.indy-v2-video-player {
    position: relative;
    width: 100%;
    margin: 20px 0 24px;
    overflow: hidden;
    border-radius: 8px;
    background: #000;
    box-shadow: 0 3px 18px rgba(0, 0, 0, .16);
    aspect-ratio: 16 / 9;
}

.indy-v2-video-player iframe {
    position: absolute;
    inset: 0;
    display: block;
    width: 100% !important;
    height: 100% !important;
    border: 0;
}

/* Also make iframes pasted directly into post content responsive. */
.article__content iframe {
    max-width: 100%;
}

@media (max-width: 991px) {
    .indy-v2-grid {
        gap: 18px 14px;
    }
    .indy-v2-grid--desktop-5,
    .indy-v2-grid--desktop-6 {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .indy-v2-home .listcontent {
        padding-top: 18px;
        padding-left: 9px;
        padding-right: 9px;
    }

    .indy-v2-grid {
        gap: 14px 7px;
    }

    .indy-v2-grid--mobile-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .indy-v2-grid--mobile-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

    .indy-v2-card__inner {
        border-radius: 5px;
        box-shadow: 0 1px 6px rgba(0, 0, 0, .10);
    }

    .indy-v2-card__cover {
        aspect-ratio: 3 / 4;
    }

    .indy-v2-card__body {
        padding: 7px 6px 6px;
    }

    .indy-v2-card__title {
        min-height: 2.7em;
        margin-bottom: 6px;
        font-size: 11px;
        line-height: 1.35;
    }

    .indy-v2-card__meta {
        justify-content: flex-end;
        font-size: 10px;
    }

    .indy-v2-card__date {
        display: none;
    }

    .indy-v2-card__tag {
        top: 5px;
        right: 5px;
        padding: 3px 5px;
        max-width: calc(100% - 10px);
        font-size: 8px;
    }

    .indy-v2-video-player {
        margin-top: 14px;
        margin-bottom: 18px;
        border-radius: 5px;
    }
}

@media (max-width: 360px) {
    .indy-v2-grid--mobile-3 {
        gap: 12px 5px;
    }
    .indy-v2-card__title {
        font-size: 10px;
    }
    .indy-v2-card__views {
        font-size: 9px;
    }
}
