/**
 * Hero Grid Style
 * 4-6 equal sized video cards
 * 
 * @package Polanger_VideoHub
 * @since 1.5.0
 */

/* =====================================================
   GRID STYLE HERO - Equal Sized Cards
   ===================================================== */

.pvh-hero-grid-style {
    height: auto;
    min-height: auto;
    max-height: none;
}

.pvh-hero-grid-style .pvh-hero-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 0 20px;
}

.pvh-hero-grid-style .pvh-hero-card {
    position: relative;
    display: block;
    overflow: hidden;
    border-radius: 12px;
    text-decoration: none;
    height: 220px;
}

/* Backdrop styles */
.pvh-hero-grid-style .pvh-hero-card .pvh-hero-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.pvh-hero-grid-style .pvh-hero-card .pvh-hero-backdrop img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.pvh-hero-grid-style .pvh-hero-card:hover .pvh-hero-backdrop img {
    transform: scale(1.05);
}

/* Gradient styles */
.pvh-hero-grid-style .pvh-hero-card .pvh-hero-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 50%, transparent 100%);
}

/* Video icon badge */
.pvh-hero-grid-style .pvh-hero-video-icon {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 4;
    background: rgba(0, 0, 0, 0.5);
    padding: 5px 7px;
    border-radius: 4px;
    opacity: 0.7;
    transition: opacity 0.2s;
}

.pvh-hero-grid-style .pvh-hero-card:hover .pvh-hero-video-icon {
    opacity: 1;
}

.pvh-hero-grid-style .pvh-hero-video-icon .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
    color: rgba(255, 255, 255, 0.9);
}

/* Content styles */
.pvh-hero-grid-style .pvh-hero-card .pvh-hero-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 16px;
    z-index: 3;
}

.pvh-hero-grid-style .pvh-hero-category {
    display: inline-block;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--pvh-primary-color, #ff0000);
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.pvh-hero-grid-style .pvh-hero-card .pvh-hero-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    margin: 0 0 6px 0;
    color: #fff !important;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.pvh-hero-grid-style .pvh-hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
}

.pvh-hero-grid-style .pvh-hero-separator {
    color: rgba(255, 255, 255, 0.5);
}

/* Play overlay on hover */
.pvh-hero-grid-style .pvh-hero-card .pvh-hero-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 5;
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.pvh-hero-grid-style .pvh-hero-card:hover .pvh-hero-play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.pvh-hero-grid-style .pvh-hero-play-overlay .dashicons {
    font-size: 28px;
    width: 28px;
    height: 28px;
    color: #000;
    margin-left: 4px;
}

/* =====================================================
   RESPONSIVE - Grid Style
   ===================================================== */

@media screen and (max-width: 1024px) {
    .pvh-hero-grid-style .pvh-hero-card {
        height: 200px;
    }
    
    .pvh-hero-grid-style .pvh-hero-card .pvh-hero-title {
        font-size: 15px;
    }
}

@media screen and (max-width: 768px) {
    .pvh-hero-grid-style .pvh-hero-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        padding: 0 10px;
    }
    
    .pvh-hero-grid-style .pvh-hero-card {
        height: 160px;
    }
    
    .pvh-hero-grid-style .pvh-hero-card .pvh-hero-content {
        padding: 12px;
    }
    
    .pvh-hero-grid-style .pvh-hero-card .pvh-hero-title {
        font-size: 13px;
    }
    
    .pvh-hero-grid-style .pvh-hero-category {
        font-size: 9px;
        margin-bottom: 4px;
    }
    
    .pvh-hero-grid-style .pvh-hero-meta {
        font-size: 10px;
    }
    
    .pvh-hero-grid-style .pvh-hero-card .pvh-hero-play-overlay {
        width: 50px;
        height: 50px;
    }
    
    .pvh-hero-grid-style .pvh-hero-play-overlay .dashicons {
        font-size: 24px;
        width: 24px;
        height: 24px;
    }
}

@media screen and (max-width: 576px) {
    .pvh-hero-grid-style .pvh-hero-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
        padding: 0 5px;
    }
    
    .pvh-hero-grid-style .pvh-hero-card {
        height: 140px;
    }
    
    .pvh-hero-grid-style .pvh-hero-card .pvh-hero-content {
        padding: 10px;
    }
    
    .pvh-hero-grid-style .pvh-hero-card .pvh-hero-title {
        font-size: 12px;
        -webkit-line-clamp: 2;
    }
    
    .pvh-hero-grid-style .pvh-hero-category {
        display: none;
    }
    
    .pvh-hero-grid-style .pvh-hero-meta {
        display: none;
    }
    
    .pvh-hero-grid-style .pvh-hero-card .pvh-hero-play-overlay {
        width: 40px;
        height: 40px;
    }
    
    .pvh-hero-grid-style .pvh-hero-play-overlay .dashicons {
        font-size: 20px;
        width: 20px;
        height: 20px;
    }
}
