/* === FEATURED CHANNELS PAGE STYLES === */

/* Page Layout */
.pp-channel-page-layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    padding: 0 8.33vw;
    min-height: calc(100vh - 150px);
}

.pp-channel-main-content {
    min-width: 0;
}

/* Featured Channels Section */
.pp-featured-channels-section {
    padding: 25px 0 40px 0;
    min-height: calc(100vh - 70px);
}

.pp-featured-channels-container {
    padding: 0 30px;
}

/* Channel Block */
.pp-featured-channel-block {
    margin-bottom: 20px;
}

/* Channel Header */
.pp-featured-channel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.pp-featured-channel-left {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
}

.pp-featured-channel-name {
    font-family: 'Open Sans', sans-serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 30px;
    color: var(--text);
    margin: 0;
    text-transform: uppercase;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Subscribe Button - small */
.pp-subscribe-btn {
    padding: 5px 30px;
    font-family: 'Open Sans', sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #FFFFFF;
    background: var(--primary);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pp-subscribe-btn:hover {
    background: var(--primary-2);
}

.pp-subscribe-btn.pp-subscribed {
    color: var(--text);
    background: #b6c2d52e;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
}

.theme-dark .pp-subscribe-btn.pp-subscribed {
    background: #334159;
}

.pp-subscribe-btn.pp-subscribed:hover {
    background: #334159;
    box-shadow: 0 4px 4px 0 rgba(0, 0, 0, 0.25);
    color: #FFFFFF;
}

/* Browse All Link */
.pp-browse-all-link {
    font-family: 'Open Sans', sans-serif;
    font-size: 20px;
    font-weight: 400;
    line-height: 36px;
    color: #0C93F9;
    text-decoration: none;
    text-align: right;
    transition: color 0.2s ease;
}

.pp-browse-all-link:hover {
    color: #0A7AD4;
}

/* Videos Grid - Base (Desktop 1920+) */
.pp-featured-videos-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
}

/* Video Item */
.pp-featured-video-item {
    position: relative;
    width: 100%;
}

/* Hide extra videos by default on smaller screens */
.pp-featured-video-item:nth-child(n+6) {
    display: none;
}

.pp-featured-video-card {
    display: block;
    text-decoration: none;
}

/* Video Thumbnail */
.pp-featured-video-thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 236 / 160;
    border-radius: 5px;
    overflow: hidden;
    background: var(--surface);
}

.pp-featured-video-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.pp-featured-video-card:hover .pp-featured-video-thumb img {
    transform: scale(1.05);
}

/* Hover Overlay */
.pp-featured-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(29, 29, 29, 0.00) 0%, rgba(1, 15, 41, 0.72) 80.79%);
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pp-featured-video-card:hover .pp-featured-video-overlay {
    opacity: 1;
}

.pp-featured-video-card:hover .pp-featured-video-thumb {
    border: 2px solid var(--video-card-hover-border);
    border-radius: 0;
}

