/* Container Grid */
.ycg-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 columns on PC */
    gap: 20px;
    padding: 20px 0;
    box-sizing: border-box;
}

/* Card Style */
.ycg-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.ycg-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

/* Video Wrapper (Thumbnail) */
.ycg-video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 Aspect Ratio */
    height: 0;
    overflow: hidden;
    background-color: #000;
    cursor: pointer;
}

.ycg-video-wrapper img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: auto;
    min-height: 100%;
    object-fit: cover;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.ycg-video-wrapper:hover img {
    opacity: 1;
}

/* Play Button Overlay */
.ycg-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 40px;
    background-color: rgba(33, 33, 33, 0.8);
    border-radius: 10px;
    z-index: 2;
    transition: background-color 0.2s;
}

.ycg-video-wrapper:hover .ycg-play-icon {
    background-color: #f00;
    /* YouTube Red on hover */
}

.ycg-play-icon::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 10px 0 10px 16px;
    border-color: transparent transparent transparent #fff;
}

/* Content Area */
.ycg-content {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.ycg-title {
    margin: 0 0 10px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.ycg-description {
    font-size: 0.95rem;
    color: #666;
    line-height: 1.6;
}

.ycg-description p {
    margin-bottom: 10px;
}

.ycg-description p:last-child {
    margin-bottom: 0;
}

/* Modal Styles */
.ycg-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.ycg-modal.open {
    display: flex;
    opacity: 1;
}

.ycg-modal-content {
    position: relative;
    width: 90%;
    max-width: 960px;
    background-color: #000;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2);
    animation: ycg-zoom 0.3s;
}

@keyframes ycg-zoom {
    from {
        transform: scale(0.9)
    }

    to {
        transform: scale(1)
    }
}

.ycg-close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.ycg-close:hover,
.ycg-close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.ycg-modal-body {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 */
    height: 0;
    overflow: hidden;
}

.ycg-modal-body iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Responsive: Smartphone (1 column) */
@media (max-width: 768px) {
    .ycg-container {
        grid-template-columns: 1fr;
        /* 1 column on mobile */
    }
}