/* GNBD YouTube Gallery Styles */
.gnbd-yt-gallery-wrapper {
    width: 100%;
    margin: 20px 0;
    box-sizing: border-box;
}

.gnbd-yt-grid {
    display: grid;
    gap: 20px;
}

/* Grid Columns Responsive */
.gnbd-cols-1 { grid-template-columns: repeat(1, 1fr); }
.gnbd-cols-2 { grid-template-columns: repeat(2, 1fr); }
.gnbd-cols-3 { grid-template-columns: repeat(3, 1fr); }
.gnbd-cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) {
    .gnbd-cols-3, .gnbd-cols-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 600px) {
    .gnbd-cols-2, .gnbd-cols-3, .gnbd-cols-4 { grid-template-columns: repeat(1, 1fr); }
}

/* Card Styling */
.gnbd-yt-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.gnbd-yt-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Thumbnail Overlay */
.gnbd-yt-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background-color: #000;
    cursor: pointer;
    overflow: hidden;
}

.gnbd-yt-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.3s ease;
}

.gnbd-yt-card:hover .gnbd-yt-thumbnail img {
    transform: scale(1.05);
    opacity: 0.9;
}

.gnbd-yt-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 54px;
    height: 54px;
    background: rgba(255, 0, 0, 0.85);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    transition: background 0.3s ease, transform 0.3s ease;
}

.gnbd-yt-play-btn svg {
    width: 24px;
    height: 24px;
    fill: #ffffff;
    margin-left: 3px;
}

.gnbd-yt-card:hover .gnbd-yt-play-btn {
    background: #ff0000;
    transform: translate(-50%, -50%) scale(1.1);
}

/* Content Area */
.gnbd-yt-content {
    padding: 15px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex-grow: 1;
}

.gnbd-yt-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    margin: 0 0 10px 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.gnbd-yt-title a {
    color: #222222;
    text-decoration: none;
    transition: color 0.2s ease;
}

.gnbd-yt-title a:hover {
    color: #ff0000;
}

.gnbd-yt-date {
    font-size: 12px;
    color: #777777;
}

/* Lightbox Modal */
.gnbd-yt-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999999;
}

.gnbd-yt-modal.active {
    display: flex;
}

.gnbd-yt-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
}

.gnbd-yt-modal-container {
    position: relative;
    width: 90%;
    max-width: 800px;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.gnbd-yt-modal-close {
    position: absolute;
    top: 10px;
    right: 15px;
    background: transparent;
    border: none;
    color: #ffffff;
    font-size: 32px;
    cursor: pointer;
    z-index: 2;
    line-height: 1;
}

.gnbd-yt-modal-body {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
}

.gnbd-yt-modal-body iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}