/* YouTube Video Grid Styles */
.youtube-videos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
    padding: 2rem 0;
}

.youtube-channel-title {
    grid-column: 1 / -1;
    font-size: 2.55rem;
    margin: 0 0 1.5rem 0;
}

.youtube-channel-title a {
    color: inherit;
    text-decoration: none;
}

.youtube-channel-title a:hover {
    color: #ff0000;
}

/* Video Card */
.youtube-video-card {
    background: #232323;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.youtube-video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

/* Thumbnail */
.video-thumbnail {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    overflow: hidden;
    cursor: pointer;
}

.video-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: opacity 0.3s;
}

/* Play Button */
.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.7);
    opacity: 0.85;
    transition: opacity 0.2s, transform 0.2s;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 2;
}

.video-thumbnail:hover .play-button {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.8);
}

/* Duration Badge */
.video-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: 600;
    z-index: 2;
}

/* Video Info */
.video-info {
    padding: 1rem;
}

.video-title {
    font-size: 2rem;
    line-height: 1.4;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
    color: #ffffff;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Meta Info */
.video-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: #cecbcb;
    margin-bottom: 0.5rem;
}

/* Description */
.video-description {
    font-size: 0.875rem;
    color: #ffffff;
    line-height: 1.5;
    margin: 0.5rem 0;
}

/* YouTube Link */
.youtube-link {
    display: inline-block;
    color: #eb1e03;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.5rem;
}

.youtube-link:hover {
    text-decoration: underline;
}

/* ================================
   MODAL / LIGHTBOX STYLES
   ================================ */

.youtube-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}

.youtube-modal.active {
    display: flex;
}

.youtube-modal-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    cursor: pointer;
}

.youtube-modal-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    z-index: 10000;
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.youtube-modal-player {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.youtube-modal-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.youtube-modal-close {
    position: absolute;
    top: -50px;
    right: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 3rem;
    line-height: 1;
    cursor: pointer;
    padding: 0;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.2s;
}

.youtube-modal-close:hover {
    opacity: 0.7;
}

/* Responsive Modal */
@media (max-width: 768px) {
    .youtube-modal-content {
        width: 95%;
        padding: 0 10px;
    }
    
    .youtube-modal-close {
        top: -40px;
        font-size: 2rem;
        width: 40px;
        height: 40px;
    }
}

/* Responsive Grid */
@media (max-width: 768px) {
    .youtube-videos {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        padding: 1rem 0;
    }
    
    .video-info {
        padding: 0.75rem;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .youtube-videos {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1400px) {
    .youtube-videos {
        grid-template-columns: repeat(3, 1fr);
    }
}