/* YouTube Feed Elementor Widget - CSS Completo Responsivo */
.youtube-feed-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin: 25px 0;
    max-width: 3440px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 20px;
    box-sizing: border-box;
}

.video-item {
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 3px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.video-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.video-item img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
}

.video-item h3 {
    margin: 15px;
    font-size: 15px;
    line-height: 1.4;
    color: #333;
    font-weight: 600;
}

.video-date {
    display: block;
    margin: 0 15px 15px;
    font-size: 12px;
    color: #666;
}

/* Modal Estilos */
.ytfeed-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.95);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.ytfeed-modal-content {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
}

.ytfeed-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
    background: rgba(0,0,0,0.5);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    transition: all 0.3s ease;
    line-height: 1;
}

.ytfeed-modal-close:hover {
    background: rgba(0,0,0,0.8);
    transform: rotate(90deg);
}

.ytfeed-iframe-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
}

.ytfeed-iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.ytfeed-video-title {
    color: #fff;
    text-align: center;
    margin: 15px 20px 0;
    font-size: 18px;
    line-height: 1.3;
    padding: 0 15px;
}

/* Mensajes de Error */
.ytfeed-error {
    padding: 15px;
    background: #ffecec;
    border: 1px solid #ffb3b3;
    color: #d80000;
    border-radius: 5px;
    margin: 20px 0;
    text-align: center;
}

/* Responsive Design */
@media (min-width: 1921px) {
    .youtube-feed-container {
        grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
        gap: 30px;
    }
    
    .video-item img {
        height: 180px;
    }
    
    .video-item h3 {
        font-size: 16px;
    }
    
    .ytfeed-modal-content {
        max-width: 1200px;
    }
}

@media (max-width: 1440px) {
    .youtube-feed-container {
        grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    }
}

@media (max-width: 1024px) {
    .ytfeed-modal-content {
        max-width: 90%;
    }
    
    .video-item h3 {
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .youtube-feed-container {
        grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
        gap: 20px;
    }
    
    .video-item img {
        height: 150px;
    }
}

@media (max-width: 767px) {
    .youtube-feed-container {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .video-item img {
        height: 140px;
    }
    
    .ytfeed-modal {
        padding: 10px;
    }
    
    .ytfeed-modal-content {
        border-radius: 8px;
    }
    
    .ytfeed-modal-close {
        top: 10px;
        right: 10px;
        font-size: 24px;
        width: 35px;
        height: 35px;
    }
    
    .ytfeed-video-title {
        font-size: 16px;
        margin: 10px 15px 0;
    }
}

@media (max-width: 480px) {
    .youtube-feed-container {
        padding: 0 15px;
    }
    
    .ytfeed-video-title {
        font-size: 14px;
        margin: 8px 10px 0;
    }
    
    .video-item h3 {
        margin: 10px;
        font-size: 14px;
    }
    
    .video-date {
        margin: 0 10px 10px;
        font-size: 11px;
    }
    
    .video-item img {
        height: 120px;
    }
}