/* YouTube Videos Page Styles */

body.page-template-template-youtube-videos .content-area { 
    width: 100% !important;
    float: left;
    margin-right: 0;  
}

.youtube-videos-container {
  
}

.youtube-videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

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

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

.video-thumbnail-container {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.video-thumbnail {
    position: relative;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

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

.video-thumbnail:hover img {
    transform: scale(1.05);
}

.play-button-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.play-button-overlay:hover {
    background: rgba(0, 0, 0, 0.5);
}

.play-button {
    width: 60px;
    height: 60px;
    background: #ff0000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease, background 0.3s ease;
}

.play-button:hover {
    transform: scale(1.1);
    background: #cc0000;
}

.play-button i {
    color: white;
    font-size: 20px;
    margin-left: 3px;
}

.video-content {
    padding: 20px;
}

.video-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.4;
}

.video-description {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
    margin-bottom: 10px;
}

.video-date {
    font-size: 12px;
    color: #999;
    font-style: italic;
}

.no-videos-message {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

/* Modal Styles */
.youtube-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    position: relative;
    background-color: #fff;
    margin: 5% auto;
    padding: 20px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    top:112px;
}

.close-modal {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
    z-index: 1000;
    transition: color 0.3s ease;
}

.close-modal:hover {
    color: #000;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    margin-bottom: 15px;
}

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

#modal-video-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .youtube-videos-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .video-thumbnail-container {
        height: 180px;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 15px;
    }
    
    .play-button {
        width: 50px;
        height: 50px;
    }
    
    .play-button i {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .youtube-videos-container {
        padding: 15px;
    }
    
    .video-content {
        padding: 15px;
    }
    
    .video-title {
        font-size: 16px;
    }
}
