﻿.video-hover-container {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    aspect-ratio: 16 / 9; /* 動画の縦横比に合わせて調整 */
}

.video-hover-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 12px rgba(0,0,0,0.2);
}

.thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* 画像を枠にフィットさせる */
    display: block;
    transition: opacity 0.3s ease;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    background: #000;
    z-index: 1; /* ボタンより下に */
}

    .video-overlay iframe {
        width: 100%;
        height: 100%;
        border: none;
        position: relative;
        z-index: 1;
    }

.video-hover-container:hover .thumbnail-img {
    opacity: 0;
}

.video-overlay iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(255, 0, 0, 0.8);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    transition: background 0.3s ease;
}

.video-hover-container:hover .play-icon {
    opacity: 0;
}

.play-icon::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 25px solid white;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    margin-left: 5px;
}

.unmute-button {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.7);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    z-index: 1001; /* video-overlayより上に */
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.2s ease, background 0.2s ease;
    pointer-events: none;
    color: white;
}

.video-hover-container:hover .unmute-button {
    opacity: 1;
    pointer-events: auto;
}

.unmute-button:hover {
    background: rgba(0, 0, 0, 0.9);
    transform: scale(1.1);
}

.unmute-button:active {
    transform: scale(0.95);
}