/* Play Button */
.pp-featured-video-play {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pp-featured-video-play img {
    width: 40px;
    height: 40px;
}

/* Video Info */
.pp-featured-video-info {
    padding: 10px 0;
}

.pp-featured-video-title {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    font-weight: 400;
    color: var(--text);
    margin: 0 0 6px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-height: 1.4;
}

.pp-featured-video-meta {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    color: var(--muted);
}

/* === RESPONSIVE BREAKPOINTS === */

/* 2560+ Ultra Wide - 7 videos */
@media (min-width: 2560px) {
    .pp-featured-videos-grid {
        grid-template-columns: repeat(7, 1fr);
    }

    .pp-featured-video-item:nth-child(n+6) {
        display: block;
    }

    .pp-featured-video-item:nth-child(n+8) {
        display: none;
    }
}

/* 2200-2559 - 6 videos */
@media (min-width: 2200px) and (max-width: 2559px) {
    .pp-featured-videos-grid {
        grid-template-columns: repeat(6, 1fr);
    }

    .pp-featured-video-item:nth-child(n+6) {
        display: block;
    }

    .pp-featured-video-item:nth-child(n+7) {
        display: none;
    }
}

/* 1920-2199 - 5 videos */
@media (min-width: 1920px) and (max-width: 2199px) {
    .pp-featured-videos-grid {
        grid-template-columns: repeat(5, 1fr);
    }

    .pp-featured-video-item:nth-child(n+6) {
        display: none;
    }
}

/* 1440-1919 - 4 videos */
@media (min-width: 1440px) and (max-width: 1919px) {
    .pp-featured-videos-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .pp-featured-video-item:nth-child(n+5) {
        display: none;
    }
}

/* Layout padding - sync with header/breadcrumb */
@media (max-width: 1400px) {
    .pp-channel-page-layout {
        padding: 0 5.71vw;
    }
}

/* 1200-1439 - 4 videos */
@media (min-width: 1200px) and (max-width: 1439px) {
    .pp-featured-videos-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .pp-featured-video-item:nth-child(n+5) {
        display: none;
    }
}

/* Layout padding - sync with header/breadcrumb */
@media (max-width: 1200px) {
    .pp-channel-page-layout {
        padding: 0 3.33vw;
    }
}

/* 1024-1199 - 3 videos */
@media (min-width: 1024px) and (max-width: 1199px) {
    .pp-channel-page-layout {
        grid-template-columns: 220px 1fr;
    }

    .pp-featured-channels-container {
        padding: 0 20px;
    }

    .pp-featured-videos-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .pp-featured-video-item:nth-child(n+4) {
        display: none;
    }
}

/* 768-1023 Tablet - 2 videos */
@media (min-width: 768px) and (max-width: 1023px) {
    .pp-channel-page-layout {
        grid-template-columns: 200px 1fr;
    }

    .pp-featured-channels-container {
        padding: 0 16px;
    }

    .pp-featured-videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .pp-featured-video-item:nth-child(n+3) {
        display: none;
    }

    .pp-featured-channel-name {
        font-size: 20px;
    }

    .pp-browse-all-link {
        font-size: 16px;
    }
}

/* 576-767 - Sidebar hidden, 2 videos in row */
@media (min-width: 576px) and (max-width: 767px) {
    .pp-channel-page-layout {
        grid-template-columns: 1fr;
        padding: 0 18px;
    }

    .pp-featured-channels-section {
        padding: 20px 0 30px 0;
    }

    .pp-featured-channels-container {
        padding: 0;
    }

    .pp-featured-videos-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    /* Show only 2 videos */
    .pp-featured-video-item:nth-child(-n+2) {
        display: block;
    }

    .pp-featured-video-item:nth-child(n+3) {
        display: none;
    }

    .pp-featured-channel-header {
        flex-wrap: wrap;
        gap: 8px;
    }

    .pp-featured-channel-name {
        font-size: 18px;
    }

    .pp-browse-all-link {
        font-size: 14px;
    }
}

/* 426-575 Mobile - 3 videos stacked (1 column) */
@media (min-width: 426px) and (max-width: 575px) {
    .pp-channel-page-layout {
        grid-template-columns: 1fr;
        padding: 0 18px;
    }

    .pp-featured-channels-section {
        padding: 16px 0 24px 0;
    }

    .pp-featured-channels-container {
        padding: 0;
    }

    .pp-featured-channel-block {
        margin-bottom: 15px;
    }

    .pp-featured-channel-header {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 4px 8px;
        margin-bottom: 12px;
        align-items: start;
    }

    .pp-featured-channel-left {
        display: contents;
    }

    .pp-featured-channel-name {
        grid-column: 1;
        grid-row: 1;
        font-size: 18px;
        line-height: 1.3;
    }

    .pp-featured-channel-left .pp-subscribe-btn {
        grid-column: 1;
        grid-row: 2;
        width: fit-content;
    }

    .pp-browse-all-link {
        grid-column: 2;
        grid-row: 1;
        font-size: 14px;
        line-height: 1.5;
    }

    .pp-featured-videos-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    /* Show 3 videos on mobile */
    .pp-featured-video-item:nth-child(-n+3) {
        display: block;
    }

    .pp-featured-video-item:nth-child(n+4) {
        display: none;
    }

    .pp-featured-video-title {
        font-size: 13px;
    }

    .pp-featured-video-meta {
        font-size: 14px;
    }

    .pp-subscribe-btn {
        padding: 4px 16px;
        font-size: 12px;
    }
}

/* 375-425 Mobile Small - full width cards */
@media (max-width: 425px) {
    .pp-channel-page-layout {
        grid-template-columns: 1fr;
        padding: 0 18px;
    }

    .pp-featured-channels-section {
        padding: 16px 0 24px 0;
    }

    .pp-featured-channels-container {
        padding: 0;
    }

    .pp-featured-channel-block {
        margin-bottom: 15px;
    }

    .pp-featured-channel-header {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-rows: auto auto;
        gap: 4px 8px;
        margin-bottom: 12px;
        align-items: start;
    }

    .pp-featured-channel-left {
        display: contents;
    }

    .pp-featured-channel-name {
        grid-column: 1;
        grid-row: 1;
        font-size: 18px;
        line-height: 1.3;
    }

    .pp-featured-channel-left .pp-subscribe-btn {
        grid-column: 1;
        grid-row: 2;
        width: fit-content;
    }

    .pp-browse-all-link {
        grid-column: 2;
        grid-row: 1;
        font-size: 14px;
        line-height: 1.5;
    }

    .pp-featured-videos-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .pp-featured-video-item {
        width: 100%;
    }

    .pp-featured-video-thumb {
        width: 100%;
        height: 160px;
        aspect-ratio: unset;
    }

    /* Show 3 videos on mobile */
    .pp-featured-video-item:nth-child(-n+3) {
        display: block;
    }

    .pp-featured-video-item:nth-child(n+4) {
        display: none;
    }

    .pp-featured-video-title {
        font-size: 14px;
    }

    .pp-featured-video-meta {
        font-size: 14px;
    }

    .pp-subscribe-btn {
        padding: 5px 20px;
        font-size: 12px;
    }
}

/* === DISABLE HOVER ON TOUCH DEVICES === */
@media (hover: none), (pointer: coarse) {
    .pp-featured-video-card:hover .pp-featured-video-thumb img {
        transform: none;
    }

    .pp-featured-video-card:hover .pp-featured-video-overlay {
        opacity: 0;
    }

    .pp-featured-video-card:hover .pp-featured-video-thumb {
        border: none;
        border-radius: 5px;
    }
}