/**
 * VMedios Integración - Frontend Styles
 * Estilos para la visualización de contenido integrado
 */

/* ====================
   ESTILOS GENERALES
   ==================== */

.vmedios-slider-container,
.vmedios-grid-container,
.vmedios-poster-grid-container,
.vmedios-latest-container {
    margin: 20px 0;
    width: 100%;
}

/* ====================
   GRID CAROUSEL (HORIZONTAL)
   ==================== */

.vmedios-grid-carousel-container {
    position: relative;
    margin: 20px 0;
}

.vmedios-grid-carousel-container .swiper {
    padding: 0 50px;
}

.vmedios-grid-carousel-container .swiper-button-next,
.vmedios-grid-carousel-container .swiper-button-prev {
    color: white;
    background: rgba(0, 0, 0, 0.6);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.vmedios-grid-carousel-container .swiper-button-next:hover,
.vmedios-grid-carousel-container .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.vmedios-grid-carousel-container .swiper-button-next {
    right: 0;
}

.vmedios-grid-carousel-container .swiper-button-prev {
    left: 0;
}

/* ====================
   GRID HORIZONTAL
   ==================== */

.vmedios-grid-container {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns, 3), 1fr);
    gap: 20px;
    margin: 20px 0;
}

.vmedios-grid-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vmedios-grid-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.vmedios-grid-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.vmedios-grid-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/9;
    background: #000;
}

.vmedios-grid-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.vmedios-grid-item:hover .vmedios-grid-image img {
    transform: scale(1.08);
}

.vmedios-grid-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    padding: 20px 15px 15px 15px;
    color: white;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.vmedios-grid-category {
    display: inline-block;
    background: #e74c3c;
    color: white;
    padding: 5px 14px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 8px;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    align-self: flex-start;
}

