/**
 * Niktel Realty — YouTube video thumbnail + lightbox.
 */

.niktel-video-thumb {
    position: relative;
    display: block;
    width: var(--niktel-video-w, 100%);
    aspect-ratio: 16 / 9;
    overflow: hidden;
    cursor: pointer;
    border-radius: 6px;
    background: #0a0a0a;
}

.niktel-video-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease, opacity 0.2s ease;
}

.niktel-video-thumb:hover img {
    transform: scale(1.03);
    opacity: 0.85;
}

.niktel-video-thumb:focus-visible {
    outline: 3px solid #2271b1;
    outline-offset: 2px;
}

.niktel-video-play {
    position: absolute;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: rgba(255, 0, 0, 0.88);
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
    transition: transform 0.2s ease, background 0.2s ease;
}
.niktel-video-play::before {
    content: '';
    position: absolute;
    inset: 50% auto auto 55%;
    transform: translate(-50%, -50%);
    border-style: solid;
    border-width: 14px 0 14px 22px;
    border-color: transparent transparent transparent #fff;
}
.niktel-video-thumb:hover .niktel-video-play,
.niktel-video-thumb:focus-visible .niktel-video-play {
    transform: translate(-50%, -50%) scale(1.1);
    background: rgba(255, 0, 0, 1);
}

/* === Lightbox overlay === */

.niktel-video-lock {
    overflow: hidden;
}

.niktel-video-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 32px;
    animation: niktel-fade 0.2s ease-out;
}

@keyframes niktel-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.niktel-video-modal {
    position: relative;
    width: 100%;
    max-width: 1280px;
    aspect-ratio: 16 / 9;
}

.niktel-video-iframe-wrap {
    width: 100%;
    height: 100%;
}

.niktel-video-iframe-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 6px;
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.6);
}

.niktel-video-close {
    position: absolute;
    top: -48px;
    right: -4px;
    width: 40px;
    height: 40px;
    font-size: 24px;
    line-height: 1;
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.2s ease;
}
.niktel-video-close:hover,
.niktel-video-close:focus-visible {
    background: #fff;
    color: #000;
    border-color: #fff;
    outline: none;
}

@media (max-width: 640px) {
    .niktel-video-overlay { padding: 16px; }
    .niktel-video-close { top: -44px; right: 0; }
}
