/* =====================================================
   Affiliate Video Grid - layout styled like kr-av.com
   Typography: Roboto | Accent: pink (#e91e63)
   ===================================================== */

@import url('https://fonts.googleapis.com/css?family=Roboto:400,500,700&display=swap');

/* === CONTAINER === */
.affiliate-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 15px;
    font-family: 'Roboto', Arial, sans-serif;
    background: #f5f5f5;
    box-sizing: border-box;
}

/* === HEADER === */
.affiliate-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e91e63;
}
.affiliate-header .section-title {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin: 0;
    text-transform: capitalize;
}
.affiliate-header .total-count {
    font-size: 13px;
    color: #888;
}

/* === VIDEO GRID (5-column flexbox) === */
.videos-grid {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -5px;
}

/* === VIDEO CARD === */
.video-card {
    width: 20%; /* 5 columns on desktop */
    padding: 5px;
    box-sizing: border-box;
    margin-bottom: 8px;
}
.video-card a {
    display: block;
    text-decoration: none;
    color: inherit;
    background: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.video-card a:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    transform: translateY(-2px);
}

/* === THUMBNAIL === */
.thumb-wrapper {
    position: relative;
    width: 100%;
    padding-top: 62.5%; /* 352x220 aspect ratio (~16:10) */
    overflow: hidden;
    background: #ddd;
}
.thumb-wrapper img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}
.video-card a:hover .thumb-wrapper img {
    transform: scale(1.05);
}

/* === DURATION BADGE === */
.duration {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: rgba(0, 0, 0, 0.78);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    padding: 3px 6px;
    border-radius: 3px;
    letter-spacing: 0.3px;
}

/* === VIDEO INFO === */
.video-info {
    padding: 8px 8px 10px;
}
.video-title {
    font-size: 13px;
    font-weight: 400;
    color: #333;
    margin: 0;
    line-height: 1.35;
    height: 2.7em; /* 2 lines */
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color 0.2s ease;
}
.video-card a:hover .video-title {
    color: #e91e63;
}

/* === TAGS === */
.video-tags {
    margin-top: 6px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}
.video-tags .tag {
    font-size: 10px;
    color: #777;
    background: #f0f0f0;
    padding: 2px 6px;
    border-radius: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* === NO CONTENT === */
.no-content {
    width: 100%;
    text-align: center;
    padding: 60px 20px;
    color: #888;
    font-size: 15px;
}

/* === PAGINATION === */
.pagination-wrapper {
    text-align: center;
    margin: 25px 0 35px;
}
.pagination-wrapper .pagination {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}
.pagination-wrapper .pagination li,
.pagination-wrapper .pagination .page-item {
    list-style: none;
}
.pagination-wrapper .pagination li a,
.pagination-wrapper .pagination li span,
.pagination-wrapper .pagination .page-link {
    display: block;
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: #333;
    background: #fff;
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
    transition: all 0.15s ease;
}
.pagination-wrapper .pagination li a:hover,
.pagination-wrapper .pagination .page-link:hover {
    background: #fce4ec;
    border-color: #e91e63;
    color: #e91e63;
}
.pagination-wrapper .pagination .active span,
.pagination-wrapper .pagination .active .page-link,
.pagination-wrapper .pagination .page-item.active .page-link {
    background: #e91e63;
    color: #fff;
    border-color: #e91e63;
}
.pagination-wrapper .pagination .disabled span,
.pagination-wrapper .pagination .disabled .page-link,
.pagination-wrapper .pagination .page-item.disabled .page-link {
    color: #bbb;
    background: #f5f5f5;
    cursor: not-allowed;
}

/* === RESPONSIVE === */
@media (max-width: 1200px) {
    .video-card { width: 25%; } /* 4 columns */
}
@media (max-width: 992px) {
    .video-card { width: 33.333%; } /* 3 columns */
}
@media (max-width: 768px) {
    .video-card { width: 50%; } /* 2 columns */
}
@media (max-width: 480px) {
    .video-card { width: 50%; }
    .affiliate-container { padding: 8px; }
    .video-title { font-size: 12px; }
    .pagination-wrapper .pagination li a,
    .pagination-wrapper .pagination li span,
    .pagination-wrapper .pagination .page-link { padding: 6px 10px; font-size: 13px; }
}
