/* Video container styling */
.video-container {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #000;
    border-radius: 4px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 20px;
}

/* Maintain 16:9 aspect ratio */
.video-container::before {
    content: "";
    display: block;
    padding-top: 56.25%; /* 16:9 aspect ratio */
}

/* Make videos responsive */
.responsive-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 4px;
    z-index: 1; /* Ensure video is above the background */
}

/* Portfolio videos specific styling */
.portfolio-video {
    object-fit: contain;
    background-color: #000;
}

/* Click area for capturing clicks */
.video-click-area {
    position: absolute;
    top: 0;
    left: 0;
    /* Reduce height to avoid the control bar area */
    width: 100%;
    height: 80%; /* Only cover the top portion of the video */
    z-index: 5; /* Below the play button overlay but above the video */
    background: transparent;
}

/* Red play arrow overlay */
.video-container .play-button-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10; /* Above the click area */
    opacity: 1;
    transition: opacity 0.3s ease;
    pointer-events: none; /* Allow clicks to pass through to elements below */
}

.play-button-overlay .play-button {
    pointer-events: auto; /* Make just the button clickable */
}

/* Video is playing, hide the overlay */
.video-container.playing .play-button-overlay {
    opacity: 0;
    pointer-events: none; /* Prevent clicks when hidden */
}

/* Red play button styling */
.play-button {
    width: 70px;
    height: 70px;
    background-color: rgba(0, 0, 0, 0.6);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
    position: relative;
    cursor: pointer; /* Add cursor pointer to indicate it's clickable */
}

/* Create triangle with pseudo-element */
.play-button::after {
    content: "";
    display: block;
    width: 0;
    height: 0;
    border-top: 15px solid transparent;
    border-bottom: 15px solid transparent;
    border-left: 25px solid #ff0000;
    margin-left: 5px; /* Center the triangle visually */
}

/* Hover effect */
.play-button:hover {
    transform: scale(1.1);
}

/* Force video controls to be visible */
video::-webkit-media-controls {
    opacity: 1 !important;
    visibility: visible !important;
}

video::-webkit-media-controls-panel {
    display: flex !important;
}

/* Always show controls when video is paused */
.video-container:not(.playing) video::-webkit-media-controls-panel {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Specifically target and ensure the fullscreen button is visible and clickable */
video::-webkit-media-controls-fullscreen-button {
    opacity: 1 !important;
    display: block !important;
    pointer-events: auto !important;
    visibility: visible !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .video-container {
        margin-bottom: 15px;
    }
    
    /* Smaller play button on mobile */
    .play-button {
        width: 50px;
        height: 50px;
    }
    
    .play-button::after {
        border-top: 10px solid transparent;
        border-bottom: 10px solid transparent;
        border-left: 18px solid #ff0000;
    }
}

@media (max-width: 480px) {
    .video-container {
        margin-bottom: 10px;
    }
    
    /* Even smaller play button on small mobile */
    .play-button {
        width: 40px;
        height: 40px;
    }
    
    .play-button::after {
        border-top: 8px solid transparent;
        border-bottom: 8px solid transparent;
        border-left: 14px solid #ff0000;
    }
}