/* ===== מבנה הכרטיס ===== */
.camera-card {
    position: relative;
    overflow: visible; /* ✅ חשוב! */
}

/* ===== YouTube Lazy Container ===== */
.youtube-lazy {
    position: relative; /* חשוב שיהיה מיקום יחסית ל-overlay */
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    cursor: pointer;
    background: #000;
}
.youtube-lazy img {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    object-fit: cover;
}

/* ===== כפתור Play ===== */
.youtube-lazy .play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    background: rgba(255, 0, 0, 0.8);
    border-radius: 12px;
    transition: background 0.3s;
    z-index: 10;
    pointer-events: auto;
    cursor: pointer;
}

.youtube-lazy:hover .play-button {
    background: rgba(255, 0, 0, 1);
}

.youtube-lazy .play-button:before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-40%, -50%);
    border-style: solid;
    border-width: 11px 0 11px 19px;
    border-color: transparent transparent transparent #fff;
}

/* ===== iframe YouTube ===== */
.youtube-lazy iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
}

/* ===== Ad Overlay - מחוץ ל-youtube-lazy ===== */
.ad-overlay {
    position: absolute; /* לא fixed */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 15; /* מעל הוידאו */
    display: none;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.ad-overlay.show {
    display: flex !important;
    pointer-events: auto;
}

/* ===== כפתור סגירה ===== */
.close-ad {
    top: 25%;
    right: 23%;
    position: absolute;
    background: #333;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    z-index: 11;
    font-weight: bold;
    transition: all 0.2s ease;
}

.close-ad:hover {
    background: #e74c3c;
    transform: scale(1.1);
}

/* ===== מובייל ===== */
@media (max-width: 768px) {    
    .close-ad {
        top: 15%;
        right: 5%;
        width: 20px;
        height: 20px;
        font-size: 15px;
    }
}


.card .play-button {
    position: absolute;
    top: 50%;                   
    left: 50%;                 
    transform: translate(-50%, -50%); 
    width: 68px;
    height: 48px;
    background: rgba(255,0,0,0.8);
    border-radius: 12px;
    z-index: 10;                
    pointer-events: auto;       
    cursor: pointer;            
}