.vmedios-grid-overlay h4 {
    margin: 0 0 6px 0;
    font-size: 16px;
    line-height: 1.3;
    font-weight: 700;
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.vmedios-grid-overlay .vmedios-date {
    font-size: 12px;
    opacity: 0.9;
    margin: 0;
    color: white;
}

/* ====================
   POSTER CAROUSEL (VERTICAL)
   ==================== */

.vmedios-poster-carousel-container {
    position: relative;
    margin: 20px 0;
}

.vmedios-poster-carousel-container .swiper {
    padding: 0 50px;
}

.vmedios-poster-carousel-container .swiper-button-next,
.vmedios-poster-carousel-container .swiper-button-prev {
    color: white;
    background: rgba(0, 0, 0, 0.7);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.vmedios-poster-carousel-container .swiper-button-next:hover,
.vmedios-poster-carousel-container .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.vmedios-poster-carousel-container .swiper-button-next {
    right: 0;
}

.vmedios-poster-carousel-container .swiper-button-prev {
    left: 0;
}

/* ====================
   GRID POSTER VERTICAL
   ==================== */

.vmedios-poster-grid-container {
    display: grid;
    grid-template-columns: repeat(var(--grid-columns, 4), 1fr);
    gap: 20px;
    margin: 20px 0;
}

.vmedios-poster-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background: #1a1a1a;
}

.vmedios-poster-item:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.vmedios-poster-item a {
    display: block;
    text-decoration: none;
    color: inherit;
}

.vmedios-poster-image {
    position: relative;
    aspect-ratio: 2/3;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.vmedios-poster-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.vmedios-poster-item:hover .vmedios-poster-image img {
    transform: scale(1.1);
}

.vmedios-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.vmedios-poster-item:hover .vmedios-play-overlay {
    opacity: 1;
}

.vmedios-play-icon {
    font-size: 56px;
    color: white;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
    transform: scale(1);
    transition: transform 0.3s ease;
}

.vmedios-poster-item:hover .vmedios-play-icon {
    transform: scale(1.15);
}

.vmedios-poster-content {
    padding: 15px 12px;
    background: linear-gradient(to bottom, #1a1a1a 0%, #0d0d0d 100%);
    min-height: 70px;
    display: flex;
    align-items: center;
}

.vmedios-poster-content h4 {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
    color: #ffffff;
    font-weight: 600;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.vmedios-poster-category {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #e74c3c;
    color: white;
    padding: 6px 14px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
    z-index: 2;
    transition: all 0.3s ease;
}

.vmedios-poster-item:hover .vmedios-poster-category {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

/* ====================
   LATEST LIST
   ==================== */

.vmedios-latest-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.vmedios-latest-item {
    display: flex;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.vmedios-latest-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.vmedios-latest-item a {
    display: flex;
    width: 100%;
    text-decoration: none;
    color: inherit;
}

.vmedios-latest-image {
    flex: 0 0 200px;
    overflow: hidden;
}

.vmedios-latest-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    aspect-ratio: 16/9;
}

.vmedios-latest-item:hover .vmedios-latest-image img {
    transform: scale(1.1);
}

.vmedios-latest-content {
    flex: 1;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.vmedios-latest-content h3 {
    margin: 0 0 10px 0;
    font-size: 18px;
    line-height: 1.4;
    color: #333;
}

.vmedios-latest-content .vmedios-date {
    color: #666;
    font-size: 12px;
    margin-bottom: 10px;
}

.vmedios-latest-content .vmedios-excerpt {
    color: #666;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 10px;
    flex: 1;
}

.vmedios-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: auto;
}

.vmedios-category {
    background: #f0f0f0;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    color: #666;
}

/* ====================
   TIMECASTV PLAYER
   ==================== */

/* Responsive Player */
.vmedios-timecast-responsive {
    width: 100%;
    margin: 20px 0;
}

.vmedios-timecast-responsive .vmedios-iframe-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.vmedios-timecast-responsive iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Fixed Player */
.vmedios-timecast-fixed {
    margin: 20px auto;
}

.vmedios-timecast-fixed iframe {
    display: block;
    border: 0;
}

/* Sidebar Player */
.vmedios-timecast-sidebar {
    width: 100%;
    margin: 20px 0;
}

.vmedios-timecast-sidebar .vmedios-iframe-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
}

.vmedios-timecast-sidebar iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

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

@media (max-width: 1200px) {
    .vmedios-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .vmedios-poster-grid-container {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .vmedios-slide-content {
        height: 350px;
    }
}

@media (max-width: 992px) {
    .vmedios-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .vmedios-poster-grid-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .vmedios-slide-content {
        height: 320px;
    }
    
    .vmedios-slide-overlay h3 {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .vmedios-latest-item {
        flex-direction: column;
    }
    
    .vmedios-latest-image {
        flex: 0 0 auto;
        width: 100%;
    }
    
    .vmedios-grid-container {
        grid-template-columns: repeat(1, 1fr);
    }
    
    .vmedios-poster-grid-container {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
    
    .vmedios-slide-content {
        height: 280px;
    }
    
    .vmedios-slide-overlay {
        padding: 20px 15px 20px 15px;
        min-height: 110px;
    }
    
    .vmedios-slide-overlay h3 {
        font-size: 16px;
    }
    
    .vmedios-date {
        font-size: 11px;
    }
    
    .vmedios-poster-content h4 {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .vmedios-poster-grid-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .vmedios-grid-content h4 {
        font-size: 14px;
    }
    
    .vmedios-latest-content h3 {
        font-size: 16px;
    }
    
    .vmedios-slide-content {
        height: 240px;
    }
    
    .vmedios-slide-overlay {
        padding: 15px 12px;
        min-height: 90px;
    }
    
    .vmedios-slide-overlay h3 {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .vmedios-slide-category {
        font-size: 9px;
        padding: 3px 8px;
        margin-bottom: 6px;
    }
    
    .vmedios-poster-content {
        padding: 10px 8px;
        min-height: 60px;
    }
    
    .vmedios-poster-content h4 {
        font-size: 12px;
    }
    
    .vmedios-play-icon {
        font-size: 40px;
    }
}
