/* Estilos para los videos de fondo en los servicios */
.service-block {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    transition: transform 0.5s ease;
    background-color: rgba(20, 20, 20, 0.9); /* Fondo sutil mientras carga el video */
}

.service-video {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: cover;
    top: 0;
    left: 0;
    z-index: 0;
    transition: transform 0.5s ease, opacity 0.3s ease;
    opacity: 0; /* Inicia invisible hasta que cargue */
    background-color: transparent;
}

/* Video cargado y listo para reproducir */
.service-video[data-loaded="true"] {
    opacity: 1;
}

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    transition: background 0.3s ease;
}

.service-content {
    position: relative;
    z-index: 2;
}

/* Efecto hover para los bloques con video */
.service-block:hover .service-video {
    transform: scale(1.05);
}

.service-block:hover .service-overlay {
    background: rgba(0, 0, 0, 0.4);
}

/* Ajustes responsivos */
@media (max-width: 768px) {
    .service-video {
        object-position: center;
    }
}

@media (max-width: 480px) {
    .service-block {
        height: auto;
        min-height: 250px;
    }
}
